/* =========================
    Ã°Å¸â€Â HEADER & NAVIGATION
   ========================= */
/* Ã—Â¢Ã—â„¢Ã—Â¦Ã—â€¢Ã—â€˜ Ã—â€Ã—Â¨Ã—Â§Ã—Â¢ Ã—â€Ã—â€™Ã—Å“Ã—â€¢Ã—â€˜Ã—Å“Ã—â„¢ Ã—Â©Ã—Å“ Ã—â€Ã—ÂÃ—ÂªÃ—Â¨ */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Ã—â€Ã—â€™Ã—Â¨Ã—â€œÃ—â„¢Ã—ÂÃ—Â Ã—Ëœ Ã—â€Ã—Å¾Ã—â€œÃ—â€¢Ã—â„¢Ã—Â§ Ã—Å¾Ã—â€Ã—ÂªÃ—Å¾Ã—â€¢Ã—Â Ã—â€: Ã—â€ºÃ—â€”Ã—â€¢Ã—Å“ Ã—â€ºÃ—â€Ã—â€ Ã—â€˜Ã—Â¦Ã—â€œÃ—â€œÃ—â„¢Ã—Â Ã—â€¢Ã—Å¾Ã—â€¢Ã—ÂÃ—Â¨ Ã—Å¾Ã—Â¢Ã—Ëœ Ã—â€˜Ã—Å¾Ã—Â¨Ã—â€ºÃ—â€“ */
    background: radial-gradient(circle, #4169e1 0%, #0f172a 100%);
    background-attachment: fixed; /* Ã—â€™Ã—â€¢Ã—Â¨Ã—Â Ã—Å“Ã—Â¨Ã—Â§Ã—Â¢ Ã—Å“Ã—Â Ã—Å“Ã—â€“Ã—â€¢Ã—â€“ Ã—â€˜Ã—â€™Ã—Å“Ã—â„¢Ã—Å“Ã—â€ */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

   .MainPageHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px clamp(10px, 4vw, 30px);
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%; 
}

.MainPageHeaderCenter {
    flex: 1;
    display: flex;
    justify-content: center;
}

.LeftLink, .RightLink, .CenterLink, .AnatomyLink {
    color: white;
    text-decoration: none;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    white-space: nowrap;
}

.LeftLink:hover, .CenterLink:hover, .RightLink:hover, .AnatomyLink:hover {
    color: #00bcd4;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.5);
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 3vh 5vw;
    width: 100%;
}

.title {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    font-size: clamp(20px, 4vw, 32px);
    margin: 4vh 0 2vh;
}

/* =========================
    Ã¢Å’Â¨Ã¯Â¸Â Ã—Â©Ã—â€œÃ—â€¢Ã—Âª Ã—Â§Ã—Å“Ã—Ëœ Ã—â€¢Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨Ã—â„¢Ã—Â
   ========================= */
input {
    padding: 12px 15px;
    margin: 1vh auto;
    width: 85%;
    max-width: 350px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    transition: 0.3s;
    display: block;
}

input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

button {
    padding: 12px 0;
    width: 85%;
    max-width: 250px;
    margin: 2vh auto; 
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s ease;
    display: block;
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* =========================
    Ã°Å¸â€œÂ NOTE BOX
   ========================= */
.note-box {
    margin: 5vh auto;
    padding: clamp(15px, 3vw, 25px);
    width: 90%;
    max-width: 700px;
    background: rgba(30, 41, 59, 0.4);
    border-left: 5px solid #facc15;
    border-radius: 12px;
    text-align: left;
    backdrop-filter: blur(10px);
    line-height: 1.6;
    font-size: clamp(14px, 2vw, 16px);
}

.note-box h3 { margin-top: 0; color: #facc15; }

hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 5vh auto; width: 60%; }

/* =========================
    Ã°Å¸â€“Â¼Ã¯Â¸Â Ã—Â¢Ã—â„¢Ã—Â¦Ã—â€¢Ã—â€˜ Ã—ÂªÃ—Å¾Ã—â€¢Ã—Â Ã—â€ Ã—â€™Ã—â€œÃ—â€¢Ã—Å“Ã—â€
   ========================= */
.HeaderImgContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5vh;
    padding: 0 5vw;
    width: 100%;
}

.HeaderImg {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 25px;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
    transition: transform 0.5s ease;
    margin-bottom: 20px;
}

.HeaderImg:hover {
    transform: scale(1.03);
}

/* =========================
    Ã¢Å¾â€¢ MUSCLE BAR
   ========================= */
.muscle-bar {
    display: flex;
    overflow-x: auto;
    width: 100%;
    max-width: 100vw;
    padding: 2vh clamp(10px, 3vw, 20px);
    gap: clamp(10px, 2vw, 20px);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.muscle-bar::-webkit-scrollbar { display: none; }

.muscle-item {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
    border-radius: 15px;
    min-width: clamp(70px, 15vw, 100px);
    text-decoration: none;
    color: white;
}

.muscle-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.muscle-icon {
    width: clamp(40px, 10vw, 70px);
    height: clamp(40px, 10vw, 70px);
    border-radius: 10px;
    margin-bottom: 5px;
    object-fit: cover;
}

.favorites-item { background: linear-gradient(135deg, #facc15, #f59e0b); color: black; font-weight: bold; }
.fav-icon { background: white; padding: 3px; }

/* =========================
    Ã¢Å¾â€¢ TRACKING GRID
   ========================= */
h1 {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: bold;
    padding: 0 15px;
    margin: 4vh 0;
}

.Images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(100px, 20vw, 150px), 1fr));
    gap: 15px;
    padding: clamp(10px, 3vw, 20px);
    width: 100%;
    max-width: 1000px;
}

.Images a { text-decoration: none; color: white; text-align: center; }
.Images img {
    width: 100%;
    height: clamp(80px, 12vw, 110px);
    object-fit: cover;
    border-radius: 12px;
    transition: 0.2s;
}

.label { font-size: clamp(12px, 1.5vw, 14px); margin-top: 8px; }

.ExercisesGuideLink {
    display: block;
    margin: 25px 15px;
    padding: clamp(14px, 2.5vw, 20px);
    text-align: center;
    font-size: clamp(13px, 1.8vw, 15px);
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 600px;
}

/* =========================
    Ã°Å¸â€“Â¼Ã¯Â¸Â BOTTOM IMAGE & SCROLL FIX
   ========================= */
.bottom-image {
    display: block;
    margin: 4vh auto 0 auto;
    width: 90%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
}

/* ============================================================
    Ã¢Å¾â€¢ Ã—ÂªÃ—â€¢Ã—Â¡Ã—Â¤Ã—Âª Ã—Â¡Ã—Â¤Ã—Â¦Ã—â„¢Ã—Â¤Ã—â„¢Ã—Âª Ã—Â¢Ã—â€˜Ã—â€¢Ã—Â¨ WORKOUT PLANNER SIDEBAR
   ============================================================ */

#savedWorkoutsSidebar {
    position: fixed;
    left: 20px;
    top: 20px;
    width: 200px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

#savedWorkoutsSidebar h3 {
    font-size: 18px;
    margin-top: 0;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
    text-align: center;
}

.workout-link {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
    background: #334155;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: 0.3s;
    color: white;
    text-decoration: none;
}

.workout-link:hover {
    background: #2563eb;
}

.main-content {
    width: 100%; 
    max-width: 1400px; 
    padding: 40px 20px;
    text-align: center;
}

@media (max-width: 1250px) {
    #savedWorkoutsSidebar {
        position: relative;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px auto;
        left: 0; top: 0;
    }
    .main-content { width: 95%; padding: 10px; }
}

/* =========================
    Ã°Å¸Å’Â Ã—â€Ã—â€™Ã—â€œÃ—Â¨Ã—â€¢Ã—Âª Ã—â€˜Ã—Â¡Ã—â„¢Ã—Â¡ Ã—â€¢Ã—Â¨Ã—Â§Ã—Â¢
   ========================= */
html {
    box-sizing: border-box;
    overflow-x: hidden;
    height: 100%;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: sans-serif;
    color: #f1f5f9;
    text-align: center;
    background-color: #0b0f1a;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(135deg, #0f172a 0%, #4169e1 100%);
    background-size: 30px 30px, 100% 100%;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* =========================
    Ã°Å¸â€Ëœ Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨Ã—â„¢Ã—Â (Save / Edit)
   ========================= */
.planner-btn-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.save-planner-btn, .edit-planner-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    color: white;
    display: flex;
    align-items: center;
}

.save-planner-btn { background: #2563eb !important; width: auto; }
.save-planner-btn:hover { background: #1d4ed8; transform: translateY(-2px); }

.edit-planner-btn { background: #f59e0b !important; width: auto; }
.edit-planner-btn:hover { background: #d97706; transform: translateY(-2px); }

/* =========================
    Ã°Å¸â€œÂ± Ã—ÂÃ—Å“Ã—Å¾Ã—Â Ã—ËœÃ—â„¢Ã—Â Ã—Â Ã—â€¢Ã—Â¡Ã—Â¤Ã—â„¢Ã—Â
   ========================= */
.h1WeeklyWorkoutRoutine {
    font-size: clamp(24px, 5vw, 40px);
    color: #facc15;
    margin-top: 40px;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo {
    width: clamp(40px, 8vw, 60px);
    height: auto;
    border-radius: 15px;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.planner-btn {
    background: #22c55e;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    margin: 30px 0;
    transition: 0.3s;
    border: none;
}

.planner-btn:hover {
    background: #16a34a;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}
/* Ã—Â¢Ã—â„¢Ã—Â¦Ã—â€¢Ã—â€˜ Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨ Ã—â€Ã—Å¾Ã—Â¢Ã—â€˜Ã—Â¨ Ã—Å“Ã—Å¾Ã—ÂªÃ—â€ºÃ—Â Ã—Å¸ Ã—â€Ã—ÂÃ—â„¢Ã—Å¾Ã—â€¢Ã—Â Ã—â„¢Ã—Â */
        .planner-btn {
            display: block;
            width: 90%; /* Ã—â€Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨ Ã—â„¢Ã—ÂªÃ—Â¤Ã—â€¢Ã—Â¡ 90% Ã—Å¾Ã—Â¨Ã—â€¢Ã—â€”Ã—â€˜ Ã—â€Ã—Å¾Ã—Â¡Ã—Å¡ */
            max-width: 600px; /* Ã—ÂÃ—â€˜Ã—Å“ Ã—Å“Ã—Â Ã—â„¢Ã—â€¢Ã—ÂªÃ—Â¨ Ã—Å¾-600 Ã—Â¤Ã—â„¢Ã—Â§Ã—Â¡Ã—Å“Ã—â„¢Ã—Â Ã—â€ºÃ—â€œÃ—â„¢ Ã—Â©Ã—Å“Ã—Â Ã—â„¢Ã—Â¨Ã—ÂÃ—â€ Ã—Å¾Ã—â€¢Ã—â€“Ã—Â¨ Ã—â€˜Ã—Å¾Ã—Â¡Ã—â€ºÃ—â„¢Ã—Â Ã—Â¨Ã—â€”Ã—â€˜Ã—â„¢Ã—Â */
            margin: 30px auto; /* Ã—Å¾Ã—Â¨Ã—â€ºÃ—â€“ Ã—ÂÃ—Âª Ã—â€Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨ Ã—â€¢Ã—Â Ã—â€¢Ã—ÂªÃ—Å¸ Ã—Â¨Ã—â€¢Ã—â€¢Ã—â€” Ã—Å¾Ã—Å“Ã—Å¾Ã—Â¢Ã—Å“Ã—â€ */
            padding: 15px 25px;
            background: linear-gradient(135deg, #10b981, #059669); /* Ã—Â¦Ã—â€˜Ã—Â¢ Ã—â„¢Ã—Â¨Ã—â€¢Ã—Â§ Ã—Å¾Ã—Â¨Ã—Â©Ã—â„¢Ã—Â */
            color: white;
            font-size: 1.1rem;
            font-weight: bold;
            border: none;
            border-radius: 50px; /* Ã—Â¤Ã—â„¢Ã—Â Ã—â€¢Ã—Âª Ã—Â¢Ã—â€™Ã—â€¢Ã—Å“Ã—â€¢Ã—Âª Ã—Å¾Ã—ÂÃ—â€¢Ã—â€œ (Ã—â€˜Ã—Â¦Ã—â€¢Ã—Â¨Ã—Âª Ã—â€™Ã—Å“Ã—â€¢Ã—Å“Ã—â€) */
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
            white-space: nowrap; /* Ã—Å¾Ã—â€¢Ã—Â Ã—Â¢ Ã—Å¾Ã—â€Ã—ËœÃ—Â§Ã—Â¡Ã—Ëœ Ã—Å“Ã—Â¨Ã—â€œÃ—Âª Ã—Â©Ã—â€¢Ã—Â¨Ã—â€ - Ã—Â©Ã—â€¢Ã—Å¾Ã—Â¨ Ã—Â¢Ã—Å“Ã—â„¢Ã—â€¢ Ã—â€˜Ã—Â©Ã—â€¢Ã—Â¨Ã—â€ Ã—ÂÃ—â€”Ã—Âª */
        }

        .planner-btn:hover {
            transform: translateY(-3px); /* Ã—ÂÃ—Â¤Ã—Â§Ã—Ëœ Ã—Â§Ã—Â¤Ã—â„¢Ã—Â¦Ã—â€ Ã—Â§Ã—ËœÃ—Å¸ Ã—â€˜Ã—Â¨Ã—â„¢Ã—â€”Ã—â€¢Ã—Â£ */
            box-shadow: 0 15px 25px rgba(16, 185, 129, 0.4);
            filter: brightness(1.1);
        }

        /* Ã—â€Ã—ÂªÃ—ÂÃ—Å¾Ã—â€ Ã—Å“Ã—Å¾Ã—Â¡Ã—â€ºÃ—â„¢Ã—Â Ã—Â§Ã—ËœÃ—Â Ã—â„¢Ã—Â (Ã—ËœÃ—Å“Ã—Â¤Ã—â€¢Ã—Â Ã—â„¢Ã—Â) - Ã—Â©Ã—â€Ã—ËœÃ—Â§Ã—Â¡Ã—Ëœ Ã—Å“Ã—Â Ã—â„¢Ã—Â¦Ã—Â Ã—Å¾Ã—â€Ã—â€ºÃ—Â¤Ã—ÂªÃ—â€¢Ã—Â¨ */
        @media (max-width: 600px) {
            .planner-btn {
                white-space: normal; /* Ã—â€˜Ã—ËœÃ—Å“Ã—Â¤Ã—â€¢Ã—Â Ã—â„¢Ã—Â Ã—Â§Ã—ËœÃ—Â Ã—â„¢Ã—Â Ã—Å¾Ã—ÂÃ—â€¢Ã—â€œ Ã—Â Ã—ÂÃ—Â¤Ã—Â©Ã—Â¨ Ã—â„¢Ã—Â¨Ã—â„¢Ã—â€œÃ—Âª Ã—Â©Ã—â€¢Ã—Â¨Ã—â€ Ã—ÂÃ—â€”Ã—Âª Ã—ÂÃ—Â Ã—ÂÃ—â„¢Ã—Å¸ Ã—â€˜Ã—Â¨Ã—â„¢Ã—Â¨Ã—â€ */
                font-size: 1rem;
                width: 95%;
            }
        }/* === CODEx Shared Polish === */
.page-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 22px auto 32px;
    padding: clamp(18px, 4vw, 34px);
    border-radius: 30px;
    background: rgba(7, 12, 24, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(12px);
}
.hero-copy {
    text-align: center;
    margin-bottom: 28px;
}
.eyebrow {
    margin: 0 0 10px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.72);
}
.hero-subtitle {
    width: min(720px, 100%);
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.98rem, 2vw, 1.15rem);
    line-height: 1.6;
}
.page-kicker {
    margin: 0 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}
.hero-panel {
    padding: clamp(18px, 4vw, 30px);
    border-radius: 28px;
    background: rgba(7, 12, 24, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(12px);
}
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 24px auto 10px;
    box-sizing: border-box;
    direction: ltr;
    padding: 14px;
    border-radius: 24px;
    background: rgba(7, 12, 24, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body.page-main-menu,
body.page-favorites,
body.page-my-plans,
body.page-weekly-routine,
body.page-gym-planner,
body.page-tracking-menu,
body.page-exercises-guide,
body.page-anatomy {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
body.page-main-menu,
body.page-favorites {
    padding: 24px;
}
body.page-main-menu,
body.page-weekly-routine,
body.page-gym-planner {
    margin: 0;
    min-height: 100vh;
    color: #f1f5f9;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
body.page-main-menu {
    overflow: hidden;
}
body.page-main-menu .MainPageHeader {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    flex-shrink: 0;
    width: min(1120px, calc(100% - 28px));
    margin: 18px auto 0;
    padding: 16px 18px;
    border-radius: 24px;
    background: rgba(7, 12, 24, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(14px);
}
body.page-main-menu .MainPageHeaderCenter {
    min-width: 0;
    height: 100%;
}
body.page-main-menu .HeaderIconContainer {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 26px;
    box-sizing: border-box;
}
body.page-main-menu .hero-shell {
    width: min(1120px, calc(100% - 28px));
    min-height: 100%;
    padding: clamp(20px, 4vw, 36px);
    border-radius: 28px;
    background: rgba(7, 12, 24, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
body.page-main-menu .hero-copy {
    color: #f8fafc;
}
body.page-main-menu .account-menu-open {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 40;
    width: 42px;
    height: 42px;
    min-height: 42px;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.page-main-menu .account-menu-spacer {
    width: 100%;
    height: 54px;
    flex: 0 0 auto;
}
body .settings-gear {
    display: block;
    line-height: 1;
}
body .account-actions-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}
body .account-actions-modal[hidden] {
    display: none;
}
body .account-actions-dialog {
    width: min(420px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
    text-align: left;
}
body .account-actions-dialog h2 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}
body .settings-current-user {
    margin: 0 0 10px !important;
    color: #facc15 !important;
    font-weight: 900;
    overflow-wrap: anywhere;
}
body .account-actions-dialog h3 {
    margin: 18px 0 10px;
    color: #facc15;
    font-size: 1.05rem;
}
body .account-actions-dialog p {
    margin: 0 0 18px;
    color: rgba(248, 250, 252, 0.76);
    line-height: 1.5;
}
body .settings-password-panel {
    display: grid;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}
body .settings-password-panel h3 {
    margin-top: 0;
}
body .settings-password-panel label {
    color: rgba(248, 250, 252, 0.88);
    font-weight: 800;
    font-size: 0.88rem;
}
body .settings-password-panel input {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}
body .settings-password-status {
    min-height: 20px;
    margin: 0 !important;
    color: #fde68a !important;
    font-weight: 700;
}
body .account-actions-list {
    display: grid;
}
body .account-actions-list button,
body .account-actions-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
body .account-action-logout {
    background: #dc2626;
}
body .account-action-delete {
    background: #450a0a;
}
body .account-action-forget {
    background: #991b1b;
    color: #ffffff;
}
body .account-action-change-password {
    background: #2563eb;
}
body .account-action-cancel {
    background: #16a34a;
    border: 0;
    color: #ffffff;
}
body .account-action-terms {
    background: #2563eb;
}
body.page-main-menu .hero-kicker {
    margin: 0 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}
body.page-main-menu .hero-title {
    margin: 0;
    font-size: clamp(2.1rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
body.page-main-menu .hero-subtitle {
    width: min(700px, 100%);
    font-size: clamp(0.98rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.78);
}
body.page-main-menu .HeaderIcon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.35));
}
body.page-main-menu .LeftLink,
body.page-main-menu .CenterLink,
body.page-main-menu .RightLink,
body.page-main-menu .AnatomyLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.page-main-menu .LeftLink:hover,
body.page-main-menu .CenterLink:hover,
body.page-main-menu .RightLink:hover,
body.page-main-menu .AnatomyLink:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-shadow: none;
}
body.page-tracking-menu .Images {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 26px;
}
body.page-tracking-menu .Images a {
    padding: 16px 14px 18px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
body.page-tracking-menu .Images a:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
}
body.page-tracking-menu .Images img {
    width: min(100%, 120px);
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.26));
}
body.page-tracking-menu .label {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
body.page-tracking-menu .ExercisesGuideLink {
    width: min(760px, 100%);
    margin: 30px auto 10px;
    padding: 18px 24px;
    border-radius: 22px;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.28);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    line-height: 1.6;
}
body.page-tracking-menu .bottom-image,
body.page-exercises-guide .bottom-image,
body.page-anatomy .bottom-image {
    width: min(440px, 78vw);
    margin: 30px auto 0;
    filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.34));
}
body.page-tracking-menu h1,
body.page-exercises-guide .page-title,
body.page-anatomy .page-title,
body.page-favorites h1,
body.page-my-plans h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body.page-exercises-guide .page-shell,
body.page-anatomy .page-shell {
    width: min(1200px, calc(100% - 28px));
    background: rgba(7, 12, 24, 0.42);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}
body.page-exercises-guide .page-title,
body.page-anatomy .page-title {
    font-weight: 900;
    color: #fff;
}
body.page-exercises-guide .page-subtitle,
body.page-anatomy .page-subtitle {
    width: min(720px, 100%);
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.98rem, 2vw, 1.14rem);
    line-height: 1.6;
}
body.page-exercises-guide .muscle-bar {
    padding: 0 !important;
    justify-content: center !important;
}
body.page-exercises-guide .muscle-item {
    min-width: 130px;
    padding: 16px 14px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
body.page-exercises-guide .muscle-item:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.42);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.3);
}
body.page-exercises-guide .muscle-icon {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.26));
}
body.page-exercises-guide .bottom-image {
    width: min(430px, 78vw);
    filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.34));
}
body.page-favorites .page-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    background: rgba(7, 12, 24, 0.62);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 28px 72px rgba(0,0,0,0.32);
}
body.page-favorites .exercise-card {
    background: rgba(15, 23, 42, 0.88);
    border-radius: 22px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 36px rgba(0,0,0,0.28);
    transition: 0.3s;
}
body.page-favorites .exercise-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(250, 204, 21, 0.36);
}
body.page-favorites .card-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
body.page-favorites .check-icon {
    width: 28px;
    height: 28px;
    padding: 4px;
    background: #facc15;
    border: 2px solid rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
body.page-favorites .check-icon:hover {
    transform: scale(1.15);
}
body.page-favorites .IMG {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    background: #334155;
}
body.page-favorites .exercise-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}
body.page-favorites .empty {
    text-align: center;
    margin-top: 10px;
    font-size: 20px;
    color: rgba(255,255,255,0.82);
}
body.page-my-plans .page-shell {
    width: min(1080px, 100%);
    margin: 0 auto;
    background: rgba(7, 12, 24, 0.5);
}
body.page-my-plans .plan-link {
    display: block;
    background: rgba(15, 23, 42, 0.76);
    color: #fbbf24;
    padding: 18px 25px;
    margin: 10px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.3s;
    text-align: center;
    min-width: min(100%, 260px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}
body.page-my-plans .plan-link:hover {
    background: rgba(30, 64, 175, 0.9);
    transform: translateY(-4px);
}
body.page-weekly-routine .main-content,
body.page-gym-planner .main-content {
    width: min(100%, 1400px);
    padding: clamp(32px, 6vw, 40px) clamp(12px, 3vw, 24px);
    text-align: center;
}
body.page-gym-planner .main-content {
    padding-bottom: clamp(32px, 6vw, 40px);
}
body.page-weekly-routine .planner-btn-container,
body.page-gym-planner .planner-btn-container {
    flex-wrap: wrap;
}
body.page-weekly-routine .save-planner-btn,
body.page-weekly-routine .edit-planner-btn,
body.page-gym-planner .save-planner-btn,
body.page-gym-planner .edit-planner-btn {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}
body.page-gym-planner .notebook-edit-btn,
body.page-my-plans .notebook-edit-btn {
    width: 52px;
    height: 48px;
    min-height: 48px;
    max-width: none;
    margin: 2vh auto;
    padding: 0;
    border-radius: 14px;
    background: radial-gradient(circle at 28% 22%, #ffffff 0, #dbeafe 42%, #93c5fd 100%);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.page-gym-planner .notebook-edit-btn[hidden],
body.page-my-plans .notebook-edit-btn[hidden] {
    display: none;
}
body.page-gym-planner .notebook-icon,
body.page-my-plans .notebook-icon {
    position: relative;
    width: 28px;
    height: 32px;
    border-radius: 6px 7px 7px 6px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.92), rgba(219,234,254,0.96)),
        #ffffff;
    border: 2px solid #4169e1;
    box-shadow: inset 6px 0 0 #facc15, 0 4px 10px rgba(15, 23, 42, 0.22);
    display: grid;
    align-content: center;
    padding: 6px 5px 6px 10px;
    box-sizing: border-box;
}
body.page-gym-planner .notebook-icon::after,
body.page-my-plans .notebook-icon::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -2px;
    border-style: solid;
    border-width: 0 9px 9px 0;
    border-color: transparent #bfdbfe transparent transparent;
    border-top-right-radius: 5px;
}
body.page-gym-planner .notebook-icon span,
body.page-my-plans .notebook-icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4169e1, #2563eb);
}
body.page-gym-planner .notebook-edit-btn-table-mode .notebook-icon,
body.page-my-plans .notebook-edit-btn-table-mode .notebook-icon {
    width: 32px;
    height: 30px;
    border-radius: 7px;
    background:
        linear-gradient(#4169e1, #4169e1) 0 34% / 100% 2px no-repeat,
        linear-gradient(#4169e1, #4169e1) 0 67% / 100% 2px no-repeat,
        linear-gradient(90deg, transparent calc(34% - 1px), #4169e1 calc(34% - 1px), #4169e1 calc(34% + 1px), transparent calc(34% + 1px), transparent calc(67% - 1px), #4169e1 calc(67% - 1px), #4169e1 calc(67% + 1px), transparent calc(67% + 1px)),
        linear-gradient(135deg, #ffffff, #dbeafe);
    box-shadow: inset 0 6px 0 #facc15, 0 4px 10px rgba(15, 23, 42, 0.22);
    display: block;
    padding: 0;
}
body.page-gym-planner .notebook-edit-btn-table-mode .notebook-icon::after,
body.page-my-plans .notebook-edit-btn-table-mode .notebook-icon::after {
    display: none;
}
body.page-gym-planner .notebook-edit-btn-table-mode .notebook-icon span,
body.page-my-plans .notebook-edit-btn-table-mode .notebook-icon span {
    display: none;
}
body.page-gym-planner .planner-note-editor,
body.page-my-plans .planner-note-editor {
    width: min(100%, 980px);
    margin: 0 auto 80px;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}
body.page-gym-planner .planner-note-title,
body.page-my-plans .planner-note-title {
    width: 100%;
    min-height: 62px;
    padding: 16px clamp(14px, 3vw, 24px);
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: #4169e1;
    color: #ffffff;
    font: inherit;
    font-size: clamp(1rem, 2.8vw, 1.3rem);
    font-weight: 800;
    text-align: center;
    outline: none;
}
body.page-gym-planner .planner-note-body,
body.page-my-plans .planner-note-body {
    --planner-note-line-height: 34px;
    --planner-note-line-position: 28px;
    width: 100%;
    min-height: clamp(320px, 54vh, 620px);
    padding: clamp(18px, 3vw, 28px);
    box-sizing: border-box;
    border: 0;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent var(--planner-note-line-position),
            rgba(255, 255, 255, 0.16) var(--planner-note-line-position),
            rgba(255, 255, 255, 0.16) calc(var(--planner-note-line-position) + 1px),
            transparent calc(var(--planner-note-line-position) + 1px),
            transparent var(--planner-note-line-height)
        ),
        rgba(15, 23, 42, 0.84);
    background-origin: content-box;
    background-clip: content-box, border-box;
    color: #f8fafc;
    font: inherit;
    font-size: clamp(1rem, 2.4vw, 1.12rem);
    line-height: var(--planner-note-line-height);
    resize: vertical;
    outline: none;
    white-space: pre-wrap;
}
body.page-gym-planner .planner-note-title:read-only,
body.page-my-plans .planner-note-title:read-only,
body.page-gym-planner .planner-note-body:read-only,
body.page-my-plans .planner-note-body:read-only {
    cursor: default;
}
body.page-weekly-routine .h1WeeklyWorkoutRoutine,
body.page-gym-planner .h1WeeklyWorkoutRoutine {
    margin-top: 0;
}
body.page-weekly-routine .planner-btn,
body.page-gym-planner .back-btn {
    display: block;
    width: min(95vw, 600px);
    margin: 30px auto 0;
    padding: 15px 25px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: clamp(1rem, 2.6vw, 1.1rem);
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    white-space: normal;
}
body.page-weekly-routine .planner-btn:hover,
body.page-gym-planner .back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}
body.page-gym-planner .floating-folder-container {
    position: absolute;
    top: 1%;
    right: 1%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    cursor: pointer;
}
body.page-gym-planner .folder-icon {
    position: relative;
    width: clamp(46px, 11vw, 82px);
    height: clamp(34px, 8vw, 62px);
    background: #facc15;
    border-radius: 0 4px 4px 4px;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.5);
}
body.page-gym-planner .folder-icon::before {
    content: '';
    position: absolute;
    top: -15%;
    left: 0;
    width: 40%;
    height: 15%;
    background: #eab308;
    border-radius: 4px 4px 0 0;
}
body.page-gym-planner .folder-paper {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 60%;
    background: #ffffff;
    border-radius: 2px;
    z-index: -1;
}
body.page-gym-planner .folder-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85%;
    background: #fde047;
    border-radius: 0 4px 4px 4px;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.5);
}
body.page-gym-planner .folder-label {
    font-size: clamp(6px, 1.5vw, 10px);
    font-weight: 900;
    color: #854d0e;
    text-transform: uppercase;
    white-space: nowrap;
}
body.page-gym-planner #savedPlannersList {
    display: none;
    flex-direction: column;
    margin-top: 8px;
    width: fit-content;
}
@media (max-width: 700px) {
    body.page-main-menu .MainPageHeader {
        width: calc(100% - 20px);
        padding: 14px;
    }
    body.page-main-menu .HeaderIconContainer {
        padding: 18px 10px 20px;
    }
    body.page-main-menu .hero-shell {
        width: calc(100% - 10px);
        padding: 18px 16px 26px;
        border-radius: 22px;
    }
}

/* training guide muscle visibility fix */
body.page-exercises-guide .muscle-bar {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    justify-content: initial !important;
}


/* control-bar fix */
.table-control-bar{gap:clamp(3px,1.5vw,8px) !important;flex-wrap:nowrap !important;overflow-x:hidden !important;direction:ltr !important;width:100% !important;}
.table-control-btn{min-width:0 !important;width:clamp(54px,22vw,84px) !important;height:clamp(28px,7vw,34px) !important;padding:5px clamp(4px,1.8vw,9px) !important;border-radius:8px !important;font-size:clamp(0.62rem,2.7vw,0.84rem) !important;gap:clamp(2px,1vw,5px) !important;direction:ltr !important;unicode-bidi:isolate !important;flex:1 1 0 !important;}
.table-control-btn-symbol{display:inline-block;min-width:6px;text-align:center;font-weight:900;}
.table-control-btn-text{display:inline-block;}
@media (max-width:900px){.page-shell,body.page-favorites .page-shell,body.page-my-plans .page-shell,body.page-exercises-guide .page-shell,body.page-anatomy .page-shell,body.page-tracking-menu .page-shell{width:min(100%,calc(100% - 18px));margin:16px auto 24px;padding:18px 14px 22px;border-radius:22px;}body.page-weekly-routine .main-content,body.page-gym-planner .main-content{width:100%;padding:20px 10px 28px;}.table-responsive-wrapper{padding:10px;border-radius:18px;}}
@media (max-width:640px){.table-control-btn{width:clamp(44px,22vw,72px) !important;height:28px !important;padding:4px 3px !important;font-size:clamp(0.56rem,2.7vw,0.7rem) !important;}.table-control-bar{gap:3px !important;}body.page-tracking-menu .Images,body.page-exercises-guide .muscle-bar{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}body.page-main-menu .hero-title{font-size:clamp(1.8rem,10vw,3rem);}body.page-login .login-shell{padding:18px 14px 22px;border-radius:22px;}}

/* login overflow visibility fix */
body.page-login{justify-content:flex-start !important;overflow-x:hidden !important;overflow-y:auto !important;padding:24px 16px 36px !important;box-sizing:border-box;}
body.page-login .login-shell{width:min(620px,100%) !important;margin:0 auto !important;}
body.page-login .auth-layout{display:flex;flex-direction:column;gap:18px;align-items:stretch;width:100%;}
body.page-login .auth-card{min-width:0;padding:clamp(22px,4vw,34px);border-radius:18px;border:1px solid rgba(255,255,255,0.14);background:rgba(15,23,42,0.84);box-shadow:0 18px 50px rgba(0,0,0,0.26);text-align:left;}
body.page-login .auth-card-primary,
body.page-login .auth-login-card{background:rgba(248,250,252,0.98);color:#0f172a;border-color:rgba(15,23,42,0.12);box-shadow:0 24px 70px rgba(0,0,0,0.32);}
body.page-login .auth-card-primary{display:none;}
body.page-login .auth-card-primary:target{display:block;}
body.page-login .auth-login-card{display:block;}
body.page-login:has(.auth-card-primary:target) .auth-login-card{display:none;}
body.page-login .auth-brand-row{display:flex;align-items:center;gap:10px;margin-bottom:18px;color:#0f172a;font-weight:900;font-size:1.05rem;}
body.page-login .auth-brand-row .logo{width:40px;height:40px;border-radius:10px;}
body.page-login .auth-card-kicker{margin:0 0 8px;color:#2563eb;font-size:0.78rem;font-weight:900;letter-spacing:0.12em;text-transform:uppercase;}
body.page-login .auth-card h1{margin:0 0 10px;color:#0f172a;font-size:clamp(1.9rem,4vw,2.8rem);line-height:1.08;}
body.page-login .auth-card h2{margin:0 0 8px;font-size:clamp(1.45rem,3vw,2rem);line-height:1.15;}
body.page-login .auth-card p{margin:0 0 18px;color:rgba(248,250,252,0.72);line-height:1.5;}
body.page-login .auth-card-primary p,
body.page-login .auth-login-card p{color:#475569;}
body.page-login .auth-lede{max-width:560px;}
body.page-login .auth-card label{display:block;margin:13px 0 7px;color:rgba(248,250,252,0.86);font-size:0.88rem;font-weight:800;}
body.page-login .auth-card-primary label,
body.page-login .auth-login-card label{color:#334155;}
body.page-login .auth-card input{width:100%;max-width:none;margin:0;padding:13px 14px;box-sizing:border-box;border-radius:8px;background:rgba(2,6,23,0.46);border:1px solid rgba(148,163,184,0.24);}
body.page-login .auth-card-primary input,
body.page-login .auth-login-card input{background:#ffffff;color:#0f172a;border:1px solid #cbd5e1;}
body.page-login .auth-password-field{position:relative;}
body.page-login .auth-password-field input{padding-right:44px;}
body.page-login .auth-password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;min-height:20px;max-width:none;margin:0;padding:0;border:0;border-radius:0;background:transparent !important;color:#64748b;font-size:0;box-shadow:none !important;line-height:0;}
body.page-login .auth-password-toggle:hover{transform:translateY(-50%);filter:none;background:transparent !important;box-shadow:none !important;}
body.page-login .auth-password-toggle:focus-visible{outline:2px solid #2563eb;outline-offset:2px;border-radius:4px;}
body.page-login .auth-eye-icon{display:block;width:18px;height:18px;fill:none;stroke:#64748b;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
body.page-login .auth-eye-closed{display:none;}
body.page-login .auth-password-toggle.is-visible .auth-eye-open{display:none;}
body.page-login .auth-password-toggle.is-visible .auth-eye-closed{display:block;}
body.page-login .auth-name-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.page-login .auth-field{min-width:0;}
body.page-login .auth-check-row{display:grid !important;grid-template-columns:18px minmax(0,1fr);gap:10px;align-items:start;margin:16px 0 0 !important;font-weight:600 !important;color:#475569 !important;line-height:1.45;}
body.page-login .auth-check-row input{width:18px;height:18px;margin:2px 0 0;padding:0;accent-color:#2563eb;}
body.page-login .auth-check-row span{min-width:0;}
body.page-login .auth-check-row a{color:#1d4ed8;font-weight:900;text-decoration:none;}
body.page-login .auth-check-row a:hover{text-decoration:underline;}
body.page-login .auth-check-row.auth-check-error{margin-top:14px !important;padding:10px;border:1px solid rgba(220,38,38,0.45);border-radius:10px;background:rgba(254,226,226,0.92);color:#991b1b !important;}
body.page-login .auth-check-row.auth-check-error a{color:#991b1b;}
body.page-login .auth-card button{width:100%;max-width:none;margin:18px 0 0;min-height:46px;padding:12px 16px;border-radius:8px;}
body.page-login .auth-card-primary button{background:linear-gradient(135deg,#2563eb,#1d4ed8);}
body.page-login .auth-login-card button{background:linear-gradient(135deg,#2563eb,#1d4ed8);}
body.page-login .auth-card .auth-password-toggle{position:absolute !important;right:12px !important;top:50% !important;transform:translateY(-50%) !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;width:20px !important;height:20px !important;min-height:20px !important;max-width:none !important;margin:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;color:#64748b !important;font-size:0 !important;box-shadow:none !important;line-height:0 !important;}
body.page-login .auth-card .auth-password-toggle:hover{transform:translateY(-50%) !important;filter:none !important;background:transparent !important;box-shadow:none !important;}
body.page-login .auth-switch{margin:16px 0 0 !important;text-align:center;color:#475569 !important;font-weight:700;}
body.page-login .auth-switch a{color:#1d4ed8;font-weight:900;text-decoration:none;}
body.page-login .auth-switch a:hover{text-decoration:underline;}
body.page-login .auth-message{min-height:22px;margin:12px 0 0 !important;color:#fde68a !important;font-weight:700;overflow-wrap:anywhere;}
body.page-login .auth-card-primary .auth-message,
body.page-login .auth-login-card .auth-message{color:#1d4ed8 !important;}
body.page-login .note-box{width:100% !important;max-width:100% !important;margin:18px 0 0 !important;padding:14px 16px !important;box-sizing:border-box;border-left:0;border-top:4px solid #facc15;border-radius:14px;background:rgba(30,41,59,0.58);}
body.page-login .note-box h3{margin-bottom:8px;}
body.page-login .note-box p{margin:8px 0;color:rgba(248,250,252,0.78);}
@media (max-width:900px){body.page-login .auth-layout{grid-template-columns:1fr;}}
@media (max-width:640px){body.page-login{padding:16px 12px 28px !important;}body.page-login .login-shell{width:100% !important;}body.page-login .auth-card{padding:18px 16px;}body.page-login .auth-name-grid{grid-template-columns:1fr;}body.page-login .note-box{margin-top:14px !important;}}

body.page-terms {
    justify-content: flex-start !important;
    overflow-x: hidden;
    padding: 0 16px 42px;
    box-sizing: border-box;
}
body.page-terms .terms-shell {
    width: min(880px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 4vw, 38px);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    text-align: left;
}
body.page-terms .terms-shell h1 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.08;
}
body.page-terms .terms-updated {
    margin: 0 0 28px;
    color: rgba(248, 250, 252, 0.62);
    font-weight: 700;
}
body.page-terms .terms-shell section {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
body.page-terms .terms-shell h2 {
    margin: 0 0 10px;
    color: #facc15;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}
body.page-terms .terms-shell p {
    margin: 0;
    color: rgba(248, 250, 252, 0.82);
    line-height: 1.7;
}
body.page-terms .terms-shell p + p {
    margin-top: 10px;
}
@media (max-width:640px) {
    body.page-terms {
        padding: 0 10px 28px;
    }
    body.page-terms .terms-shell {
        padding: 20px 16px;
        border-radius: 18px;
    }
}

body.page-login .app-install-prompts {
    position: fixed;
    left: 18px;
    top: 22px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: min(280px, calc(100vw - 36px));
}

body.page-login .app-install-prompts[hidden] {
    display: none;
}

body.page-login .app-install-card {
    border: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    width: 100%;
    padding: 16px 18px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.98), rgba(20, 184, 166, 0.96)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 45%);
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), 0 0 0 5px rgba(34, 197, 94, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

body.page-login .app-install-card[hidden] {
    display: none;
}

body.page-login .app-install-card:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.08);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 6px rgba(34, 197, 94, 0.18);
}

body.page-login .ios-install-card {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.98), rgba(14, 165, 233, 0.96)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 45%);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), 0 0 0 5px rgba(59, 130, 246, 0.12);
}

body.page-login .ios-install-card:hover {
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 6px rgba(59, 130, 246, 0.18);
}

body.page-login .pc-install-card {
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.98), rgba(245, 158, 11, 0.96)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 45%);
    color: #111827;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), 0 0 0 5px rgba(250, 204, 21, 0.12);
}

body.page-login .pc-install-card:hover {
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 6px rgba(250, 204, 21, 0.18);
}

body.page-login .app-install-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.86;
}

body.page-login .app-install-title {
    font-size: clamp(1.05rem, 1.9vw, 1.32rem);
}

body.page-login .app-install-subtitle {
    max-width: 220px;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.88;
}

body.page-login .install-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

body.page-login .install-modal[hidden] {
    display: none;
}

body.page-login .install-dialog {
    position: relative;
    width: min(430px, 100%);
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
}

body.page-login .install-dialog h2 {
    margin: 8px 0 16px;
    font-size: 1.45rem;
    line-height: 1.2;
}

body.page-login .install-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1;
}

body.page-login .install-message {
    margin: 0;
    color: rgba(248, 250, 252, 0.88);
    line-height: 1.55;
}

body.page-login .pc-install-steps {
    margin: 0 0 16px;
    padding-left: 22px;
    color: rgba(248, 250, 252, 0.88);
    line-height: 1.65;
}

body.page-login .android-install-steps {
    margin: 0 0 16px;
    padding-left: 22px;
    color: rgba(248, 250, 252, 0.88);
    line-height: 1.65;
}

body.page-login .install-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
}

body.page-login .install-action,
body.page-login .install-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

body.page-login .install-action {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

body.page-login .install-cancel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

body.page-login .ios-copy-link {
    width: 100%;
    max-width: none;
    margin: 18px 0 0;
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
}

body.page-login .ios-copy-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    body.page-login .app-install-prompts {
        position: static;
        width: min(100%, 330px);
        margin: 0 auto 18px;
    }

    body.page-login .app-install-card {
        min-height: 88px;
        padding: 14px 16px;
    }

    body.page-login .app-install-title {
        font-size: 1.08rem;
    }

    body.page-login .install-dialog {
        padding: 22px 18px;
    }

    body.page-login .install-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px), (max-height: 760px) {
    body.page-login .app-install-prompts {
        position: static;
        width: min(100%, 360px);
        margin: 0 auto 20px;
    }

    body.page-login .app-install-card {
        min-height: 88px;
    }
}

@media (min-width: 1181px) and (min-height: 761px) {
    body.page-login .login-shell {
        margin-top: 0 !important;
    }
}

/* broad responsive fix pass */
body.page-main-menu{
    overflow-x:hidden !important;
    overflow-y:auto !important;
    padding:16px 10px 24px !important;
}

body.page-main-menu .MainPageHeader{
    width:min(1120px,100%) !important;
    box-sizing:border-box;
}

body.page-main-menu .HeaderIconContainer{
    width:100%;
    padding:16px 0 0 !important;
    align-items:stretch !important;
}

body.page-main-menu .hero-shell{
    width:min(1120px,100%) !important;
    min-height:auto !important;
    box-sizing:border-box;
}

body.page-main-menu .HeaderIcon{
    width:min(100%,520px);
    height:auto;
    margin:0 auto;
}

body.page-tracking-menu .page-shell,
body.page-exercises-guide .page-shell,
body.page-anatomy .page-shell,
body.page-favorites .page-shell,
body.page-my-plans .page-shell,
body.page-login .login-shell,
body.page-weekly-routine .hero-panel,
body.page-gym-planner .hero-panel{
    box-sizing:border-box;
}

body.page-tracking-menu .Images,
body.page-exercises-guide .muscle-bar,
body.page-favorites .container{
    width:100%;
    box-sizing:border-box;
}

body.page-weekly-routine .main-content,
body.page-gym-planner .main-content{
    box-sizing:border-box;
}

@media (max-width: 860px){
    body.page-main-menu .MainPageHeader{
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding:12px;
    }

    body.page-main-menu .MainPageHeaderCenter{
        min-width:0;
    }

    body.page-main-menu .LeftLink,
    body.page-main-menu .CenterLink,
    body.page-main-menu .RightLink,
    body.page-main-menu .AnatomyLink{
        min-height:44px;
        font-size:0.95rem;
        padding:10px 12px;
    }

    body.page-main-menu .hero-shell{
        padding:18px 14px 22px !important;
        border-radius:22px;
    }

    body.page-main-menu .hero-subtitle{
        width:100% !important;
    }

    body.page-weekly-routine .main-content,
    body.page-gym-planner .main-content{
        padding:16px 8px 24px !important;
    }

    .table-responsive-wrapper{
        width:100% !important;
        overflow-x:auto !important;
    }
}

@media (max-width: 760px){
    body.page-main-menu{
        padding:12px 8px 20px !important;
    }

    body.page-main-menu .MainPageHeader{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        border-radius:18px;
    }

    body.page-main-menu .LeftLink,
    body.page-main-menu .CenterLink,
    body.page-main-menu .RightLink,
    body.page-main-menu .AnatomyLink{
        width:100%;
        max-width:none;
        padding:12px 14px;
    }

    body.page-main-menu .MainPageHeaderCenter{
        min-width:0;
    }

    body.page-main-menu .hero-title{
        font-size:clamp(1.8rem,11vw,2.8rem) !important;
    }

    body.page-main-menu .hero-kicker{
        letter-spacing:0.2em;
    }
}

@media (max-width: 640px){
    body.page-main-menu .hero-title{
        font-size:clamp(1.8rem,11vw,2.8rem) !important;
    }

    body.page-tracking-menu .Images,
    body.page-exercises-guide .muscle-bar,
    body.page-favorites .container{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    body.page-login .auth-grid{
    }

    body.page-weekly-routine .planner-btn,
    body.page-gym-planner .back-btn{
        width:100% !important;
    }
}

@media (max-width: 520px){
    body.page-main-menu .MainPageHeader{
        grid-template-columns:1fr;
    }
}

@media (max-width: 420px){
    body.page-tracking-menu .Images,
    body.page-exercises-guide .muscle-bar,
    body.page-favorites .container{
        grid-template-columns:1fr !important;
    }

    .table-control-btn{
        width:auto !important;
        max-width:none;
    }
}

/* training guide favorites highlight fix */
body.page-exercises-guide .favorites-item{background:linear-gradient(135deg,#facc15,#f59e0b) !important;color:#111827 !important;border-color:rgba(250,204,21,0.55) !important;} 
body.page-exercises-guide .favorites-item:hover{background:linear-gradient(135deg,#fde047,#f59e0b) !important;color:#111827 !important;} 
body.page-exercises-guide .favorites-item div{color:#111827 !important;font-weight:800;}

/* weights tracking exact row layout */
body.page-tracking-menu .Images{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    max-width:1200px !important;
    align-items:stretch;
}

body.page-tracking-menu .Images a{
    min-height:190px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

body.page-tracking-menu .Images img{
    width:min(100%,130px) !important;
    height:auto !important;
    margin:0 auto 10px !important;
}

@media (max-width:1100px){
    body.page-tracking-menu .Images{
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    }
}

@media (max-width:760px){
    body.page-tracking-menu .Images{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width:520px){
    body.page-tracking-menu .Images{
        grid-template-columns:1fr !important;
    }

    body.page-tracking-menu .Images a{
        min-height:unset;
    }
}

/* weekly and planner controls exact spacing match */
#weeklyControlsContainer,.planner-btn-container,#plannerControlsContainer,#plannerControls,#currentPlanControls{width:100%;}
#weeklyControlsContainer.table-control-bar,#plannerControls.table-control-bar,#currentPlanControls.table-control-bar,#weeklyControlsContainer .table-control-bar,#plannerControlsContainer .table-control-bar{display:flex !important;justify-content:center !important;align-items:center !important;gap:clamp(3px,1.5vw,8px) !important;flex-wrap:nowrap !important;overflow-x:hidden !important;direction:ltr !important;width:100% !important;}
#weeklyControlsContainer .table-control-btn,#plannerControls .table-control-btn,#currentPlanControls .table-control-btn{min-width:0 !important;width:clamp(54px,22vw,84px) !important;height:clamp(28px,7vw,34px) !important;padding:5px clamp(4px,1.8vw,9px) !important;font-size:clamp(0.62rem,2.7vw,0.84rem) !important;flex:1 1 0 !important;}
@media (max-width:640px){#weeklyControlsContainer .table-control-btn,#plannerControls .table-control-btn,#currentPlanControls .table-control-btn{width:clamp(44px,22vw,72px) !important;height:28px !important;padding:4px 3px !important;font-size:clamp(0.56rem,2.7vw,0.7rem) !important;}}

/* favorites image fit refinement */
body.page-favorites .IMG{
    width:100%;
    height:auto !important;
    aspect-ratio:4 / 3;
    object-fit:contain !important;
    object-position:center;
    padding:10px;
    border-radius:16px;
    background:#334155;
}


/* planner table text wrapping and inline links */
body.page-weekly-routine .table-responsive-wrapper table,
body.page-gym-planner .table-responsive-wrapper table,
#CurrentPlanTable {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: auto !important;
}

body.page-weekly-routine .table-responsive-wrapper th,
body.page-weekly-routine .table-responsive-wrapper td,
body.page-gym-planner .table-responsive-wrapper th,
body.page-gym-planner .table-responsive-wrapper td,
#CurrentPlanTable th,
#CurrentPlanTable td {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    line-height: 1.45;
    vertical-align: middle;
    font-size: clamp(0.82rem, 1.1vw, 1rem);
}

.table-cell-editor {
    display: block;
    max-width: 100%;
    box-sizing: border-box;
    font: inherit;
    white-space: nowrap;
}

.table-cell-editor-multiline {
    min-height: 54px;
    resize: vertical;
}

.planner-inline-link {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 700;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    display: inline;
    max-width: 100%;
}

.planner-inline-link:hover {
    background: none;
    color: #fde68a;
}

/* anatomy detail prototype */
body.page-anatomy-detail {
    width: 100%;
    min-height: 100vh;
    padding: 24px 14px 34px;
    box-sizing: border-box;
}

.anatomy-detail-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.anatomy-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
    font-weight: 800;
}

.anatomy-detail-hero,
.anatomy-workspace {
    margin-top: 18px;
    padding: clamp(18px, 4vw, 34px);
    border-radius: 24px;
    background: rgba(7, 12, 24, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
    box-sizing: border-box;
}

.anatomy-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
    align-items: center;
    text-align: left;
}

.anatomy-detail-hero h1 {
    margin: 0;
    padding: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1;
}

.anatomy-detail-hero .hero-subtitle {
    margin: 14px 0 0;
    width: min(680px, 100%);
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.anatomy-detail-hero img {
    width: min(100%, 230px);
    margin: 0 auto;
    filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.34));
}

.anatomy-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
    align-items: start;
}

.anatomy-visual-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.anatomy-visual-panel img {
    width: min(100%, 320px);
    display: block;
    margin: 0 auto;
}

.anatomy-visual-caption {
    display: grid;
    margin-top: 16px;
    text-align: left;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.anatomy-visual-caption strong {
    color: #facc15;
    font-size: 1.15rem;
}

.anatomy-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.anatomy-tab {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-weight: 900;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    align-items: center;
    padding: 8px 10px 8px 14px;
    text-align: left;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.anatomy-tab span:first-child {
    min-width: 0;
}

.anatomy-tab-cue {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #facc15;
    font-size: 1.2rem;
    line-height: 1;
}

.anatomy-tab.is-active {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    border-color: rgba(250, 204, 21, 0.5);
    color: #111827;
}

.anatomy-tab.is-active .anatomy-tab-cue {
    background: rgba(17, 24, 39, 0.16);
    color: #111827;
}

.anatomy-muscle-grid {
    display: grid;
    margin-top: 14px;
}

.anatomy-muscle-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.anatomy-muscle-summary {
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    padding: 14px;
    border: 0;
    background: transparent;
    color: white;
    text-align: left;
}

.anatomy-image-open,
.anatomy-muscle-name,
.anatomy-read-more {
    border: 0;
    font: inherit;
    color: inherit;
}

.anatomy-image-open,
.anatomy-muscle-name {
    padding: 0;
    background: transparent;
    text-align: left;
    cursor: zoom-in;
}

.anatomy-read-more {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 2px;
    border-radius: 10px;
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
}

.anatomy-image-open img {
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.anatomy-muscle-summary strong,
.anatomy-muscle-summary em {
    display: block;
}

.anatomy-muscle-name {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.anatomy-muscle-color {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    background: var(--muscle-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.anatomy-muscle-summary strong {
    font-size: 1.02rem;
}

.anatomy-muscle-summary em {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    line-height: 1.45;
}

.anatomy-muscle-details {
    display: none;
    padding: 0 16px 16px 86px;
    color: rgba(255, 255, 255, 0.82);
    text-align: left;
    line-height: 1.55;
}

.anatomy-muscle-details.is-open {
    display: block;
}

.anatomy-muscle-details p {
    margin: 8px 0 0;
}

.anatomy-lightbox-open {
    overflow: hidden;
}

.anatomy-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 72px 18px 24px;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.94);
}

.anatomy-image-lightbox.is-open {
    display: grid;
}

.anatomy-image-lightbox img {
    max-width: min(100%, 1180px);
    max-height: calc(100vh - 108px);
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.anatomy-lightbox-back {
    position: fixed;
    top: 18px;
    left: 18px;
    min-width: 82px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 820px) {
    .anatomy-detail-hero,
    .anatomy-workspace {
        grid-template-columns: 1fr;
    }

    .anatomy-detail-hero {
        text-align: center;
    }

    .anatomy-detail-hero .hero-subtitle {
        margin-inline: auto;
    }

    .anatomy-visual-panel {
        position: static;
    }
}

@media (max-width: 520px) {
    body.page-anatomy-detail {
        padding: 14px 8px 24px;
    }

    .anatomy-detail-hero,
    .anatomy-workspace {
        padding: 14px;
        border-radius: 16px;
    }

    .anatomy-visual-panel {
        padding: 12px;
        border-radius: 14px;
    }

    .anatomy-visual-images {
    }

    .anatomy-visual-figure {
        padding: 8px;
    }

    .anatomy-visual-figure img {
        max-height: min(48vh, 360px);
    }

    .anatomy-visual-caption {
        margin-top: 10px;
    }

    .anatomy-tabs {
        grid-template-columns: 1fr;
    }

    .anatomy-muscle-summary {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 12px;
    }

    .anatomy-image-open img {
        width: 48px;
        height: 48px;
    }

    .anatomy-muscle-details {
        padding: 0 12px 14px;
    }
}

.anatomy-visual-images {
    display: grid;
}

.anatomy-visual-figure {
    width: 100%;
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    cursor: zoom-in;
    display: grid;
    align-items: center;
    color: #ffffff;
    text-align: center;
}

.anatomy-visual-figure img {
    width: 100%;
    height: auto;
    max-height: min(72vh, 680px);
    display: block;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    margin: 0 auto;
}

/* =========================
   DARK MODE OPTION
   ========================= */
body .settings-theme-panel {
    grid-template-columns: 1fr;
}
body .settings-theme-panel h3,
body .settings-theme-panel p {
    margin: 0;
}
body .settings-theme-toggle {
    display: flex;
    align-items: center;
    width: fit-content;
    font-weight: 800;
    cursor: pointer;
}
body .settings-theme-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
body .settings-theme-switch {
    position: relative;
    width: 46px;
    height: 26px;
    border: 1px solid;
    border-radius: 999px;
    flex: 0 0 auto;
    transition: background 0.2s ease, border-color 0.2s ease;
}
body .settings-theme-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    transition: transform 0.2s ease;
}
body .settings-theme-toggle input:checked + .settings-theme-switch::after {
    transform: translateX(20px);
}
body .settings-theme-panel {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}
body .settings-theme-panel p {
    color: rgba(248, 250, 252, 0.74);
}
body .settings-theme-toggle {
    color: #f8fafc;
}
body .settings-theme-toggle input {
    accent-color: #22c55e;
}
body .settings-theme-switch {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}
body .settings-theme-switch::after {
    background: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
body .settings-theme-toggle input:checked + .settings-theme-switch {
    background: linear-gradient(135deg, #0891b2, #22c55e);
    border-color: rgba(34, 197, 94, 0.62);
}
body.dark-mode {
    background: radial-gradient(circle, #111827 0%, #020617 100%);
    color: #e5e7eb;
}
body.theme-dark-background {
    background-color: #020617 !important;
    background-image: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-attachment: fixed !important;
}
body.dark-mode .MainPageHeader {
    background-color: rgba(2, 6, 23, 0.92);
    border-bottom-color: rgba(148, 163, 184, 0.16);
}
body.dark-mode input {
    background: rgba(2, 6, 23, 0.82);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.22);
}
body.dark-mode input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.24);
}
body.dark-mode .note-box,
body.dark-mode .ExerciseBox,
body.dark-mode .page-shell,
body.dark-mode .main-content,
body.dark-mode .hero-shell,
body.dark-mode .account-actions-dialog,
body.dark-mode .exercise-card,
body.dark-mode .plan-link,
body.dark-mode .muscle-item,
body.dark-mode .Images a,
body.dark-mode .ExercisesGuideLink {
    background: rgba(2, 6, 23, 0.78);
    border-color: rgba(148, 163, 184, 0.14);
    color: #f8fafc;
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
}
body.dark-mode .account-actions-modal {
    background: rgba(0, 0, 0, 0.78);
}
body.dark-mode .settings-password-panel,
body.dark-mode .settings-theme-panel {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}
body.dark-mode .account-actions-dialog h3,
body.dark-mode .settings-current-user,
body.dark-mode .note-box h3,
body.dark-mode .page-title,
body.dark-mode .favorites-item,
body.dark-mode .plan-link {
    color: #facc15 !important;
}
body.dark-mode .account-actions-dialog p,
body.dark-mode .hero-kicker,
body.dark-mode .hero-subtitle,
body.dark-mode .page-subtitle,
body.dark-mode .empty {
    color: rgba(226, 232, 240, 0.78);
}
body.dark-mode .LeftLink,
body.dark-mode .RightLink,
body.dark-mode .CenterLink,
body.dark-mode .AnatomyLink {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.16);
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body.dark-mode .LeftLink:hover,
body.dark-mode .CenterLink:hover,
body.dark-mode .RightLink:hover,
body.dark-mode .AnatomyLink:hover,
body.dark-mode .muscle-item:hover,
body.dark-mode .Images a:hover {
    background: rgba(8, 47, 73, 0.68);
    border-color: rgba(34, 211, 238, 0.34);
    color: #ffffff;
}
body.dark-mode .account-menu-open {
    background: rgba(2, 6, 23, 0.94);
    color: #f8fafc;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.52);
}
body.dark-mode .account-action-logout {
    background: #b91c1c;
}
body.dark-mode .account-action-delete {
    background: #220303;
}
body.dark-mode .account-action-forget {
    background: #7f1d1d;
}
body.dark-mode .account-action-change-password,
body.dark-mode .account-action-terms {
    background: #0e7490;
}
body.dark-mode .account-action-cancel,
body.dark-mode button {
    background: linear-gradient(135deg, #16a34a, #047857);
    color: #ffffff;
}
body.dark-mode .check-icon,
body.dark-mode .favorites-item {
    background: #facc15;
    color: #020617;
}

/* =========================
   ANATOMY MAIN BACKGROUND MATCH
   ========================= */
body.theme-dark-background.page-anatomy,
body.theme-dark-background.page-anatomy .page-shell,
body.theme-dark-background.page-anatomy-detail,
body.theme-dark-background.page-anatomy-detail .anatomy-detail-hero,
body.theme-dark-background.page-anatomy-detail .anatomy-workspace,
body.theme-dark-background.page-anatomy-detail .anatomy-visual-panel,
body.theme-dark-background.page-anatomy-detail .anatomy-muscle-card {
    background: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-color: #020617 !important;
    background-image: radial-gradient(circle, #111827 0%, #020617 100%) !important;
}
/* =========================
   LYFTA STYLE MAIN PAGE SIDEBAR
   ========================= */
body.page-main-menu {
    display: grid !important;
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: stretch !important;
    min-height: 100vh;
    padding: 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body.page-main-menu .main-sidebar {
    position: sticky;
    top: 16px;
    align-self: start;
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    box-sizing: border-box;
    border-radius: 22px;
    background: rgba(7, 12, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}
body.page-main-menu .main-sidebar-top {
    display: grid;
    justify-items: start;
    padding: 4px 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body.page-main-menu .main-settings-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: none;
    font-size: 1.25rem;
}
body.page-main-menu .main-settings-button:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}
body.page-main-menu .main-sidebar-user,
body.page-main-menu .main-sidebar-category {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 11px 12px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.page-main-menu .main-sidebar-user,
body.page-main-menu .main-sidebar-category {
    margin: 10px 0 2px;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.18));
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
}
body.page-main-menu .main-sidebar-category::after,
body.page-main-menu .main-sidebar-user::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 8px;
    background: currentColor;
    opacity: 0.38;
}
body.page-main-menu .main-sidebar-top .main-sidebar-user {
    margin-top: 0;
}
body.page-main-menu .main-sidebar-category:first-child {
    margin-top: 0;
}
body.dark-mode.page-main-menu .main-sidebar-user,
body.dark-mode.page-main-menu .main-sidebar-category {
    color: #fcd34d;
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.26), rgba(15, 23, 42, 0.28));
    border-top-color: rgba(252, 211, 77, 0.28);
    border-bottom-color: rgba(252, 211, 77, 0.28);
}
body.dark-mode.page-main-menu .main-sidebar-user::after,
body.dark-mode.page-main-menu .main-sidebar-category::after {
    opacity: 0.5;
}
body.page-main-menu .main-sidebar-nav {
    display: grid;
}
body.page-main-menu .main-sidebar-secondary {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body.page-main-menu .main-sidebar-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: rgba(248, 250, 252, 0.76);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
body.page-main-menu .main-sidebar-link:hover,
body.page-main-menu .main-sidebar-link.is-active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    transform: translateX(2px);
}
body.page-main-menu .main-sidebar-premium {
    margin-top: 6px;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #f59e0b);
}
body.page-main-menu .main-sidebar-premium:hover {
    color: #111827;
    background: linear-gradient(135deg, #fde047, #f59e0b);
}
body.page-main-menu .HeaderIconContainer {
    min-width: 0;
    width: 100%;
    padding: 0 !important;
    align-self: stretch;
}
body.page-main-menu .hero-shell {
    width: 100% !important;
    min-height: calc(100vh - 32px) !important;
}
body.dark-mode.page-main-menu .main-sidebar {
    background: rgba(2, 6, 23, 0.82);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}
body.dark-mode.page-main-menu .main-settings-button,
body.dark-mode.page-main-menu .main-sidebar-link:hover,
body.dark-mode.page-main-menu .main-sidebar-link.is-active {
    background: rgba(15, 23, 42, 0.9);
}
@media (max-width: 1279.98px) {
    body.page-main-menu {
        grid-template-columns: 1fr;
        padding: 12px !important;
    }
    body.page-main-menu .main-sidebar {
        display: none;
    }
    body.page-main-menu .main-sidebar-nav {
        grid-template-columns: 1fr;
    }
    body.page-main-menu .hero-shell {
        min-height: auto !important;
        width: 100% !important;
        flex-direction: column;
        align-items: flex-start;
    }
    body.page-main-menu .HeaderIconContainer {
        padding: 0 !important;
    }
    body.page-main-menu .HeaderIcon {
        width: min(100%, 460px);
    }
}
@media (max-width: 480px) {
    body.page-main-menu {
        padding: 10px !important;
    }
    body.page-main-menu .main-sidebar {
        display: none;
    }
    body.page-main-menu .main-sidebar-top {
    }
    body.page-main-menu .main-sidebar-link {
        min-height: 40px;
        padding: 0 10px;
    }
    body.page-main-menu .hero-shell {
        padding: 16px 14px 20px !important;
    }
    body.page-main-menu .HeaderIcon {
        max-width: 100%;
    }
}
@media (min-width: 1280px) {
    body.has-mobile-footer:not(.page-main-menu) {
        padding-left: 286px !important;
    }
    body.has-mobile-footer:not(.page-main-menu) .main-sidebar {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 86;
        width: 248px;
        height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
        padding: 18px 14px;
        box-sizing: border-box;
        border-radius: 22px;
        background: rgba(7, 12, 24, 0.72);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
        overflow-y: auto;
    }
    body.has-mobile-footer .site-menu-button {
        display: none !important;
    }
}
@media (max-width: 1279.98px) {
    body.has-mobile-footer .main-sidebar {
        display: none !important;
    }
    body.has-mobile-footer .site-menu-button {
        display: inline-flex;
    }
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-top {
    display: grid;
    justify-items: start;
    padding: 4px 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-nav {
    display: grid;
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-user,
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-category {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 10px 0 2px;
    padding: 11px 12px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.18));
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-top .main-sidebar-user {
    margin-top: 0;
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-user::after,
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-category::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 8px;
    background: currentColor;
    opacity: 0.38;
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: rgba(248, 250, 252, 0.76);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-link:hover,
body.has-mobile-footer:not(.page-main-menu) .main-sidebar-link.is-active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    transform: translateX(2px);
}
body.dark-mode.has-mobile-footer:not(.page-main-menu) .main-sidebar {
    background: rgba(2, 6, 23, 0.82);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}
body.dark-mode.has-mobile-footer:not(.page-main-menu) .main-sidebar-user,
body.dark-mode.has-mobile-footer:not(.page-main-menu) .main-sidebar-category {
    color: #fcd34d;
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.26), rgba(15, 23, 42, 0.28));
    border-top-color: rgba(252, 211, 77, 0.28);
    border-bottom-color: rgba(252, 211, 77, 0.28);
}
body.page-main-menu .main-mobile-footer {
    display: none;
}
body.page-main-menu .main-mobile-footer-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
body.page-main-menu .main-mobile-footer-icon {
    width: 22px;
    height: 22px;
    display: block;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.page-main-menu .main-mobile-footer-icon-home {
    width: 23px;
    height: 23px;
}
body.page-main-menu .main-mobile-footer-icon-table {
    width: 24px;
    height: 24px;
}
body.page-main-menu .main-mobile-footer-gymrat,
body.page-main-menu .main-mobile-footer-anatomy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
body.page-main-menu .main-mobile-footer-item.is-active {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.42);
}
body.dark-mode.page-main-menu .main-mobile-footer-item {
    background: rgba(2, 6, 23, 0.94);
    border-color: rgba(148, 163, 184, 0.22);
}
body.dark-mode.page-main-menu .main-mobile-footer-item.is-active {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(74, 222, 128, 0.44);
}
@media (max-width: 640px) {
    body.page-main-menu {
        padding-bottom: 88px !important;
    }
    body.page-main-menu .main-mobile-footer {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        background: rgba(7, 12, 24, 0.92);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(14px);
    }
    body.page-main-menu .main-mobile-footer-item {
        width: 100%;
        height: 50px;
        min-width: 0;
        min-height: 50px;
    }
}
@media (max-width: 640px) {
    body .account-actions-modal {
        align-items: flex-start;
        z-index: 140;
        padding: 12px 12px 120px;
    }
    body .account-actions-dialog {
        width: min(420px, 100%);
        max-height: calc(100dvh - 132px);
        margin-top: 0;
        margin-bottom: 0;
    }
}
body.has-mobile-footer .main-mobile-footer {
    display: none;
}
body.has-mobile-footer .main-mobile-footer-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
body.has-mobile-footer .main-mobile-footer-icon {
    width: 20px;
    height: 20px;
    display: block;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.has-mobile-footer .main-mobile-footer-icon-home {
    width: 21px;
    height: 21px;
}
body.has-mobile-footer .main-mobile-footer-icon-table {
    width: 22px;
    height: 22px;
}
body.has-mobile-footer .main-mobile-footer-gymrat,
body.has-mobile-footer .main-mobile-footer-anatomy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
body.has-mobile-footer .main-mobile-footer-item.is-active {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.42);
}
body.dark-mode.has-mobile-footer .main-mobile-footer-item {
    background: rgba(2, 6, 23, 0.94);
    border-color: rgba(148, 163, 184, 0.22);
}
body.dark-mode.has-mobile-footer .main-mobile-footer-item.is-active {
    background: rgba(34, 197, 94, 0.28);
    border-color: rgba(74, 222, 128, 0.44);
}
@media (max-width: 640px) {
    body.has-mobile-footer {
        padding-bottom: 88px !important;
    }
    body.has-mobile-footer .main-mobile-footer {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 95;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        background: rgba(7, 12, 24, 0.92);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(14px);
    }
    body.has-mobile-footer .main-mobile-footer-item {
        width: 100%;
        height: 42px;
        min-width: 0;
        min-height: 42px;
    }
}
.main-mobile-footer {
    direction: ltr !important;
}
.main-mobile-footer .main-mobile-footer-item {
    direction: ltr;
}
.main-mobile-footer .main-mobile-footer-item[aria-label="Home"] { order: 1; }
.main-mobile-footer .main-mobile-footer-item[aria-label="Diet"] { order: 2; }
.main-mobile-footer .main-mobile-footer-item[aria-label="Workout plan"] { order: 3; }
.main-mobile-footer .main-mobile-footer-item[aria-label="Progressive overload"] { order: 4; }
.main-mobile-footer .main-mobile-footer-item[aria-label="Anatomy"] { order: 5; }
.main-mobile-footer .main-mobile-footer-item[aria-label="Settings"] { order: 6; }
@media (min-width: 1280px) {
    body.page-main-menu.has-mobile-footer .site-menu-button {
        display: none !important;
    }
}
body.has-mobile-footer .site-menu-button {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 96;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}
body.has-mobile-footer .site-menu-button svg {
    width: 22px;
    height: 22px;
    display: block;
}
body.has-mobile-footer .site-menu-button:hover {
    background: rgba(30, 41, 59, 0.96);
}
body.has-mobile-footer .site-menu-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}
body.has-mobile-footer .site-menu-modal[hidden] {
    display: none;
}
body.has-mobile-footer .site-menu-dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
    text-align: left;
}
body .account-actions-dialog {
    position: relative;
}
body .account-actions-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: none;
}
body .account-actions-close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: none;
}
body .account-actions-dialog h2 {
    padding-right: 52px;
}
body.has-mobile-footer .site-menu-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 1.35rem;
    line-height: 1;
}
body.has-mobile-footer .site-menu-close:hover {
    background: rgba(255, 255, 255, 0.14);
}
body.has-mobile-footer .site-menu-section {
    display: grid;
    justify-items: stretch;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
body.has-mobile-footer .site-menu-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
body.has-mobile-footer .site-menu-section-title {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 10px 0 2px;
    padding: 11px 12px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.18));
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.has-mobile-footer .site-menu-section-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 8px;
    background: currentColor;
    opacity: 0.38;
}
body.has-mobile-footer .site-menu-section:first-of-type .site-menu-section-title {
    margin-top: 0;
}
body.has-mobile-footer .site-menu-link,
body.has-mobile-footer .site-menu-action {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font: inherit;
    text-align: left;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px 12px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
}
body.has-mobile-footer .site-menu-link:hover,
body.has-mobile-footer .site-menu-action:hover {
    background: rgba(255, 255, 255, 0.12);
}
body.has-mobile-footer .site-menu-group {
    display: grid;
}
body.has-mobile-footer .site-menu-indent {
    padding-left: 10px;
}
body.site-menu-open {
    overflow: hidden;
}
@media (max-width: 640px) {
    body.has-mobile-footer .site-menu-button {
        top: 10px;
        left: 10px;
    }
    body.has-mobile-footer .site-menu-dialog {
        width: min(100%, 380px);
        padding: 22px 18px 18px;
    }
}
@media (max-width: 1279.98px) {
    body.has-mobile-footer .main-sidebar {
        display: none !important;
    }
    body.has-mobile-footer .site-menu-button {
        display: inline-flex !important;
    }
}
@media (max-width: 1279.98px) {
    body.has-mobile-footer {
        padding-bottom: 88px !important;
    }
    body.has-mobile-footer .main-mobile-footer {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 95;
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        background: rgba(7, 12, 24, 0.92);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(14px);
    }
    body.has-mobile-footer .main-mobile-footer-item {
        width: 100%;
        height: 42px;
        min-width: 0;
        min-height: 42px;
    }
    body.page-main-menu .HeaderIconContainer {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 112px);
        width: 100%;
        margin: 0 auto;
        padding: 0 !important;
        box-sizing: border-box;
    }
    body.page-main-menu .hero-shell {
        width: min(100%, 960px) !important;
        min-height: auto !important;
        margin: 0 auto;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    body.page-main-menu .hero-copy {
        max-width: 680px;
        margin: 0 auto;
        text-align: center;
    }
    body.page-main-menu .HeaderIcon {
        margin-left: auto;
        margin-right: auto;
    }
}
@media (min-width: 1280px) {
    body.has-mobile-footer .main-mobile-footer {
        display: none !important;
    }
}
.main-mobile-footer .main-mobile-footer-gymrat,
.main-mobile-footer .main-mobile-footer-anatomy {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 2px;
    box-sizing: border-box;
    border-radius: inherit;
}
body.has-mobile-footer .site-menu-dialog,
body.has-mobile-footer .site-menu-section,
body.has-mobile-footer .site-menu-section-title,
body.has-mobile-footer .site-menu-link,
body.has-mobile-footer .site-menu-action {
    direction: ltr !important;
    text-align: left !important;
}
body.has-mobile-footer .site-menu-link,
body.has-mobile-footer .site-menu-action {
    justify-content: flex-start !important;
}
body.has-mobile-footer .main-sidebar,
body.has-mobile-footer .main-sidebar-top,
body.has-mobile-footer .main-sidebar-nav,
body.has-mobile-footer .main-sidebar-user,
body.has-mobile-footer .main-sidebar-category,
body.has-mobile-footer .main-sidebar-link {
    direction: ltr !important;
    text-align: left !important;
}
body.has-mobile-footer .main-sidebar-link {
    justify-content: flex-start !important;
}

body.page-exercise-list {
    display: block;
    align-items: initial;
    min-height: 100vh;
    box-sizing: border-box;
}

body.page-exercise-list .container {
    width: min(100%, 1180px);
    margin: 0 auto;
    box-sizing: border-box;
}

body.page-exercise-list .exercise-card {
    min-width: 0;
}

body.page-exercise-list .exercise-title {
    overflow-wrap: anywhere;
}

body.page-exercise-list .site-menu-button,
body.page-exercise-list .main-mobile-footer-item {
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    body.page-exercise-list .container {
        margin-left: 0;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    body.page-exercise-list {
        padding: 76px 12px 96px !important;
    }

    body.page-exercise-list .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-exercise-list .exercise-card {
        border-radius: 14px;
        padding: 12px;
    }
}
body.page-tracking-entry {
    display: block;
    align-items: initial;
    justify-content: initial;
    min-height: 100vh;
    box-sizing: border-box;
}

body.page-tracking-entry .wrapper {
    width: min(100%, 1000px);
    margin: clamp(76px, 9vh, 110px) auto 32px;
    padding: 20px;
    box-sizing: border-box;
}

body.page-tracking-entry .container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.page-tracking-entry .box {
    min-width: 0;
    box-sizing: border-box;
}

body.page-tracking-entry .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

body.page-tracking-entry .buttons button {
    width: min(220px, 100%);
    margin: 0;
}

body.page-tracking-entry .site-menu-button,
body.page-tracking-entry .main-mobile-footer-item {
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    body.page-tracking-entry .wrapper {
        margin-left: 0;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    body.page-tracking-entry {
        padding: 76px 12px 96px !important;
    }

    body.page-tracking-entry .wrapper {
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    body.page-tracking-entry .container {
        grid-template-columns: 1fr;
    }

    body.page-tracking-entry .box {
        border-radius: 14px;
        padding: 14px;
    }
}
/* Muscle page corrections: match MainPage background, improve selection, and use width efficiently. */
body.page-exercise-list,
body.page-tracking-entry {
    background: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    background-color: #0f172a !important;
    background-image: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    background-attachment: fixed !important;
    color: #ffffff !important;
}

body.theme-dark-background.page-exercise-list,
body.theme-dark-background.page-tracking-entry,
body.dark-mode.page-exercise-list,
body.dark-mode.page-tracking-entry {
    background: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-color: #020617 !important;
    background-image: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-attachment: fixed !important;
    color: #e5e7eb !important;
}

body.page-exercise-list .container {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
    align-items: stretch;
}

body.page-exercise-list .exercise-card {
    width: 100%;
    box-sizing: border-box;
}

body.page-exercise-list .IMG {
    height: clamp(118px, 12vw, 170px) !important;
}

body.page-tracking-entry .container {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
    justify-content: stretch !important;
}

body.page-tracking-entry .box {
    min-width: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.page-tracking-entry .box.is-selected {
    border-color: rgba(74, 222, 128, 0.72) !important;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.28), 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
}

body.page-tracking-entry .selectBox {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
}

body.page-tracking-entry .exercise-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

body.page-tracking-entry .exercise-select-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 108px;
    min-height: 42px;
    max-width: none !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.72) !important;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: none !important;
}

body.page-tracking-entry .exercise-select-toggle[aria-pressed="true"] {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: rgba(74, 222, 128, 0.58);
    color: #dcfce7;
}

body.page-tracking-entry .exercise-select-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid currentColor;
    box-sizing: border-box;
}

body.page-tracking-entry .exercise-select-toggle[aria-pressed="true"] .exercise-select-dot {
    background: currentColor;
}

@media (max-width: 900px) {
    body.page-exercise-list .container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body.page-exercise-list .container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.page-exercise-list .IMG {
        height: clamp(104px, 30vw, 132px) !important;
    }

    body.page-tracking-entry .container {
        grid-template-columns: 1fr !important;
    }

    body.page-tracking-entry .exercise-select-toggle {
        min-width: 116px;
        min-height: 44px;
        padding: 10px 14px !important;
    }
}
/* Favorites grid matches exercise-list tile density. */
body.page-favorites .page-shell {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

body.page-favorites .container {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
    align-items: stretch;
    box-sizing: border-box;
}

body.page-favorites .exercise-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 16px;
}

body.page-favorites .IMG {
    width: 100%;
    height: clamp(118px, 12vw, 170px) !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    box-sizing: border-box;
}

body.page-favorites .exercise-title {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    body.page-favorites .container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)) !important;
    }
}

@media (max-width: 640px) {
    body.page-favorites .page-shell {
        padding: 18px 12px 22px !important;
    }

    body.page-favorites .container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.page-favorites .exercise-card {
        padding: 12px;
        border-radius: 14px;
    }

    body.page-favorites .IMG {
        height: clamp(104px, 30vw, 132px) !important;
    }
}
/* Compact training-guide muscle scroller for exercise detail pages. */
body.page-exercise-list .training-guide-mini-nav {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    padding: 4px 0 10px;
    box-sizing: border-box;
    overflow: hidden;
}

body.page-exercise-list .training-guide-mini-nav::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 0;
    bottom: 10px;
    width: clamp(34px, 7vw, 72px);
    pointer-events: none;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.94));
}

body.theme-dark-background.page-exercise-list .training-guide-mini-nav::after,
body.dark-mode.page-exercise-list .training-guide-mini-nav::after {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.96));
}

body.page-exercise-list .training-guide-mini-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 42px 8px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(250, 204, 21, 0.75) rgba(255, 255, 255, 0.14);
}

body.page-exercise-list .training-guide-mini-track::-webkit-scrollbar {
    height: 6px;
}

body.page-exercise-list .training-guide-mini-track::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

body.page-exercise-list .training-guide-mini-track::-webkit-scrollbar-thumb {
    background: rgba(250, 204, 21, 0.78);
    border-radius: 999px;
}

body.page-exercise-list .training-guide-mini-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    height: clamp(42px, 5.4vw, 52px);
    padding: 5px 10px 5px 6px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    text-decoration: none;
    font-size: clamp(0.76rem, 1.6vw, 0.9rem);
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

body.page-exercise-list .training-guide-mini-item img {
    width: clamp(30px, 4.6vw, 40px);
    height: clamp(30px, 4.6vw, 40px);
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

body.page-exercise-list .training-guide-mini-item.is-active {
    border-color: rgba(250, 204, 21, 0.74);
    background: rgba(250, 204, 21, 0.2);
    color: #fef3c7;
}

body.page-exercise-list .training-guide-mini-favorites {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #111827;
    border-color: rgba(250, 204, 21, 0.68);
}

@media (max-width: 640px) {
    body.page-exercise-list .training-guide-mini-nav {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    body.page-exercise-list .training-guide-mini-track {
        padding-right: 34px;
    }

    body.page-exercise-list .training-guide-mini-item {
        height: 40px;
        padding: 4px 9px 4px 5px;
        border-radius: 10px;
    }

    body.page-exercise-list .training-guide-mini-item img {
        width: 30px;
        height: 30px;
    }
}
/* Reuse compact training-guide scroller on Favorites. */
body.page-favorites .training-guide-mini-nav {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    padding: 4px 0 10px;
    box-sizing: border-box;
    overflow: hidden;
}

body.page-favorites .training-guide-mini-nav::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 0;
    bottom: 10px;
    width: clamp(34px, 7vw, 72px);
    pointer-events: none;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.94));
}

body.dark-mode.page-favorites .training-guide-mini-nav::after,
body.theme-dark-background.page-favorites .training-guide-mini-nav::after {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.96));
}

body.page-favorites .training-guide-mini-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 42px 8px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(250, 204, 21, 0.75) rgba(255, 255, 255, 0.14);
}

body.page-favorites .training-guide-mini-track::-webkit-scrollbar {
    height: 6px;
}

body.page-favorites .training-guide-mini-track::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

body.page-favorites .training-guide-mini-track::-webkit-scrollbar-thumb {
    background: rgba(250, 204, 21, 0.78);
    border-radius: 999px;
}

body.page-favorites .training-guide-mini-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    height: clamp(42px, 5.4vw, 52px);
    padding: 5px 10px 5px 6px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    text-decoration: none;
    font-size: clamp(0.76rem, 1.6vw, 0.9rem);
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

body.page-favorites .training-guide-mini-item img {
    width: clamp(30px, 4.6vw, 40px);
    height: clamp(30px, 4.6vw, 40px);
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

body.page-favorites .training-guide-mini-item.is-active {
    border-color: rgba(250, 204, 21, 0.74);
    background: rgba(250, 204, 21, 0.2);
    color: #fef3c7;
}

body.page-favorites .training-guide-mini-favorites {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #111827;
    border-color: rgba(250, 204, 21, 0.68);
}

@media (max-width: 640px) {
    body.page-favorites .training-guide-mini-nav {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    body.page-favorites .training-guide-mini-track {
        padding-right: 34px;
    }

    body.page-favorites .training-guide-mini-item {
        height: 40px;
        padding: 4px 9px 4px 5px;
        border-radius: 10px;
    }

    body.page-favorites .training-guide-mini-item img {
        width: 30px;
        height: 30px;
    }
}
/* Terms page background matches MainPage light/dark modes. */
body.page-terms {
    background: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    background-color: #0f172a !important;
    background-image: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    background-attachment: fixed !important;
    color: #ffffff !important;
}

body.theme-dark-background.page-terms,
body.dark-mode.page-terms {
    background: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-color: #020617 !important;
    background-image: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-attachment: fixed !important;
    color: #e5e7eb !important;
}

/* Diet website page integration. */
body.page-diet {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    background-color: #0f172a !important;
    background-image: radial-gradient(circle, #4169e1 0%, #0f172a 100%) !important;
    color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    box-sizing: border-box;
}
body.theme-dark-background.page-diet,
body.dark-mode.page-diet {
    background: radial-gradient(circle, #111827 0%, #020617 100%) !important;
    background-color: #020617 !important;
    background-image: radial-gradient(circle, #111827 0%, #020617 100%) !important;
}
body.page-diet *,
body.page-diet *::before,
body.page-diet *::after {
    box-sizing: border-box;
}
body.page-diet .diet-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 24px;
}
body.page-diet .diet-hero,
body.page-diet .diet-panel,
body.page-diet .diet-stat,
body.page-diet .diet-target-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}
body.dark-mode.page-diet .diet-hero,
body.dark-mode.page-diet .diet-panel,
body.dark-mode.page-diet .diet-stat,
body.dark-mode.page-diet .diet-target-card,
body.theme-dark-background.page-diet .diet-hero,
body.theme-dark-background.page-diet .diet-panel,
body.theme-dark-background.page-diet .diet-stat,
body.theme-dark-background.page-diet .diet-target-card {
    background: rgba(2, 6, 23, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}
body.page-diet .diet-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: stretch;
    padding: 22px;
    border-radius: 8px;
}
body.page-diet .diet-kicker {
    margin: 0 0 8px;
    color: #facc15;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
body.page-diet h1,
body.page-diet h2,
body.page-diet h3,
body.page-diet p {
    margin-top: 0;
}
body.page-diet h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}
body.page-diet .diet-hero p:not(.diet-kicker) {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(248, 250, 252, 0.76);
    line-height: 1.55;
}
body.page-diet .diet-target-card {
    display: grid;
    align-content: center;
    padding: 16px;
    border-radius: 8px;
}
body.page-diet .diet-target-card label,
body.page-diet .diet-field-label,
body.page-diet .diet-custom-date {
    color: rgba(248, 250, 252, 0.86);
    font-size: 0.9rem;
    font-weight: 800;
}
body.page-diet .diet-target-row,
body.page-diet .diet-actions-row,
body.page-diet .diet-date-controls,
body.page-diet .diet-food-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
body.page-diet input,
body.page-diet textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    padding: 11px 12px;
    font: inherit;
    outline: none;
}
body.page-diet textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
}
body.page-diet input:focus,
body.page-diet textarea:focus {
    border-color: rgba(74, 222, 128, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
body.page-diet .diet-target-row input {
    flex: 1 1 150px;
}
body.page-diet .diet-food-search {
    display: grid;
    margin: 18px 0;
}
body.page-diet .diet-food-search-row input[type="search"] {
    flex: 1 1 280px;
}
body.page-diet .diet-grams-field {
    display: inline-flex;
    align-items: center;
    flex: 0 0 150px;
    color: rgba(248, 250, 252, 0.86);
    font-size: 0.9rem;
    font-weight: 800;
}
body.page-diet .diet-grams-field input {
    min-width: 0;
}
body.page-diet .diet-search-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
body.page-diet .diet-search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    text-align: left;
}
body.page-diet .diet-search-result:hover {
    background: rgba(30, 41, 59, 0.92);
}
body.page-diet .diet-search-result strong,
body.page-diet .diet-search-result small {
    display: block;
}
body.page-diet .diet-search-result small,
body.page-diet .diet-search-empty {
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.82rem;
    line-height: 1.35;
}
body.page-diet .diet-search-empty {
    margin: 0;
}
body.page-diet button {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.9);
    color: #052e16;
    padding: 0 16px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
body.page-diet button:hover {
    background: #4ade80;
}
body.page-diet #clearDietButton,
body.page-diet #deleteDietDayButton {
    background: rgba(127, 29, 29, 0.88);
    color: #fff7ed;
}
body.page-diet #refreshDietButton,
body.page-diet .diet-date-button {
    background: rgba(255, 255, 255, 0.09);
    color: #f8fafc;
}
body.page-diet .diet-date-button.is-active {
    background: rgba(250, 204, 21, 0.95);
    color: #111827;
}
body.page-diet .diet-custom-date {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}
body.page-diet .diet-custom-date input {
    min-width: 160px;
}
body.page-diet .diet-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 16px 0;
}
body.page-diet .diet-stat {
    min-height: 116px;
    display: grid;
    align-content: center;
    padding: 16px;
    border-radius: 8px;
}
body.page-diet .diet-stat span,
body.page-diet .diet-stat small {
    color: rgba(248, 250, 252, 0.68);
    font-weight: 800;
}
body.page-diet .diet-stat strong {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1;
}
body.page-diet .diet-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: start;
}
body.page-diet .diet-panel {
    min-width: 0;
    padding: 18px;
    border-radius: 8px;
}
body.page-diet .diet-panel-heading,
body.page-diet .diet-items-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 14px;
}
body.page-diet .diet-panel-heading h2,
body.page-diet .diet-items-header h3 {
    margin-bottom: 0;
}
body.page-diet #dietSaveStatus,
body.page-diet #dietItemCount {
    min-height: 20px;
    margin: 0;
    color: #bbf7d0;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: right;
}
body.page-diet .diet-actions-final {
    margin-top: 14px;
    justify-content: flex-end;
}
body.page-diet #dietChart {
    width: 100%;
    height: auto;
    max-height: 280px;
    display: block;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}
body.page-diet .diet-history-table-wrap {
    width: 100%;
    margin-top: 14px;
    overflow-x: auto;
}
body.page-diet .diet-history-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    color: #f8fafc;
}
body.page-diet .diet-history-table th,
body.page-diet .diet-history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    white-space: nowrap;
}
body.page-diet .diet-history-table th {
    color: #facc15;
    font-size: 0.78rem;
    text-transform: uppercase;
}
body.page-diet .diet-history-table td:last-child {
    font-weight: 900;
}
@media (min-width: 1280px) {
    body.page-diet .diet-shell {
        margin-left: 0;
    }
}
@media (max-width: 980px) {
    body.page-diet .diet-hero,
    body.page-diet .diet-workspace {
        grid-template-columns: 1fr;
    }
    }
@media (max-width: 767px) {
    body.page-diet .diet-shell {
        padding: 12px 10px 92px;
    }
    body.page-diet .diet-hero,
    body.page-diet .diet-panel {
        padding: 14px;
    }
    body.page-diet .diet-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.page-diet .diet-stat {
        min-height: 96px;
        padding: 12px;
    }
    body.page-diet .diet-actions-row button,
    body.page-diet .diet-target-row button {
        flex: 1 1 150px;
    }
    body.page-diet .diet-panel-heading,
    body.page-diet .diet-items-header {
        align-items: stretch;
        flex-direction: column;
    }
    body.page-diet #dietSaveStatus,
    body.page-diet #dietItemCount {
        text-align: left;
    }
    }
@media (max-width: 420px) {
    body.page-diet .diet-summary-grid {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-date-controls button,
    body.page-diet .diet-custom-date {
        width: 100%;
    }
    body.page-diet .diet-custom-date input {
        min-width: 0;
        flex: 1;
    }
}
/* End Diet website page integration. */
/* Diet setup page. */
body.page-diet .diet-edit-setup-link,
body.page-diet-setup .diet-skip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 14px;
    padding: 0 14px;
    border: 1px solid rgba(250, 204, 21, 0.32);
    border-radius: 8px;
    color: #fef3c7;
    background: rgba(250, 204, 21, 0.12);
    font-weight: 900;
    text-decoration: none;
}
body.page-diet-setup .diet-setup-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 24px;
}
body.page-diet-setup .diet-setup-card,
body.page-diet-setup .diet-bodyfat-reference article {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
    border-radius: 8px;
}
body.dark-mode.page-diet-setup .diet-setup-card,
body.dark-mode.page-diet-setup .diet-bodyfat-reference article,
body.theme-dark-background.page-diet-setup .diet-setup-card,
body.theme-dark-background.page-diet-setup .diet-bodyfat-reference article {
    background: rgba(2, 6, 23, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
}
body.page-diet-setup .diet-setup-card {
    max-width: 880px;
    margin: 0 auto 16px;
    padding: 18px;
}
body.page-diet-setup .diet-setup-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
body.page-diet-setup .diet-setup-card-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}
body.page-diet-setup .diet-setup-card-heading p:not(.diet-kicker) {
    max-width: 640px;
    margin-bottom: 0;
    color: rgba(248, 250, 252, 0.76);
    line-height: 1.55;
}
body.page-diet-setup .diet-setup-form {
    display: grid;
}
body.page-diet-setup .diet-setup-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-diet-setup .diet-setup-basics label:last-child {
    grid-column: 1 / -1;
}
body.page-diet-setup .diet-setup-fields label {
    display: grid;
    color: rgba(248, 250, 252, 0.86);
    font-weight: 900;
    font-size: 0.9rem;
}
body.page-diet-setup select {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    padding: 0 12px;
    font: inherit;
    outline: none;
}
body.page-diet-setup .diet-setup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
body.page-diet-setup .diet-setup-final-actions {
    justify-content: flex-end;
}
body.page-diet-setup #resetDietSetupButton {
    background: rgba(127, 29, 29, 0.88);
    color: #fff7ed;
}
body.page-diet-setup #dietSetupStatus {
    margin: 0;
    color: #bbf7d0;
    font-weight: 900;
}
body.page-diet-setup .diet-recommendation-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.page-diet-setup .diet-recommendation-summary article,
body.page-diet-setup .diet-range-list {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
body.page-diet-setup .diet-recommendation-summary article {
    min-height: 92px;
    display: grid;
    align-content: center;
    padding: 12px;
}
body.page-diet-setup .diet-recommendation-summary span,
body.page-diet-setup .diet-recommendation-summary small {
    color: rgba(248, 250, 252, 0.68);
    font-weight: 800;
}
body.page-diet-setup .diet-recommendation-summary strong {
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    line-height: 1;
}
body.page-diet-setup .diet-range-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
}
body.page-diet-setup .diet-range-list p {
    margin: 0;
    color: rgba(248, 250, 252, 0.78);
    line-height: 1.4;
}
body.page-diet-setup .diet-range-list strong {
    color: #facc15;
}
body.page-diet-setup .diet-bodyfat-reference {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1180px;
    margin: 0 auto;
}
body.page-diet-setup .diet-bodyfat-reference article {
    min-width: 0;
    padding: 14px;
}
body.page-diet-setup .diet-bodyfat-reference h2 {
    margin: 0 0 10px;
    color: #facc15;
    font-size: 1.05rem;
}
body.page-diet-setup .diet-bodyfat-reference img {
    width: 100%;
    min-height: 220px;
    max-height: 520px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
@media (min-width: 1280px) {
    body.page-diet-setup .diet-setup-shell {
        margin-left: 0;
    }
}
@media (max-width: 980px) {
    body.page-diet-setup .diet-setup-card-heading {
        flex-direction: column;
    }
    body.page-diet-setup .diet-setup-fields,
    body.page-diet-setup .diet-recommendation-summary,
    body.page-diet-setup .diet-range-list,
    body.page-diet-setup .diet-bodyfat-reference {
        grid-template-columns: 1fr;
    }
    body.page-diet-setup .diet-setup-basics label:last-child {
        grid-column: auto;
    }
}
@media (max-width: 767px) {
    body.page-diet-setup .diet-setup-shell {
        padding: 12px 10px 92px;
    }
    body.page-diet-setup .diet-setup-card,
    body.page-diet-setup .diet-bodyfat-reference article {
        padding: 14px;
    }
    body.page-diet-setup .diet-setup-actions button,
    body.page-diet-setup .diet-skip-link {
        width: 100%;
    }
}
/* End Diet setup page. */
/* Diet body fat guide interaction. */
body.page-diet-setup .diet-bodyfat-label-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}
body.page-diet-setup #openBodyfatGuideButton {
    display: inline;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #facc15;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}
body.page-diet-setup #openBodyfatGuideButton:hover,
body.page-diet-setup #openBodyfatGuideButton:focus-visible {
    color: #fde68a;
    outline: none;
}
body.page-diet-setup .diet-bodyfat-reference[hidden] {
    display: none !important;
}
body.page-diet-setup .diet-bodyfat-reference {
    max-width: 1180px;
    margin: 0 auto;
}
body.page-diet-setup .diet-bodyfat-reference-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0 12px;
}
body.page-diet-setup .diet-bodyfat-reference-heading h2,
body.page-diet-setup .diet-bodyfat-reference-heading p {
    margin: 0;
}
body.page-diet-setup .diet-bodyfat-reference-heading p:not(.diet-kicker) {
    color: rgba(248, 250, 252, 0.74);
    line-height: 1.45;
}
body.page-diet-setup .diet-bodyfat-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-diet-setup .diet-bodyfat-reference h3 {
    margin: 0 0 10px;
    color: #facc15;
    font-size: 1.05rem;
}
body.page-diet-setup .bodyfat-image-fallback {
    margin: 0;
    color: rgba(248, 250, 252, 0.78);
    line-height: 1.5;
}
body.page-diet-setup .bodyfat-image-fallback a {
    color: #fde68a;
    font-weight: 900;
}
@media (max-width: 980px) {
    body.page-diet-setup .diet-bodyfat-reference-grid {
        grid-template-columns: 1fr;
    }
    body.page-diet-setup .diet-bodyfat-reference-heading {
        flex-direction: column;
    }
    body.page-diet-setup #closeBodyfatGuideButton {
        width: 100%;
    }
}

/* End Diet body fat guide interaction. */


/* Diet modal and footer active polish. */
body.diet-bodyfat-guide-open { overflow: hidden; }
body.page-diet-setup .diet-bodyfat-reference {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: 16px;
    background: rgba(2, 6, 23, 0.82);
}
body.page-diet-setup .diet-bodyfat-reference[hidden] { display: none !important; }
body.page-diet-setup .diet-bodyfat-reference-dialog {
    width: min(760px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
    padding: 16px;
}
body.page-diet-setup .diet-bodyfat-reference-stack {
    display: grid;
    grid-template-columns: 1fr;
}
body.page-diet-setup .diet-reset-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.76);
}
body.page-diet-setup .diet-reset-confirm-modal[hidden] { display: none !important; }
body.page-diet-setup .diet-reset-confirm-dialog {
    width: min(380px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    padding: 20px;
    color: #f8fafc;
}
body.page-diet-setup .diet-reset-confirm-dialog h2 { margin: 0 0 8px; }
body.page-diet-setup .diet-reset-confirm-dialog p {
    margin: 0 0 16px;
    color: rgba(248, 250, 252, 0.76);
    line-height: 1.45;
}
body.page-diet-setup .diet-reset-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
body.page-diet-setup #confirmDietResetYes { background: #dc2626; color: #ffffff; }
body.page-diet-setup #confirmDietResetNo { background: #16a34a; color: #ffffff; }
body.has-mobile-footer .main-mobile-footer-item.is-active,
body.page-main-menu .main-mobile-footer-item.is-active {
    background: rgba(34, 197, 94, 0.28) !important;
    border-color: rgba(74, 222, 128, 0.52) !important;
    color: #dcfce7 !important;
}
body.has-mobile-footer .main-mobile-footer-item.is-active svg,
body.page-main-menu .main-mobile-footer-item.is-active svg { color: #86efac !important; }
@media (max-width: 767px) {
    body.page-diet-setup .diet-bodyfat-reference { padding: 10px; }
    body.page-diet-setup .diet-bodyfat-reference-dialog {
        max-height: calc(100dvh - 20px);
        padding: 12px;
    }
}
/* End Diet modal and footer active polish. */

/* Google registration UI. */
body.page-login .auth-google-register-panel {
    margin: 16px 0 4px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
body.page-login .auth-google-title {
    margin: 0 0 10px !important;
    color: #334155 !important;
    font-size: 0.88rem;
    font-weight: 900;
}
body.page-login .auth-google-button {
    min-height: 44px;
}
body.page-login .auth-google-help {
    margin: 10px 0 0 !important;
    color: #475569 !important;
    font-size: 0.86rem;
    line-height: 1.4;
}
body.page-login .auth-google-selected {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 800;
}
body.page-login .auth-google-selected[hidden] {
    display: none !important;
}
body.page-login .auth-google-selected img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}
body.page-login .auth-google-selected span {
    min-width: 0;
    overflow-wrap: anywhere;
}
body.page-login .auth-google-selected button {
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    background: #16a34a;
    color: #ffffff;
}
/* End Google registration UI. */

/* Passwordless Google auth polish. */
body.page-login .auth-google-register-panel {
    margin: 18px 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
}
body.page-login .auth-google-title {
    margin: 0 0 8px !important;
    color: #334155 !important;
    font-size: 0.86rem;
    font-weight: 900;
}
body.page-login .auth-google-native-button {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 0.98rem;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
body.page-login .auth-google-native-button:hover,
body.page-login .auth-google-native-button:focus-visible {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #111827;
    outline: none;
}
body.page-login .auth-google-mark {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #2563eb;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 900;
}
body.page-login .auth-google-help {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 0.82rem;
    line-height: 1.35;
}
body.dark-mode.page-login .auth-google-title,
body.theme-dark-background.page-login .auth-google-title {
    color: rgba(248, 250, 252, 0.86) !important;
}
body.dark-mode.page-login .auth-google-native-button,
body.theme-dark-background.page-login .auth-google-native-button {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
body.dark-mode.page-login .auth-google-native-button:hover,
body.theme-dark-background.page-login .auth-google-native-button:hover {
    background: rgba(30, 41, 59, 0.98);
}
/* End passwordless Google auth polish. */
/* Account chooser. */
body.page-account-select {
    min-height: 100vh;
    margin: 0;
    padding: 24px 16px 36px;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    color: #0f172a;
    background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 52%, #dcfce7 100%);
}
body.page-account-select .account-select-shell {
    width: min(560px, 100%);
    min-height: calc(100vh - 60px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
body.page-account-select .account-select-card {
    width: 100%;
    max-width: 520px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: clamp(22px, 4vw, 34px);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.98);
    color: #0f172a;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
    box-sizing: border-box;
}
body.page-account-select .auth-brand-row {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    color: #0f172a;
    font-weight: 900;
    font-size: 1.05rem;
}
body.page-account-select .auth-brand-row .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
body.page-account-select .auth-card-kicker {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
body.page-account-select h1 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.08;
}
body.page-account-select .auth-lede,
body.page-account-select .auth-message {
    margin: 0;
    color: #475569;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
body.page-account-select .account-select-list {
    display: grid;
    margin: 18px 0 12px;
}
body.page-account-select .account-select-item {
    width: 100%;
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
body.page-account-select .account-select-item img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
body.page-account-select .account-select-item span {
    min-width: 0;
    display: grid;
}
body.page-account-select .account-select-item strong,
body.page-account-select .account-select-item small {
    overflow-wrap: anywhere;
}
body.page-account-select .account-select-item small {
    color: #64748b;
    font-weight: 800;
}
body.page-account-select .account-select-actions {
    margin-top: 12px;
}
body .account-action-change {
    background: #0e7490;
    color: #ffffff;
}
body.dark-mode.page-account-select,
body.theme-dark-background.page-account-select {
    color: #f8fafc;
    background: linear-gradient(135deg, #020617 0%, #111827 50%, #052e16 100%);
}
body.dark-mode.page-account-select .account-select-card,
body.theme-dark-background.page-account-select .account-select-card {
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}
body.dark-mode.page-account-select .auth-brand-row,
body.theme-dark-background.page-account-select .auth-brand-row,
body.dark-mode.page-account-select h1,
body.theme-dark-background.page-account-select h1 {
    color: #f8fafc;
}
body.dark-mode.page-account-select .auth-lede,
body.theme-dark-background.page-account-select .auth-lede,
body.dark-mode.page-account-select .auth-message,
body.theme-dark-background.page-account-select .auth-message {
    color: rgba(248, 250, 252, 0.72);
}
body.dark-mode.page-account-select .account-select-item,
body.theme-dark-background.page-account-select .account-select-item {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
}
body.dark-mode.page-account-select .account-select-item small,
body.theme-dark-background.page-account-select .account-select-item small {
    color: rgba(248, 250, 252, 0.7);
}
/* End account chooser. */

/* Settings username and scroll polish. */
body .account-actions-modal {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body .account-actions-dialog {
    max-width: calc(100vw - 24px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body .settings-username-panel {
    margin: 0 0 14px;
}
body .settings-username-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
body .settings-username-row input {
    min-width: 0;
}
body .settings-username-row button {
    width: auto;
    min-height: 42px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 8px;
    white-space: nowrap;
}
@media (max-width: 460px) {
    body .settings-username-row {
        grid-template-columns: 1fr;
    }
    body .settings-username-row button {
        width: 100%;
    }
}
/* End settings username and scroll polish. */





/* Diet setup range targets. */
body.page-diet-setup .diet-setup-apply-actions {
    justify-content: flex-start;
}
body.page-diet-setup .diet-setup-range-targets fieldset {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}
body.page-diet-setup .diet-setup-range-targets legend {
    padding: 0 6px;
    color: #facc15;
    font-weight: 900;
}
body.page-diet-setup .diet-range-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-diet-setup .diet-range-inputs label {
    display: grid;
}
@media (max-width: 520px) {
    body.page-diet-setup .diet-range-inputs {
        grid-template-columns: 1fr;
    }
}
/* End diet setup range targets. */

/* Diet history removed layout. */
body.page-diet .diet-workspace {
    grid-template-columns: minmax(0, 1fr);
}
body.page-diet .diet-form-panel {
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
}
/* End diet history removed layout. */

/* Diet goal progress cards. */
body.page-diet .diet-stat {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    --diet-progress: 0%;
}
body.page-diet .diet-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--diet-progress, 0%);
    max-width: 100%;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.38), rgba(34, 197, 94, 0.18));
    border-right: 1px solid rgba(134, 239, 172, 0.38);
    z-index: -1;
    transition: width 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
body.page-diet .diet-stat.is-in-goal::before {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.58), rgba(22, 163, 74, 0.34));
    border-right-color: rgba(134, 239, 172, 0.72);
}
body.page-diet .diet-stat.is-in-goal {
    border-color: rgba(134, 239, 172, 0.62);
}
body.page-diet .diet-stat.is-under-goal::before,
body.page-diet .diet-stat.is-over-goal::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.58), rgba(185, 28, 28, 0.34));
    border-right-color: rgba(252, 165, 165, 0.72);
}
body.page-diet .diet-stat.is-under-goal,
body.page-diet .diet-stat.is-over-goal {
    border-color: rgba(252, 165, 165, 0.62);
}
body.page-diet .diet-stat.is-over-goal::before {
    width: 100%;
}
body.page-diet .diet-stat > * {
    position: relative;
    z-index: 1;
}
/* End diet goal progress cards. */

/* Diet page centered layout and practical food search panel. */
body.page-diet .diet-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 104px;
}
body.page-diet .diet-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 26px 22px;
}
body.page-diet .diet-hero p:not(.diet-kicker) {
    margin-left: auto;
    margin-right: auto;
}
body.page-diet .diet-edit-setup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 16px;
    padding: 0 14px;
    border: 1px solid rgba(250, 204, 21, 0.42);
    border-radius: 8px;
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    font-weight: 900;
    text-decoration: none;
}
body.page-diet .diet-summary-grid {
    width: min(980px, 100%);
    margin: 16px auto;
}
body.page-diet .diet-workspace {
    justify-items: center;
}
body.page-diet .diet-form-panel {
    max-width: 900px;
    width: 100%;
}
body.page-diet .diet-panel {
    padding: 22px;
}
body.page-diet .diet-food-search {
    position: relative;
    z-index: 5;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}
body.page-diet .diet-food-search.is-open {
    border-color: rgba(134, 239, 172, 0.48);
    background: rgba(15, 23, 42, 0.72);
}
body.page-diet .diet-food-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
    align-items: end;
}
body.page-diet .diet-grams-field {
    display: grid;
    grid-template-columns: 1fr;
    flex: none;
}
body.page-diet .diet-search-panel[hidden] {
    display: none !important;
}
body.page-diet .diet-search-panel {
    display: grid;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}
body.page-diet .diet-search-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.page-diet .diet-search-panel-heading strong,
body.page-diet .diet-search-panel-heading span {
    display: block;
}
body.page-diet .diet-search-panel-heading span {
    margin-top: 3px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.86rem;
    line-height: 1.35;
}
body.page-diet .diet-search-close {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}
body.page-diet .diet-search-results {
    max-height: min(430px, 52vh);
    overflow-y: auto;
    padding-right: 4px;
}
body.page-diet .diet-search-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.74);
}
body.page-diet .diet-search-result:hover {
    background: rgba(30, 41, 59, 0.86);
}
body.page-diet .diet-search-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}
body.page-diet .diet-search-result-actions button {
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}
body.page-diet .diet-search-grams-button {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}
body.page-diet .diet-search-empty {
    padding: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}
@media (min-width: 1280px) {
    body.page-diet .diet-shell {
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 767px) {
    body.page-diet .diet-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 14px;
    }
    body.page-diet .diet-panel {
        padding: 16px;
    }
    body.page-diet .diet-food-search-row,
    body.page-diet .diet-search-result {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-search-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }
    body.page-diet .diet-search-close,
    body.page-diet .diet-search-result-actions button,
    body.page-diet .diet-actions-row button,
    body.page-diet .diet-actions-final button {
        width: 100%;
    }
    body.page-diet .diet-search-result-actions {
        justify-content: stretch;
    }
}
/* End Diet page centered layout and practical food search panel. */

/* Diet search result layout fix. */
body.page-diet .diet-search-panel {
    width: 100%;
    overflow: hidden;
}
body.page-diet .diet-search-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
}
body.page-diet .diet-search-result {
    width: 100%;
    min-width: 0;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(132px, max-content);
    align-items: center;
    padding: 12px;
}
body.page-diet .diet-search-result > span:first-child {
    min-width: 0;
    overflow: hidden;
}
body.page-diet .diet-search-result strong {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.25;
}
body.page-diet .diet-search-result small {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    overflow-wrap: anywhere;
}
body.page-diet .diet-search-result-actions {
    min-width: 132px;
    display: grid;
    grid-auto-rows: minmax(38px, auto);
    justify-items: stretch;
    align-items: stretch;
}
body.page-diet .diet-search-result-actions button {
    width: 100%;
    min-width: 0;
    max-width: 180px;
    justify-self: end;
    white-space: normal;
    line-height: 1.15;
    padding: 8px 10px;
}
@media (max-width: 860px) {
    body.page-diet .diet-search-result {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    body.page-diet .diet-search-result-actions {
        min-width: 0;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
    body.page-diet .diet-search-result-actions button {
        max-width: none;
        justify-self: stretch;
    }
}
/* End Diet search result layout fix. */

/* Diet search simplified list and selected-food detail panel. */
body.page-diet .diet-search-results {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-height: min(300px, 38vh);
    overflow-y: auto;
}
body.page-diet .diet-search-result {
    display: block !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.74);
    color: #f8fafc;
    text-align: left;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
body.page-diet .diet-search-result:hover,
body.page-diet .diet-search-result:focus-visible {
    border-color: rgba(134, 239, 172, 0.5);
    background: rgba(30, 41, 59, 0.95);
    outline: none;
}
body.page-diet .diet-selected-food[hidden] {
    display: none !important;
}
body.page-diet .diet-selected-food {
    display: grid;
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1200;
    width: min(540px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(134, 239, 172, 0.38);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 0 9999px rgba(2, 6, 23, 0.62);
}
body.page-diet .diet-selected-food-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
body.page-diet .diet-selected-food-heading strong,
body.page-diet .diet-selected-food-heading span {
    display: block;
}
body.page-diet .diet-selected-food-heading strong {
    line-height: 1.25;
    overflow-wrap: anywhere;
}
body.page-diet .diet-selected-food-heading span {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.86rem;
}
body.page-diet .diet-selected-food-close {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    background: rgba(127, 29, 29, 0.9);
    color: #fff7ed;
}
body.page-diet .diet-selected-food-macros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.page-diet .diet-selected-food-macros span {
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
body.page-diet .diet-selected-food-macros strong,
body.page-diet .diet-selected-food-macros small {
    display: block;
}
body.page-diet .diet-selected-food-macros strong {
    font-size: 1.15rem;
    line-height: 1;
}
body.page-diet .diet-selected-food-macros small {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
}
body.page-diet .diet-selected-serving-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
body.page-diet .diet-selected-food-mode,
body.page-diet .diet-selected-food-amount,
body.page-diet .diet-selected-food-meal {
    display: grid;
    color: rgba(248, 250, 252, 0.86);
    font-size: 0.9rem;
    font-weight: 800;
}
body.page-diet .diet-selected-serving-controls select,
body.page-diet .diet-selected-serving-controls input {
    min-width: 0;
}
body.page-diet .diet-selected-food-actions {
    display: flex;
    flex-wrap: wrap;
}
body.page-diet #discardSelectedFoodButton {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}
@media (max-width: 640px) {
    body.page-diet .diet-selected-food-heading,
    body.page-diet .diet-selected-food-actions {
        flex-direction: column;
    }
    body.page-diet .diet-selected-food-close,
    body.page-diet .diet-selected-food-actions button {
        width: 100%;
    }
    body.page-diet .diet-selected-food-macros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* End Diet search simplified list and selected-food detail panel. */

/* Diet long food-name containment. */
body.page-diet .diet-food-search,
body.page-diet .diet-search-panel,
body.page-diet .diet-selected-food,
body.page-diet .diet-selected-food * {
    min-width: 0;
    max-width: 100%;
}
body.page-diet .diet-search-panel {
    overflow: visible;
}
body.page-diet .diet-search-results {
    align-items: stretch;
}
body.page-diet .diet-search-result {
    height: auto;
    min-height: 46px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
body.page-diet .diet-selected-food-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: start;
}
body.page-diet .diet-selected-food-heading > div {
    min-width: 0;
}
body.page-diet .diet-selected-food-heading strong,
body.page-diet #dietSelectedFoodName,
body.page-diet #dietSelectedFoodServing {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
body.page-diet .diet-selected-food-macros {
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
}
body.page-diet .diet-selected-food-macros span {
    overflow: hidden;
}
body.page-diet .diet-selected-food-actions button,
body.page-diet .diet-selected-food-amount input {
    min-width: 0;
}
@media (max-width: 640px) {
    body.page-diet .diet-selected-food-heading {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-selected-food-close {
        width: 100%;
        min-width: 0;
    }
}
/* End Diet long food-name containment. */

/* Diet logged food long-row editor. */
body.page-diet .diet-log-list {
    display: grid;
    margin-top: 16px;
}
body.page-diet .diet-log-count {
    color: #bbf7d0;
    font-size: 0.86rem;
    font-weight: 900;
    text-align: right;
}
body.page-diet .diet-delete-day-button {
    justify-self: end;
    min-width: 132px;
}
@media (max-width: 640px) {
    body.page-diet .diet-delete-day-button {
        width: 100%;
        justify-self: stretch;
    }
}
/* End Diet logged food long-row editor. */
/* Diet barcode product panel. */
body.page-diet .diet-ocr-panel {
    display: grid;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.54);
}
body.page-diet .diet-ocr-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
body.page-diet .diet-ocr-heading h3 {
    margin: 0;
    font-size: 1rem;
}
body.page-diet #dietOcrStatus {
    margin: 0;
    max-width: 300px;
    color: rgba(226, 232, 240, 0.76);
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: right;
}
body.page-diet .diet-ocr-controls,
body.page-diet .diet-ocr-serving-controls,
body.page-diet .diet-ocr-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
}
body.page-diet .diet-ocr-file,
body.page-diet .diet-ocr-language,
body.page-diet .diet-ocr-result-grid label,
body.page-diet .diet-ocr-serving-controls label {
    display: grid;
    min-width: 0;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.86rem;
    font-weight: 800;
}
body.page-diet .diet-ocr-file,
body.page-diet .diet-ocr-language {
    flex: 1 1 210px;
}
body.page-diet .diet-ocr-controls input,
body.page-diet .diet-ocr-controls select,
body.page-diet .diet-ocr-result input,
body.page-diet .diet-ocr-result select {
    min-height: 40px;
    min-width: 0;
    border-radius: 8px;
}
body.page-diet .diet-ocr-preview[hidden],
body.page-diet .diet-ocr-camera[hidden],
body.page-diet .diet-ocr-result[hidden] {
    display: none !important;
}
body.page-diet .diet-ocr-preview {
    display: grid;
    grid-template-columns: minmax(0, 180px) auto;
    align-items: center;
}
body.page-diet .diet-ocr-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
body.page-diet .diet-ocr-result {
    display: grid;
}
body.page-diet .diet-ocr-result-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(110px, 0.7fr));
}
body.page-diet .diet-ocr-save-option {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center;
    min-height: 40px;
}
body.page-diet .diet-ocr-save-option input {
    min-height: auto;
}
body.page-diet .diet-ocr-calculated {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.page-diet .diet-ocr-calculated span {
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
body.page-diet .diet-ocr-calculated strong,
body.page-diet .diet-ocr-calculated small {
    display: block;
}
body.page-diet .diet-ocr-calculated strong {
    font-size: 1.1rem;
    line-height: 1;
}
body.page-diet .diet-ocr-calculated small {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
}
body.page-diet .diet-ocr-raw {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.86rem;
}
body.page-diet .diet-ocr-raw pre {
    max-height: 180px;
    margin: 8px 0 0;
    padding: 10px;
    overflow: auto;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.44);
    white-space: pre-wrap;
}
@media (max-width: 900px) {
    body.page-diet .diet-ocr-heading {
        flex-direction: column;
    }
    body.page-diet #dietOcrStatus {
        max-width: none;
        text-align: left;
    }
    body.page-diet .diet-ocr-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    body.page-diet .diet-ocr-preview,
    body.page-diet .diet-ocr-result-grid,
    body.page-diet .diet-ocr-calculated {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-ocr-actions button,
    body.page-diet .diet-ocr-controls button {
        width: 100%;
    }
}
/* End Diet barcode product panel. */




/* Diet barcode lookup panel. */
body.page-diet .diet-barcode-panel {
    display: grid;
    padding: 12px;
    border: 1px solid rgba(134, 239, 172, 0.24);
    border-radius: 8px;
    background: rgba(22, 163, 74, 0.08);
}
body.page-diet .diet-barcode-heading strong,
body.page-diet .diet-barcode-heading span {
    display: block;
}
body.page-diet .diet-barcode-heading span {
    margin-top: 3px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.84rem;
}
body.page-diet .diet-barcode-controls,
body.page-diet .diet-barcode-camera-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
}
body.page-diet .diet-barcode-controls label {
    display: grid;
    flex: 1 1 210px;
    min-width: 0;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.86rem;
    font-weight: 800;
}
body.page-diet .diet-barcode-controls input {
    min-height: 40px;
    min-width: 0;
    border-radius: 8px;
}
body.page-diet .diet-barcode-camera[hidden] {
    display: none !important;
}
body.page-diet .diet-barcode-camera {
    display: grid;
}
body.page-diet .diet-barcode-camera video {
    width: 100%;
    max-height: min(360px, 50vh);
    object-fit: contain;
    border-radius: 8px;
    background: #020617;
}
body.page-diet .diet-barcode-camera-actions button {
    flex: 1 1 150px;
}
@media (max-width: 640px) {
    body.page-diet .diet-barcode-controls button,
    body.page-diet .diet-barcode-camera-actions button {
        width: 100%;
    }
}
/* End Diet barcode lookup panel. */


/* Diet page organization and responsive polish. */
body.page-diet {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 28rem),
        linear-gradient(135deg, #07111f 0%, #0f172a 46%, #111827 100%);
}
body.page-diet .diet-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 96px;
}
body.page-diet .diet-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-height: auto;
    margin: 0 0 18px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}
body.page-diet .diet-hero h1 {
    margin: 4px 0 6px;
    line-height: 1;
}
body.page-diet .diet-hero p {
    max-width: 56rem;
}
body.page-diet .diet-edit-setup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 12px;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.14);
    color: #dcfce7;
    font-weight: 900;
    text-decoration: none;
}
body.page-diet .diet-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}
body.page-diet .diet-stat,
body.page-diet .diet-panel,
body.page-diet .diet-ocr-panel,
body.page-diet .diet-search-panel,
body.page-diet .diet-selected-food {
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.2);
}
body.page-diet .diet-stat {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.66);
}
body.page-diet .diet-stat span,
body.page-diet .diet-stat small {
    overflow-wrap: anywhere;
}
body.page-diet .diet-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
body.page-diet .diet-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.76);
}
body.page-diet .diet-panel-heading,
body.page-diet .diet-ocr-heading,
body.page-diet .diet-search-panel-heading,
body.page-diet .diet-selected-food-heading {
    min-width: 0;
}
body.page-diet .diet-panel-heading h2,
body.page-diet .diet-ocr-heading h3 {
    line-height: 1.12;
}
body.page-diet .diet-date-controls,
body.page-diet .diet-food-search-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, max-content)) minmax(180px, 1fr);
    align-items: end;
}
body.page-diet .diet-food-search-row {
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px);
}
body.page-diet .diet-date-controls button,
body.page-diet .diet-date-controls input,
body.page-diet .diet-food-search-row input,
body.page-diet .diet-search-close,
body.page-diet .diet-selected-food-actions button,
body.page-diet .diet-actions-row button,
body.page-diet .diet-ocr-actions button,
body.page-diet .diet-barcode-controls button,
body.page-diet .diet-barcode-camera-actions button {
    min-height: 42px;
    border-radius: 8px;
}
body.page-diet .diet-field-label,
body.page-diet .diet-custom-date,
body.page-diet .diet-grams-field,
body.page-diet .diet-ocr-result-grid label,
body.page-diet .diet-ocr-serving-controls label,
body.page-diet .diet-barcode-controls label {
    line-height: 1.25;
}
body.page-diet .diet-search-results {
    max-height: 360px;
    overflow: auto;
}
body.page-diet .diet-search-result {
    align-items: center;
    text-align: left;
}
body.page-diet .diet-selected-serving-controls,
body.page-diet .diet-ocr-serving-controls,
body.page-diet .diet-barcode-controls {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
}
body.page-diet .diet-selected-serving-controls {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
}
body.page-diet .diet-ocr-panel {
    margin: 18px 0 16px;
    padding: 16px;
    border-color: rgba(34, 197, 94, 0.24);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(20, 83, 45, 0.24));
}
body.page-diet #dietOcrStatus {
    min-height: 20px;
}
body.page-diet .diet-barcode-panel {
    padding: 14px;
    background: rgba(2, 6, 23, 0.22);
}
body.page-diet .diet-barcode-controls {
    grid-template-columns: auto minmax(220px, 1fr) auto;
}
body.page-diet .diet-barcode-camera video {
    aspect-ratio: 16 / 9;
    max-height: 420px;
    object-fit: cover;
}
body.page-diet .diet-ocr-result {
    padding-top: 2px;
}
body.page-diet .diet-ocr-result-grid {
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(112px, 0.7fr));
    align-items: end;
}
body.page-diet .diet-ocr-calculated,
body.page-diet .diet-selected-food-macros {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.page-diet .diet-ocr-calculated span,
body.page-diet .diet-selected-food-macros span {
    min-width: 0;
    overflow: hidden;
}
body.page-diet .diet-actions-row {
    margin-top: 12px;
}
body.page-diet .diet-actions-row button {
    width: 100%;
}
body.page-diet .diet-log-list {
    padding-top: 4px;
}
body.page-diet input,
body.page-diet select,
body.page-diet button {
    max-width: 100%;
}
@media (max-width: 980px) {
    body.page-diet .diet-shell {
        width: min(100% - 24px, 860px);
        padding-top: 20px;
    }
    body.page-diet .diet-summary-grid,
    body.page-diet .diet-ocr-calculated,
    body.page-diet .diet-selected-food-macros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.page-diet .diet-date-controls,
    body.page-diet .diet-food-search-row,
    body.page-diet .diet-selected-serving-controls,
    body.page-diet .diet-ocr-serving-controls,
    body.page-diet .diet-barcode-controls,
    body.page-diet .diet-ocr-result-grid {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-barcode-controls button,
    body.page-diet .diet-ocr-actions button {
        width: 100%;
    }
    }
@media (max-width: 640px) {
    body.page-diet .diet-shell {
        width: min(100% - 18px, 520px);
        padding: 14px 0 92px;
    }
    body.page-diet .diet-hero,
    body.page-diet .diet-panel,
    body.page-diet .diet-ocr-panel {
        padding: 14px;
    }
    body.page-diet .diet-hero,
    body.page-diet .diet-ocr-heading,
    body.page-diet .diet-panel-heading,
    body.page-diet .diet-search-panel-heading {
        display: grid;
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-summary-grid,
    body.page-diet .diet-date-controls,
    body.page-diet .diet-food-search-row,
    body.page-diet .diet-selected-serving-controls,
    body.page-diet .diet-ocr-serving-controls,
    body.page-diet .diet-barcode-controls,
    body.page-diet .diet-ocr-result-grid,
    body.page-diet .diet-ocr-calculated,
    body.page-diet .diet-selected-food-macros {
        grid-template-columns: 1fr;
    }
    body.page-diet #dietOcrStatus,
    body.page-diet #dietSaveStatus,
    body.page-diet .diet-log-count {
        text-align: left;
    }
    body.page-diet .diet-date-controls button,
    body.page-diet .diet-date-controls label,
    body.page-diet .diet-food-search-row label,
    body.page-diet .diet-selected-food-actions button,
    body.page-diet .diet-barcode-controls button,
    body.page-diet .diet-barcode-camera-actions button,
    body.page-diet .diet-ocr-actions button {
        width: 100%;
    }
    }
/* End Diet page organization and responsive polish. */


/* Diet barcode result compact mobile flow. */
body.page-diet .diet-date-button,
body.page-diet .diet-custom-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}
body.page-diet .diet-custom-date {
    gap: 8px;
}
body.page-diet .diet-ocr-result {
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.16);
}
body.page-diet .diet-ocr-result-grid input,
body.page-diet .diet-ocr-serving-controls input,
body.page-diet .diet-ocr-serving-controls select {
    min-height: 38px;
}
body.page-diet .diet-ocr-save-option {
    width: fit-content;
    padding: 0 10px;
}
body.page-diet .diet-ocr-calculated span {
    padding: 9px 10px;
}
body.page-diet .diet-ocr-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
body.page-diet .diet-ocr-actions button {
    width: 100%;
}
@media (max-width: 640px) {
    body.page-diet .diet-panel-heading h2,
    body.page-diet .diet-ocr-heading h3 {
        font-size: 1.05rem;
    }
    body.page-diet .diet-date-controls {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-custom-date {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
    body.page-diet .diet-custom-date input {
        width: min(60%, 190px);
    }
    body.page-diet .diet-ocr-panel {
        margin: 14px 0 12px;
    }
    body.page-diet .diet-barcode-panel,
    body.page-diet .diet-ocr-result {
        padding: 10px;
    }
    body.page-diet .diet-ocr-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.page-diet .diet-ocr-result-grid label:first-child {
        grid-column: 1 / -1;
    }
    body.page-diet .diet-ocr-result-grid label,
    body.page-diet .diet-ocr-serving-controls label,
    body.page-diet .diet-barcode-controls label {
        font-size: 0.78rem;
    }
    body.page-diet .diet-ocr-result-grid input,
    body.page-diet .diet-ocr-serving-controls input,
    body.page-diet .diet-ocr-serving-controls select,
    body.page-diet .diet-barcode-controls input {
        min-height: 36px;
        padding: 6px 9px;
        font-size: 0.95rem;
    }
    body.page-diet .diet-ocr-serving-controls {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-ocr-save-option {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 36px;
        justify-content: start;
    }
    body.page-diet .diet-ocr-calculated {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    body.page-diet .diet-ocr-calculated span {
        padding: 7px 4px;
        text-align: center;
    }
    body.page-diet .diet-ocr-calculated strong {
        font-size: 0.95rem;
    }
    body.page-diet .diet-ocr-calculated small {
        font-size: 0.66rem;
    }
    body.page-diet .diet-ocr-actions {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-ocr-actions button,
    body.page-diet .diet-barcode-controls button {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.9rem;
    }
}
@media (max-width: 380px) {
    body.page-diet .diet-ocr-result-grid,
    body.page-diet .diet-ocr-serving-controls,
    body.page-diet .diet-ocr-actions {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-ocr-calculated {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* End Diet barcode result compact mobile flow. */


/* Diet split-page layout. */
body.page-diet .diet-add-food-link-row {
    margin: 14px 0 12px;
}
body.page-diet .diet-add-food-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    padding: 0 16px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.16);
    color: #dcfce7;
    font-weight: 900;
    text-decoration: none;
}
body.page-diet .diet-add-food-link:hover,
body.page-diet .diet-add-food-link:focus-visible {
    background: rgba(34, 197, 94, 0.24);
}
body.page-diet .diet-add-food-shell .diet-food-search {
    margin-top: 16px;
}
body.page-diet .diet-add-food-shell .diet-ocr-panel {
    margin-bottom: 0;
}
@media (max-width: 640px) {
    body.page-diet .diet-add-food-link {
        min-height: 42px;
    }
    body.page-diet .diet-add-food-shell .diet-hero h1 {
        font-size: 1.6rem;
    }
}
/* End Diet split-page layout. */


/* Diet simplified dates and Add Food search dropdown. */
body.page-diet .diet-date-controls-simple {
    grid-template-columns: minmax(98px, max-content) minmax(112px, max-content) minmax(0, 1fr);
}
body.page-diet .diet-current-date {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.24);
    color: rgba(226, 232, 240, 0.88);
    font-weight: 900;
}
body.page-diet .diet-add-food-status:empty {
    display: none;
}
body.page-diet .diet-add-food-shell .diet-panel {
    padding-top: 16px;
}
body.page-diet .diet-add-food-shell .diet-food-search {
    z-index: 30;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
body.page-diet .diet-add-food-shell .diet-food-search.is-open {
    border-color: transparent;
    background: transparent;
}
body.page-diet .diet-add-food-shell .diet-search-panel {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    z-index: 40;
    margin-top: 0;
    padding: 6px;
    border-color: rgba(148, 163, 184, 0.2);
    border-radius: 0 0 8px 8px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 46px rgba(2, 6, 23, 0.42);
}
body.page-diet .diet-add-food-shell .diet-search-panel-heading {
    display: none;
}
body.page-diet .diet-add-food-shell .diet-search-results {
    max-height: min(360px, 52vh);
    overflow: auto;
}
body.page-diet .diet-add-food-shell .diet-search-result {
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
}
body.page-diet .diet-add-food-shell .diet-search-result:hover,
body.page-diet .diet-add-food-shell .diet-search-result:focus-within {
    background: rgba(34, 197, 94, 0.12);
}
body.page-diet .diet-add-food-shell .diet-selected-food {
    margin-top: 12px;
}
body.page-diet .diet-add-food-shell .diet-ocr-panel {
    margin-top: 18px;
}
@media (max-width: 640px) {
    body.page-diet .diet-date-controls-simple {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-current-date {
        grid-column: 1 / -1;
        justify-content: center;
        min-height: 38px;
    }
    body.page-diet .diet-add-food-shell .diet-search-panel {
        max-height: 58vh;
    }
}
/* End Diet simplified dates and Add Food search dropdown. */


/* Diet stats links and discard emphasis. */
body.page-diet #discardSelectedFoodButton,
body.page-diet #dietDiscardOcrResultButton {
    background: rgba(185, 28, 28, 0.92);
    color: #ffffff;
    border-color: rgba(248, 113, 113, 0.34);
}
body.page-diet #discardSelectedFoodButton:hover,
body.page-diet #discardSelectedFoodButton:focus-visible,
body.page-diet #dietDiscardOcrResultButton:hover,
body.page-diet #dietDiscardOcrResultButton:focus-visible {
    background: rgba(220, 38, 38, 0.96);
}
body.page-diet .diet-stats-link-row {
    margin: 0 0 12px;
}
body.page-diet .diet-stats-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    padding: 0 16px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.16);
    color: #dbeafe;
    font-weight: 900;
    text-decoration: none;
}
body.page-diet .diet-stats-link:hover,
body.page-diet .diet-stats-link:focus-visible {
    background: rgba(37, 99, 235, 0.24);
}
/* End Diet stats links and discard emphasis. */


/* My foods feature. */
body.page-diet #dietSaveSelectedFoodButton,
body.page-diet #dietSaveOcrFoodButton {
    background: rgba(37, 99, 235, 0.9);
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.32);
}
body.page-diet .diet-my-foods-link-row {
    margin: 0 0 12px;
}
body.page-diet .diet-my-foods-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    padding: 0 16px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    background: rgba(217, 119, 6, 0.16);
    color: #fef3c7;
    font-weight: 900;
    text-decoration: none;
}
body.page-diet .diet-my-foods-list {
    display: grid;
}
body.page-diet .diet-my-food-card {
    display: grid;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.18);
}
body.page-diet .diet-my-food-heading strong,
body.page-diet .diet-my-food-heading span {
    display: block;
    overflow-wrap: anywhere;
}
body.page-diet .diet-my-food-heading span {
    margin-top: 3px;
    color: rgba(226, 232, 240, 0.68);
    font-size: 0.82rem;
    font-weight: 800;
}
body.page-diet .diet-my-food-controls {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr) auto;
    align-items: end;
}
body.page-diet .diet-my-food-controls label {
    display: grid;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.86rem;
    font-weight: 800;
}
body.page-diet .diet-my-food-controls input,
body.page-diet .diet-my-food-controls select,
body.page-diet .diet-my-food-controls button {
    min-height: 40px;
    border-radius: 8px;
}
@media (max-width: 640px) {
    body.page-diet .diet-my-food-controls {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-my-food-controls button {
        grid-column: 1 / -1;
        width: 100%;
    }
}
/* End My foods feature. */


/* Diet delete day full-width action. */
body.page-diet .diet-delete-day-button {
    width: 100%;
    justify-self: stretch;
}
/* End Diet delete day full-width action. */


/* My foods delete action. */
body.page-diet .diet-my-food-controls {
    grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr) auto auto;
}
body.page-diet [data-my-food-delete] {
    background: rgba(185, 28, 28, 0.92);
    color: #ffffff;
    border-color: rgba(248, 113, 113, 0.34);
}
body.page-diet [data-my-food-delete]:hover,
body.page-diet [data-my-food-delete]:focus-visible {
    background: rgba(220, 38, 38, 0.96);
}
@media (max-width: 640px) {
    body.page-diet .diet-my-food-controls {
        grid-template-columns: 1fr 1fr;
    }
    body.page-diet .diet-my-food-controls button {
        grid-column: auto;
    }
}
@media (max-width: 420px) {
    body.page-diet .diet-my-food-controls,
    body.page-diet .diet-my-food-controls button {
        grid-template-columns: 1fr;
        grid-column: 1 / -1;
    }
}
/* End My foods delete action. */


/* Barcode result three-button row. */
body.page-diet .diet-ocr-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.page-diet .diet-ocr-actions button {
    min-width: 0;
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
}
@media (max-width: 420px) {
    body.page-diet .diet-ocr-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    body.page-diet .diet-ocr-actions button {
        font-size: 0.78rem;
        line-height: 1.12;
    }
}
/* End Barcode result three-button row. */


/* Diet stats archive dashboard. */
body.page-diet .diet-stats-note {
    margin: 0 0 12px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.88rem;
    line-height: 1.4;
}
body.page-diet .diet-stats-table-wrap {
    width: 100%;
    overflow-x: auto;
}
body.page-diet .diet-stats-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}
body.page-diet .diet-stats-table th,
body.page-diet .diet-stats-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
}
body.page-diet .diet-stats-table th:first-child,
body.page-diet .diet-stats-table td:first-child {
    text-align: left;
}
body.page-diet .diet-stat-check {
    color: #22c55e;
    font-weight: 1000;
}
body.page-diet .diet-stat-x {
    color: #ef4444;
    font-weight: 1000;
}
body.page-diet .diet-stat-empty {
    color: rgba(226, 232, 240, 0.62);
    font-weight: 900;
}
body.page-diet .diet-stats-total {
    display: flex;
    flex-wrap: wrap;
    margin-top: 12px;
}
body.page-diet .diet-stats-total span {
    flex: 1 1 180px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}
body.page-diet .diet-stats-download-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    align-items: start;
}
body.page-diet .diet-stats-download-controls > label:first-child {
    grid-column: 2;
    justify-self: stretch;
}
body.page-diet .diet-stats-download-controls > label[data-stats-report-fields],
body.page-diet .diet-stats-download-controls > div[data-stats-report-fields] {
    grid-column: 1 / -1;
}
body.page-diet .diet-stats-download-controls [data-stats-report-fields="months"] {
    display: grid;
    grid-template-columns: minmax(0, 260px);
    align-items: end;
}
body.page-diet .diet-stats-download-controls #dietStatsDownloadButton {
    grid-column: 2;
    justify-self: stretch;
    align-self: end;
}
body.page-diet .diet-stats-download-controls label {
    display: grid;
    min-width: 0;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.86rem;
    font-weight: 800;
}
body.page-diet .diet-stats-download-controls input,
body.page-diet .diet-stats-download-controls select,
body.page-diet .diet-stats-download-controls button {
    min-height: 40px;
    max-width: 100%;
    border-radius: 8px;
}
body.page-diet .diet-stats-download-controls input,
body.page-diet .diet-stats-download-controls select {
    color-scheme: dark;
}
body.page-diet .diet-stats-download-controls input[type="month"]::-webkit-calendar-picker-indicator,
body.page-diet .diet-stats-download-controls input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    opacity: 1;
    cursor: pointer;
}
body.page-diet .diet-stats-download-controls [hidden] {
    display: none !important;
}
@media (max-width: 900px) {
    body.page-diet .diet-stats-download-controls {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 200px);
    }
}
@media (max-width: 560px) {
    body.page-diet .diet-stats-download-controls,
    body.page-diet .diet-stats-download-controls [data-stats-report-fields="months"] {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-stats-download-controls > label:first-child,
    body.page-diet .diet-stats-download-controls #dietStatsDownloadButton {
        grid-column: 1;
        justify-self: stretch;
    }
}
/* End Diet stats archive dashboard. */


/* Diet compact mobile food log. */
body.page-diet .diet-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
body.page-diet .diet-toggle-log-button {
    min-height: 34px;
    width: auto;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.28);
    color: #dbeafe;
}
@media (max-width: 700px) {
    }
@media (max-width: 420px) {
    body.page-diet .diet-log-head {
        align-items: stretch;
        flex-direction: column;
    }
    body.page-diet .diet-toggle-log-button {
        width: 100%;
    }
}
/* End Diet compact mobile food log. */


/* Diet compact food log input sizing refinement. */



@media (max-width: 700px) {
    
    
    
}
@media (max-width: 420px) {
    
}
/* End Diet compact food log input sizing refinement. */


/* Diet exact compact food log row sizing. */





@media (max-width: 700px) {
    
}
@media (max-width: 420px) {
    
}
/* End Diet exact compact food log row sizing. */


/* Diet food log even column spacing. */





@media (max-width: 420px) {
    
}
/* End Diet food log even column spacing. */


/* Diet food log remove button input alignment. */


/* End Diet food log remove button input alignment. */


/* Diet food log name-top layout and exact remove alignment. */







@media (max-width: 420px) {
    
}
/* End Diet food log name-top layout and exact remove alignment. */


/* Diet food log remove button final level fix. */

@media (max-width: 700px) {
    
}
/* End Diet food log remove button final level fix. */
/* Diet food log unified cell sizing. */



/* End Diet food log unified cell sizing. */

/* New Diet food log. */
body.page-diet .diet-live-log {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.34);
}
body.page-diet .diet-live-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(248, 250, 252, 0.92);
}
body.page-diet .diet-live-log-head span {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.86rem;
    font-weight: 800;
}
body.page-diet .diet-live-log-grid {
    display: grid;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}
body.page-diet .diet-live-log-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.45fr) repeat(5, minmax(82px, 0.72fr)) minmax(86px, 0.7fr);
    gap: 8px;
    align-items: end;
    min-width: 780px;
}
body.page-diet .diet-live-log-row-header {
    align-items: center;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}
body.page-diet .diet-live-log-row input,
body.page-diet .diet-live-log-remove {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    box-sizing: border-box;
}
body.page-diet .diet-live-log-row input {
    padding: 8px 10px;
}
body.page-diet .diet-live-log-remove {
    padding: 0 10px;
    background: rgba(127, 29, 29, 0.88);
    color: #ffffff;
    white-space: nowrap;
}
body.page-diet .diet-live-log-empty {
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.9rem;
}
@media (max-width: 640px) {
    body.page-diet .diet-live-log {
        padding: 10px;
    }
    body.page-diet .diet-live-log-head {
        align-items: stretch;
        flex-direction: column;
    }
}
/* End new Diet food log. */


/* Diet summary card spacing. */
body.page-diet .diet-summary-grid {
    gap: 1%;
}
/* End Diet summary card spacing. */


/* Diet hero centered content. */
body.page-diet .diet-hero {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    justify-content: center;
    text-align: center;
}
body.page-diet .diet-hero > div {
    width: 100%;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
body.page-diet .diet-hero p:not(.diet-kicker) {
    margin-left: auto;
    margin-right: auto;
}
body.page-diet .diet-edit-setup-link {
    margin-left: auto;
    margin-right: auto;
}
/* End Diet hero centered content. */


/* Barcode result spacing and compact labels. */
body.page-diet .diet-ocr-serving-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1%;
    align-items: end;
}
body.page-diet .diet-ocr-serving-controls label {
    display: grid;
    align-content: end;
    min-width: 0;
}
body.page-diet .diet-ocr-serving-controls select,
body.page-diet .diet-ocr-serving-controls input {
    width: 100%;
    min-height: 42px;
    height: 42px;
    box-sizing: border-box;
}
body.page-diet .diet-ocr-calculated {
    gap: 1%;
}
body.page-diet .diet-ocr-actions {
    gap: 1%;
}
@media (max-width: 380px) {
    body.page-diet .diet-ocr-serving-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
/* End barcode result spacing and compact labels. */


/* Diet mobile summary compact row. */
@media (max-width: 640px) {
    body.page-diet .diet-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1% !important;
        width: 100%;
        margin: 10px auto 12px;
    }
    body.page-diet .diet-stat {
        min-height: 74px !important;
        padding: 7px 3px !important;
        align-content: center;
        text-align: center;
    }
    body.page-diet .diet-stat span,
    body.page-diet .diet-stat small {
        font-size: 0.56rem;
        line-height: 1.12;
    }
    body.page-diet .diet-stat strong {
        font-size: 1rem !important;
        line-height: 1;
    }
}
@media (max-width: 380px) {
    body.page-diet .diet-stat {
        min-height: 68px !important;
        padding: 6px 2px !important;
    }
    body.page-diet .diet-stat span,
    body.page-diet .diet-stat small {
        font-size: 0.5rem;
    }
    body.page-diet .diet-stat strong {
        font-size: 0.9rem !important;
    }
}
/* End Diet mobile summary compact row. */


/* Barcode result input grid spacing. */
body.page-diet .diet-ocr-result-grid {
    gap: 1%;
}
/* End barcode result input grid spacing. */


/* Barcode serving label alignment. */
body.page-diet .diet-ocr-serving-controls {
    align-items: start;
}
body.page-diet .diet-ocr-serving-controls label {
    grid-template-rows: 18px 42px;
    align-content: start;
}
body.page-diet .diet-ocr-serving-controls label > span {
    display: block;
    line-height: 18px;
}
/* End barcode serving label alignment. */


/* Barcode serving controls raised above calculated macros. */
body.page-diet .diet-ocr-serving-controls {
    position: relative;
    bottom: 2%;
    margin-bottom: 2%;
}
/* End barcode serving controls raised above calculated macros. */


/* Add-food search without default grams. */
body.page-diet .diet-add-food-shell .diet-food-search-row {
    grid-template-columns: minmax(0, 1fr);
}
body.page-diet .diet-add-food-shell .diet-food-search-row input[type="search"] {
    width: 100%;
}
/* End add-food search without default grams. */


/* Barcode serving select vertical match. */
body.page-diet .diet-ocr-serving-controls label:first-child select {
    position: relative !important;
    top: 4px !important;
}
/* End barcode serving select vertical match. */


/* Barcode result panel rebuilt layout. */
body.page-diet .diet-ocr-result-v2 {
    display: grid !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.18);
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid {
    display: grid !important;
    grid-template-columns: minmax(180px, 1.45fr) repeat(4, minmax(88px, 1fr)) !important;
    gap: 1% !important;
    align-items: start !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid label,
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls label {
    display: grid !important;
    grid-template-rows: 18px 42px !important;
    gap: 4px !important;
    align-content: start !important;
    min-width: 0 !important;
    line-height: 18px !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid label > span,
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls label > span {
    display: block !important;
    height: 18px !important;
    line-height: 18px !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid input,
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls select,
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1% !important;
    align-items: start !important;
    position: static !important;
    bottom: auto !important;
    margin: 0 !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls label:first-child select {
    position: static !important;
    top: auto !important;
}
body.page-diet .diet-ocr-result-v2 .diet-ocr-calculated,
body.page-diet .diet-ocr-result-v2 .diet-ocr-actions {
    gap: 1% !important;
}
@media (max-width: 640px) {
    body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    body.page-diet .diet-ocr-result-v2 .diet-ocr-result-grid label:first-child {
        grid-column: 1 / -1;
    }
    body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}
@media (max-width: 380px) {
    body.page-diet .diet-ocr-result-v2 .diet-ocr-serving-controls {
        grid-template-columns: 1fr !important;
    }
}
/* End barcode result panel rebuilt layout. */


/* Diet main action button spacing. */
body.page-diet .diet-add-food-link-row,
body.page-diet .diet-my-foods-link-row,
body.page-diet .diet-stats-link-row,
body.page-diet .diet-main-actions-row {
    margin: 0 0 12px !important;
}
body.page-diet .diet-main-actions-row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
}
body.page-diet .diet-main-actions-row button {
    width: 100%;
}
body.page-diet .diet-remove-day-button {
    background: rgba(127, 29, 29, 0.9);
    color: #ffffff;
}
body.page-diet .diet-remove-day-button:hover,
body.page-diet .diet-remove-day-button:focus-visible {
    background: rgba(185, 28, 28, 0.96);
}
/* End Diet main action button spacing. */


/* Diet Log Food panel redesign. */
body.page-diet .diet-form-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px !important;
}
body.page-diet .diet-form-panel > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
body.page-diet .diet-form-panel .diet-panel-heading {
    align-items: center;
}
body.page-diet .diet-form-panel .diet-date-controls-simple {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    align-items: stretch;
}
body.page-diet .diet-form-panel .diet-current-date {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0 !important;
    text-align: center;
}
body.page-diet .diet-form-panel .diet-add-food-link-row,
body.page-diet .diet-form-panel .diet-my-foods-link-row,
body.page-diet .diet-form-panel .diet-stats-link-row,
body.page-diet .diet-form-panel .diet-main-actions-row {
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-add-food-link,
body.page-diet .diet-form-panel .diet-my-foods-link,
body.page-diet .diet-form-panel .diet-stats-link,
body.page-diet .diet-form-panel .diet-main-actions-row button {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}
body.page-diet .diet-form-panel .diet-main-actions-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px !important;
}
body.page-diet .diet-form-panel .diet-live-log {
    margin-top: 2px !important;
}
@media (max-width: 520px) {
    body.page-diet .diet-form-panel {
        gap: 10px !important;
    }
    body.page-diet .diet-form-panel .diet-date-controls-simple {
        gap: 8px !important;
    }
}
/* End Diet Log Food panel redesign. */


/* Selected search food panel rebuilt layout. */
body.page-diet .diet-selected-food-v2 {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    gap: 12px !important;
    margin-top: 12px !important;
    padding: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.2);
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.2);
}
body.page-diet .diet-selected-food-v2[hidden] {
    display: none !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: start;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-heading strong {
    display: block;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-heading span {
    display: block;
    margin-top: 4px;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-macros {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1% !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-macros span {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}
body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1% !important;
    align-items: start !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls label {
    display: grid !important;
    grid-template-rows: 18px 42px !important;
    gap: 4px !important;
    align-content: start !important;
    min-width: 0 !important;
    line-height: 18px !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls label > span {
    display: block !important;
    height: 18px !important;
    line-height: 18px !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls select,
body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1% !important;
}
body.page-diet .diet-selected-food-v2 .diet-selected-food-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px;
}
@media (max-width: 640px) {
    body.page-diet .diet-selected-food-v2 {
        padding: 12px !important;
        gap: 10px !important;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-macros {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-macros span {
        padding: 8px 4px;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-macros strong {
        font-size: 0.95rem;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-macros small {
        font-size: 0.66rem;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px !important;
    }
    body.page-diet .diet-selected-food-v2 .diet-selected-food-actions button {
        font-size: 0.82rem;
        line-height: 1.15;
        padding-left: 8px;
        padding-right: 8px;
    }
}
@media (max-width: 380px) {
    body.page-diet .diet-selected-food-v2 .diet-selected-serving-controls,
    body.page-diet .diet-selected-food-v2 .diet-selected-food-actions {
        grid-template-columns: 1fr !important;
    }
}
/* End selected search food panel rebuilt layout. */


/* Diet Log Food exact 1 percent action spacing. */
body.page-diet .diet-form-panel {
    gap: 1% !important;
}
body.page-diet .diet-form-panel .diet-date-controls-simple,
body.page-diet .diet-form-panel .diet-main-actions-row {
    gap: 1% !important;
}
body.page-diet .diet-form-panel .diet-add-food-link-row,
body.page-diet .diet-form-panel .diet-my-foods-link-row,
body.page-diet .diet-form-panel .diet-stats-link-row,
body.page-diet .diet-form-panel .diet-main-actions-row {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
/* End Diet Log Food exact 1 percent action spacing. */


/* Diet panel exact vertical spacing and contained food log. */
body.page-diet .diet-form-panel {
    overflow: hidden;
}
body.page-diet .diet-form-panel .diet-add-food-link-row,
body.page-diet .diet-form-panel .diet-my-foods-link-row,
body.page-diet .diet-form-panel .diet-stats-link-row,
body.page-diet .diet-form-panel .diet-main-actions-row,
body.page-diet .diet-form-panel .diet-live-log {
    margin: 1% 0 0 !important;
}
body.page-diet .diet-form-panel .diet-main-actions-row {
    gap: 0 !important;
    row-gap: 0 !important;
}
body.page-diet .diet-form-panel .diet-main-actions-row button + button {
    margin-top: 1% !important;
}
body.page-diet .diet-form-panel .diet-live-log {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}
body.page-diet .diet-form-panel .diet-live-log-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
}
body.page-diet .diet-form-panel .diet-live-log-row {
    min-width: 0;
    width: 100%;
    grid-template-columns: minmax(110px, 1.3fr) repeat(5, minmax(58px, 0.8fr)) minmax(70px, 0.85fr);
}
@media (max-width: 640px) {
    body.page-diet .diet-form-panel .diet-live-log-row {
        min-width: 620px;
    }
}
/* End Diet panel exact vertical spacing and contained food log. */


/* Final Log Food panel redesign. */
body.page-diet .diet-form-panel {
    width: min(980px, 100%) !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel,
body.page-diet .diet-form-panel * {
    min-width: 0;
}
body.page-diet .diet-form-panel > * {
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-panel-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px !important;
    align-items: start !important;
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-panel-heading h2 {
    margin: 0;
}
body.page-diet .diet-form-panel #dietSaveStatus {
    justify-self: end;
    align-self: center;
    min-height: 22px;
    margin: 0 !important;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
    color: rgba(220, 252, 231, 0.92);
    font-size: 0.84rem;
    font-weight: 800;
    text-align: right;
}
body.page-diet .diet-form-panel .diet-date-controls-simple {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, 1.25fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
}
body.page-diet .diet-form-panel .diet-date-controls-simple button,
body.page-diet .diet-form-panel .diet-current-date {
    width: 100% !important;
    min-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-current-date {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
    color: rgba(248, 250, 252, 0.86);
    font-weight: 900;
    text-align: center;
}
body.page-diet .diet-form-panel .diet-add-food-link-row,
body.page-diet .diet-form-panel .diet-my-foods-link-row,
body.page-diet .diet-form-panel .diet-stats-link-row {
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-add-food-link,
body.page-diet .diet-form-panel .diet-my-foods-link,
body.page-diet .diet-form-panel .diet-stats-link {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-main-actions-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-main-actions-row button {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-live-log {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-live-log-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-width: 0;
}
body.page-diet .diet-form-panel .diet-live-log-grid {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    padding-bottom: 4px !important;
}
body.page-diet .diet-form-panel .diet-live-log-row {
    width: 100% !important;
    min-width: 760px !important;
    display: grid !important;
    grid-template-columns: minmax(150px, 1.5fr) repeat(5, minmax(74px, 0.8fr)) minmax(90px, 0.85fr) !important;
    gap: 8px !important;
    align-items: end !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-live-log-row-header {
    align-items: center !important;
    padding: 0 2px;
}
body.page-diet .diet-form-panel .diet-live-log-row input,
body.page-diet .diet-form-panel .diet-live-log-remove {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-form-panel .diet-live-log-empty {
    margin: 0 !important;
    padding: 10px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    text-align: center;
}
@media (min-width: 760px) {
    body.page-diet .diet-form-panel {
        gap: 16px !important;
    }
    body.page-diet .diet-form-panel .diet-live-log-row {
        min-width: 0 !important;
    }
}
@media (max-width: 640px) {
    body.page-diet .diet-form-panel {
        gap: 12px !important;
    }
    body.page-diet .diet-form-panel .diet-panel-heading {
        grid-template-columns: 1fr;
    }
    body.page-diet .diet-form-panel #dietSaveStatus {
        justify-self: stretch;
        text-align: center;
    }
    body.page-diet .diet-form-panel .diet-date-controls-simple {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    body.page-diet .diet-form-panel .diet-current-date {
        grid-column: 1 / -1;
    }
    body.page-diet .diet-form-panel .diet-main-actions-row {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    body.page-diet .diet-form-panel .diet-live-log {
        padding: 10px !important;
    }
    body.page-diet .diet-form-panel .diet-live-log-row {
        min-width: 720px !important;
    }
}
/* End final Log Food panel redesign. */

/* workout plan table edge colors */
body.page-weekly-routine .table-responsive-wrapper table th,
body.page-gym-planner .table-responsive-wrapper table th,
#CurrentPlanTable th {
    background-color: #00a2e8 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

body.page-weekly-routine .table-responsive-wrapper table td,
body.page-gym-planner .table-responsive-wrapper table td,
#CurrentPlanTable td {
    background: #898989 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

body.page-weekly-routine .table-responsive-wrapper table tr:first-child th,
body.page-gym-planner .table-responsive-wrapper table tr:first-child th,
#CurrentPlanTable tr:first-child th {
    background-color: #00a2e8 !important;
}

/* gym planner organized controls */
body.page-gym-planner .hero-panel {
    width: min(1180px, 100%);
}

body.page-gym-planner .planner-action-panel {
    width: min(100%, 820px);
    margin: 18px auto 22px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

body.page-gym-planner .planner-action-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    width: 100%;
    direction: ltr;
}

body.page-gym-planner .planner-structure-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.page-gym-planner #plannerControlsContainer,
body.page-gym-planner #plannerControls {
    width: 100%;
}

body.page-gym-planner #plannerControls.table-control-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

body.page-gym-planner .planner-my-plans-btn,
body.page-gym-planner .edit-planner-btn,
body.page-gym-planner .save-planner-btn,
body.page-gym-planner .notebook-edit-btn,
body.page-gym-planner #plannerControls .table-control-btn {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

body.page-gym-planner .planner-my-plans-btn {
    background: #00a2e8 !important;
    cursor: pointer;
}

body.page-gym-planner .edit-planner-btn {
    background: #f59e0b !important;
}

body.page-gym-planner .save-planner-btn {
    background: #16a34a !important;
}

body.page-gym-planner .notebook-edit-btn {
    background: #334155 !important;
}

body.page-gym-planner #plannerControls .table-control-btn-delete {
    background: #dc2626 !important;
}

body.page-gym-planner #plannerControls .table-control-btn-add {
    background: #22c55e !important;
}

body.page-gym-planner .planner-back-panel {
    width: min(100%, 820px);
    margin: 18px auto 0;
}

body.page-gym-planner .planner-back-panel .back-btn {
    width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 720px) {
    body.page-gym-planner .planner-action-panel {
        width: 100%;
        padding: 10px;
    }

    body.page-gym-planner .planner-action-group,
    body.page-gym-planner #plannerControls.table-control-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }

    body.page-gym-planner .planner-my-plans-btn,
    body.page-gym-planner .edit-planner-btn,
    body.page-gym-planner .save-planner-btn,
    body.page-gym-planner .notebook-edit-btn,
    body.page-gym-planner #plannerControls .table-control-btn {
        height: 42px !important;
        min-height: 42px !important;
        font-size: 0.82rem !important;
        padding: 0 8px !important;
    }
}

/* gym planner edit controls width fix */
body.page-gym-planner .planner-action-panel {
    width: min(100%, 1040px);
}

body.page-gym-planner .planner-structure-actions {
    display: block !important;
}

body.page-gym-planner .planner-structure-actions #plannerControlsContainer,
body.page-gym-planner .planner-structure-actions #plannerControls {
    width: 100% !important;
}

body.page-gym-planner #plannerControls.table-control-bar {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
    gap: 16px !important;
}

body.page-gym-planner #plannerControls .table-control-btn {
    min-width: 150px !important;
    height: 48px !important;
    font-size: 0.96rem !important;
    gap: 8px !important;
    letter-spacing: 0 !important;
}

@media (max-width: 720px) {
    body.page-gym-planner #plannerControls.table-control-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.page-gym-planner #plannerControls .table-control-btn {
        min-width: 0 !important;
    }
}

/* weekly routine organized controls */
body.page-weekly-routine .hero-panel {
    width: min(1180px, 100%);
}

body.page-weekly-routine .weekly-action-panel {
    width: min(100%, 1040px);
    margin: 18px auto 22px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

body.page-weekly-routine .weekly-action-group {
    display: grid;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    direction: ltr;
}

body.page-weekly-routine .weekly-primary-actions {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

body.page-weekly-routine .weekly-structure-actions {
    display: block !important;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.page-weekly-routine #weeklyControlsContainer {
    width: 100% !important;
}

body.page-weekly-routine #weeklyControlsContainer.table-control-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
    gap: 16px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    direction: ltr !important;
}

body.page-weekly-routine .edit-planner-btn,
body.page-weekly-routine .save-planner-btn,
body.page-weekly-routine #weeklyControlsContainer .table-control-btn {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    min-width: 150px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.96rem !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

body.page-weekly-routine .edit-planner-btn {
    background: #f59e0b !important;
}

body.page-weekly-routine .save-planner-btn {
    background: #16a34a !important;
}

body.page-weekly-routine #weeklyControlsContainer .table-control-btn-delete {
    background: #dc2626 !important;
}

body.page-weekly-routine #weeklyControlsContainer .table-control-btn-add {
    background: #22c55e !important;
}

body.page-weekly-routine .weekly-planner-link-panel {
    width: min(100%, 1040px);
    margin: 18px auto 0;
}

body.page-weekly-routine .weekly-planner-link-panel .planner-btn {
    width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 720px) {
    body.page-weekly-routine .weekly-action-panel {
        width: 100%;
        padding: 10px;
    }

    body.page-weekly-routine .weekly-primary-actions,
    body.page-weekly-routine #weeklyControlsContainer.table-control-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.page-weekly-routine .edit-planner-btn,
    body.page-weekly-routine .save-planner-btn,
    body.page-weekly-routine #weeklyControlsContainer .table-control-btn {
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        font-size: 0.82rem !important;
        padding: 0 8px !important;
    }
}

/* weekly routine desktop table fit */
@media (min-width: 901px) {
    body.page-weekly-routine .table-responsive-wrapper {
        overflow-x: visible !important;
        padding: 10px !important;
    }

    body.page-weekly-routine .table-responsive-wrapper table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th,
    body.page-weekly-routine .table-responsive-wrapper td {
        padding: 10px 8px !important;
        font-size: clamp(0.72rem, 0.85vw, 0.9rem) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.25 !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th:first-child,
    body.page-weekly-routine .table-responsive-wrapper td:first-child {
        width: 118px !important;
    }
}

body.page-weekly-routine .weekly-planner-link-panel {
    display: flex !important;
    justify-content: center !important;
}

body.page-weekly-routine .weekly-planner-link-panel .planner-btn {
    width: min(100%, 620px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* planner builder desktop table fit */
@media (min-width: 901px) {
    body.page-gym-planner .table-responsive-wrapper {
        overflow-x: visible !important;
        padding: 10px !important;
    }

    body.page-gym-planner .table-responsive-wrapper table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    body.page-gym-planner .table-responsive-wrapper th,
    body.page-gym-planner .table-responsive-wrapper td {
        padding: 10px 8px !important;
        font-size: clamp(0.72rem, 0.85vw, 0.9rem) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.25 !important;
    }

    body.page-gym-planner .table-responsive-wrapper th:first-child,
    body.page-gym-planner .table-responsive-wrapper td:first-child {
        width: 118px !important;
    }
}

/* shared responsive workout tables */
body.page-my-plans #planViewer {
    width: min(100%, 1180px) !important;
    max-width: none !important;
    box-sizing: border-box;
}

body.page-my-plans .saved-plan-action-panel {
    width: min(100%, 1040px);
    margin: 0 auto 18px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

body.page-my-plans .saved-plan-primary-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
    direction: ltr;
}

body.page-my-plans .saved-plan-primary-actions button,
body.page-my-plans #currentPlanControls .table-control-btn {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    min-width: 150px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-weight: 800 !important;
    font-size: 0.96rem !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

body.page-my-plans #currentPlanControls.table-control-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
    gap: 16px !important;
    width: min(100%, 1040px) !important;
    margin: 0 auto 12px !important;
    overflow: visible !important;
    direction: ltr !important;
}

body.page-my-plans .saved-plan-table-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    body.page-weekly-routine .table-responsive-wrapper,
    body.page-gym-planner .table-responsive-wrapper,
    body.page-my-plans .saved-plan-table-wrap {
        overflow-x: visible !important;
        padding: 6px !important;
        padding-inline: 6px !important;
    }

    body.page-weekly-routine .table-responsive-wrapper table,
    body.page-gym-planner .table-responsive-wrapper table,
    body.page-my-plans #CurrentPlanTable {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th,
    body.page-weekly-routine .table-responsive-wrapper td,
    body.page-gym-planner .table-responsive-wrapper th,
    body.page-gym-planner .table-responsive-wrapper td,
    body.page-my-plans #CurrentPlanTable th,
    body.page-my-plans #CurrentPlanTable td {
        padding: clamp(5px, 1.6vw, 8px) clamp(3px, 1.2vw, 6px) !important;
        font-size: clamp(0.52rem, 2.15vw, 0.72rem) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.16 !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th:first-child,
    body.page-weekly-routine .table-responsive-wrapper td:first-child,
    body.page-gym-planner .table-responsive-wrapper th:first-child,
    body.page-gym-planner .table-responsive-wrapper td:first-child,
    body.page-my-plans #CurrentPlanTable th:first-child,
    body.page-my-plans #CurrentPlanTable td:first-child {
        width: clamp(52px, 18vw, 82px) !important;
    }
}

@media (max-width: 720px) {
    body.page-my-plans .saved-plan-primary-actions,
    body.page-my-plans #currentPlanControls.table-control-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.page-my-plans .saved-plan-primary-actions button,
    body.page-my-plans #currentPlanControls .table-control-btn {
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        font-size: 0.82rem !important;
        padding: 0 8px !important;
    }
}

/* my plans structure actions alignment */
body.page-my-plans .saved-plan-structure-actions {
    display: block !important;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.page-my-plans .saved-plan-structure-actions #currentPlanControls {
    width: 100% !important;
}

/* my plans desktop table wrap */
@media (min-width: 901px) {
    body.page-my-plans .saved-plan-table-wrap {
        overflow-x: visible !important;
        padding: 10px !important;
        padding-inline: 10px !important;
    }

    body.page-my-plans #CurrentPlanTable {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    body.page-my-plans #CurrentPlanTable th,
    body.page-my-plans #CurrentPlanTable td {
        padding: 10px 8px !important;
        font-size: clamp(0.72rem, 0.85vw, 0.9rem) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.25 !important;
    }

    body.page-my-plans #CurrentPlanTable th:first-child,
    body.page-my-plans #CurrentPlanTable td:first-child {
        width: 118px !important;
    }
}

/* main page feature showcase */
body.page-main-menu .main-feature-shell {
    width: min(1180px, 100%) !important;
    min-height: auto !important;
    align-items: stretch !important;
    gap: 18px;
}

body.page-main-menu .main-feature-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

body.page-main-menu .main-feature-logo {
    width: clamp(120px, 18vw, 210px) !important;
    max-height: 210px !important;
}

body.page-main-menu .main-feature-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.page-main-menu .main-feature-card {
    min-height: 154px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.66);
    color: #f8fafc;
    text-decoration: none;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.page-main-menu .main-feature-card-large {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(0, 162, 232, 0.9), rgba(15, 23, 42, 0.82));
    border-color: rgba(255, 255, 255, 0.28);
}

body.page-main-menu .main-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(250, 204, 21, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

body.page-main-menu .main-feature-card-large:hover {
    background: linear-gradient(135deg, rgba(0, 162, 232, 1), rgba(15, 23, 42, 0.9));
}

body.page-main-menu .main-feature-kicker {
    color: #facc15;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

body.page-main-menu .main-feature-card strong {
    color: #ffffff;
    font-size: clamp(1rem, 1.6vw, 1.32rem);
    line-height: 1.08;
}

body.page-main-menu .main-feature-card span:last-child {
    color: rgba(248, 250, 252, 0.78);
    line-height: 1.42;
    font-size: 0.92rem;
}

body.page-main-menu .main-feature-card-large span:last-child {
    color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 900px) {
    body.page-main-menu .main-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-main-menu .main-feature-card-large {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    body.page-main-menu .main-feature-shell {
        gap: 12px;
        padding: 14px !important;
    }

    body.page-main-menu .main-feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.page-main-menu .main-feature-card,
    body.page-main-menu .main-feature-card-large {
        grid-column: auto;
        min-height: 128px;
        padding: 14px;
    }
}



/* Diet setup spacing and BMI polish. */
body.page-diet-setup .diet-setup-card {
    max-width: 1040px;
    padding: clamp(18px, 2.4vw, 28px);
}
body.page-diet-setup .diet-setup-form {
    gap: 18px;
}
body.page-diet-setup .diet-setup-fields {
    gap: 14px;
}
body.page-diet-setup .diet-setup-basics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}
body.page-diet-setup .diet-setup-fields label {
    min-width: 0;
    gap: 7px;
}
body.page-diet-setup .diet-setup-basics input,
body.page-diet-setup .diet-setup-basics select {
    width: 100%;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
    margin: 0;
}
body.page-diet-setup #setupActivity,
body.page-diet-setup #setupGoal {
    height: 46px;
    min-height: 46px;
}
body.page-diet-setup .diet-bodyfat-label-row {
    justify-content: flex-start;
    gap: 6px;
    min-height: 20px;
    text-align: left;
}
body.page-diet-setup #openBodyfatGuideButton {
    line-height: 1.1;
}
body.page-diet-setup .diet-setup-actions,
body.page-diet-setup .diet-setup-final-actions,
body.page-diet-setup .diet-setup-apply-actions {
    gap: 12px;
    margin: 0;
}
body.page-diet-setup .diet-recommendation-summary {
    gap: 14px;
}
body.page-diet-setup .diet-recommendation-summary article {
    gap: 6px;
}
body.page-diet-setup .diet-range-list {
    gap: 12px;
}
body.page-diet-setup .diet-range-list p {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
}
body.page-diet-setup .diet-setup-range-targets {
    gap: 14px;
}
body.page-diet-setup .diet-setup-range-targets fieldset {
    padding: 14px;
}
body.page-diet-setup .diet-range-inputs {
    gap: 10px;
}
body.page-diet-setup .diet-range-inputs input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0;
}
@media (max-width: 980px) {
    body.page-diet-setup .diet-setup-basics,
    body.page-diet-setup .diet-setup-fields,
    body.page-diet-setup .diet-recommendation-summary,
    body.page-diet-setup .diet-range-list {
        grid-template-columns: 1fr;
    }
}
/* End Diet setup spacing and BMI polish. */


/* Main page equal feature cards. */
body.page-main-menu .main-feature-grid {
    align-items: stretch;
}
body.page-main-menu .main-feature-card,
body.page-main-menu .main-feature-card-large {
    grid-column: auto;
    min-height: 174px;
    height: 100%;
}
body.page-main-menu .main-feature-card {
    justify-content: flex-start;
}
body.page-main-menu .main-feature-card span:last-child {
    flex: 1;
}
@media (max-width: 900px) {
    body.page-main-menu .main-feature-card,
    body.page-main-menu .main-feature-card-large {
        grid-column: auto;
    }
}
@media (max-width: 560px) {
    body.page-main-menu .main-feature-card,
    body.page-main-menu .main-feature-card-large {
        min-height: 146px;
    }
}
/* End Main page equal feature cards. */




/* Diet setup responsive polish and menu spacing. */
body.page-diet-setup .diet-setup-shell {
    width: min(1180px, calc(100% - 24px));
    padding-left: 0;
    padding-right: 0;
}
body.page-diet-setup .diet-setup-card {
    width: 100%;
    box-sizing: border-box;
}
body.page-diet-setup .diet-setup-card-heading {
    gap: 14px;
    flex-wrap: wrap;
}
body.page-diet-setup .diet-setup-card-heading > div {
    min-width: min(100%, 420px);
    flex: 1 1 420px;
}
body.page-diet-setup .diet-skip-link {
    flex: 0 0 auto;
}
body.page-diet-setup .diet-setup-basics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
body.page-diet-setup .diet-setup-basics label:last-child {
    grid-column: auto;
}
body.page-diet-setup .diet-setup-basics label,
body.page-diet-setup .diet-setup-range-targets fieldset,
body.page-diet-setup .diet-range-list p,
body.page-diet-setup .diet-recommendation-summary article {
    min-width: 0;
}
body.page-diet-setup .diet-bodyfat-label-row {
    flex-wrap: wrap;
}
body.page-diet-setup .diet-setup-actions {
    justify-content: flex-start;
}
body.page-diet-setup .diet-setup-actions button {
    min-width: min(100%, 210px);
}
body.page-diet-setup #dietSetupStatus {
    min-width: min(100%, 260px);
    flex: 1 1 260px;
}
body.page-diet-setup .diet-recommendation-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.page-diet-setup .diet-recommendation-summary article {
    min-height: 86px;
}
body.page-diet-setup .diet-range-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
body.page-diet-setup .diet-setup-range-targets {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
body.page-diet-setup .diet-range-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.page-diet-setup .diet-setup-final-actions {
    justify-content: flex-end;
}
body.has-mobile-footer .site-menu-dialog {
    display: grid;
    gap: 18px;
    padding: 26px 22px 22px;
}
body.has-mobile-footer .site-menu-section {
    gap: 8px;
    margin-top: 0;
    padding-top: 16px;
}
body.has-mobile-footer .site-menu-section:first-of-type {
    padding-top: 0;
}
body.has-mobile-footer .site-menu-section-title {
    margin: 0 0 4px;
}
body.has-mobile-footer .site-menu-link,
body.has-mobile-footer .site-menu-action {
    min-height: 42px;
    padding-top: 10px;
    padding-bottom: 10px;
}
@media (max-width: 700px) {
    body.page-diet-setup .diet-setup-shell {
        width: min(100% - 16px, 100%);
        padding-bottom: 92px;
    }
    body.page-diet-setup .diet-setup-card {
        padding: 14px;
    }
    body.page-diet-setup .diet-setup-card-heading h1 {
        font-size: 2rem;
    }
    body.page-diet-setup .diet-skip-link {
        width: auto;
        min-width: 150px;
    }
    body.page-diet-setup .diet-setup-basics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    body.page-diet-setup .diet-setup-basics input,
    body.page-diet-setup .diet-setup-basics select {
        height: 44px;
        min-height: 44px;
    }
    body.page-diet-setup .diet-recommendation-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    body.page-diet-setup .diet-recommendation-summary article {
        min-height: 74px;
        padding: 8px 6px;
    }
    body.page-diet-setup .diet-recommendation-summary strong {
        font-size: 1.08rem;
    }
    body.page-diet-setup .diet-recommendation-summary small,
    body.page-diet-setup .diet-recommendation-summary span {
        font-size: 0.72rem;
        line-height: 1.15;
    }
    body.page-diet-setup .diet-range-list {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }
    body.page-diet-setup .diet-setup-range-targets {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    body.page-diet-setup .diet-setup-actions,
    body.page-diet-setup .diet-setup-final-actions,
    body.page-diet-setup .diet-setup-apply-actions {
        gap: 8px;
    }
    body.page-diet-setup .diet-setup-actions button,
    body.page-diet-setup .diet-skip-link {
        width: auto;
    }
    body.has-mobile-footer .site-menu-dialog {
        gap: 14px;
        padding: 22px 18px 18px;
    }
    body.has-mobile-footer .site-menu-section {
        gap: 7px;
        padding-top: 14px;
    }
}
@media (max-width: 430px) {
    body.page-diet-setup .diet-setup-basics {
        grid-template-columns: 1fr;
    }
    body.page-diet-setup .diet-recommendation-summary {
        grid-template-columns: 1fr;
    }
    body.page-diet-setup .diet-setup-actions button,
    body.page-diet-setup .diet-skip-link {
        width: 100%;
    }
}
/* End Diet setup responsive polish and menu spacing. */


/* Diet stats total spacing. */
body.page-diet .diet-stats-total {
    gap: 12px;
}
body.page-diet .diet-stats-total span {
    margin: 0;
}
@media (max-width: 520px) {
    body.page-diet .diet-stats-total {
        gap: 10px;
    }
}
/* End Diet stats total spacing. */


/* Diet setup sub-981 stability. */
@media (max-width: 980px) {
    body.page-diet-setup .diet-setup-shell {
        width: min(100% - 20px, 940px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 16px 0 92px !important;
        box-sizing: border-box !important;
    }
    body.page-diet-setup .diet-setup-card {
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }
    body.page-diet-setup .diet-setup-card-heading {
        flex-flow: row wrap !important;
        align-items: flex-start !important;
    }
    body.page-diet-setup .diet-setup-form,
    body.page-diet-setup .diet-setup-fields,
    body.page-diet-setup .diet-recommendation-summary,
    body.page-diet-setup .diet-range-list,
    body.page-diet-setup .diet-range-inputs {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    body.page-diet-setup .diet-setup-basics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    body.page-diet-setup .diet-setup-basics label:last-child {
        grid-column: auto !important;
    }
    body.page-diet-setup .diet-setup-basics input,
    body.page-diet-setup .diet-setup-basics select,
    body.page-diet-setup .diet-range-inputs input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    body.page-diet-setup .diet-recommendation-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    body.page-diet-setup .diet-recommendation-summary article {
        min-height: 78px !important;
        padding: 9px 8px !important;
    }
    body.page-diet-setup .diet-range-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    body.page-diet-setup .diet-setup-range-targets {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
    body.page-diet-setup .diet-range-inputs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body.page-diet-setup .diet-setup-actions button,
    body.page-diet-setup .diet-skip-link {
        width: auto !important;
    }
}
@media (max-width: 620px) {
    body.page-diet-setup .diet-setup-shell {
        width: min(100% - 14px, 100%) !important;
        padding-top: 10px !important;
    }
    body.page-diet-setup .diet-setup-card {
        padding: 12px !important;
    }
    body.page-diet-setup .diet-setup-basics,
    body.page-diet-setup .diet-range-list,
    body.page-diet-setup .diet-setup-range-targets {
        grid-template-columns: 1fr !important;
    }
    body.page-diet-setup .diet-recommendation-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }
    body.page-diet-setup .diet-recommendation-summary article {
        min-height: 70px !important;
        padding: 7px 5px !important;
    }
    body.page-diet-setup .diet-recommendation-summary strong {
        font-size: 1rem !important;
    }
    body.page-diet-setup .diet-recommendation-summary small,
    body.page-diet-setup .diet-recommendation-summary span {
        font-size: 0.68rem !important;
        overflow-wrap: anywhere !important;
    }
}
@media (max-width: 430px) {
    body.page-diet-setup .diet-recommendation-summary,
    body.page-diet-setup .diet-range-inputs {
        grid-template-columns: 1fr !important;
    }
    body.page-diet-setup .diet-setup-actions button,
    body.page-diet-setup .diet-skip-link {
        width: 100% !important;
    }
}
/* End Diet setup sub-981 stability. */


/* Add food barcode tablet stack. */
@media (min-width: 641px) and (max-width: 980px) {
    body.page-diet .diet-add-food-shell .diet-barcode-controls {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    body.page-diet .diet-add-food-shell .diet-barcode-controls label {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body.page-diet .diet-add-food-shell .diet-barcode-controls input,
    body.page-diet .diet-add-food-shell .diet-barcode-controls button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
/* End Add food barcode tablet stack. */


/* Mobile footer button spacing. */
body.has-mobile-footer .main-mobile-footer,
body.page-main-menu .main-mobile-footer {
    gap: 8px !important;
}
body.has-mobile-footer .main-mobile-footer-item,
body.page-main-menu .main-mobile-footer-item {
    box-sizing: border-box !important;
}
@media (max-width: 420px) {
    body.has-mobile-footer .main-mobile-footer,
    body.page-main-menu .main-mobile-footer {
        gap: 6px !important;
    }
}
/* End Mobile footer button spacing. */


/* Settings dialog spacing. */
body .account-actions-dialog {
    display: grid;
    gap: 12px;
}
body .account-actions-dialog h2,
body .account-actions-dialog h3,
body .account-actions-dialog p,
body .settings-current-user {
    margin-bottom: 0 !important;
}
body .settings-password-panel,
body .settings-theme-panel,
body .settings-username-panel {
    gap: 12px;
}
body .settings-password-panel > div,
body .settings-theme-panel > div,
body .settings-username-panel > div {
    display: grid;
    gap: 6px;
}
body .settings-theme-toggle {
    gap: 10px;
    margin-top: 2px;
}
body .settings-username-row {
    gap: 10px;
}
body .account-actions-list {
    gap: 10px;
    margin-top: 2px;
}
body .account-actions-list button,
body .account-actions-list a {
    margin: 0 !important;
}
@media (max-width: 520px) {
    body .account-actions-dialog {
        gap: 10px;
    }
    body .settings-password-panel,
    body .settings-theme-panel,
    body .settings-username-panel,
    body .account-actions-list {
        gap: 8px;
    }
}
/* End Settings dialog spacing. */

/* Language settings and RTL support. */
body .settings-language-panel {
    gap: 10px;
}
body .settings-language-trigger {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.08);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}
body .settings-language-options[hidden] {
    display: none !important;
}
body .settings-language-options {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
}
body .settings-language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
}
body .settings-language-option:hover {
    background: rgba(34, 197, 94, 0.1);
}
body .settings-language-option span {
    color: inherit;
}
body.dark-mode .settings-language-trigger,
body.dark-mode .settings-language-options {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}
html[dir="rtl"] body {
    direction: rtl;
}
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"] {
    direction: ltr;
    text-align: right;
}
html[dir="rtl"] .settings-theme-toggle,
html[dir="rtl"] .settings-language-option,
html[dir="rtl"] body .settings-username-row {
    direction: rtl;
}
html[dir="rtl"] .diet-search-result,
html[dir="rtl"] .diet-search-empty {
    text-align: right;
}
.main-mobile-footer,
body.has-mobile-footer .main-mobile-footer,
body.page-main-menu .main-mobile-footer {
    direction: ltr !important;
    flex-direction: row !important;
}
.main-mobile-footer .main-mobile-footer-item {
    direction: ltr !important;
}
/* End language settings and RTL support. */

/* Use compact navigation when the full sidebar cannot fit vertically. */
@media (min-width: 1280px) and (max-height: 839.98px) {
    body.has-mobile-footer:not(.page-main-menu) {
        padding-left: 0 !important;
        padding-bottom: 88px !important;
    }
    body.page-main-menu.has-mobile-footer {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 12px 12px 88px !important;
    }
    body.has-mobile-footer .main-sidebar { display: none !important; }
    body.has-mobile-footer .site-menu-button { display: inline-flex !important; }
    body.has-mobile-footer .main-mobile-footer {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 95;
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        background: rgba(7, 12, 24, 0.92);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(14px);
    }
    body.has-mobile-footer .main-mobile-footer-item {
        width: 100%;
        height: 42px;
        min-width: 0;
        min-height: 42px;
    }
    body.page-main-menu.has-mobile-footer .HeaderIconContainer {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 112px);
        width: 100%;
        margin: 0 auto;
        padding: 0 !important;
        box-sizing: border-box;
    }
    body.page-main-menu.has-mobile-footer .hero-shell {
        width: min(100%, 960px) !important;
        min-height: auto !important;
        margin: 0 auto;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    body.page-main-menu.has-mobile-footer .hero-copy {
        max-width: 680px;
        margin: 0 auto;
        text-align: center;
    }
    body.page-main-menu.has-mobile-footer .HeaderIcon {
        margin-left: auto;
        margin-right: auto;
    }
}





/* Keep desktop sidebars pinned left even when Hebrew RTL is active. */
@media (min-width: 1280px) and (min-height: 840px) {
    html[dir="rtl"] body.page-main-menu {
        direction: ltr !important;
        grid-template-columns: 248px minmax(0, 1fr) !important;
    }
    html[dir="rtl"] body.page-main-menu .main-sidebar,
    html[dir="rtl"] body.has-mobile-footer:not(.page-main-menu) .main-sidebar {
        left: 16px !important;
        right: auto !important;
        direction: ltr !important;
        text-align: left !important;
    }
    html[dir="rtl"] body.has-mobile-footer:not(.page-main-menu) {
        padding-left: 286px !important;
        padding-right: 0 !important;
    }
    html[dir="rtl"] body.page-main-menu .main-sidebar-link,
    html[dir="rtl"] body.has-mobile-footer:not(.page-main-menu) .main-sidebar-link {
        justify-content: flex-start !important;
        text-align: left !important;
    }
}

/* Keep calendar picker icons white on diet date/month fields. */
body.page-diet input[type="date"]::-webkit-calendar-picker-indicator,
body.page-diet input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.25) !important;
    opacity: 1 !important;
}
body.page-diet input[type="date"],
body.page-diet input[type="month"] {
    color-scheme: dark;
}

/* Hebrew mode uses a plain sans-serif font everywhere. */
html[dir="rtl"],
html[dir="rtl"] body,
html[dir="rtl"] body *,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] option,
html[dir="rtl"] table,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] .gymrat-dialog,
html[dir="rtl"] .gymrat-dialog * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
/* Professional Diet action cards. */
body.page-diet .diet-form-panel .diet-action-hub {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin: 0 !important;
}
body.page-diet .diet-form-panel .diet-action-card,
body.page-diet .diet-form-panel a.diet-action-card,
body.page-diet .diet-form-panel button.diet-action-card {
    position: relative;
    width: 100% !important;
    min-height: 108px !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin: 0 !important;
    padding: 18px 20px !important;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 92% 12%, rgba(96, 165, 250, 0.16), transparent 38%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96)) !important;
    color: #f8fafc !important;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.2) !important;
    font: inherit;
    text-align: left;
    text-decoration: none !important;
    overflow: hidden;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
body.page-diet .diet-form-panel .diet-action-card-featured {
    grid-column: 1 / -1;
    min-height: 126px !important;
    background:
        radial-gradient(circle at 88% 15%, rgba(134, 239, 172, 0.28), transparent 34%),
        linear-gradient(135deg, #166534, #064e3b 62%, #0f3d3e) !important;
    border-color: rgba(134, 239, 172, 0.38) !important;
}
body.page-diet .diet-form-panel .diet-action-date {
    background:
        radial-gradient(circle at 90% 12%, rgba(250, 204, 21, 0.2), transparent 38%),
        linear-gradient(145deg, rgba(51, 65, 85, 0.98), rgba(15, 23, 42, 0.98)) !important;
    border-color: rgba(250, 204, 21, 0.24) !important;
}
body.page-diet .diet-form-panel .diet-action-date .diet-action-visual {
    color: #fde68a;
}
body.page-diet .diet-form-panel .diet-action-date.is-active {
    background:
        radial-gradient(circle at 88% 12%, rgba(134, 239, 172, 0.26), transparent 40%),
        linear-gradient(145deg, rgba(22, 101, 52, 0.98), rgba(6, 78, 59, 0.98)) !important;
    border-color: rgba(134, 239, 172, 0.58) !important;
    box-shadow: 0 16px 38px rgba(6, 78, 59, 0.28) !important;
}
body.page-diet .diet-form-panel .diet-action-date.is-active .diet-action-visual {
    color: #bbf7d0;
}
body.page-diet .diet-form-panel .diet-date-controls-simple {
    display: block !important;
}
body.page-diet .diet-form-panel .diet-date-controls-simple .diet-current-date {
    width: 100% !important;
}
body.page-diet .diet-form-panel .diet-action-remove {
    background:
        radial-gradient(circle at 90% 10%, rgba(248, 113, 113, 0.2), transparent 38%),
        linear-gradient(145deg, rgba(127, 29, 29, 0.96), rgba(69, 10, 10, 0.98)) !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
}
body.page-diet .diet-form-panel .diet-action-visual {
    width: 58px;
    height: 58px;
    min-width: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.09);
    color: #93c5fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.page-diet .diet-form-panel .diet-action-card-featured .diet-action-visual {
    width: 68px;
    height: 68px;
    min-width: 68px;
    color: #bbf7d0;
    background: rgba(255, 255, 255, 0.12);
}
body.page-diet .diet-form-panel .diet-action-remove .diet-action-visual {
    color: #fecaca;
}
body.page-diet .diet-form-panel .diet-action-visual svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.page-diet .diet-form-panel .diet-action-card-featured .diet-action-visual svg {
    width: 44px;
    height: 44px;
    stroke-width: 2.8;
}
body.page-diet .diet-form-panel .diet-action-title {
    min-width: 0;
    color: inherit;
    font-size: clamp(1rem, 1.7vw, 1.18rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
body.page-diet .diet-form-panel .diet-action-card-featured .diet-action-title {
    font-size: clamp(1.12rem, 2vw, 1.35rem);
}
body.page-diet .diet-form-panel .diet-action-card:hover,
body.page-diet .diet-form-panel .diet-action-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.52) !important;
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.32) !important;
    filter: brightness(1.08);
}
body.page-diet .diet-form-panel .diet-action-card-featured:hover,
body.page-diet .diet-form-panel .diet-action-card-featured:focus-visible {
    border-color: rgba(134, 239, 172, 0.72) !important;
}
body.page-diet .diet-form-panel .diet-action-remove:hover,
body.page-diet .diet-form-panel .diet-action-remove:focus-visible {
    border-color: rgba(252, 165, 165, 0.64) !important;
}
body.page-diet .diet-form-panel .diet-action-card:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.55);
    outline-offset: 3px;
}
@media (max-width: 520px) {
    body.page-diet .diet-form-panel .diet-action-hub {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    body.page-diet .diet-form-panel .diet-action-card-featured {
        grid-column: auto;
    }
    body.page-diet .diet-form-panel .diet-action-card,
    body.page-diet .diet-form-panel a.diet-action-card,
    body.page-diet .diet-form-panel button.diet-action-card {
        min-height: 92px !important;
        padding: 14px 16px !important;
    }
    body.page-diet .diet-form-panel .diet-action-card-featured {
        min-height: 104px !important;
    }
    body.page-diet .diet-form-panel .diet-action-visual {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
    body.page-diet .diet-form-panel .diet-action-card-featured .diet-action-visual {
        width: 58px;
        height: 58px;
        min-width: 58px;
    }
}
/* End professional Diet action cards. */

/* Progressive overload muscle dashboards. */
body.page-tracking-entry .wrapper{width:min(1180px,100%)!important;max-width:1180px!important;margin:0 auto!important;padding:24px!important;box-sizing:border-box;overflow:visible!important}
body.page-tracking-entry .tracking-muscle-hero{min-height:250px;display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:28px;align-items:center;padding:30px 34px;border:1px solid rgba(96,165,250,.22);border-radius:26px;background:radial-gradient(circle at 85% 10%,rgba(59,130,246,.24),transparent 36%),linear-gradient(145deg,rgba(15,23,42,.98),rgba(30,58,138,.62));box-shadow:0 24px 58px rgba(2,6,23,.32);overflow:hidden}
body.page-tracking-entry .tracking-back-link{display:inline-flex;margin-bottom:22px;color:#bfdbfe;font-weight:800;text-decoration:none}
body.page-tracking-entry .tracking-eyebrow{margin:0 0 6px;color:#60a5fa;font-size:.78rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
body.page-tracking-entry .tracking-muscle-copy h1{margin:0;font-size:clamp(2.3rem,6vw,4.6rem);line-height:.95}
body.page-tracking-entry .tracking-muscle-copy>p:last-child{max-width:650px;margin:16px 0 0;color:rgba(226,232,240,.82);line-height:1.6}
body.page-tracking-entry .tracking-muscle-image{height:210px;display:flex;align-items:center;justify-content:center}
body.page-tracking-entry .tracking-muscle-image img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 18px 26px rgba(0,0,0,.4))}
body.page-tracking-entry .tracking-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0 24px}
body.page-tracking-entry .tracking-summary article{min-height:94px;display:grid;align-content:center;gap:7px;padding:16px 18px;border:1px solid rgba(148,163,184,.16);border-radius:18px;background:rgba(15,23,42,.88);box-shadow:0 14px 30px rgba(2,6,23,.18)}
body.page-tracking-entry .tracking-summary span{color:rgba(191,219,254,.75);font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
body.page-tracking-entry .tracking-summary strong{color:#f8fafc;font-size:clamp(1.45rem,3vw,2rem)}
body.page-tracking-entry .tracking-section-heading{display:flex;justify-content:space-between;gap:24px;align-items:end;margin:8px 0 14px}
body.page-tracking-entry .tracking-section-heading p{max-width:520px;margin:0;color:rgba(203,213,225,.68);line-height:1.5}
body.page-tracking-entry .tracking-section-heading>div p{color:#60a5fa;font-size:.76rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
body.page-tracking-entry .tracking-section-heading h2{margin:3px 0 0;font-size:clamp(1.5rem,3vw,2.2rem)}
body.page-tracking-entry .container{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
body.page-tracking-entry .box{padding:16px!important;border-radius:22px!important;background:linear-gradient(155deg,rgba(30,41,59,.98),rgba(15,23,42,.98))!important;border:1px solid rgba(148,163,184,.18)!important;box-shadow:0 18px 42px rgba(2,6,23,.24)!important}
body.page-tracking-entry .exercise-card-top{display:grid;grid-template-columns:74px minmax(0,1fr);gap:14px;align-items:center;margin-bottom:12px}
body.page-tracking-entry .exercise-media-slot{position:relative;width:74px;height:74px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(96,165,250,.2);border-radius:18px;background:rgba(15,23,42,.68);overflow:hidden}
body.page-tracking-entry .exercise-media-slot img{width:100%;height:100%;object-fit:contain}
body.page-tracking-entry .exercise-media-slot span{position:absolute;inset:auto 4px 4px;padding:3px 4px;border-radius:6px;background:rgba(2,6,23,.82);color:rgba(226,232,240,.74);font-size:.55rem;font-weight:800;text-align:center}
body.page-tracking-entry .exercise-card-heading{min-width:0;display:grid;gap:4px}
body.page-tracking-entry .exercise-muscle-label{color:#60a5fa;font-size:.72rem;font-weight:900;text-transform:uppercase}
body.page-tracking-entry .exercise-card-name{overflow:hidden;color:#f8fafc;font-size:1.12rem;text-overflow:ellipsis;white-space:nowrap}
body.page-tracking-entry .exercise-pr-summary{color:#facc15;font-size:.76rem;font-weight:800}
body.page-tracking-entry .exercise-toggle{min-height:44px;background:rgba(51,65,85,.58)!important}
body.page-tracking-entry .exercise-name-field,body.page-tracking-entry .tracking-field{display:grid;gap:5px;min-width:0}
body.page-tracking-entry .exercise-name-field>span,body.page-tracking-entry .tracking-field>span{color:rgba(191,219,254,.72);font-size:.68rem;font-weight:800;text-transform:uppercase}
body.page-tracking-entry .set{grid-template-columns:54px minmax(82px,1fr) minmax(72px,.8fr) minmax(92px,auto) 38px!important;gap:8px!important;padding:10px!important;border:1px solid rgba(148,163,184,.12)!important;border-radius:14px;background:rgba(2,6,23,.28)}
body.page-tracking-entry .set input{min-height:40px!important}
body.page-tracking-entry .set .set-pr-toggle{width:auto!important;min-width:92px!important;max-width:none!important;min-height:40px!important;display:inline-flex;gap:6px;align-items:center;justify-content:center;padding:7px 10px!important;border:1px solid rgba(250,204,21,.24);border-radius:11px;background:rgba(120,53,15,.28);color:#fde68a;font-size:.78rem;font-weight:900}
body.page-tracking-entry .set .set-pr-toggle.is-pr{background:linear-gradient(135deg,#ca8a04,#a16207);border-color:rgba(253,224,71,.74);color:#fffbea;box-shadow:0 8px 20px rgba(161,98,7,.28)}
body.page-tracking-entry .set .set-delete-btn{width:38px!important;min-width:38px!important;max-width:38px!important;min-height:40px!important}
body.page-tracking-entry .buttons{position:sticky;bottom:16px;z-index:40;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;margin:18px 0 0!important;padding:10px;border:1px solid rgba(148,163,184,.18);border-radius:18px;background:rgba(15,23,42,.9);box-shadow:0 18px 40px rgba(2,6,23,.34);backdrop-filter:blur(14px)}
body.page-tracking-entry .buttons button{min-height:48px!important;border-radius:13px!important}
body.page-tracking-entry .buttons button:last-child{background:rgba(127,29,29,.92)}
@media(max-width:900px){body.page-tracking-entry .wrapper{padding:76px 14px 96px!important}body.page-tracking-entry .tracking-muscle-hero{grid-template-columns:minmax(0,1fr) 180px;min-height:220px;padding:24px}body.page-tracking-entry .tracking-summary{grid-template-columns:repeat(2,minmax(0,1fr))}body.page-tracking-entry .container{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:600px){body.page-tracking-entry .tracking-muscle-hero{grid-template-columns:minmax(0,1fr) 105px;gap:12px;min-height:190px;padding:20px 16px;border-radius:20px}body.page-tracking-entry .tracking-back-link{margin-bottom:15px;font-size:.82rem}body.page-tracking-entry .tracking-muscle-copy>p:last-child{font-size:.86rem;line-height:1.45}body.page-tracking-entry .tracking-muscle-image{height:130px}body.page-tracking-entry .tracking-summary{gap:8px;margin:10px 0 18px}body.page-tracking-entry .tracking-summary article{min-height:78px;padding:12px;border-radius:14px}body.page-tracking-entry .tracking-section-heading{display:grid;gap:8px}body.page-tracking-entry .tracking-section-heading>p{font-size:.78rem}body.page-tracking-entry .set{grid-template-columns:48px minmax(0,1fr) minmax(0,1fr) 38px!important}body.page-tracking-entry .set>strong{grid-column:1;grid-row:1}body.page-tracking-entry .set .set-delete-btn{grid-column:4;grid-row:1}body.page-tracking-entry .tracking-field{grid-row:2}body.page-tracking-entry .set .set-pr-toggle{grid-column:2/4;grid-row:3;width:100%!important}body.page-tracking-entry .buttons{bottom:78px}}
/* End progressive overload muscle dashboards. */

/* Diet stats month picker and Hebrew sidebar font fixes. */
body.page-diet .diet-stats-download-controls input[type="month"],
body.page-diet .diet-stats-download-controls input[type="date"] {
    color-scheme: dark !important;
    color: #ffffff !important;
}
body.page-diet .diet-stats-download-controls input[type="month"]::-webkit-calendar-picker-indicator,
body.page-diet .diet-stats-download-controls input[type="date"]::-webkit-calendar-picker-indicator,
body.page-diet input[type="month"]::-webkit-calendar-picker-indicator,
body.page-diet input[type="date"]::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}
body.page-diet .diet-stats-month-label {
    display: block;
    margin-top: 6px;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}
html[dir="rtl"] .main-sidebar,
html[dir="rtl"] .main-sidebar *,
html[dir="rtl"] .main-mobile-footer,
html[dir="rtl"] .main-mobile-footer * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
/* Force Hebrew sidebar navigation to the plain sans-serif stack. */
html[lang="he"] .main-sidebar,
html[lang="he"] .main-sidebar *,
html[lang="he"] .main-sidebar-link,
html[lang="he"] .main-sidebar-link *,
html[lang="he"] .main-sidebar-user,
html[lang="he"] .main-sidebar-category,
html[lang="he"] .main-mobile-footer,
html[lang="he"] .main-mobile-footer *,
html[dir="rtl"] .main-sidebar,
html[dir="rtl"] .main-sidebar *,
body.lang-he .main-sidebar,
body.lang-he .main-sidebar *,
body.lang-he .main-sidebar-link,
body.lang-he .main-sidebar-link *,
body.lang-he .main-sidebar-user,
body.lang-he .main-sidebar-category,
body.lang-he .main-mobile-footer,
body.lang-he .main-mobile-footer * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-synthesis: none;
}
/* Final Hebrew sidebar font and workout table word wrapping fixes. */
.main-sidebar,
.main-sidebar *,
.main-sidebar-link,
.main-sidebar-link *,
.main-sidebar-user,
.main-sidebar-category,
.site-menu-dialog,
.site-menu-dialog *,
.main-mobile-footer,
.main-mobile-footer * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
body.page-weekly-routine .table-responsive-wrapper table,
body.page-gym-planner .table-responsive-wrapper table,
body.page-my-plans #CurrentPlanTable {
    overflow-wrap: normal !important;
    word-break: normal !important;
}
body.page-weekly-routine .table-responsive-wrapper th,
body.page-weekly-routine .table-responsive-wrapper td,
body.page-weekly-routine .table-responsive-wrapper th *,
body.page-weekly-routine .table-responsive-wrapper td *,
body.page-gym-planner .table-responsive-wrapper th,
body.page-gym-planner .table-responsive-wrapper td,
body.page-gym-planner .table-responsive-wrapper th *,
body.page-gym-planner .table-responsive-wrapper td *,
body.page-my-plans #CurrentPlanTable th,
body.page-my-plans #CurrentPlanTable td,
body.page-my-plans #CurrentPlanTable th *,
body.page-my-plans #CurrentPlanTable td * {
    overflow-wrap: normal !important;
    word-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    white-space: normal !important;
}
body.page-weekly-routine .table-cell-editor,
body.page-weekly-routine .table-cell-editor-multiline,
body.page-gym-planner .table-cell-editor,
body.page-gym-planner .table-cell-editor-multiline,
body.page-my-plans #CurrentPlanTable input,
body.page-my-plans #CurrentPlanTable textarea {
    overflow-wrap: normal !important;
    word-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}



/* main page requested hero emphasis */
body.page-main-menu .main-feature-shell {
    overflow: hidden;
}

body.page-main-menu .main-feature-brand {
    flex-direction: column;
    gap: clamp(10px, 2vh, 18px);
    min-height: min(820px, calc(100vh - 64px));
    text-align: center;
}

body.page-main-menu .main-feature-title-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.8vh, 8px);
}

body.page-main-menu .main-feature-title-stack h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(3rem, 9vw, 8rem);
    font-weight: 1000;
    line-height: 0.88;
    letter-spacing: 0;
}

body.page-main-menu .main-feature-title-stack p {
    margin: 0;
    color: #facc15;
    font-size: clamp(0.86rem, 2.4vw, 1.85rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.page-main-menu .main-feature-logo {
    width: clamp(260px, 56vw, 680px) !important;
    max-width: 92vw !important;
    max-height: min(56vh, 680px) !important;
    object-fit: contain;
}

@media (max-width: 560px) {
    body.page-main-menu .main-feature-brand {
        min-height: calc(100vh - 100px);
    }

    body.page-main-menu .main-feature-logo {
        width: clamp(240px, 86vw, 420px) !important;
        max-height: 48vh !important;
    }
}

/* weekly routine horizontal scroll table fix */
body.page-weekly-routine .table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

body.page-weekly-routine .table-responsive-wrapper table,
body.page-weekly-routine #WorkoutPlanMainPage {
    width: max-content !important;
    min-width: max(920px, 100%) !important;
    max-width: none !important;
    table-layout: auto !important;
}

body.page-weekly-routine .table-responsive-wrapper th,
body.page-weekly-routine .table-responsive-wrapper td {
    min-width: 118px;
    padding: 12px 14px !important;
    font-size: clamp(0.82rem, 1vw, 0.98rem) !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    line-height: 1.3 !important;
}

body.page-weekly-routine .table-responsive-wrapper th:first-child,
body.page-weekly-routine .table-responsive-wrapper td:first-child {
    min-width: 130px !important;
    width: 130px !important;
}

@media (max-width: 900px) {
    body.page-weekly-routine .table-responsive-wrapper {
        overflow-x: auto !important;
        padding: 8px !important;
    }

    body.page-weekly-routine .table-responsive-wrapper table,
    body.page-weekly-routine #WorkoutPlanMainPage {
        width: max-content !important;
        min-width: 920px !important;
        table-layout: auto !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th,
    body.page-weekly-routine .table-responsive-wrapper td {
        min-width: 112px;
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
    }

    body.page-weekly-routine .table-responsive-wrapper th:first-child,
    body.page-weekly-routine .table-responsive-wrapper td:first-child {
        min-width: 124px !important;
        width: 124px !important;
    }
}


/* Shared Settings overlay: keep the same pop-out on every page. */
.account-actions-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: clamp(12px, 3vw, 24px) !important;
    box-sizing: border-box !important;
    overflow: auto !important;
    background: rgba(2, 6, 23, 0.72) !important;
    backdrop-filter: blur(8px);
}
.account-actions-modal[hidden] {
    display: none !important;
}
.account-actions-modal .account-actions-dialog {
    position: relative !important;
    width: min(420px, 100%) !important;
    max-height: calc(100dvh - 32px) !important;
    margin: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
/* End shared Settings overlay. */


/* Footer primary action icon sizing. */
.main-mobile-footer .main-mobile-footer-item[aria-label="Diet"] .main-mobile-footer-icon {
    width: 31px !important;
    height: 31px !important;
    font-size: 30px !important;
    line-height: 1 !important;
}
.main-mobile-footer .main-mobile-footer-workout-plan {
    width: 29px !important;
    height: 29px !important;
    padding: 0 !important;
    object-fit: contain !important;
}
.main-mobile-footer .main-mobile-footer-gymrat {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    object-fit: contain !important;
}
/* End footer primary action icon sizing. */


/* Larger Home and Settings footer icons. */
.main-mobile-footer .main-mobile-footer-item[aria-label="Home"] .main-mobile-footer-icon,
.main-mobile-footer .main-mobile-footer-item[aria-label="Settings"] .main-mobile-footer-icon {
    width: 29px !important;
    height: 29px !important;
}
/* End larger Home and Settings footer icons. */


/* Local exercise media presentation. */
body.page-tracking-entry .exercise-media-slot.has-exercise-media {
    width: 132px;
    height: 102px;
    flex: 0 0 132px;
    border-color: rgba(148, 180, 220, 0.52);
    background:
        radial-gradient(circle at 42% 34%, rgba(111, 132, 158, 0.92) 0%, rgba(66, 83, 105, 0.96) 48%, rgba(35, 47, 65, 0.99) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 28px rgba(2,6,23,.28);
}
body.page-tracking-entry .exercise-media-slot.has-exercise-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.12), transparent 42%, rgba(2,6,23,.12));
}
body.page-tracking-entry .exercise-media-slot.has-exercise-media img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    padding: 5px;
    box-sizing: border-box;
    object-fit: contain;
    filter: drop-shadow(0 7px 9px rgba(2,6,23,.35));
}
body.page-tracking-entry .exercise-media-slot.has-exercise-media.is-animating {
    border-color: rgba(96, 165, 250, .8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 2px rgba(59,130,246,.14), 0 14px 32px rgba(2,6,23,.35);
}
body.page-tracking-entry .exercise-media-slot.has-exercise-media span {
    z-index: 2;
    left: 7px;
    right: 7px;
    bottom: 6px;
    padding: 4px 6px;
    background: rgba(15,23,42,.82);
    color: #eaf2ff;
    font-size: .59rem;
    letter-spacing: .02em;
}
body.page-tracking-entry .tracking-media-credit {
    display: inline;
    color: #93c5fd;
    font-weight: 800;
    text-decoration: none;
}
body.page-tracking-entry .tracking-media-credit:hover {
    color: #bfdbfe;
    text-decoration: underline;
}
@media (max-width: 600px) {
    body.page-tracking-entry .exercise-media-slot.has-exercise-media {
        width: 108px;
        height: 88px;
        flex-basis: 108px;
    }
}
/* End local exercise media presentation. */

/* Exercise directory, picker and full-screen media */
.exercise-media-slot{font:inherit;color:inherit;border:1px solid rgba(255,255,255,.12);cursor:pointer}
.exercise-media-slot:hover,.exercise-media-slot:focus-visible{border-color:#9a7cff;transform:translateY(-2px);box-shadow:0 12px 30px rgba(92,56,190,.28);outline:none}
.exercise-name-picker{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.tracking-exercise-browse-btn{min-height:46px;padding:0 16px;border:1px solid rgba(169,139,255,.5);border-radius:12px;background:linear-gradient(135deg,#7558d7,#5233ad);color:#fff;font-weight:800;cursor:pointer}
.tracking-exercise-suggestions{position:absolute;z-index:30;top:calc(100% + 8px);left:0;right:0;max-height:310px;overflow:auto;padding:8px;border:1px solid rgba(169,139,255,.35);border-radius:14px;background:#171424;box-shadow:0 18px 50px rgba(0,0,0,.5)}
.tracking-exercise-result{width:100%;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 14px;border:0;border-bottom:1px solid rgba(255,255,255,.07);background:transparent;color:#fff;text-align:left;cursor:pointer}
.tracking-exercise-result:hover,.tracking-exercise-result:focus-visible{background:rgba(139,102,246,.17);outline:none}
.tracking-exercise-result span{display:grid;gap:3px}.tracking-exercise-result small{color:#aaa1bf;text-transform:capitalize}.tracking-exercise-result em{font-style:normal;font-size:.72rem;padding:4px 8px;border-radius:99px;background:rgba(135,96,242,.22);color:#d8cbff}
.tracking-exercise-browser,.tracking-media-viewer{position:fixed;z-index:10050;inset:0;background:rgba(7,5,12,.86);backdrop-filter:blur(12px);display:grid;place-items:center;padding:24px}
.tracking-exercise-browser[hidden],.tracking-media-viewer[hidden],.tracking-exercise-suggestions[hidden]{display:none!important}
.tracking-exercise-browser-dialog{position:relative;width:min(850px,96vw);max-height:88vh;overflow:hidden;display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:12px;padding:28px;border:1px solid rgba(173,145,255,.32);border-radius:24px;background:linear-gradient(145deg,#211a34,#12101c);box-shadow:0 30px 90px rgba(0,0,0,.65);color:#fff}
.tracking-exercise-browser-dialog h2,.tracking-exercise-browser-dialog p{margin:0}.tracking-exercise-browser-dialog p{color:#bdb5ce}
.tracking-exercise-browser-search{width:100%;min-height:52px;padding:0 16px;border:1px solid rgba(169,139,255,.42);border-radius:13px;background:#0e0c15;color:#fff;font-size:1rem}
.tracking-exercise-browser-results{overflow:auto;border:1px solid rgba(255,255,255,.08);border-radius:14px}
.tracking-overlay-close{position:absolute;z-index:2;top:14px;right:14px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:1.1rem;cursor:pointer}
.tracking-media-viewer{grid-template-rows:minmax(0,1fr) auto;gap:14px;background:radial-gradient(circle at 50% 40%,rgba(88,64,145,.48),rgba(16,13,25,.94) 65%)}
.tracking-media-viewer img{max-width:92vw;max-height:84vh;object-fit:contain;filter:drop-shadow(0 20px 40px rgba(0,0,0,.5))}
.tracking-media-viewer strong{color:#fff;font-size:1.1rem}.tracking-overlay-open{overflow:hidden}
@media(max-width:650px){.exercise-name-picker{grid-template-columns:1fr}.tracking-exercise-browser{padding:10px}.tracking-exercise-browser-dialog{width:100%;max-height:94vh;padding:22px 14px}.tracking-exercise-browse-btn{width:100%}}

/* Progressive overload card refinement: linked media + custom display names. */
body.page-tracking-entry .box{position:relative;overflow:visible}
body.page-tracking-entry .exercise-card-top{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;margin:0 0 10px!important;padding-top:34px}
body.page-tracking-entry .exercise-card-heading{min-width:0;display:grid;gap:4px;padding:0 4px}
body.page-tracking-entry .exercise-muscle-label{overflow:hidden;color:#60a5fa;font-size:.7rem;font-weight:900;letter-spacing:.04em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}
body.page-tracking-entry .exercise-card-name{display:block;max-width:100%;overflow:hidden;color:#f8fafc;font-size:1.15rem;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
body.page-tracking-entry .exercise-card-actions,body.page-tracking-entry .exercise-pr-summary{display:none!important}
body.page-tracking-entry .exercise-select-toggle{position:absolute!important;z-index:5;top:0;left:0;width:auto!important;min-width:0!important;min-height:28px!important;padding:5px 9px!important;font-size:.7rem!important;gap:5px;border-radius:9px!important}
body.page-tracking-entry .exercise-select-dot{width:9px;height:9px}
body.page-tracking-entry .exercise-media-slot,
body.page-tracking-entry .exercise-media-slot.has-exercise-media{width:100%!important;height:clamp(170px,20vw,235px)!important;min-height:170px;flex:none!important;border-radius:18px}
body.page-tracking-entry .exercise-media-slot.has-exercise-media img{width:100%;height:100%;padding:2px!important;object-fit:contain}
body.page-tracking-entry .exercise-media-slot span{max-width:calc(100% - 14px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.page-tracking-entry .exercise-toggle{margin-top:2px}
body.page-tracking-entry .exercise-toggle-label{display:none}
body.page-tracking-entry .exercise-toggle-caret{width:100%;text-align:center}
body.page-tracking-entry .exercise-details:not(.is-collapsed)~*{}
body.page-tracking-entry .box:has(.exercise-details:not(.is-collapsed)) .exercise-media-slot{height:clamp(210px,25vw,290px)!important}
body.page-tracking-entry .exercise-name-picker{display:block!important;position:relative}
body.page-tracking-entry .tracking-exercise-browse-btn{display:none!important}
body.page-tracking-entry .tracking-suggestion-browse-all{position:sticky;bottom:0;width:100%;min-height:43px;margin-top:7px;border:1px solid rgba(169,139,255,.48);border-radius:10px;background:linear-gradient(135deg,#7558d7,#5233ad);color:#fff;font-weight:900;cursor:pointer}
body.page-tracking-entry .sets-panel{display:grid!important;gap:8px!important;margin-top:12px;padding:10px!important;border:1px solid rgba(148,163,184,.15);border-radius:16px;background:rgba(2,6,23,.34)}
body.page-tracking-entry .sets-panel .set{display:grid!important;grid-template-columns:44px minmax(78px,1fr) minmax(70px,.8fr) 34px 32px!important;gap:7px!important;align-items:end;padding:8px!important;border:1px solid rgba(148,163,184,.11)!important;border-radius:11px!important;background:rgba(15,23,42,.7)!important}
body.page-tracking-entry .sets-panel .set>strong{align-self:center;font-size:.74rem}
body.page-tracking-entry .sets-panel .tracking-field{gap:3px}
body.page-tracking-entry .sets-panel .set input{min-height:36px!important;padding:6px 8px!important}
body.page-tracking-entry .sets-panel .set .set-delete-btn{grid-column:4;width:34px!important;min-width:34px!important;max-width:34px!important;min-height:36px!important;padding:0!important}
body.page-tracking-entry .sets-panel .set .set-pr-toggle{grid-column:5;width:32px!important;min-width:32px!important;max-width:32px!important;min-height:36px!important;padding:0!important;border-radius:9px!important;font-size:.92rem!important}
body.page-tracking-entry .sets-panel .set .set-pr-toggle span{line-height:1}
body.page-tracking-entry .set-pr-text{display:none!important}
@media(max-width:600px){
 body.page-tracking-entry .exercise-card-top{padding-top:32px}
 body.page-tracking-entry .exercise-media-slot,body.page-tracking-entry .exercise-media-slot.has-exercise-media{height:clamp(185px,56vw,250px)!important}
 body.page-tracking-entry .box:has(.exercise-details:not(.is-collapsed)) .exercise-media-slot{height:clamp(210px,64vw,290px)!important}
 body.page-tracking-entry .sets-panel .set{grid-template-columns:38px minmax(0,1fr) minmax(0,1fr) 32px 30px!important}
 body.page-tracking-entry .sets-panel .set>strong{grid-column:1!important;grid-row:1!important}
 body.page-tracking-entry .sets-panel .tracking-field{grid-row:1!important}
 body.page-tracking-entry .sets-panel .set .set-delete-btn{grid-column:4!important;grid-row:1!important;width:32px!important;min-width:32px!important}
 body.page-tracking-entry .sets-panel .set .set-pr-toggle{grid-column:5!important;grid-row:1!important;width:30px!important;min-width:30px!important}
}

/* Exercise media caption removal and suggestion priority. */
body.page-tracking-entry .exercise-media-slot span{display:none!important}
body.page-tracking-entry .tracking-suggestion-browse-all{position:sticky!important;top:0!important;bottom:auto!important;z-index:2;margin:0 0 7px!important}

/* Centered library action and selected-media state. */
body.page-tracking-entry .tracking-suggestion-browse-all{display:flex!important;align-items:center;justify-content:center;width:calc(100% - 12px)!important;margin:0 auto 8px!important;text-align:center!important}
body.page-tracking-entry .tracking-exercise-result em.is-selected-media{background:linear-gradient(135deg,#ca8a04,#a16207)!important;border:1px solid rgba(253,224,71,.74);color:#fffbea!important;box-shadow:0 6px 16px rgba(161,98,7,.28);font-weight:900}
body.page-tracking-entry .tracking-exercise-result.is-media-selected{background:rgba(202,138,4,.08)}

/* Auth page web install gate. */
body.page-login {
    min-height: 100dvh;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(16px, 4vw, 44px) !important;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 20% 8%, rgba(59, 130, 246, 0.44), transparent 25%),
        linear-gradient(135deg, #071225 0%, #0c2f5f 48%, #075f55 100%);
    color: #f8fafc;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.page-login .auth-web-required {
    width: min(920px, 100%);
    margin: 0 auto;
    display: none;
}

body.page-login.auth-web-gate .auth-web-required {
    display: block;
}

body.page-login.auth-web-gate .login-shell,
body.page-login.auth-web-gate .app-install-prompts {
    display: none !important;
}

body.page-login.auth-installed-app .auth-web-required {
    display: none !important;
}

body.page-login.auth-installed-app .login-shell {
    display: block;
}

body.page-login .auth-required-panel {
    width: 100%;
    padding: clamp(24px, 5vw, 54px);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.97);
    color: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

body.page-login .auth-required-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(28px, 6vw, 58px);
}

body.page-login .auth-required-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}

body.page-login .auth-required-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

body.page-login .auth-required-terms {
    color: #0f766e;
    font-weight: 900;
    text-decoration: none;
}

body.page-login .auth-required-terms:hover {
    text-decoration: underline;
}

body.page-login .auth-required-kicker {
    margin: 0 0 10px;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.page-login .auth-required-panel h1 {
    max-width: 680px;
    margin: 0 0 14px;
    padding: 0;
    color: #0f172a;
    font-size: clamp(2.25rem, 6vw, 4.4rem);
    line-height: 1;
    font-weight: 900;
}

body.page-login .auth-required-copy {
    max-width: 680px;
    margin: 0 0 clamp(24px, 5vw, 42px);
    color: #475569;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.55;
}

body.page-login .auth-install-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.page-login .auth-install-option {
    min-height: 116px;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.page-login .auth-install-option span,
body.page-login .auth-install-option strong {
    display: block;
}

body.page-login .auth-install-platform {
    margin-bottom: 12px;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.page-login .auth-install-option strong {
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 1.04rem;
}

body.page-login .auth-install-option span:last-child {
    color: #64748b;
    font-size: 0.93rem;
}

body.page-login .login-shell {
    width: min(620px, 100%) !important;
    margin: 0 auto !important;
}

@media (max-width: 760px) {
    body.page-login {
        align-items: flex-start !important;
        padding: 12px !important;
    }

    body.page-login .auth-required-panel {
        padding: 22px 16px;
        border-radius: 18px;
    }

    body.page-login .auth-required-header {
        align-items: flex-start;
        margin-bottom: 34px;
    }

    body.page-login .auth-install-grid {
        grid-template-columns: 1fr;
    }

    body.page-login .auth-install-option {
        min-height: 96px;
    }
}

/* Colorful install gate actions. */
body.page-login .auth-required-panel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 253, 249, 0.96)),
        radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.18), transparent 34%);
}

body.page-login .auth-required-terms {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(15, 118, 110, 0.35);
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfeff, #dcfce7);
    color: #0f766e;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

body.page-login .auth-required-terms span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 900;
}

body.page-login .auth-install-option {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
    color: #0f172a;
    border: 0;
    overflow: hidden;
}

body.page-login .auth-install-option:hover {
    transform: translateY(-3px);
    filter: none;
}

body.page-login .auth-install-icon {
    grid-row: 1 / 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

body.page-login .auth-install-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-login .auth-install-android {
    background: linear-gradient(135deg, #dcfce7, #86efac);
}

body.page-login .auth-install-ios {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
}

body.page-login .auth-install-windows {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
}

body.page-login .auth-install-mac {
    background: linear-gradient(135deg, #f5f3ff, #ddd6fe);
}

body.page-login .auth-install-linux {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
}

body.page-login .auth-install-chromeos {
    background: linear-gradient(135deg, #fee2e2, #a7f3d0 52%, #bfdbfe);
}

body.page-login .auth-install-option::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -24px;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

body.page-login .auth-install-option:focus-visible,
body.page-login .auth-required-terms:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.45);
    outline-offset: 3px;
}


body.page-login .ios-install-steps {
    margin: 16px 0 0;
    padding-left: 20px;
    color: rgba(248, 250, 252, 0.82);
    line-height: 1.5;
}

body.page-login .ios-copy-link {
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #93c5fd;
    box-shadow: none;
    text-decoration: underline;
}

/* Stronger install gate visual polish. */
body.page-login.auth-web-gate {
    background:
        radial-gradient(circle at 16% 10%, rgba(37, 99, 235, 0.78), transparent 25%),
        radial-gradient(circle at 86% 16%, rgba(20, 184, 166, 0.72), transparent 28%),
        radial-gradient(circle at 72% 88%, rgba(249, 115, 22, 0.42), transparent 22%),
        linear-gradient(135deg, #020617 0%, #071a36 38%, #063f3a 100%);
}

body.page-login .auth-required-panel {
    border: 1px solid rgba(125, 211, 252, 0.26);
    background:
        linear-gradient(145deg, rgba(7, 18, 42, 0.98), rgba(6, 78, 75, 0.94)),
        radial-gradient(circle at 100% 0, rgba(14, 165, 233, 0.26), transparent 34%);
    color: #f8fafc;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
}

body.page-login .auth-required-brand {
    color: #f8fafc;
}

body.page-login .auth-required-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d4ed8, #14b8a6);
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

body.page-login .auth-required-logo {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    object-fit: cover;
    display: block;
}

body.page-login .auth-required-terms {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

body.page-login .auth-required-terms:hover {
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    text-decoration: none;
}

body.page-login .auth-required-kicker {
    color: #67e8f9;
}

body.page-login .auth-required-panel h1 {
    color: #ffffff;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

body.page-login .auth-required-copy {
    color: #cbd5e1;
}

body.page-login .auth-install-grid {
    gap: 14px;
}

body.page-login .auth-install-option {
    min-height: 126px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

body.page-login .auth-install-option:hover {
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.3);
}

body.page-login .auth-install-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.32);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

body.page-login .auth-install-icon svg {
    width: 29px;
    height: 29px;
}

body.page-login .auth-install-platform {
    color: rgba(255, 255, 255, 0.78);
}

body.page-login .auth-install-option strong {
    color: #ffffff;
}

body.page-login .auth-install-option span:last-child {
    color: rgba(255, 255, 255, 0.82);
}

body.page-login .auth-install-android {
    background: linear-gradient(135deg, #15803d, #22c55e);
}

body.page-login .auth-install-ios {
    background: linear-gradient(135deg, #0369a1, #38bdf8);
}

body.page-login .auth-install-windows {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

body.page-login .auth-install-mac {
    background: linear-gradient(135deg, #6d28d9, #a855f7);
}

body.page-login .auth-install-linux {
    background: linear-gradient(135deg, #b45309, #f97316);
}

body.page-login .auth-install-chromeos {
    background: linear-gradient(135deg, #dc2626, #16a34a 52%, #2563eb);
}

@media (max-width: 760px) {
    body.page-login .auth-required-logo-frame {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    body.page-login .auth-required-logo {
        width: 38px;
        height: 38px;
    }

    body.page-login .auth-required-terms {
        padding: 0 14px;
    }
}

/* Install dialog button spacing. */
body.page-login .install-dialog {
    border-radius: 18px;
}

body.page-login .install-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

body.page-login .install-action,
body.page-login .install-cancel {
    width: 100%;
    max-width: none;
    min-height: 48px;
    margin: 0;
    border-radius: 10px;
}

body.page-login .install-action {
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.22);
}

body.page-login .install-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
}

body.page-login .ios-copy-link {
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 14px 0 0;
    padding: 10px 14px;
    border: 1px solid rgba(147, 197, 253, 0.42);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    box-shadow: none;
    text-decoration: none;
}

body.page-login .ios-copy-link:hover {
    background: rgba(37, 99, 235, 0.28);
    color: #ffffff;
}

@media (max-width: 520px) {
    body.page-login .install-actions {
        grid-template-columns: 1fr;
    }
}

/* Final responsive install gate pass. */
body.page-login .auth-required-panel {
    width: min(100%, 980px);
    margin: 0 auto;
}

body.page-login .auth-required-header,
body.page-login .auth-install-option,
body.page-login .install-actions {
    min-width: 0;
}

body.page-login .auth-required-panel h1,
body.page-login .auth-required-copy,
body.page-login .auth-install-option strong,
body.page-login .auth-install-option span {
    overflow-wrap: anywhere;
}

@media (max-width: 1020px) {
    body.page-login .auth-install-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body.page-login .auth-required-header {
        flex-wrap: wrap;
    }

    body.page-login .auth-required-terms {
        width: 100%;
        justify-content: center;
    }

    body.page-login .auth-install-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    body.page-login .auth-required-panel {
        padding: 18px 12px;
    }

    body.page-login .auth-install-option {
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 12px;
        min-height: 112px;
        padding: 14px 12px;
    }

    body.page-login .auth-install-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    body.page-login .auth-install-icon svg {
        width: 25px;
        height: 25px;
    }
}

/* Final icon centering and iOS modal correction. */
body.page-login .auth-install-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

body.page-login .auth-install-icon {
    grid-row: auto;
    flex: 0 0 auto;
    margin: 0 auto 4px;
}

body.page-login .auth-install-platform,
body.page-login .auth-install-option strong,
body.page-login .auth-install-option span:last-child {
    margin: 0;
}

body.page-login .ios-install-steps {
    margin: 18px 0 0;
}

body.page-login .ios-install-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-login .ios-install-actions .ios-copy-link,
body.page-login .ios-install-actions .install-cancel {
    width: 100%;
    max-width: none;
    margin: 0;
}

@media (max-width: 420px) {
    body.page-login .auth-install-option {
        min-height: 118px;
        padding: 16px 12px;
    }

    body.page-login .ios-install-actions {
        grid-template-columns: 1fr;
    }
}


/* Diet UX icon buttons and BMI spectrum. */
body.page-diet .diet-icon-button,
body.page-diet button.diet-icon-button,
body.page-diet a.diet-icon-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    text-align: center;
}

body.page-diet .diet-button-icon,
body.page-diet .diet-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

body.page-diet .diet-button-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.12);
}

body.page-diet .diet-button-icon svg,
body.page-diet .diet-icon-only svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-diet .diet-icon-button-danger .diet-button-icon {
    background: rgba(248, 113, 113, 0.18);
}

body.page-diet .diet-selected-food-close.diet-icon-only {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 10px !important;
}

body.page-diet-setup .diet-bmi-spectrum {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 10%, rgba(34, 197, 94, 0.14), transparent 28%),
        rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.18);
}

body.page-diet-setup .diet-bmi-spectrum-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
}

body.page-diet-setup .diet-bmi-spectrum-heading h2 {
    margin: 3px 0 0;
    color: #f8fafc;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.15;
}

body.page-diet-setup #bmiValueText {
    min-width: 58px;
    color: #ffffff;
    font-size: clamp(1.5rem, 4vw, 2.15rem);
    font-weight: 1000;
    text-align: right;
}

body.page-diet-setup .diet-bmi-track {
    position: relative;
    display: grid;
    grid-template-columns: 20% 8.333% 21.667% 16.667% 33.333%;
    min-height: 58px;
    overflow: visible;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.page-diet-setup .diet-bmi-band {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 8px 6px;
    color: #ffffff;
    font-size: clamp(0.62rem, 1.1vw, 0.78rem);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
}

body.page-diet-setup .diet-bmi-severe {
    border-radius: 10px 0 0 10px;
    background: #b91c1c;
}

body.page-diet-setup .diet-bmi-under {
    background: #f97316;
}

body.page-diet-setup .diet-bmi-normal {
    background: #16a34a;
}

body.page-diet-setup .diet-bmi-over {
    background: #f97316;
}

body.page-diet-setup .diet-bmi-obese {
    border-radius: 0 10px 10px 0;
    background: #b91c1c;
}

body.page-diet-setup .diet-bmi-marker {
    position: absolute;
    z-index: 2;
    top: -9px;
    width: 18px;
    height: 76px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.64);
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.42);
    transform: translateX(-50%);
    transition: left 220ms ease;
}

body.page-diet-setup .diet-bmi-marker[hidden] {
    display: none;
}

body.page-diet-setup .diet-bmi-ticks {
    display: grid;
    grid-template-columns: 20% 8.333% 21.667% 16.667% 33.333%;
    gap: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 620px) {
    body.page-diet .diet-icon-button,
    body.page-diet button.diet-icon-button,
    body.page-diet a.diet-icon-button {
        gap: 7px;
    }

    body.page-diet .diet-button-icon {
        width: 22px;
        height: 22px;
    }

    body.page-diet-setup .diet-bmi-spectrum {
        padding: 14px;
        gap: 12px;
    }

    body.page-diet-setup .diet-bmi-spectrum-heading {
        align-items: start;
    }

    body.page-diet-setup .diet-bmi-track {
        min-height: 76px;
    }

    body.page-diet-setup .diet-bmi-band {
        padding: 8px 3px;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    body.page-diet-setup .diet-bmi-marker {
        height: 92px;
    }

    body.page-diet-setup .diet-bmi-ticks {
        font-size: 0.62rem;
    }
}

/* Compact BMI range inside the BMI summary card. */
body.page-diet-setup .diet-recommendation-summary .diet-bmi-summary-card {
    gap: 5px;
    align-content: center;
}

body.page-diet-setup .diet-bmi-summary-card > em {
    display: block;
    margin-top: 1px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

body.page-diet-setup .diet-bmi-mini {
    position: relative;
    display: grid;
    grid-template-columns: 28.333% 21.667% 50%;
    width: min(170px, 100%);
    height: 8px;
    margin: 5px auto 0;
    overflow: visible;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

body.page-diet-setup .diet-bmi-mini-band {
    min-width: 0;
    height: 8px;
}

body.page-diet-setup .diet-bmi-mini-under {
    border-radius: 999px 0 0 999px;
    background: #f97316;
}

body.page-diet-setup .diet-bmi-mini-good {
    background: #16a34a;
}

body.page-diet-setup .diet-bmi-mini-over {
    border-radius: 0 999px 999px 0;
    background: #ef4444;
}

body.page-diet-setup .diet-bmi-mini-marker {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #020617;
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.45);
    transform: translate(-50%, -50%);
    transition: left 220ms ease;
}

body.page-diet-setup .diet-bmi-mini-marker[hidden] {
    display: none;
}

body.page-diet-setup .diet-bmi-mini-labels {
    display: grid;
    grid-template-columns: 28.333% 21.667% 50%;
    width: min(190px, 100%);
    margin: 1px auto 0;
    color: rgba(226, 232, 240, 0.66);
    font-size: 0.52rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

body.page-diet-setup .diet-bmi-mini-labels span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 520px) {
    body.page-diet-setup .diet-bmi-mini-labels {
        font-size: 0.48rem;
    }
}
/* Final compact BMI card label. */
body.page-diet-setup .diet-bmi-summary-card {
    min-height: 104px;
}

body.page-diet-setup .diet-bmi-summary-card > span#bmiCategoryText {
    margin-top: 2px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
}

body.page-diet-setup .diet-bmi-mini-labels,
body.page-diet-setup .diet-bmi-summary-card > em {
    display: none !important;
}

body.page-diet-setup .diet-bmi-mini {
    margin-top: 4px;
}
/* Diet setup card-style actions and balanced BMI mini range. */
body.page-diet-setup .diet-setup-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

body.page-diet-setup .diet-setup-actions #dietSetupStatus {
    grid-column: 1 / -1;
    margin: 0;
}

body.page-diet-setup .diet-setup-actions button.diet-setup-action-card {
    width: 100% !important;
    min-height: 82px !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    padding: 16px 18px !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 92% 12%, rgba(96, 165, 250, 0.16), transparent 38%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96)) !important;
    color: #f8fafc !important;
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.2) !important;
    text-align: left;
    font-weight: 900;
    line-height: 1.15;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

body.page-diet-setup .diet-setup-actions button.diet-setup-action-card:hover,
body.page-diet-setup .diet-setup-actions button.diet-setup-action-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.52) !important;
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.32) !important;
    filter: brightness(1.08);
}

body.page-diet-setup .diet-setup-actions .diet-button-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #93c5fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.page-diet-setup .diet-setup-actions .diet-button-icon svg {
    width: 31px;
    height: 31px;
    stroke-width: 2.5;
}

body.page-diet-setup .diet-setup-action-apply,
body.page-diet-setup .diet-setup-action-save {
    background:
        radial-gradient(circle at 88% 12%, rgba(134, 239, 172, 0.24), transparent 40%),
        linear-gradient(145deg, rgba(22, 101, 52, 0.98), rgba(6, 78, 59, 0.98)) !important;
    border-color: rgba(134, 239, 172, 0.38) !important;
}

body.page-diet-setup .diet-setup-action-apply .diet-button-icon,
body.page-diet-setup .diet-setup-action-save .diet-button-icon {
    color: #bbf7d0;
}

body.page-diet-setup .diet-setup-action-reset {
    background:
        radial-gradient(circle at 90% 10%, rgba(248, 113, 113, 0.2), transparent 38%),
        linear-gradient(145deg, rgba(127, 29, 29, 0.96), rgba(69, 10, 10, 0.98)) !important;
    border-color: rgba(248, 113, 113, 0.34) !important;
}

body.page-diet-setup .diet-setup-action-reset .diet-button-icon {
    color: #fecaca;
}

body.page-diet-setup .diet-bmi-mini {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: min(156px, 100%);
}

body.page-diet-setup .diet-bmi-mini-severe {
    border-radius: 999px 0 0 999px;
    background: #b91c1c;
}

body.page-diet-setup .diet-bmi-mini-under {
    border-radius: 0 !important;
    background: #f97316;
}

body.page-diet-setup .diet-bmi-mini-good {
    background: #16a34a;
}

body.page-diet-setup .diet-bmi-mini-over {
    border-radius: 0 !important;
    background: #f97316;
}

body.page-diet-setup .diet-bmi-mini-obese {
    border-radius: 0 999px 999px 0;
    background: #b91c1c;
}

@media (max-width: 560px) {
    body.page-diet-setup .diet-setup-actions,
    body.page-diet-setup .diet-setup-final-actions,
    body.page-diet-setup .diet-setup-apply-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.page-diet-setup .diet-setup-actions button.diet-setup-action-card {
        min-height: 76px !important;
        padding: 13px 15px !important;
    }

    body.page-diet-setup .diet-setup-actions .diet-button-icon {
        width: 48px;
        height: 48px;
    }
}
/* Center diet setup action cards and clarify reset confirmation. */
body.page-diet-setup .diet-setup-actions button.diet-setup-action-card {
    justify-content: center !important;
    text-align: center !important;
}

body.page-diet-setup .diet-setup-final-actions button.diet-setup-action-card {
    justify-content: center !important;
}

body.page-diet-setup .diet-reset-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.page-diet-setup .diet-reset-confirm-actions #confirmDietResetYes {
    background: linear-gradient(135deg, #991b1b, #7f1d1d) !important;
    border-color: rgba(248, 113, 113, 0.52) !important;
    color: #ffffff !important;
}

body.page-diet-setup .diet-reset-confirm-actions #confirmDietResetYes .diet-button-icon {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.18);
}

body.page-diet-setup .diet-reset-confirm-actions #confirmDietResetNo {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.96), rgba(15, 23, 42, 0.96)) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
}

body.page-diet-setup .diet-reset-confirm-actions #confirmDietResetNo .diet-button-icon {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.1);
}
/* Center setup button blocks while keeping icon/text left aligned. */
body.page-diet-setup .diet-setup-actions {
    justify-items: center;
}

body.page-diet-setup .diet-setup-actions button.diet-setup-action-card {
    max-width: 420px;
    justify-content: flex-start !important;
    text-align: left !important;
}

body.page-diet-setup .diet-setup-final-actions button.diet-setup-action-card {
    justify-content: flex-start !important;
}

@media (max-width: 560px) {
    body.page-diet-setup .diet-setup-actions button.diet-setup-action-card {
        max-width: none;
    }
}
/* Final diet setup button placement. */
body.page-diet-setup #recommendDietButton,
body.page-diet-setup #applyRecommendationButton {
    grid-column: 1 / -1;
    width: min(420px, 100%) !important;
    justify-self: center;
}

body.page-diet-setup .diet-setup-final-actions {
    width: min(860px, 100%);
    margin-left: auto !important;
    margin-right: auto !important;
    justify-items: stretch;
}

body.page-diet-setup .diet-setup-final-actions button.diet-setup-action-card {
    width: 100% !important;
    max-width: none;
}

body.page-diet-setup .diet-reset-confirm-actions {
    width: min(520px, 100%);
    margin-left: auto;
    margin-right: auto;
}

/* Full-screen automatic barcode scanner. */
body.page-diet.diet-barcode-scanner-open {
    overflow: hidden !important;
}

body.page-diet .diet-barcode-camera[hidden] {
    display: none !important;
}

body.page-diet .diet-barcode-camera {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000000 !important;
    overflow: hidden !important;
}

body.page-diet .diet-barcode-camera video {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    background: #000000 !important;
}

body.page-diet .diet-barcode-camera-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: calc(env(safe-area-inset-right, 0px) + 14px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

body.page-diet .diet-barcode-camera-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-diet .diet-barcode-camera-reticle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(78vw, 520px);
    height: min(30vh, 220px);
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(15, 23, 42, 0.42);
    pointer-events: none;
}

body.page-diet .diet-barcode-camera-status {
    position: absolute;
    left: max(16px, env(safe-area-inset-left, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    z-index: 2;
    margin: 0 auto;
    width: fit-content;
    max-width: calc(100vw - 32px);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}


/* Clear barcode status and my-food editing. */
body.page-diet #dietOcrStatus.is-error{display:inline-flex;align-items:center;min-height:42px;padding:10px 14px;border:1px solid rgba(248,113,113,.55);border-radius:12px;background:rgba(127,29,29,.92);color:#fff;font-weight:900;box-shadow:0 12px 28px rgba(127,29,29,.24)}
body.page-diet .diet-my-food-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0;padding:12px;border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(2,6,23,.24)}
body.page-diet .diet-my-food-edit-grid label{display:grid;gap:5px;min-width:0;color:rgba(191,219,254,.76);font-size:.72rem;font-weight:900;text-transform:uppercase}
body.page-diet .diet-my-food-edit-grid input{width:100%;min-width:0;min-height:40px;padding:8px 10px;box-sizing:border-box;border:1px solid rgba(148,163,184,.24);border-radius:10px;background:rgba(15,23,42,.88);color:#f8fafc;font-weight:800}
body.page-diet .diet-my-food-edit-grid label:first-child{grid-column:1/-1}
body.page-diet [data-my-food-save]{background:linear-gradient(135deg,#166534,#047857)!important}
@media(max-width:720px){body.page-diet .diet-my-food-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){body.page-diet .diet-my-food-edit-grid{grid-template-columns:minmax(0,1fr)}}


/* Compact collapsible My Foods editor. */
body.page-diet .diet-my-food-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
body.page-diet .diet-my-food-edit-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    box-shadow: none;
}
body.page-diet .diet-my-food-edit-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.page-diet .diet-my-food-edit-toggle[aria-expanded="true"] {
    background: rgba(20, 184, 166, 0.22);
    border-color: rgba(94, 234, 212, 0.38);
    color: #ccfbf1;
}
body.page-diet .diet-my-food-edit-grid[hidden] {
    display: none !important;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-edit-grid {
    display: none !important;
}
body.page-diet .diet-my-food-card:not(.is-editing) {
    padding-bottom: 14px;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls {
    margin-top: 10px;
}
body.page-diet .diet-my-food-card.is-editing .diet-my-food-edit-grid {
    margin-top: 10px;
}


/* Equal barcode result action buttons. */
body.page-diet .diet-ocr-result .diet-ocr-actions,
body.page-diet .diet-ocr-result-v2 .diet-ocr-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
body.page-diet .diet-ocr-result .diet-ocr-actions button,
body.page-diet .diet-ocr-result-v2 .diet-ocr-actions button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: auto;
    padding: 7px 5px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.78rem;
}
@media (max-width: 380px) {
    body.page-diet .diet-ocr-result .diet-ocr-actions,
    body.page-diet .diet-ocr-result-v2 .diet-ocr-actions {
        gap: 5px;
    }
    body.page-diet .diet-ocr-result .diet-ocr-actions button,
    body.page-diet .diet-ocr-result-v2 .diet-ocr-actions button {
        min-height: 36px;
        padding: 6px 4px;
        font-size: 0.7rem;
    }
}
/* End equal barcode result action buttons. */

body.page-diet .diet-my-food-card:not(.is-editing) [data-my-food-save] {
    display: none !important;
}
body.page-diet .diet-my-food-card.is-editing [data-my-food-save] {
    display: inline-flex;
}


/* My Foods final action polish. */
body.page-diet .diet-my-food-card {
    position: relative;
}
body.page-diet .diet-my-food-heading {
    padding-right: 46px;
}
body.page-diet .diet-my-food-edit-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
}
body.page-diet .diet-my-food-controls button {
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f8fafc;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.2);
}
body.page-diet .diet-my-food-controls [data-my-food-log] {
    background: linear-gradient(135deg, #2563eb, #0891b2) !important;
}
body.page-diet .diet-my-food-controls [data-my-food-save] {
    background: linear-gradient(135deg, #15803d, #0f766e) !important;
}
body.page-diet .diet-my-food-controls [data-my-food-delete] {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
}
body.page-diet .diet-my-food-card.is-editing [data-my-food-save] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
html[dir="rtl"] body.page-diet .diet-my-food-heading {
    padding-right: 0;
    padding-left: 46px;
}
html[dir="rtl"] body.page-diet .diet-my-food-edit-toggle {
    right: auto;
    left: 12px;
}
/* End My Foods final action polish. */


/* My Foods tighter minimized cards. */
body.page-diet .diet-my-food-edit-toggle {
    top: 3px;
    right: 3px;
}
body.page-diet .diet-my-food-heading {
    padding-right: 38px;
}
body.page-diet .diet-my-food-card:not(.is-editing) {
    padding-bottom: 10px;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-ocr-calculated {
    margin-top: 8px;
    gap: 6px;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.62fr);
    gap: 6px;
    align-items: end;
    margin-top: 6px;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls label {
    gap: 3px;
    font-size: 0.76rem;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls input,
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls select {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.84rem;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls button {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.05;
    box-shadow: none;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls [data-my-food-log],
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls [data-my-food-delete] {
    grid-column: auto;
    width: 100%;
}
body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.62fr);
    gap: 7px;
}
body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls [data-my-food-save] {
    grid-column: 1 / -1;
    width: 100%;
}
html[dir="rtl"] body.page-diet .diet-my-food-edit-toggle {
    right: auto;
    left: 3px;
}
html[dir="rtl"] body.page-diet .diet-my-food-heading {
    padding-right: 0;
    padding-left: 38px;
}
@media (max-width: 420px) {
    body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls,
    body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls {
        grid-template-columns: minmax(0, 1fr) minmax(76px, 0.68fr);
    }
}
/* End My Foods tighter minimized cards. */


/* My Foods compact button order. */
body.page-diet .diet-my-food-controls label {
    order: 0;
}
body.page-diet .diet-my-food-controls [data-my-food-log] {
    order: 1;
}
body.page-diet .diet-my-food-controls [data-my-food-delete] {
    order: 2;
}
body.page-diet .diet-my-food-controls [data-my-food-save] {
    order: 3;
}
body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls [data-my-food-log],
body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls [data-my-food-delete] {
    grid-column: auto;
    width: 100%;
}
/* End My Foods compact button order. */


/* My Foods final compact alignment. */
body.page-diet .diet-my-food-list,
body.page-diet #dietMyFoodsList {
    display: grid;
    gap: 12px;
}
body.page-diet .diet-my-food-card {
    margin: 0;
}
body.page-diet .diet-my-food-edit-toggle {
    top: 8px;
    right: 8px;
}
body.page-diet .diet-my-food-heading {
    padding-right: 48px;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls,
body.page-diet .diet-my-food-card.is-editing .diet-my-food-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
}
body.page-diet .diet-my-food-controls label {
    order: 0;
}
body.page-diet .diet-my-food-controls [data-my-food-delete] {
    order: 1;
    grid-column: 1;
    width: 100%;
}
body.page-diet .diet-my-food-controls [data-my-food-log] {
    order: 2;
    grid-column: 2;
    width: 100%;
}
body.page-diet .diet-my-food-controls [data-my-food-save] {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
}
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls [data-my-food-log],
body.page-diet .diet-my-food-card:not(.is-editing) .diet-my-food-controls [data-my-food-delete] {
    min-height: 34px;
    padding: 7px 8px;
}
html[dir="rtl"] body.page-diet .diet-my-food-edit-toggle {
    right: 8px;
    left: auto;
}
html[dir="rtl"] body.page-diet .diet-my-food-heading {
    padding-right: 48px;
    padding-left: 0;
}
/* End My Foods final compact alignment. */


/* My Foods edit button exact corner placement. */
body.page-diet .diet-my-food-card {
    position: relative;
}
body.page-diet .diet-my-food-card .diet-my-food-edit-toggle {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 2;
}
html[dir="rtl"] body.page-diet .diet-my-food-card .diet-my-food-edit-toggle {
    right: 6px !important;
    left: auto !important;
}
body.page-diet .diet-my-food-card .diet-my-food-heading {
    padding-right: 50px;
}
html[dir="rtl"] body.page-diet .diet-my-food-card .diet-my-food-heading {
    padding-right: 50px;
    padding-left: 0;
}
/* End My Foods edit button exact corner placement. */


/* My Foods category system. */
body.page-diet .diet-my-food-category-tools { display: grid; gap: 10px; margin: 0 0 14px; }
body.page-diet .diet-my-food-category-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
body.page-diet .diet-my-food-category-create input { min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 10px; background: rgba(15, 23, 42, 0.82); color: #f8fafc; font-weight: 800; }
body.page-diet .diet-my-food-category-create button { min-height: 40px; padding: 8px 12px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #0f766e); color: #ffffff; font-weight: 900; }
body.page-diet .diet-my-food-category-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
body.page-diet .diet-my-food-category-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 999px; background: rgba(15, 23, 42, 0.74); color: rgba(226, 232, 240, 0.86); font-size: 0.82rem; font-weight: 900; }
body.page-diet .diet-my-food-category-tab small { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: rgba(148, 163, 184, 0.16); color: rgba(226, 232, 240, 0.74); text-align: center; }
body.page-diet .diet-my-food-category-tab.is-active { border-color: rgba(94, 234, 212, 0.42); background: rgba(20, 184, 166, 0.2); color: #ccfbf1; }
body.page-diet .diet-my-food-edit-grid label:has([data-my-food-edit-category]) { grid-column: span 2; }
body.page-diet .diet-my-food-edit-grid select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; box-sizing: border-box; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 10px; background: rgba(15, 23, 42, 0.88); color: #f8fafc; font-weight: 800; }
@media (max-width: 520px) { body.page-diet .diet-my-food-category-create { grid-template-columns: 1fr; } body.page-diet .diet-my-food-category-create button { width: 100%; } body.page-diet .diet-my-food-edit-grid label:has([data-my-food-edit-category]) { grid-column: 1 / -1; } }
/* End My Foods category system. */


/* My Foods two-view categories. */
body.page-diet .diet-my-food-view-header { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
body.page-diet .diet-my-food-view-header button { min-height: 42px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 12px; background: rgba(15, 23, 42, 0.7); color: rgba(226, 232, 240, 0.86); font-weight: 900; }
body.page-diet .diet-my-food-view-header button.is-active { border-color: rgba(94, 234, 212, 0.42); background: rgba(20, 184, 166, 0.22); color: #ccfbf1; }
body.page-diet .diet-my-food-category-tabs { display: grid; gap: 12px; }
body.page-diet .diet-my-food-category-card { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 12px; background: rgba(2, 6, 23, 0.18); }
body.page-diet .diet-my-food-category-card-head { display: grid; gap: 8px; }
body.page-diet .diet-my-food-category-open { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(94, 234, 212, 0.22); background: rgba(20, 184, 166, 0.16); color: #ecfeff; font-weight: 900; text-align: left; }
body.page-diet .diet-my-food-category-open small { min-width: 28px; padding: 3px 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.5); text-align: center; }
body.page-diet .diet-my-food-category-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
body.page-diet .diet-my-food-category-actions input { min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 10px; background: rgba(15, 23, 42, 0.8); color: #f8fafc; font-weight: 800; }
body.page-diet .diet-my-food-category-actions button { min-height: 36px; padding: 7px 10px; border-radius: 10px; font-weight: 900; }
body.page-diet .diet-my-food-category-actions [data-my-food-category-save] { background: linear-gradient(135deg, #15803d, #0f766e); color: #fff; }
body.page-diet .diet-my-food-category-actions [data-my-food-category-delete] { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; }
body.page-diet .diet-my-food-category-foods { display: grid; gap: 10px; }
@media (max-width: 560px) { body.page-diet .diet-my-food-category-actions { grid-template-columns: 1fr 1fr; } body.page-diet .diet-my-food-category-actions input { grid-column: 1 / -1; } }
/* End My Foods two-view categories. */


/* My Foods add category modal. */
body.page-diet .diet-my-food-category-tools { justify-items: start; }
body.page-diet .diet-my-food-category-create { display: none !important; }
body.page-diet .diet-my-food-add-category { min-height: 36px; padding: 7px 12px; border: 1px solid rgba(94, 234, 212, 0.28); border-radius: 10px; background: rgba(20, 184, 166, 0.18); color: #ccfbf1; font-weight: 900; }
body.page-diet .diet-my-food-category-modal[hidden] { display: none !important; }
body.page-diet .diet-my-food-category-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px; background: rgba(2, 6, 23, 0.68); backdrop-filter: blur(8px); }
body.page-diet .diet-my-food-category-dialog { position: relative; width: min(360px, 100%); display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 14px; background: #0f172a; color: #f8fafc; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42); }
body.page-diet .diet-my-food-category-dialog h3 { margin: 0; padding-right: 36px; font-size: 1rem; }
body.page-diet .diet-my-food-category-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 9px; background: rgba(15, 23, 42, 0.82); color: #e2e8f0; font-size: 1.15rem; font-weight: 900; }
body.page-diet .diet-my-food-category-dialog label { display: grid; gap: 6px; color: rgba(226, 232, 240, 0.82); font-size: 0.82rem; font-weight: 900; }
body.page-diet .diet-my-food-category-dialog input { min-height: 40px; padding: 8px 10px; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 10px; background: rgba(15, 23, 42, 0.88); color: #f8fafc; font-weight: 800; }
body.page-diet .diet-my-food-category-dialog > button:last-child { min-height: 40px; border-radius: 10px; background: linear-gradient(135deg, #15803d, #0f766e); color: #ffffff; font-weight: 900; }
html[dir="rtl"] body.page-diet .diet-my-food-category-close { right: auto; left: 8px; }
html[dir="rtl"] body.page-diet .diet-my-food-category-dialog h3 { padding-right: 0; padding-left: 36px; }
/* End My Foods add category modal. */


/* My Foods sorting modal. */
body.page-diet .diet-my-food-category-tools { grid-template-columns: auto auto; align-items: center; gap: 8px; }
body.page-diet .diet-my-food-sort-foods { min-height: 36px; padding: 7px 12px; border: 1px solid rgba(147, 197, 253, 0.28); border-radius: 10px; background: rgba(37, 99, 235, 0.18); color: #bfdbfe; font-weight: 900; }
body.page-diet .diet-my-food-sort-dialog { width: min(520px, 100%); max-height: min(680px, calc(100vh - 36px)); overflow: auto; }
body.page-diet .diet-my-food-sort-list { display: grid; gap: 8px; max-height: 440px; overflow: auto; padding-right: 2px; }
body.page-diet .diet-my-food-sort-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 0.7fr); gap: 8px; align-items: center; padding: 8px; border: 1px solid rgba(148, 163, 184, 0.14); border-radius: 10px; background: rgba(2, 6, 23, 0.28); }
body.page-diet .diet-my-food-sort-row span { min-width: 0; overflow-wrap: anywhere; color: #f8fafc; font-weight: 900; }
body.page-diet .diet-my-food-sort-row select { min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 10px; background: rgba(15, 23, 42, 0.88); color: #f8fafc; font-weight: 800; }
@media (max-width: 520px) { body.page-diet .diet-my-food-category-tools { grid-template-columns: 1fr 1fr; justify-items: stretch; } body.page-diet .diet-my-food-add-category, body.page-diet .diet-my-food-sort-foods { width: 100%; } body.page-diet .diet-my-food-sort-row { grid-template-columns: 1fr; } }
/* End My Foods sorting modal. */


/* My Foods category detail pages. */
body.page-diet .diet-my-food-category-card { padding: 0; overflow: hidden; }
body.page-diet .diet-my-food-category-card .diet-my-food-category-open { min-height: 58px; border-radius: 12px; padding: 12px 14px; background: rgba(20, 184, 166, 0.14); }
body.page-diet .diet-my-food-category-detail { display: grid; gap: 10px; }
body.page-diet .diet-my-food-category-detail-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(132px, 0.5fr); gap: 8px; align-items: center; }
body.page-diet .diet-my-food-category-back { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 10px; border: 1px solid rgba(148, 163, 184, 0.2); background: rgba(15, 23, 42, 0.75); color: #e2e8f0; }
body.page-diet .diet-my-food-category-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
body.page-diet .diet-my-food-category-detail-head strong, body.page-diet .diet-my-food-category-detail-head span { display: block; overflow-wrap: anywhere; }
body.page-diet .diet-my-food-category-detail-head strong { color: #f8fafc; font-size: 1rem; }
body.page-diet .diet-my-food-category-detail-head span { color: rgba(226, 232, 240, 0.68); font-size: 0.8rem; font-weight: 800; }
body.page-diet .diet-my-food-category-edit-button { width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(147, 197, 253, 0.3); background: rgba(37, 99, 235, 0.18); color: #bfdbfe; font-weight: 900; }
body.page-diet .diet-my-food-category-actions[hidden] { display: none !important; }
body.page-diet .diet-my-food-category-detail .diet-my-food-category-actions { margin-bottom: 2px; }
@media (max-width: 560px) { body.page-diet .diet-my-food-category-detail-head { grid-template-columns: 38px minmax(0, 1fr); } body.page-diet .diet-my-food-category-edit-button { grid-column: 1 / -1; width: min(220px, 100%); justify-self: stretch; } }
html[dir="rtl"] body.page-diet .diet-my-food-category-back svg { transform: scaleX(-1); }
/* End My Foods category detail pages. */


/* My Foods category top action sizing. */
body.page-diet .diet-my-food-category-tools { grid-template-columns: repeat(2, minmax(140px, 220px)); justify-content: start; }
body.page-diet .diet-my-food-add-category,
body.page-diet .diet-my-food-sort-foods { min-height: 38px; padding: 8px 14px; }
@media (max-width: 520px) { body.page-diet .diet-my-food-category-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* End My Foods category top action sizing. */


/* My Foods category button grid final. */
body.page-diet .diet-my-food-view-header[hidden] { display: none !important; }
body.page-diet .diet-my-food-category-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.page-diet .diet-my-food-category-card { min-width: 0; padding: 0; background: transparent; border: 0; }
body.page-diet .diet-my-food-category-button-wrap { position: relative; min-width: 0; }
body.page-diet .diet-my-food-category-card .diet-my-food-category-open { width: 100%; min-height: 58px; padding: 11px 46px 11px 12px; box-sizing: border-box; border-radius: 12px; justify-content: space-between; background: rgba(20, 184, 166, 0.16); }
body.page-diet .diet-my-food-category-card .diet-my-food-category-open span { min-width: 0; overflow-wrap: anywhere; text-align: left; }
body.page-diet .diet-my-food-category-pen { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(147, 197, 253, 0.3); background: rgba(37, 99, 235, 0.2); color: #bfdbfe; }
body.page-diet .diet-my-food-category-pen svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.page-diet .diet-my-food-category-card .diet-my-food-category-actions { margin-top: 7px; grid-template-columns: 1fr 1fr; }
body.page-diet .diet-my-food-category-card .diet-my-food-category-actions input { grid-column: 1 / -1; }
body.page-diet .diet-my-food-category-detail { grid-column: 1 / -1; min-height: calc(100vh - 220px); }
body.page-diet .diet-my-food-category-detail-head { grid-template-columns: 42px minmax(0, 1fr); }
body.page-diet .diet-my-food-category-back { width: 42px; height: 42px; border-radius: 12px; }
@media (max-width: 420px) { body.page-diet .diet-my-food-category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } body.page-diet .diet-my-food-category-card .diet-my-food-category-open { min-height: 54px; padding: 10px 42px 10px 10px; } body.page-diet .diet-my-food-category-pen { width: 32px; height: 32px; min-width: 32px; min-height: 32px; top: 7px; right: 7px; } }
html[dir="rtl"] body.page-diet .diet-my-food-category-card .diet-my-food-category-open { padding-right: 12px; padding-left: 46px; }
html[dir="rtl"] body.page-diet .diet-my-food-category-card .diet-my-food-category-open span { text-align: right; }
html[dir="rtl"] body.page-diet .diet-my-food-category-pen { right: auto; left: 8px; }
/* End My Foods category button grid final. */


/* My Foods category detail pen fix. */
body.page-diet .diet-my-food-category-detail-head { grid-template-columns: 42px minmax(0, 1fr) 38px; }
body.page-diet .diet-my-food-category-detail-pen { position: static; justify-self: end; }
@media (max-width: 420px) { body.page-diet .diet-my-food-category-detail-head { grid-template-columns: 42px minmax(0, 1fr) 36px; } }
/* End My Foods category detail pen fix. */


/* My Food category standalone page. */
body.page-diet.page-my-food-category .diet-my-food-category-page-workspace { max-width: 980px; margin: 0 auto; padding-top: 18px; }
body.page-diet .diet-my-food-category-page-head { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 14px; }
body.page-diet .diet-my-food-category-page-head h1 { margin: 0; color: #f8fafc; font-size: 1.25rem; overflow-wrap: anywhere; }
body.page-diet .diet-my-food-category-page-head .diet-kicker { margin: 0 0 3px; }
body.page-diet .diet-my-food-category-page-back { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.22); background: rgba(15, 23, 42, 0.8); color: #e2e8f0; }
body.page-diet .diet-my-food-category-page-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] body.page-diet .diet-my-food-category-page-back svg { transform: scaleX(-1); }
/* End My Food category standalone page. */


/* My Foods per-food move category. */
body.page-diet .diet-my-food-category-tools { display: grid; }
body.page-diet .diet-my-food-controls { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.page-diet .diet-my-food-controls label { grid-column: span 1; }
body.page-diet .diet-my-food-controls [data-my-food-delete] { order: 1; grid-column: 1; }
body.page-diet .diet-my-food-controls [data-my-food-move-category] { order: 2; grid-column: 2; background: linear-gradient(135deg, #7c3aed, #2563eb) !important; }
body.page-diet .diet-my-food-controls [data-my-food-log] { order: 3; grid-column: 3; }
body.page-diet .diet-my-food-controls [data-my-food-save] { order: 4; grid-column: 1 / -1; }
body.page-diet .diet-my-food-move-food-name { margin: 0; color: rgba(226, 232, 240, 0.72); font-weight: 800; overflow-wrap: anywhere; }
body.page-diet .diet-my-food-move-list { display: grid; gap: 8px; }
body.page-diet .diet-my-food-move-list button { min-height: 38px; padding: 8px 10px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 10px; background: rgba(15, 23, 42, 0.82); color: #f8fafc; font-weight: 900; text-align: left; }
body.page-diet .diet-my-food-move-list button.is-active { border-color: rgba(94, 234, 212, 0.44); background: rgba(20, 184, 166, 0.22); color: #ccfbf1; }
@media (max-width: 420px) { body.page-diet .diet-my-food-controls button { font-size: 0.72rem; padding: 7px 5px; } }
/* End My Foods per-food move category. */


/* My Foods final action alignment. */
body.page-diet .diet-my-food-card .diet-my-food-controls {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
    align-items: end !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls label {
    grid-column: span 3 !important;
    order: 0 !important;
    display: grid !important;
    gap: 4px !important;
    align-self: stretch !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls select,
body.page-diet .diet-my-food-card .diet-my-food-controls input {
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;
    box-sizing: border-box !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 7px 6px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 0.76rem !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-delete] {
    order: 1 !important;
    grid-column: 1 / span 2 !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-move-category] {
    order: 2 !important;
    grid-column: 3 / span 2 !important;
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-log] {
    order: 3 !important;
    grid-column: 5 / span 2 !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-save] {
    order: 4 !important;
    grid-column: 1 / -1 !important;
}
@media (max-width: 380px) {
    body.page-diet .diet-my-food-card .diet-my-food-controls button {
        font-size: 0.68rem !important;
        padding: 6px 4px !important;
    }
}
/* End My Foods final action alignment. */


/* My Foods removed bulk sort button. */
body.page-diet .diet-my-food-category-tools { grid-template-columns: minmax(140px, 220px) !important; }
body.page-diet .diet-my-food-sort-foods,
body.page-diet #dietOpenMyFoodSortModal,
body.page-diet #dietMyFoodSortModal { display: none !important; }
@media (max-width: 520px) { body.page-diet .diet-my-food-category-tools { grid-template-columns: 1fr !important; } }
/* End My Foods removed bulk sort button. */


/* My Foods edit category modal. */
body.page-diet .diet-my-food-edit-category-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.page-diet .diet-my-food-edit-category-actions button { min-height: 40px; border-radius: 10px; font-weight: 900; }
body.page-diet #dietDeleteMyFoodCategoryEdit { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; }
body.page-diet #dietSaveMyFoodCategoryEdit { background: linear-gradient(135deg, #15803d, #0f766e); color: #fff; }
body.page-diet .diet-my-food-edit-category-confirm[hidden] { display: none !important; }
body.page-diet .diet-my-food-edit-category-confirm { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(248, 113, 113, 0.34); border-radius: 12px; background: rgba(127, 29, 29, 0.3); }
body.page-diet .diet-my-food-edit-category-confirm p { margin: 0; color: #fee2e2; font-weight: 900; }
body.page-diet .diet-my-food-edit-category-confirm div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.page-diet #dietCancelMyFoodCategoryDelete { background: rgba(15, 23, 42, 0.85); color: #e2e8f0; }
body.page-diet #dietConfirmMyFoodCategoryDelete { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; }
/* End My Foods edit category modal. */


/* My Foods full-width category buttons. */
body.page-diet .diet-my-food-category-tabs {
    grid-template-columns: minmax(0, 1fr) !important;
}
body.page-diet .diet-my-food-category-card {
    grid-column: 1 / -1;
}
body.page-diet .diet-my-food-category-card .diet-my-food-category-open {
    min-height: 58px;
}
/* End My Foods full-width category buttons. */


/* My Foods green log button. */
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-log] {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    border-color: rgba(34, 197, 94, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.18) !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-log]:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}
/* End My Foods green log button. */


/* My Foods category tools hidden guard. */
body.page-diet .diet-my-food-category-tools[hidden] {
    display: none !important;
}
/* End My Foods category tools hidden guard. */


/* My Foods remove from category action. */
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-remove-category] {
    order: 4;
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f97316, #dc2626) !important;
    border: 1px solid rgba(251, 146, 60, 0.62) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22) !important;
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-remove-category]:hover {
    background: linear-gradient(135deg, #fb923c, #ef4444) !important;
    border-color: rgba(254, 215, 170, 0.72) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}
body.page-diet .diet-my-food-card .diet-my-food-controls [data-my-food-remove-category] + [data-my-food-save] {
    order: 5;
}
/* End My Foods remove from category action. */


/* My Foods centered move category modal. */
body.page-diet #dietMyFoodMoveCategoryModal {
    position: fixed !important;
    inset: 0 !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
}
body.page-diet #dietMyFoodMoveCategoryModal .diet-my-food-move-dialog {
    width: min(420px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 32px));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}
body.page-diet #dietMyFoodMoveCategoryModal .diet-my-food-move-list {
    max-height: min(420px, calc(100vh - 180px));
    overflow-y: auto;
    padding-right: 2px;
}
/* End My Foods centered move category modal. */




/* Compact barcode action buttons. */
body.page-diet .diet-barcode-controls .diet-barcode-action {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 10px !important;
}
body.page-diet .diet-barcode-controls .diet-barcode-action .diet-button-icon {
    width: 28px;
    height: 28px;
    background: transparent;
}
body.page-diet .diet-barcode-controls .diet-barcode-action svg {
    width: 22px;
    height: 22px;
}
@media (max-width: 640px) {
    body.page-diet .diet-barcode-controls .diet-barcode-action {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
    }
}
/* User-created foods dialog. */
body.diet-modal-open { overflow: hidden; }
body.page-diet .diet-create-food-modal { position: fixed; inset: 0; z-index: 10020; display: grid; place-items: center; padding: 20px; background: rgba(2,6,23,.78); backdrop-filter: blur(10px); }
body.page-diet .diet-create-food-modal[hidden], body.page-diet .diet-create-food-serving[hidden] { display: none; }
body.page-diet .diet-create-food-dialog { width: min(680px,100%); max-height: min(860px,calc(100vh - 32px)); overflow: auto; padding: 26px; border: 1px solid rgba(96,165,250,.3); border-radius: 24px; color: #eaf2ff; background: radial-gradient(circle at 100% 0,rgba(37,99,235,.22),transparent 34%),linear-gradient(150deg,#111c31,#09111f 72%); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
body.page-diet .diet-create-food-head { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; margin-bottom: 22px; }
body.page-diet .diet-create-food-head h2, body.page-diet .diet-create-food-head p { margin: 0; }
body.page-diet .diet-create-food-head h2 { font-size: clamp(1.35rem,4vw,1.8rem); }
body.page-diet .diet-create-food-head span { display: block; margin-top: 4px; color: #9fb0ca; font-size: .9rem; }
body.page-diet .diet-create-food-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: #bfdbfe; background: linear-gradient(145deg,#2563eb,#1d4ed8); box-shadow: 0 10px 28px rgba(37,99,235,.35); }
body.page-diet .diet-create-food-mark svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body.page-diet .diet-create-food-close { width: 40px; height: 40px; border: 1px solid rgba(148,163,184,.25); border-radius: 50%; color: #cbd5e1; background: rgba(15,23,42,.75); font-size: 1.5rem; cursor: pointer; }
body.page-diet .diet-create-food-dialog label { color: #cbd5e1; font-size: .82rem; font-weight: 700; }
body.page-diet .diet-create-food-dialog input { width: 100%; box-sizing: border-box; margin-top: 7px; padding: 12px 13px; border: 1px solid rgba(96,165,250,.42); border-radius: 12px; outline: none; color: #f8fafc; background: rgba(15,23,42,.78); }
body.page-diet .diet-create-food-dialog input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.16); }
body.page-diet .diet-create-food-basis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; padding: 0; border: 0; }
body.page-diet .diet-create-food-basis legend { grid-column: 1/-1; margin-bottom: 8px; color: #94a3b8; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
body.page-diet .diet-create-food-basis label { position: relative; cursor: pointer; }
body.page-diet .diet-create-food-basis input { position: absolute; opacity: 0; pointer-events: none; }
body.page-diet .diet-create-food-basis label>span { display: flex; min-height: 66px; flex-direction: column; justify-content: center; padding: 11px 14px; border: 1px solid rgba(148,163,184,.22); border-radius: 14px; background: rgba(15,23,42,.58); }
body.page-diet .diet-create-food-basis input:checked+span { border-color: #3b82f6; background: rgba(37,99,235,.18); box-shadow: inset 0 0 0 1px rgba(96,165,250,.25); }
body.page-diet .diet-create-food-basis small { margin-top: 3px; color: #8192ad; font-weight: 500; }
body.page-diet .diet-create-food-serving, body.page-diet .diet-create-food-macro-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
body.page-diet .diet-create-food-serving { margin-bottom: 14px; padding: 14px; border-radius: 15px; background: rgba(30,64,175,.1); }
body.page-diet .diet-create-food-serving label, body.page-diet .diet-create-food-macro-grid label { position: relative; }
body.page-diet .diet-create-food-serving label>span, body.page-diet .diet-create-food-macro-grid small { position: absolute; right: 12px; bottom: 13px; color: #64748b; font-size: .72rem; }
body.page-diet .diet-create-food-macro-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
body.page-diet .diet-create-food-preview { display: grid; grid-template-columns: 1.4fr repeat(4,1fr); gap: 1px; margin-top: 18px; overflow: hidden; border: 1px solid rgba(148,163,184,.18); border-radius: 15px; background: rgba(148,163,184,.16); }
body.page-diet .diet-create-food-preview>span { display: flex; min-height: 64px; flex-direction: column; justify-content: center; padding: 9px; text-align: center; background: rgba(8,16,30,.9); }
body.page-diet .diet-create-food-preview strong { color: #f8fafc; font-size: .98rem; }
body.page-diet .diet-create-food-preview small { color: #8494ae; font-size: .68rem; }
body.page-diet .diet-create-food-status { min-height: 20px; margin: 10px 0 0; color: #fca5a5; font-size: .82rem; }
body.page-diet .diet-create-food-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 4px; }
body.page-diet .diet-create-food-actions button { min-height: 46px; border: 1px solid rgba(148,163,184,.22); border-radius: 13px; color: #dbeafe; background: rgba(30,41,59,.8); font-weight: 800; cursor: pointer; }
body.page-diet .diet-create-food-actions button[type="submit"] { border-color: #3b82f6; color: white; background: linear-gradient(135deg,#2563eb,#1d4ed8); }
@media (max-width:620px) {
 body.page-diet .diet-create-food-modal { align-items: end; padding: 0; }
 body.page-diet .diet-create-food-dialog { max-height: 92vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
 body.page-diet .diet-create-food-head { grid-template-columns: 44px 1fr auto; }
 body.page-diet .diet-create-food-mark { width: 44px; height: 44px; border-radius: 14px; }
 body.page-diet .diet-create-food-macro-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 body.page-diet .diet-create-food-preview { grid-template-columns: repeat(4,1fr); }
 body.page-diet .diet-create-food-preview>span:first-child { grid-column: 1/-1; min-height: 48px; }
}
/* End user-created foods dialog. */
