/* ============================================
   THEME: ODEOLOGY_
   ============================================ */

.coming-soon-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(237, 234, 228, 0.7) !important;
    border-color: rgba(237, 234, 228, 0.12) !important;
}

.coming-soon-checkbox {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(237, 234, 228, 0.12) !important;
    color: rgba(237, 234, 228, 0.7) !important;
}
.allergy-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #ffffff;
    color: #5d4f43;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.coming-soon-item {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(237, 234, 228, 0.12) !important;
    color: rgba(237, 234, 228, 0.72) !important;
}

small {
    font-size: 0.85em;
    opacity: 0.8;
}

:root {
    --bg: #0f0b08;
    --panel: #15100c;
    --panel-glass: rgba(21, 16, 12, 0.82);
    --card: #1c1610;
    --ink: #f7f2ea;
    --muted: #c5b8a8;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #c58d4f;
    --accent-strong: #a46a2f;
    --accent-soft: rgba(197, 141, 79, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;

    --font-display: 'Playfair Display', 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Space Grotesk', system-ui, sans-serif;

    --transition: all 0.25s ease;
    --navbar-height: 72px;
}

:root[data-theme="light"] {
    --bg: #faf7f3;
    --panel: #ffffff;
    --panel-glass: rgba(255, 255, 255, 0.86);
    --card: #ffffff;
    --ink: #1b120c;
    --muted: #63574a;
    --line: rgba(0, 0, 0, 0.08);
    --accent: #e7a34d;
    --accent-strong: #c37b25;
    --accent-soft: rgba(231, 163, 77, 0.16);
    --shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
}

:root.theme-transition *,
:root.theme-transition *::before,
:root.theme-transition *::after {
    transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease, filter 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
    :root.theme-transition *,
    :root.theme-transition *::before,
    :root.theme-transition *::after {
        transition: none;
    }
}

body::after {
    content: '';
    position: fixed;
    inset: -20%;
    pointer-events: none;
    opacity: 0;
    z-index: 50;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.32), rgba(197, 141, 79, 0.18), rgba(0, 0, 0, 0.08));
    transform: scale(0.6);
    filter: blur(28px);
}

body.theme-wipe-dark::after {
    opacity: 1;
    animation: wipePulse 0.8s ease forwards;
}

body.theme-wipe-light::after {
    opacity: 1;
    animation: wipePulseLight 0.8s ease forwards;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.42), rgba(231, 163, 77, 0.22), rgba(0, 0, 0, 0.04));
}

@keyframes wipePulse {
    0% { transform: scale(0.4); opacity: 0; }
    35% { opacity: 1; }
    70% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes wipePulseLight {
    0% { transform: scale(0.4); opacity: 0; }
    35% { opacity: 1; }
    70% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 20% 20%, rgba(197, 141, 79, 0.08), transparent 32%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.06), transparent 28%),
        linear-gradient(180deg, #140f0b, #0f0b08 40%, #16110c 100%);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    padding-left: 0;
    padding-top: var(--navbar-height);
}

:root[data-theme="light"] body {
    background:
        radial-gradient(circle at 20% 20%, rgba(231, 163, 77, 0.12), transparent 32%),
        radial-gradient(circle at 80% 0%, rgba(0, 0, 0, 0.03), transparent 28%),
        linear-gradient(180deg, #fffdfb, #faf7f3 45%, #f3eee8 100%);
}

body.control-collapsed {
    padding-left: var(--control-collapsed-width);
}

body.control-open {
    padding-left: var(--control-width);
}

body.training-page {
    overflow: auto;
    height: auto;
}

.training-page #training {
    min-height: calc(100vh - 70px);
    height: auto;
    overflow: visible;
}

.training-page .training-shell {
    padding-top: 0;
}

.training-page .training-panel-inner {
    height: auto;
    overflow: visible;
}

.training-page .control-close {
    display: none;
}

.training-page .control-panel {
    width: var(--control-width) !important;
}

.training-page .control-panel.collapsed {
    width: var(--control-width) !important;
    padding: var(--control-padding) !important;
}

.training-page .control-panel.collapsed .text,
.training-page .control-panel.collapsed .control-search,
.training-page .control-panel.collapsed .section-label,
.training-page .control-panel.collapsed .brand-mini {
    display: revert !important;
}

.grocery-page {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(197,141,79,0.16), transparent 38%), var(--bg);
    z-index: 80;
    overflow: hidden;
    display: none;
}

.grocery-page:not(.hidden) {
    display: block;
}

.grocery-page-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 1.6rem clamp(1rem, 3vw, 2.5rem);
}

.grocery-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.grocery-req {
    flex: 1;
    max-width: 440px;
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(125deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px dashed var(--line);
    box-shadow: 0 10px 24px rgba(0,0,0,0.16);
    display: grid;
    gap: 0.35rem;
}

.grocery-req .label {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.grocery-req .value {
    font-weight: 700;
}

.grocery-macros {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 1rem 1.6rem;
    padding: 1rem 1.4rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,252,247,0.75) 100%);
    border: 2px solid rgba(231, 163, 77, 0.2);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
}

.final-topbar .grocery-macros {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.grocery-macros .label {
    display: block;
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.85);
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
    font-weight: 700;
    text-transform: uppercase;
}

.grocery-loop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    flex: 1;
}

.loop-block {
    display: grid;
    gap: 0.55rem;
}

.loop-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    justify-content: space-between;
}

.loop-row {
    position: relative;
    width: 100%;
    height: 84px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

.loop-row .loop-track {
    position: absolute;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    will-change: transform;
    animation: scroll-right 18s linear infinite;
    padding-right: 60px;
}

.loop-row.reverse .loop-track {
    animation: scroll-left 18s linear infinite;
}

.loop-row.slow .loop-track { animation-duration: 26s; }
.loop-row.medium .loop-track { animation-duration: 20s; }
.loop-row.paused .loop-track { animation-play-state: paused; }

.grocery-bottom {
    padding-top: 0.4rem;
    display: flex;
    justify-content: center;
}

.g-next-wide {
    width: min(720px, 92%);
    padding: 0.95rem 1.6rem;
    font-weight: 800;
}

.g-next-wide:disabled {
    background: rgba(120, 110, 100, 0.35);
    color: rgba(60, 50, 40, 0.6);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.grocery-final {
    position: relative;
    min-height: 100vh;
    inset: auto;
    background: radial-gradient(circle at 20% 20%, rgba(197,141,79,0.12), transparent 40%), var(--bg);
    z-index: 1;
    display: block;
    overflow: visible;
}

.grocery-final.hidden { display: none; }

.grocery-final-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem clamp(1rem, 3vw, 2.8rem);
    align-items: start;
}

.grocery-final-inner.compact {
    grid-template-columns: 1fr;
    max-width: 980px;
    margin: 0 auto;
    gap: 1.4rem;
}

.final-topbar {
    display: flex;
    justify-content: flex-end;
}

.final-topbar .grocery-macros {
    margin-left: auto;
}

.final-page {
    color: #1b120c;
    background:
        radial-gradient(circle at 12% 18%, rgba(231, 163, 77, 0.18), transparent 42%),
        radial-gradient(circle at 85% 0%, rgba(0, 0, 0, 0.03), transparent 30%),
        linear-gradient(180deg, #fffdfb, #faf7f3 45%, #f3eee8 100%);
}

.final-left h2 {
    font-size: clamp(2rem, 3.4vw, 3rem);
    color: #2b1f16;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.final-left p {
    max-width: 640px;
    color: rgba(93, 79, 67, 0.85);
    font-size: 1rem;
    line-height: 1.6;
}

.final-left {
    display: grid;
    gap: 1.4rem;
    padding: 1.6rem 1.6rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.final-form {
    display: grid;
    gap: 1.2rem;
}

.final-form .ns-field {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1rem 1rem;
    display: grid;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.18s ease;
}

.final-form .ns-field:hover {
    border-color: rgba(231, 163, 77, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.final-form .ns-field span {
    color: #3d2817;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.final-form .ns-field small {
    color: rgba(93, 79, 67, 0.75);
    font-size: 0.85rem;
}

.final-form input,
.final-form select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    padding: 0.48rem 0.7rem;
    background: #ffffff;
    color: #1b120c;
    font-weight: 700;
}

.final-form select option {
    color: #1b120c;
}

.final-form input:focus,
.final-form select:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
    background: #fffdf8;
}

/* Button group styles for required inputs */
.budget-options,
.meal-options,
.prep-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0.7rem 0 0;
}

.budget-btn,
.meal-btn,
.prep-btn {
    flex: 1;
    min-width: 85px;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #ffffff;
    color: #5d4f43;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.budget-btn:hover,
.meal-btn:hover,
.prep-btn:hover {
    border-color: rgba(231, 163, 77, 0.25);
    background: #fffbf7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.budget-btn.active,
.meal-btn.active,
.prep-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(231, 163, 77, 0.25);
}

/* New dietary, taste-cost, and allergies option styles */
.diet-options,
.taste-cost-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0.7rem 0 0;
}

.diet-btn,
.taste-cost-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.7rem 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #ffffff;
    color: #5d4f43;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.diet-btn:hover,
.taste-cost-btn:hover {
    border-color: rgba(231, 163, 77, 0.25);
    background: #fffbf7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.diet-btn.active,
.taste-cost-btn.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(231, 163, 77, 0.25);
}

/* Allergies checkbox group */
.allergies-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.8rem;
    margin: 0.7rem 0 0;
}

.allergy-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #ffffff;
    color: #5d4f43;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

.allergy-checkbox:hover {
    border-color: rgba(231, 163, 77, 0.25);
    background: #fffbf7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.allergy-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    border-radius: 4px;
    flex-shrink: 0;
}

.allergy-checkbox input[type="checkbox"]:checked + span {
    color: var(--accent);
    font-weight: 700;
}

/* Optional accordion section */
.final-section-a {
    display: grid;
    gap: 1.2rem;
}

.final-section-b {
    margin-top: 1.6rem;
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #3d2817;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.16s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.accordion-header.is-locked {
    opacity: 0.60;
    filter: saturate(0.70);
    cursor: not-allowed;
    position: relative;
}

.accordion-header.is-locked::after {
    content: "✕";
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
    color: rgba(239, 68, 68, 0.75);
    pointer-events: none;
}

.accordion-header.is-locked:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.food-sources-login-hint {
    margin-left: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    opacity: 0.85;
    color: rgba(239, 68, 68, 0.85);
}

.accordion-header:hover {
    background: #fffbf7;
    border-color: rgba(231, 163, 77, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.accordion-header.active {
    background: #fffbf7;
    border-color: rgba(231, 163, 77, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.accordion-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.accordion-content.hidden {
    display: none;
}

.food-sources-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.food-source-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.food-source-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.food-source-item:hover {
    border-color: rgba(231, 163, 77, 0.22);
}

.food-source-item .fs-check {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.food-source-thumb {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    flex: 0 0 auto;
}

.food-source-meta {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    flex: 1 1 auto;
}

.food-source-name {
    font-weight: 900;
    color: #2b1f16;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.food-source-sub {
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.food-source-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.food-source-trash {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    cursor: pointer;
    font-weight: 900;
    display: grid;
    place-items: center;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.food-source-trash:hover {
    transform: translateY(-1px);
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(220, 38, 38, 0.12);
}

.btn.is-pulsing {
    animation: odePulseBtn 1.15s ease-in-out 0s 4;
}

.btn.is-locked {
    opacity: 0.55;
    filter: saturate(0.65);
    cursor: not-allowed;
    position: relative;
}

.btn.is-locked::after {
    content: "✕";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
    color: rgba(239, 68, 68, 0.85);
    pointer-events: none;
}

.btn.is-locked:hover {
    opacity: 0.65;
}

@keyframes odePulseBtn {
    0% { box-shadow: 0 0 0 rgba(231, 163, 77, 0); transform: translateY(0); }
    50% { box-shadow: 0 0 0 6px rgba(231, 163, 77, 0.18); transform: translateY(-1px); }
    100% { box-shadow: 0 0 0 rgba(231, 163, 77, 0); transform: translateY(0); }
}

.timing-auto {
    padding: 0.7rem 0.9rem;
    border: 1px dashed rgba(0,0,0,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.8);
}

.final-actions {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 2rem;
}

.final-actions > div {
    display: grid;
    gap: 0.4rem;
}

.final-actions .btn {
    border-radius: 10px;
    padding: 0.8rem 1.3rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.16s ease;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.final-actions .btn-primary {
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(231, 163, 77, 0.2);
    border: 1px solid var(--accent);
    color: #ffffff;
}

.final-actions .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(231, 163, 77, 0.25);
}

.final-actions .btn-primary:active {
    box-shadow: 0 2px 8px rgba(231, 163, 77, 0.15);
}

.final-actions .btn-ghost {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #3d2817;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.final-actions .btn-ghost:hover {
    border-color: rgba(231, 163, 77, 0.2);
    background: #fffbf7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.final-actions .btn-ghost:active {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.final-actions .tiny {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.8);
}

@media (max-width: 1000px) {
    .grocery-final-inner {
        grid-template-columns: 1fr;
    }
}

.plan-page {
    padding: 2.4rem clamp(1rem, 3vw, 2.8rem);
    position: relative;
}

.plan-page-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 50;
}

.plan-page-close:hover {
    background: rgba(0,0,0,0.05);
    color: #666;
}

.plan-shell {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    gap: 1.6rem;
}

.plan-cta {
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffdf8;
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.plan-cta.glowing {
    box-shadow: 0 16px 32px rgba(0,0,0,0.1), 0 0 20px rgba(216, 137, 31, 0.4);
}

.plan-cta h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.plan-cta .btn-primary {
    white-space: nowrap;
}

.plan-cta-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 900px) {
    .plan-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    .plan-cta-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.plan-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: nowrap;
    margin-bottom: 1.5rem;
}

.plan-top-left {
    flex: 0 0 auto;
}

.plan-top-left h1 {
    margin: 0 0 0.2rem;
    font-size: 1.8rem;
}

.plan-top-left > p {
    margin: 0;
}

.plan-top-actions {
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.plan-summary-bar {
    display: flex;
    gap: 1.2rem;
    flex-wrap: nowrap;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    flex: 1 1 auto;
    min-width: 0;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    min-width: 70px;
}

.summary-item .label {
    font-size: 0.75rem;
    color: #9d8a76;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.summary-item .value {
    font-size: 1rem;
    font-weight: 700;
    color: #1b120c;
}

.plan-grid {
    display: grid;
    /* Give the Weekly grocery list card more breathing room on desktop */
    grid-template-columns: minmax(340px, 1.1fr) minmax(420px, 1.6fr);
    column-gap: 1.4rem;
    row-gap: 1.4rem;
    align-items: start;
}

.plan-sidebar {
    display: grid;
    gap: 1.4rem;
}

.plan-stack {
    display: grid;
    gap: 0.7rem;
}

/* Collapsible sections */
.plan-card.collapsible.hidden {
    opacity: 0.6;
    border-color: rgba(0, 0, 0, 0.05);
}

.collapsible-header {
    cursor: pointer;
    position: relative;
    padding-right: 2.5rem;
}

.collapse-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.4rem;
}

.collapsible-header[aria-expanded="true"] .collapse-toggle {
    transform: translateY(-50%) rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-content.hidden {
    max-height: 0;
    opacity: 0;
}

/* Grocery cost summary */
.grocery-cost-summary {
    display: flex;
    gap: 1.2rem;
    padding: 0.8rem;
    background: rgba(231, 163, 77, 0.08);
    border-radius: 10px;
    margin: 0 0 0.8rem 0;
}

.cost-item {
    flex: 1;
    text-align: center;
}

.cost-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cost-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

/* Simplified budget */
.budget-simple,
.budget-breakdown {
    display: grid;
    gap: 0.6rem;
}

.budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.budget-row.status {
    border: none;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    justify-content: center;
    padding: 0.8rem;
    margin-top: 0.4rem;
}

.status-badge {
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Macro accuracy pill */
.pill-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#supplement-shop .pill-group {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.45rem;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

/* A softer pill for informational tags beside the primary "Optional" pill. */
.pill.pill-soft {
    background: rgba(0,0,0,0.06);
    color: rgba(27, 18, 12, 0.78);
    text-transform: none;
    box-shadow: none;
}

.pill.pill-soft.strong {
    background: rgba(211, 47, 47, 0.12);
    color: #8a1f1f;
    border: 1px solid rgba(211, 47, 47, 0.14);
}

.pill.pill-soft.info {
    background: rgba(46, 125, 50, 0.10);
    color: #1b5e20;
    border: 1px solid rgba(46, 125, 50, 0.12);
}

#supplement-shop .pill {
    font-size: 0.65rem;
    padding: 0.24rem 0.6rem;
}

#supplement-shop .pill-group::-webkit-scrollbar {
    height: 0;
}

.macro-accuracy-pill {
    font-weight: 600;
}

.macro-accuracy-pill.on-target {
    background: rgba(46, 125, 50, 0.15);
    color: #2e7d32;
}

.macro-accuracy-pill.caution {
    background: rgba(255, 193, 7, 0.15);
    color: #f9a825;
}

.macro-accuracy-pill.over {
    background: rgba(211, 47, 47, 0.15);
    color: #c62828;
}

.macro-accuracy-pill.under {
    background: rgba(245, 166, 35, 0.15);
    color: #f57c00;
}

/* Macro summary row at bottom of meal plan */
.macro-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.macro-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
}

.macro-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.macro-target {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1b120c;
}

.macro-actual {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.macro-actual.on-target {
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.macro-actual.caution {
    background: rgba(255, 193, 7, 0.15);
    color: #f9a825;
}

.macro-actual.off-target {
    background: rgba(211, 47, 47, 0.12);
    color: #c62828;
}

.macro-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(61, 68, 73, 0.05) 0%, rgba(90, 98, 104, 0.08) 100%);
    border-radius: 12px;
    border-left: 3px solid #5a6268;
}

.macro-note p {
    margin: 0;
    font-size: 0.85rem;
    color: #4a4a4a;
    line-height: 1.5;
}

.macro-note strong {
    color: #2e7d32;
}

.macro-note a {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
}

.macro-note a:hover {
    text-decoration: underline;
}

.macro-warnings {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #f97316;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #1f2937;
}
.macro-warnings.hidden {
    display: none;
}
.macro-warning {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.3rem;
    line-height: 1.4;
}
.macro-warning::before {
    content: '⚠️';
    font-size: 0.9em;
    margin-top: 0.1rem;
}
.macro-warning.info::before {
    content: 'ℹ️';
}
.macro-warning.supplement::before {
    content: '💊';
}
.macro-warning strong {
    color: #111827;
    font-weight: 600;
}

.macro-reconfigure-note {
    display: block;
    margin-top: 0.6rem;
    color: #f97316;
    font-weight: 600;
    line-height: 1.45;
}

.macro-reconfigure-note.hidden {
    display: none;
}

.budget-row .label {
    color: var(--muted);
    font-size: 0.9rem;
}

.budget-row .value {
    font-weight: 700;
    color: #1b120c;
}

.plan-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 18px 36px rgba(0,0,0,0.12);
    padding: 1.1rem 1.2rem;
    display: grid;
    gap: 1rem;
}

.plan-card > .grocery-card {
    grid-column: 1 / -1;
}

.budget-card,
.meals-card {
    grid-column: auto;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.card-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.budget-details {
    display: grid;
    gap: 0.6rem;
}

.budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.budget-row.highlight {
    background: rgba(231, 163, 77, 0.08);
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
}

.budget-row.status {
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    background: rgba(76, 175, 80, 0.1);
    justify-content: center;
    margin-top: 0.5rem;
}

.status-text {
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.9rem;
}

.budget-row .label {
    color: #9d8a76;
    font-size: 0.9rem;
}

.budget-row .value {
    font-weight: 700;
    color: #1b120c;
    font-size: 1rem;
}

.meal-structure {
    display: grid;
    gap: 0.8rem;
}

.meal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.meal-item .label {
    color: #9d8a76;
    font-size: 0.9rem;
}

.meal-item .value {
    font-weight: 700;
    color: #1b120c;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.plan-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
}

.budget-cheaper {
    justify-self: start;
    align-self: start;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    color: #2b2014;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border: 1px solid rgba(0,0,0,0.55);
    box-shadow: 0 8px 18px rgba(197, 141, 79, 0.35);
}

.budget-cheaper:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(197, 141, 79, 0.45);
}

.budget-custom {
    justify-self: start;
    align-self: start;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    color: #2b2014;
    border-radius: 999px;
    background: #e8dccf;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    position: relative;
}

.budget-custom:hover {
    transform: translateY(-1px);
    background: #ddd1c2;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

.budget-custom[title] {
    cursor: help;
}

.budget-custom[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-0.6rem);
    background: rgba(27, 18, 12, 0.95);
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    font-weight: 500;
    line-height: 1.3;
}

.cheaper-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 11, 8, 0.35);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 90;
}

.cheaper-modal.hidden {
    display: none;
}

.cheaper-card {
    width: min(640px, 94vw);
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 22px 50px rgba(0,0,0,0.22);
    padding: 1.2rem 1.3rem;
    display: grid;
    gap: 1rem;
}

.cheaper-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.cheaper-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.cheaper-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(43, 32, 20, 0.6);
}

.cheaper-options {
    display: grid;
    gap: 0.4rem;
}

.cheaper-custom {
    display: grid;
    gap: 0.8rem;
}

.cheaper-custom-list {
    display: grid;
    gap: 0.6rem;
    max-height: 360px;
    overflow: auto;
    padding-right: 0.2rem;
}

.cheaper-changes {
    font-size: 0.78rem;
    color: rgba(93, 79, 67, 0.8);
    display: grid;
    gap: 0.25rem;
}

.cheaper-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffaf3;
}

.cheaper-row select {
    min-width: 180px;
}

.cheaper-row small {
    display: block;
    color: rgba(93, 79, 67, 0.75);
}

.cheaper-custom-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
}

.cheaper-actions {
    display: inline-flex;
    gap: 0.6rem;
}

.plan-card.weekly-list {
    overflow: visible;
}

/* Desktop: keep the left "Weekly grocery list" card from growing past the right column.
   Instead, scroll the list INSIDE the card so the columns stay visually aligned. */
@media (min-width: 901px) {
    .plan-page .plan-card.weekly-list {
        position: sticky;
        top: 1.2rem;
        max-height: calc(100vh - 2.4rem);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .plan-page .plan-card.weekly-list .grocery-list {
        min-height: 0; /* required for overflow inside flex container */
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 0.35rem;
    }
}

.food-calendar {
    position: relative;
}

.calendar-subtext {
    margin-top: -0.4rem;
    font-size: 0.85rem;
}

.food-calendar .calendar-wrap {
    display: grid;
    gap: 1rem;
}

/* Dedicated Grocery Calendar page: give the calendar more room */
.grocery-calendar-page .gc-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.6rem 1rem 3rem;
}

.grocery-calendar-page .gc-header {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    margin: 1.2rem 0 1rem;
}

.grocery-calendar-page .gc-actions {
    display: inline-flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

@media (min-width: 980px) {
    .grocery-calendar-page .food-calendar .calendar-wrap {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

.grocery-calendar-page .food-calendar .calendar-detail {
    margin-top: 0.2rem;
}

.calendar-pill.calendar-mode {
    cursor: pointer;
    border-style: solid;
}

.calendar-pill.calendar-mode.is-active {
    background: #1b120c;
    color: #ffffff;
    border-color: rgba(0,0,0,0.18);
}

.calendar-pill.calendar-action {
    cursor: pointer;
    border-style: solid;
}

.calendar-pill.calendar-action[disabled],
.calendar-pill.calendar-action[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

.calendar-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: start;
}

.calendar-detail {
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffdf8;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    display: grid;
    gap: 0.6rem;
}

.calendar-detail-head {
    display: grid;
    gap: 0.1rem;
}

.calendar-detail-title {
    font-weight: 700;
    font-size: 0.85rem;
}

.calendar-detail-date {
    font-size: 0.78rem;
    color: rgba(93, 79, 67, 0.7);
}

.calendar-detail-body {
    display: grid;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: rgba(93, 79, 67, 0.92);
}

.calendar-detail-empty {
    color: rgba(93, 79, 67, 0.65);
}

.calendar-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.calendar-detail-name {
    font-weight: 600;
    color: #2b2014;
}

.calendar-detail-meta {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.calendar-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.calendar-detail-badge.low {
    background: rgba(201, 161, 58, 0.16);
    color: #a67e1f;
}

.calendar-detail-badge.buy {
    background: rgba(208, 106, 58, 0.16);
    color: #a34a25;
}

.calendar-arrow {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2b2014;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.calendar-arrow:hover {
    background: #f7efe0;
}

.calendar-month {
    display: grid;
    gap: 0.5rem;
}

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

.calendar-month-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.calendar-month-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.calendar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px dashed rgba(0,0,0,0.22);
    background: #fff7ee;
    color: #6b3b22;
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: grab;
}

.calendar-pill.expired {
    background: #fff0f0;
    color: #8a2d2d;
    border-color: rgba(138, 45, 45, 0.25);
}

.calendar-pill.skip {
    background: #eef7ff;
    color: #2b4f7d;
    border-color: rgba(43, 79, 125, 0.25);
}

.calendar-pill.redo {
    background: #1b120c;
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 10px;
    cursor: pointer;
}

.calendar-pill:active {
    cursor: grabbing;
}

.calendar-pill.redo:active {
    cursor: pointer;
}

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

.calendar-weekday {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(93, 79, 67, 0.7);
    text-align: center;
    padding-bottom: 0.2rem;
}

.calendar-cell {
    min-height: 80px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffdf8;
    padding: 0.35rem 0.4rem;
    display: grid;
    gap: 0.3rem;
    align-content: start;
    cursor: pointer;
}

.calendar-cell.is-drop {
    border-color: rgba(208, 106, 58, 0.5);
    box-shadow: 0 0 0 2px rgba(208, 106, 58, 0.12) inset;
}

.calendar-cell.is-empty {
    background: transparent;
    border: 1px dashed rgba(0,0,0,0.08);
}

.calendar-cell.is-start {
    border-color: rgba(231, 163, 77, 0.6);
    box-shadow: 0 0 0 2px rgba(231, 163, 77, 0.18) inset;
}

.calendar-cell.has-buy {
    background: #fff6ee;
    border-color: rgba(231, 163, 77, 0.35);
}

.calendar-cell.has-low {
    background: #fffbe8;
    border-color: rgba(205, 160, 60, 0.35);
}

.calendar-day {
    font-weight: 700;
    font-size: 0.72rem;
    color: #2b2014;
    letter-spacing: 0.02em;
}

.calendar-items {
    display: grid;
    gap: 0.15rem;
    font-size: 0.58rem;
    color: rgba(93, 79, 67, 0.9);
}

.calendar-cell.is-selected {
    border-color: rgba(43, 32, 20, 0.3);
    box-shadow: 0 0 0 2px rgba(43, 32, 20, 0.08) inset;
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.2;
    white-space: normal;
}

.calendar-item.calendar-more {
    color: rgba(93, 79, 67, 0.6);
    font-style: italic;
}

.calendar-picker {
    position: absolute;
    inset: 0;
    background: rgba(15, 11, 8, 0.25);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 5;
}

.calendar-picker.hidden {
    display: none;
}

.calendar-picker-card {
    width: min(520px, 92vw);
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 20px 46px rgba(0,0,0,0.2);
    padding: 1rem 1.1rem;
    display: grid;
    gap: 0.9rem;
}

.calendar-picker-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
}

.calendar-picker-title {
    font-weight: 700;
    font-size: 1rem;
}

.calendar-picker-date {
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.7);
}

.calendar-picker-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: rgba(43, 32, 20, 0.6);
}

.calendar-picker-body {
    display: grid;
    gap: 0.4rem;
    max-height: 260px;
    overflow: auto;
    padding-right: 0.2rem;
}

.calendar-picker-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffaf3;
}

.calendar-picker-item input {
    accent-color: #d06a3a;
}

.calendar-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.calendar-legend {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: rgba(93, 79, 67, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-items: center;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1;
}


@media (max-width: 700px) {
    .calendar-nav {
        grid-template-columns: 1fr;
    }
    .calendar-arrow {
        width: 100%;
    }
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.card-head-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.budget-button-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pill-action {
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff7ee;
    color: #6b3b22;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.pill-action:hover {
    background: #f6ead9;
}

.meal-grid {
    display: grid;
    gap: 1.2rem;
}

.meal-blocks {
    display: grid;
    gap: 1.2rem;
}

.meal-block {
    display: grid;
    gap: 0.6rem;
    padding: 0.9rem;
    background: #faf8f4;
    border-radius: 8px;
    border-left: 4px solid #d8891f;
}

.meal-title {
    font-weight: 700;
    color: #2a2119;
    font-size: 1rem;
}

.meal-items {
    display: grid;
    gap: 0.35rem;
}

.meal-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: #3a2c1f;
}

.meal-item-name {
    color: rgba(42, 33, 25, 0.9);
    font-weight: 500;
    flex: 0 0 auto;
}

.meal-item-macros {
    font-size: 0.75rem;
    color: rgba(93, 79, 67, 0.45);
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.meal-item-measurement {
    font-size: 0.85rem;
    color: rgba(42, 33, 25, 0.65);
    white-space: nowrap;
    flex: 0 0 auto;
}

.meal-summary {
    font-weight: 600;
    color: #d8891f;
    font-size: 0.95rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.meal-daily-total {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    background: #f7efe0;
    border-radius: 8px;
    border: 2px solid #d8891f;
    margin-top: 0.4rem;
}

.daily-total-label {
    font-weight: 700;
    color: #2a2119;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.daily-total-value {
    font-weight: 700;
    color: #d8891f;
    font-size: 1.1rem;
}

.grocery-list {
    display: grid;
    gap: 0.55rem;
}

.grocery-list-container {
    display: grid;
    gap: 0.8rem;
}

.grocery-actions {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.grocery-actions .btn {
    width: 100%;
}

.grocery-actions .tiny {
    margin: 0;
    text-align: center;
    font-size: 0.75rem;
}

.add-cart-row {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.3rem;
}

.cart-button {
    border: 1px solid rgba(0,0,0,0.12);
    background: #f7efe0;
    color: #2b2014;
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.cart-button:hover {
    background: #efe4cf;
}

.grocery-item-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    align-items: start;
    padding: 0.75rem 0.9rem;
    padding-right: 2.4rem;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fffaf3;
    box-shadow: 0 12px 26px rgba(0,0,0,0.08);
    position: relative;
}

.grocery-item-top {
    display: grid;
    grid-template-columns: 68px auto 1fr auto;
    gap: 0.9rem;
    align-items: start;
    min-width: 0;
}

.grocery-item-info {
    display: grid;
    gap: 0.4rem;
    text-align: left;
}

.grocery-item-container-size {
    font-size: 0.9rem;
    color: #d8891f;
    font-weight: 600;
}

.grocery-item-consumption {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(93, 79, 67, 0.8);
}

.consumption-daily,
.consumption-weekly {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.grocery-item-purchase {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.9rem;
    color: #3a2c1f;
    font-weight: 500;
}

.purchase-qty {
    font-weight: 700;
    color: #2a2119;
}

.purchase-price {
    font-size: 0.85rem;
    color: rgba(93, 79, 67, 0.75);
}

/* ============================================
   MODERN GROCERY LIST CARDS
   ============================================ */

.grocery-header {
    margin-bottom: 1.5rem;
}

/* Grocery Intro Section */
.grocery-intro {
    background: linear-gradient(135deg, #f8f6f3 0%, #fff 100%);
    border: 1px solid rgba(196, 154, 108, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.grocery-intro-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.grocery-intro-title .grocery-icon {
    font-size: 1.3rem;
}

.grocery-intro-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #1b120c;
    font-weight: 600;
}

.grocery-intro-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #6d5c4d;
    line-height: 1.5;
}

.grocery-intro-desc strong {
    color: #1b120c;
}

/* Month Summary Bar */
.grocery-month-summary {
    background: linear-gradient(135deg, #3d4449 0%, #5a6268 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(61,68,73,0.25);
}

.month-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.month-label {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 500;
}

.month-days {
    font-size: 1rem;
    font-weight: 600;
}

.month-cost {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.month-cost-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.month-cost-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5a623;
}

/* Card Duration Badge */
.grocery-card-duration {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(46, 125, 50, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.8rem;
}

.grocery-card-duration .duration-icon {
    font-size: 0.9rem;
}

.grocery-card-duration .duration-text {
    font-size: 0.8rem;
    color: #2e7d32;
}

.grocery-card-duration .duration-text strong {
    color: #1b5e20;
}

/* Legacy styles (kept for compatibility) */
.grocery-total-cost {
    background: linear-gradient(135deg, #3d4449 0%, #5a6268 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(61,68,73,0.35);
}

.grocery-total-cost .cost-label {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 500;
}

.grocery-total-cost .cost-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f5a623;
}

.grocery-total-cost .cost-days {
    font-size: 0.8rem;
    opacity: 0.7;
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
}

.grocery-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Plan page: keep grocery cards in a clean 2-column grid */
@media (min-width: 860px) {
    .plan-page .grocery-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.grocery-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grocery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.grocery-card-image {
    position: relative;
    height: 140px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.grocery-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.grocery-card-image.no-image {
    background: linear-gradient(135deg, #f5a623 0%, #d4860c 100%);
}

.grocery-card-image.no-image::after {
    content: '🛒';
    font-size: 3rem;
}

.grocery-card-link {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a2c1f;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.grocery-card-link:hover {
    background: #f5a623;
    color: #fff;
    transform: scale(1.1);
}

.grocery-card-body {
    padding: 1rem;
}

.grocery-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2a2119;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.grocery-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1612;
    margin-bottom: 0.75rem;
}

.grocery-card-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(93, 79, 67, 0.6);
}

.grocery-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #faf8f5;
    border-radius: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.detail-label {
    color: rgba(93, 79, 67, 0.7);
}

.detail-value {
    font-weight: 600;
    color: #3a2c1f;
}

.detail-row.highlight {
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.detail-row.highlight .detail-value {
    color: #f5a623;
    font-weight: 700;
}

.grocery-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.container-price {
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.6);
}

.grocery-check-modern {
    position: relative;
    cursor: pointer;
}

.grocery-check-modern input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.grocery-check-modern .checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.grocery-check-modern input:checked + .checkmark {
    background: #f5a623;
    border-color: #f5a623;
}

.grocery-check-modern input:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============================================
   MODERN MEAL CARDS
   ============================================ */

.meal-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 1rem;
}

.meal-header {
    background: linear-gradient(135deg, #3d4449 0%, #5a6268 100%);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meal-header h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.meal-macros {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

.meal-items {
    padding: 0.75rem 1.25rem;
}

.meal-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.meal-item:last-child {
    border-bottom: none;
}

.meal-item-name {
    font-weight: 500;
    color: #2a2119;
}

.meal-item-qty {
    font-size: 0.85rem;
    color: #f5a623;
    font-weight: 600;
    background: rgba(245, 166, 35, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.meal-item-macros {
    font-size: 0.8rem;
    color: rgba(93, 79, 67, 0.6);
}

.upgrade-message {
    background: #fffbf7;
    border: 2px solid #f5a623;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
}

.upgrade-message h4 {
    color: #f5a623;
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.upgrade-message p {
    color: #5d4f43;
    margin-bottom: 1.5rem;
    white-space: pre-line;
    line-height: 1.6;
}

.grocery-thumb-box {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 12px 22px rgba(0,0,0,0.12);
}

.grocery-thumb-box.empty {
    background: #f2ede6;
}

.grocery-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.grocery-link {
    text-align: left;
    display: inline-block;
    line-height: 1.2;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2a2119;
}

.grocery-item-info .ns-muted.tight {
    line-height: 1.25;
    font-size: 0.82rem;
    color: rgba(93, 79, 67, 0.85);
}

.grocery-cart-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #b24b3b;
}

.grocery-cart-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b24b3b;
}

.grocery-cart-status.in-cart {
    color: #2f7a3e;
}

.grocery-cart-status.in-cart::before {
    background: #2f7a3e;
}

.grocery-price-stack {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    align-self: center;
}

.grocery-price {
    font-weight: 700;
    font-size: 1rem;
    color: #1b120c;
    text-align: center;
}

@media (max-width: 760px) {
    .grocery-item-top {
        grid-template-columns: 68px 1fr;
        grid-auto-rows: auto;
    }
    .grocery-price-stack,
    .grocery-check {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

.grocery-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    align-self: start;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    position: absolute;
    top: 10px;
    right: 10px;
}


.grocery-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.grocery-check-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.25);
    background: transparent;
    transition: var(--transition);
}

.grocery-check-input:checked + .grocery-check-box {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(231, 163, 77, 0.2);
}

.grocery-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.grocery-link:hover {
    text-decoration: underline;
}

.grocery-link.grocery-popup {
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

#popup-error {
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid rgba(165, 70, 35, 0.2);
    background: rgba(255, 120, 70, 0.12);
    color: #a54c2c;
    font-weight: 600;
}

.popup-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.popup-retry {
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff3e4;
    color: #2b2014;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.popup-retry:hover {
    background: #f6e7d3;
}

.item-switch {
    border: 1px solid rgba(0,0,0,0.12);
    background: #f4efe7;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.item-switch:hover {
    background: #efe7da;
}

.grocery-item span {
    font-weight: 600;
}

.list-note {
    font-size: 0.85rem;
    color: rgba(93, 79, 67, 0.75);
}

@media (max-width: 900px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }
    .plan-card.weekly-list {
        grid-row: 2;
    }
    .plan-stack {
        grid-row: 1;
    }
    .meal-split-head,
    .meal-row {
        grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(28px, 44px)) minmax(56px, 70px);
    }
}

/* ============================================
   MOBILE GROCERY DRAWER (mobile-only)
   Keeps desktop layout unchanged.
   ============================================ */
@media (max-width: 900px) {
    .mobile-grocery-toggle {
        position: fixed;
        left: max(14px, env(safe-area-inset-left));
        bottom: max(14px, env(safe-area-inset-bottom));
        z-index: 110;
        border: 1px solid rgba(0, 0, 0, 0.12);
        background: linear-gradient(135deg, #ffffff 0%, #fff1df 100%);
        color: #2b2014;
        padding: 0.35rem 0.65rem;
        border-radius: 999px;
        font-weight: 800;
        letter-spacing: 0.3px;
        box-shadow: 0 10px 22px rgba(31, 22, 13, 0.16);
        backdrop-filter: blur(8px);
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        text-transform: uppercase;
        font-size: 0.62rem;
        line-height: 1.1;
    }

    .mobile-grocery-toggle:active {
        transform: translateY(1px);
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 105;
        background: rgba(0, 0, 0, 0.30);
        backdrop-filter: blur(2px);
    }

    #grocery-list.plan-card.weekly-list {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(92vw, 420px);
        z-index: 110;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        border-radius: 0 16px 16px 0;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #grocery-list.plan-card.weekly-list.is-open {
        transform: translateX(0);
    }

    #grocery-list.plan-card.weekly-list .card-head {
        position: sticky;
        top: 0;
        z-index: 1;
        background: inherit;
    }

    #grocery-list.plan-card.weekly-list .grocery-cost-summary {
        flex-shrink: 0;
    }

    #grocery-list-items.grocery-list {
        flex: 1;
        min-height: 0;
        overflow: auto;
        padding-bottom: 80px; /* keep last cards above the toggle button */
        -webkit-overflow-scrolling: touch;
    }

    .mobile-drawer-close {
        margin-left: auto;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.10);
        background: rgba(255, 255, 255, 0.75);
        color: #2b2014;
        font-weight: 900;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-drawer-close:active {
        transform: translateY(1px);
    }
}

@media (max-width: 900px) {
    .plan-page .grocery-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .grocery-card-image {
        height: 110px;
    }

    .grocery-card-body {
        padding: 0.75rem;
    }

    .grocery-card-title {
        font-size: 0.85rem;
    }

    .grocery-card-price {
        font-size: 1.2rem;
    }

    .meal-grid,
    .meal-blocks {
        gap: 0.8rem;
    }

    .meal-block {
        padding: 0.75rem;
    }

    .meal-title {
        font-size: 0.95rem;
    }

    .meal-item {
        font-size: 0.88rem;
    }
}

@media (max-width: 700px) {
    .plan-page {
        padding: 1.1rem 0.85rem 6.2rem;
    }

    .plan-page-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .plan-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .plan-top-left h1 {
        font-size: 1.36rem;
    }

    .plan-summary-bar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        padding: 0.65rem;
        border-radius: 12px;
    }

    .summary-item {
        align-items: flex-start;
        text-align: left;
        min-width: 0;
    }

    .summary-item .label {
        font-size: 0.6rem;
    }

    .summary-item .value {
        font-size: 0.86rem;
    }

    .plan-card {
        padding: 0.8rem 0.9rem;
    }

    .card-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .card-head h3 {
        font-size: 0.95rem;
    }

    .pill-group {
        flex-wrap: wrap;
    }

    .grocery-cost-summary {
        flex-direction: column;
        gap: 0.55rem;
    }

    .meal-item {
        flex-wrap: wrap;
        gap: 0.35rem 0.6rem;
    }

    .meal-item-macros {
        order: 3;
        flex: 1 1 100%;
        text-align: left;
    }

    .macro-summary-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .macro-col {
        flex: 1 1 calc(50% - 0.6rem);
        align-items: flex-start;
    }

    .macro-note {
        font-size: 0.88rem;
    }

    .budget-button-group {
        display: flex;
        gap: 0.4rem;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 700px) {
    .plan-shell {
        gap: 1rem;
    }

    .plan-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .plan-card {
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    }

    .plan-card + .plan-card {
        margin-top: 0.2rem;
    }

    .plan-stack {
        gap: 0.9rem;
    }

    .plan-top {
        margin-bottom: 0.6rem;
    }

    .plan-top-left p {
        font-size: 0.88rem;
        color: rgba(61, 40, 23, 0.7);
    }

    .plan-summary-bar {
        background: #fffaf3;
        border: 1px solid rgba(0, 0, 0, 0.06);
    }

    .summary-item {
        padding: 0.2rem 0.1rem;
    }

    .summary-item .value {
        font-size: 0.86rem;
    }

    .weekly-list .card-head {
        gap: 0.6rem;
    }

    .grocery-cost-summary {
        padding: 0.6rem;
        background: rgba(231, 163, 77, 0.08);
        border-radius: 12px;
    }

    .grocery-list {
        gap: 0.5rem;
    }

    .grocery-item-row {
        padding: 0.6rem 0.7rem;
        padding-right: 2.1rem;
        border-radius: 14px;
        box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    }

    .grocery-item-top {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 0.6rem;
    }

    .grocery-item-consumption {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        font-size: 0.8rem;
    }

    .grocery-item-purchase {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        font-size: 0.82rem;
    }

    .meal-block {
        padding: 0.48rem 0.6rem;
        border-left-width: 2px;
        border-radius: 10px;
    }

    .meal-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name measurement"
            "macros macros";
        gap: 0.18rem 0.4rem;
        font-size: 0.78rem;
    }

    .meal-item-name {
        font-size: 0.8rem;
        grid-area: name;
    }

    .meal-item-measurement {
        font-size: 0.68rem;
        grid-area: measurement;
        justify-self: end;
        text-align: right;
    }

    .macro-summary-row {
        gap: 0.45rem;
    }

    .macro-col {
        padding: 0.3rem 0.4rem;
        border-radius: 10px;
        background: rgba(250, 248, 244, 0.8);
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .budget-breakdown {
        gap: 0.15rem;
    }

    .budget-row {
        padding: 0.4rem 0;
    }

    .essentials-section {
        margin-top: 0.6rem;
    }

    .essentials-subtitle {
        font-size: 0.88rem;
        margin-bottom: 0.75rem;
    }

    /* Macro essentials: single-card swipe carousel on mobile */
    #macro-essentials .essentials-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 100%;
        gap: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
        align-items: start;
    }

    #macro-essentials .essential-card {
        scroll-snap-align: start;
        border-radius: 16px;
        align-self: start;
    }

    #macro-essentials .essentials-grid::-webkit-scrollbar {
        display: none;
    }

    #macro-essentials .essential-body {
        padding: 0.65rem 0.75rem;
    }

    #macro-essentials .essential-desc {
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    #macro-essentials .essential-meta {
        margin-bottom: 0.4rem;
    }

    #macro-essentials .essential-image {
        height: 92px;
        padding: 0.55rem;
    }

    #macro-essentials .carousel-track img {
        height: 92px;
        padding: 0.5rem;
    }

    #macro-essentials .essential-body h4 {
        font-size: 0.88rem;
    }

    #macro-essentials .essential-desc {
        font-size: 0.8rem;
        line-height: 1.25;
    }

    #macro-essentials .essential-meta {
        gap: 0.3rem;
    }

    #macro-essentials .essential-price {
        font-size: 0.86rem;
    }

    #macro-essentials .essential-cta {
        padding: 0.38rem 0.6rem;
        font-size: 0.75rem;
    }

    #macro-essentials .essential-body {
        padding: 0.6rem 0.7rem;
    }

    #macro-essentials .essentials-dots {
        display: flex;
        justify-content: center;
        gap: 0.35rem;
        margin-top: 0.35rem;
    }

    #macro-essentials .essentials-dots .dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: rgba(27, 18, 12, 0.2);
    }

    #macro-essentials .essentials-dots .dot.active {
        background: #1b120c;
    }

    #budget-summary .budget-button-group::-webkit-scrollbar {
        height: 4px;
    }

    #budget-summary .budget-button-group::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 999px;
    }

    #budget-summary .budget-button-group .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .meal-item-macros {
        grid-area: macros;
        font-size: 0.6rem;
        text-align: left;
    }

    .meal-title {
        font-size: 0.88rem;
    }

    .meal-items {
        gap: 0.2rem;
    }

    .meal-summary {
        font-size: 0.82rem;
        padding-top: 0.25rem;
    }

    .meal-daily-total {
        padding: 0.6rem;
        border-width: 1px;
    }

    .daily-total-label {
        font-size: 0.74rem;
    }

    .daily-total-value {
        font-size: 0.9rem;
    }

    /* Section-specific polish for mobile */
    #meal-plan {
        background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
        border-color: rgba(216, 137, 31, 0.15);
    }

    #meal-plan .macro-note {
        background: rgba(216, 137, 31, 0.08);
        border-left-color: #d8891f;
    }

    #budget-summary {
        background: #fffdf8;
        border-color: rgba(0, 0, 0, 0.06);
    }

    #budget-summary .budget-row.status {
        background: rgba(27, 18, 12, 0.04);
        border-radius: 10px;
        padding: 0.5rem 0.6rem;
        border: none;
    }

    #budget-summary .budget-row.status .status-badge {
        background: #1b120c;
        color: #ffffff;
        padding: 0.25rem 0.6rem;
        border-radius: 999px;
        font-size: 0.7rem;
    }

    #plan-cta.cta-attention {
        padding: 0.85rem 0.9rem;
        border-radius: 16px;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
    }

    #plan-cta .cta-attention-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.45rem;
    }

    #plan-cta .cta-attention-btn,
    #plan-cta .cta-secondary-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 901px) {
    .mobile-grocery-toggle,
    .mobile-drawer-close,
    .mobile-drawer-backdrop {
        display: none !important;
    }
}

.loop-pill {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.loop-pill.active {
    border-color: rgba(0,255,170,0.65);
    box-shadow: 0 10px 28px rgba(0,255,170,0.25);
    color: #65ffc4;
}

:root[data-theme="light"] .loop-row {
    background: rgba(255,255,255,0.7);
    border-color: rgba(0,0,0,0.06);
}
:root[data-theme="light"] .loop-pill {
    background: rgba(255,255,255,0.82);
    border-color: rgba(0,0,0,0.08);
    color: #2b2014;
}
:root[data-theme="light"] .loop-pill.active {
    border-color: rgba(230,160,40,0.9);
    box-shadow: 0 12px 30px rgba(229,170,60,0.28);
}

@keyframes scroll-right {
    0% { transform: translateX(-25%); }
    100% { transform: translateX(0); }
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-25%); }
}

img {
    max-width: 100%;
    display: block;
}

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

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    z-index: 1;
    mix-blend-mode: soft-light;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 35% 30%, rgba(197, 141, 79, 0.2), transparent 45%), var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

:root[data-theme="light"] .preloader {
    background: radial-gradient(circle at 35% 30%, rgba(231, 163, 77, 0.2), transparent 45%), var(--bg);
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-word {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--ink);
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transform: translate(-50%, -50%) scale(0.9);
    animation: popIn 1s ease forwards;
    transition: transform 1.2s ease, filter 1.2s ease, top 1.2s ease, left 1.2s ease;
}

.preloader-word .brand-dot {
    transform: translateY(2px);
}

@keyframes popIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7) rotate(-6deg); filter: blur(4px); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(4deg); filter: blur(0); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); filter: blur(0); }
}

.preloader-bar {
    position: absolute;
    top: calc(50% + 70px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(320px, 70vw);
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

:root[data-theme="light"] .preloader-bar {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.preloader-bar .fill {
    height: 100%;
    width: 0;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    animation: loadFill 2.4s ease forwards;
}

.preloader-bar.fade {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.9);
}

@keyframes loadFill {
    0% { width: 0; }
    100% { width: 100%; }
}



.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
}

.eyebrow {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h3 {
    font-size: 1.4rem;
}

p {
    color: var(--muted);
    font-size: 1rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2.5rem;
}

.section-subtitle {
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.btn-primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: #0c0a08;
    box-shadow: 0 10px 30px rgba(197, 141, 79, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(197, 141, 79, 0.45);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

:root[data-theme="light"] .btn-ghost {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.btn-mini {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 10px;
    align-self: start;
}

.tag, .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--ink);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.pill.dark {
    background: rgba(255, 255, 255, 0.05);
}

.pill.soft {
    border: none;
    background: var(--accent-soft);
    color: #f8ede0;
}

.pill.live {
    color: #0c0a08;
    background: var(--accent);
    border: none;
}

.brand-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 6px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 120;
    backdrop-filter: blur(12px);
    background: rgba(12, 10, 8, 0.82);
    border-bottom: 1px solid var(--line);
}

:root[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.88);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: var(--navbar-height);
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    order: 2;
    justify-content: center;
    flex: 1;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    font-weight: 600;
    color: var(--muted);
    position: relative;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .nav-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-training {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    padding: 0.45rem 0.75rem;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
}

:root[data-theme="light"] .nav-training {
    border-color: transparent;
    background: transparent;
}

.nav-training::after {
    display: none;
}

.nav-training:hover {
    transform: translateY(-1px);
    border-color: rgba(197, 141, 79, 0.38);
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu a.coming-soon-link,
.nav-menu a.coming-soon-link:hover {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(237, 234, 228, 0.16);
    cursor: not-allowed;
    transform: none;
}

:root[data-theme="light"] .nav-training:hover {
    border-color: rgba(197, 141, 79, 0.32);
    background: rgba(0, 0, 0, 0.05);
}

.nav-training-main {
    font-weight: 850;
    color: var(--ink);
    line-height: 1.05;
}

.nav-training-sub {
    display: none;
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--muted);
    line-height: 1.05;
}

body.training-page .nav-training-sub,
body.training-status-page .nav-training-sub {
    display: block;
}

.nav-menu a.coming-soon-link .nav-training-sub {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .nav-training:hover {
        transform: none;
    }
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    font-weight: 850;
    border: 1px solid rgba(0, 255, 170, 0.32);
    background: rgba(0, 255, 170, 0.10);
    color: rgba(230, 255, 248, 0.92);
    white-space: nowrap;
}

:root[data-theme="light"] .nav-badge {
    border-color: rgba(230,160,40,0.75);
    background: rgba(231, 163, 77, 0.16);
    color: rgba(55, 35, 20, 0.92);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    order: 4;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--ink);
    border-radius: 4px;
}

.theme-toggle {
    margin-left: 0;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    order: 5;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Auth (Neon-backed sessions) */
.auth-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    order: 4;
}

.auth-nav-btn {
    padding: 0.58rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-nav-btn-primary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

.auth-nav-btn-ghost {
    background: transparent;
    color: var(--muted);
}

.auth-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.auth-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 170px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(12, 10, 8, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.35rem;
    z-index: 40;
}

:root[data-theme="light"] .auth-menu {
    background: rgba(255, 255, 255, 0.96);
}

.auth-menu-item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.auth-menu-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.ode-prompt-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
}

.ode-prompt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.ode-prompt-card {
    position: relative;
    width: min(520px, calc(100% - 28px));
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(12, 10, 8, 0.96);
    backdrop-filter: blur(12px);
    padding: 1.25rem 1.25rem 1.1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] .ode-prompt-card {
    background: rgba(255, 255, 255, 0.96);
}

.ode-prompt-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: var(--transition);
}

.ode-prompt-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ode-prompt-title {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
}

.ode-prompt-body {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.ode-prompt-note {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.ode-prompt-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

/* Auth gating (blur page until signed in) */
body.auth-gated main,
body.auth-gated .control-panel {
    filter: blur(10px) saturate(0.92);
    pointer-events: none;
    user-select: none;
}

body.auth-gated .auth-close {
    display: none;
}

body.auth-gated .auth-backdrop {
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: min(520px, calc(100% - 28px));
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(12, 10, 8, 0.96);
    backdrop-filter: blur(12px);
    padding: 1.25rem 1.25rem 1.1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.96);
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: var(--transition);
}

.auth-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.auth-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.auth-error {
    margin: 0 0 0.8rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 110, 110, 0.45);
    background: rgba(255, 110, 110, 0.08);
    color: var(--ink);
    font-weight: 600;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-tab {
    flex: 1;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 650;
    transition: var(--transition);
}

.auth-tab.active {
    border-color: var(--accent);
    color: var(--ink);
}

.auth-form {
    display: grid;
    gap: 0.5rem;
}

.auth-label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 650;
    margin-top: 0.2rem;
}

.auth-input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    outline: none;
    transition: var(--transition);
}

.auth-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 141, 79, 0.18);
}

.auth-submit {
    margin-top: 0.35rem;
}

body.modal-open {
    overflow: hidden;
}

/* Admin dashboard */
.admin-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(circle at 18% 12%, rgba(197, 141, 79, 0.16), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.06), transparent 40%),
        var(--bg);
}

.admin-card {
    width: min(1160px, 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.12), transparent 38%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
    padding: 1.4rem 1.4rem 1.25rem;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-header-left {
    display: grid;
    gap: 0.3rem;
}

.admin-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(197, 141, 79, 0.25);
    background: rgba(197, 141, 79, 0.08);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--ink);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-close {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.admin-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.admin-title {
    margin: 0;
    font-size: 1.65rem;
}

.admin-sub {
    margin: 0.35rem 0 1rem;
    color: var(--muted);
    font-weight: 650;
}

.admin-h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.admin-h3 {
    margin: 1.25rem 0 0.6rem;
    font-size: 1.05rem;
}

.admin-note,
.admin-muted {
    color: var(--muted);
    font-weight: 650;
    margin: 0.35rem 0 1rem;
}

.admin-error {
    margin: 0.9rem 0 0;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 110, 110, 0.45);
    background: rgba(255, 110, 110, 0.08);
    color: var(--ink);
    font-weight: 700;
}

.admin-form {
    display: grid;
    gap: 0.5rem;
    max-width: 520px;
}

.admin-label {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.admin-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font-weight: 650;
}

.admin-input:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.admin-submit {
    margin-top: 0.5rem;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.75);
}

.admin-tabs {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-tab {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 800;
    transition: var(--transition);
}

.admin-tab.active {
    border-color: var(--accent);
    color: var(--ink);
}

.admin-tab[data-tab="accounts"] {
    border-color: rgba(92, 193, 255, 0.35);
    color: rgba(205, 235, 255, 0.95);
}

.admin-tab[data-tab="leads"] {
    border-color: rgba(255, 189, 92, 0.4);
    color: rgba(255, 231, 196, 0.95);
}

.admin-tab[data-tab="guests"] {
    border-color: rgba(175, 130, 255, 0.4);
    color: rgba(228, 210, 255, 0.95);
}

.admin-tab[data-tab="data"] {
    border-color: rgba(122, 255, 178, 0.35);
    color: rgba(210, 255, 232, 0.95);
}

.admin-tab[data-tab="orders"] {
    border-color: rgba(255, 122, 155, 0.4);
    color: rgba(255, 212, 222, 0.95);
}

.admin-tab[data-tab="messages"] {
    border-color: rgba(255, 235, 130, 0.45);
    color: rgba(255, 247, 210, 0.95);
}

.admin-tab.active {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

:root[data-theme="light"] .admin-tab[data-tab="accounts"],
:root[data-theme="light"] .admin-tab[data-tab="leads"],
:root[data-theme="light"] .admin-tab[data-tab="guests"],
:root[data-theme="light"] .admin-tab[data-tab="data"],
:root[data-theme="light"] .admin-tab[data-tab="orders"],
:root[data-theme="light"] .admin-tab[data-tab="messages"] {
    color: rgba(42, 30, 20, 0.9);
    background: rgba(0, 0, 0, 0.03);
}

.admin-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1rem;
}

@media (max-width: 980px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.16);
    padding: 0.95rem;
    overflow: hidden;
}

:root[data-theme="light"] .admin-panel {
    background: rgba(255, 255, 255, 0.75);
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.admin-items {
    display: grid;
    gap: 0.6rem;
    max-height: 62vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.admin-bulk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(197, 141, 79, 0.08);
    margin: 0.85rem 0 0.85rem;
}

.admin-bulk-count {
    font-weight: 900;
}

.admin-bulk-right {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-item-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.45rem 0.45rem 0.6rem;
}

.admin-item-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.admin-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.55rem 0.55rem;
    transition: var(--transition);
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.admin-item:hover {
    border-color: rgba(197, 141, 79, 0.45);
    transform: translateY(-1px);
}

.admin-item.active {
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(197, 141, 79, 0.18);
}

.admin-item-main {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-md);
}

.admin-icon-btn {
    flex: 0 0 auto;
    width: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.admin-icon-btn:hover {
    border-color: rgba(255, 110, 110, 0.6);
    color: #ff6e6e;
}

.admin-item-title {
    font-weight: 900;
}

.admin-item-sub {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
    margin-top: 0.15rem;
}

.admin-item-meta {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.admin-detail-body {
    display: grid;
    gap: 0.9rem;
}

.admin-detail-body h3 {
    margin: 0.2rem 0 0.2rem;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 720px) {
    .admin-summary {
        grid-template-columns: 1fr;
    }
}

.admin-summary-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.9rem 1rem;
}

.admin-summary-label {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.92rem;
}

.admin-summary-value {
    margin-top: 0.25rem;
    font-weight: 950;
    font-size: 1.35rem;
}

.admin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-weight: 750;
    font-size: 0.9rem;
}

.admin-events {
    display: grid;
    gap: 0.55rem;
}

.admin-event {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.7rem 0.85rem;
}

.admin-event-name {
    font-weight: 900;
}

.admin-event-meta {
    margin-top: 0.2rem;
    color: var(--muted);
    font-weight: 650;
    font-size: 0.9rem;
}

.admin-kv {
    display: grid;
    gap: 0.5rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.admin-kv-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.45rem 0.75rem;
    align-items: start;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.admin-kv-row:last-child {
    border-bottom: 0;
}

.admin-kv .k {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-kv .v {
    font-weight: 700;
    color: var(--ink);
}

.admin-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-weight: 650;
}

.admin-select {
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-weight: 800;
}

.admin-pre {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
    max-height: 38vh;
    overflow: auto;
    font-size: 0.9rem;
}

:root[data-theme="light"] .admin-pre {
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 720px) {
    .admin-kv-row {
        grid-template-columns: 1fr;
    }
}

/* Hero */
.hero {
    padding: 5.5rem 0 4.5rem;
    background:
        radial-gradient(circle at 75% 10%, rgba(197, 141, 79, 0.18), transparent 40%),
        radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.07), transparent 34%),
        linear-gradient(145deg, #18100c, #0f0b08 55%, #21150d);
    overflow: hidden;
}

:root[data-theme="light"] .hero {
    background:
        radial-gradient(circle at 75% 10%, rgba(229, 155, 63, 0.18), transparent 40%),
        radial-gradient(circle at 15% 0%, rgba(0, 0, 0, 0.05), transparent 32%),
        linear-gradient(145deg, #fffaf3, #f6f1ea 55%, #efe7dd);
}

.hero-split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 2.2rem;
    align-items: start;
}

.hero-left {
    display: grid;
    gap: 1.8rem;
    padding: 1.4rem 1.6rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    max-width: 600px;
}

.hero-copy .hero-subtitle {
    margin: 1rem 0 1.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.1rem;
}

.stat {
    padding: 1.05rem 1.15rem;
    border: 1px solid rgba(197, 141, 79, 0.2);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(197, 141, 79, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.floating-card {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.floating-body .metric {
    margin-bottom: 1rem;
}

.meter {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
}

.pill-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.metric.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.video-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-placeholder iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.steps-panel .floating-body .metric {
    margin-bottom: 0.75rem;
}

.steps-panel .floating-body .metric h3 {
    color: var(--ink);
}

.steps-panel .floating-body .metric p {
    margin-top: 0.25rem;
}

.panel {
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(197, 141, 79, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    box-shadow: var(--shadow);
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.hero-right {
    display: grid;
    gap: 1.2rem;
    max-width: 620px;
    justify-self: end;
    width: 100%;
}

.video-area {
    position: relative;
    width: 100%;
}

.video-head {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.under-video {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.accent-border {
    position: relative;
}

.accent-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(120deg, rgba(197, 141, 79, 0.6), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Resources */
.resources {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%), var(--bg);
}

:where(section.resources.mission) {
    padding: 3.2rem 0;
}

:where(section.resources.nutrition-funnel) {
    padding: 3.6rem 0;
}

:root[data-theme="light"] .resources {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 30%), var(--bg);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mission .offer-header {
    margin-top: 1rem;
}

.mission .mission-layout {
    display: grid;
    gap: 1.5rem;
}

.mission .offer-stack {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 980px) {
    .mission .mission-layout {
        grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
        align-items: stretch;
    }

    .mission .mission-layout.mission-layout-single {
        grid-template-columns: minmax(0, 1fr);
    }

    .mission .mission-left,
    .mission .mission-right {
        display: flex;
        min-height: 100%;
    }

    .mission .mission-left .offer-stack {
        flex: 1 1 auto;
        display: flex;
        min-height: 100%;
    }

    .mission .mission-left .offer-stack > .resource-card,
    .mission .mission-right > .resource-card {
        flex: 1 1 auto;
        height: 100%;
    }

    .mission .mission-layout.mission-layout-single .mission-right > .resource-card {
        flex: 0 0 auto;
        height: auto;
    }
}

.mission .mission-right {
    display: flex;
}

.mission .mission-right .offer-save-card {
    flex: 1 1 auto;
}

.mission .mission-right .offer-save-card {
    background: rgba(255, 255, 255, 0.02);
}

.mission .mission-right .offer-save-card.resource-card {
    padding: 1.05rem 1.1rem 0.35rem;
    gap: 0.85rem;
}

.mission .section-header {
    margin-bottom: 1.1rem;
}

.mission .section-subtitle {
    max-width: 62ch;
}

.mission .mission-right .offer-save-card .card-top h3 {
    font-size: clamp(1.65rem, 2.1vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

:root[data-theme="light"] .mission .mission-right .offer-save-card .card-top h3 {
    color: var(--ink);
}

:root[data-theme="light"] .mission .mission-right .offer-save-card {
    background: #ffffff;
}

.mission .intake-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.6rem;
}

.mission .intake-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    border: 0;
    padding: 0;
    margin: 0;
}

.mission .intake-progress {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.mission .intake-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.mission .intake-progress-label {
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.mission .intake-progress-status {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ink);
}

.mission .intake-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    overflow: hidden;
}

:root[data-theme="light"] .mission .intake-progress-bar {
    background: rgba(0, 0, 0, 0.04);
}

.mission .intake-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
}

.mission .intake-viewport {
    overflow: hidden;
    border-radius: 14px;
    height: auto;
    transition: height 220ms ease;
}

.mission .intake-track {
    display: flex;
    align-items: flex-start;
    transform: translateX(0%);
    transition: transform 260ms ease;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .mission .intake-viewport {
        transition: none;
    }
}

.mission .intake-screen {
    width: 100%;
    flex: 0 0 100%;
    padding-top: 0.35rem;
    position: relative;
}

.mission .intake-q {
    margin: 0 0 0.45rem;
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.mission .intake-helper {
    margin: 0.25rem 0 0;
    font-size: 0.86rem;
    line-height: 1.35;
    opacity: 0.75;
}

.blueprint-results .blueprint-grid {
    display: grid;
    gap: 1rem;
}

.blueprint-results .blueprint-card h3 {
    margin: 0;
}

.blueprint-results .blueprint-card-actions {
    margin-top: 0.9rem;
}

.blueprint-results .blueprint-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.mission .intake-actions-row {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.12rem;
}

.mission .intake-actions-final {
    margin-top: 0.7rem;
}

.mission .intake-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.mission .intake-choice {
    width: 100%;
    text-align: left;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

:root[data-theme="light"] .mission .intake-choice {
    background: rgba(0, 0, 0, 0.02);
}

.mission .intake-choice:hover {
    border-color: rgba(197, 141, 79, 0.45);
}

.mission .intake-choice.is-selected,
.mission .intake-choice[aria-pressed="true"] {
    border-color: rgba(197, 141, 79, 0.65);
    background: rgba(197, 141, 79, 0.12);
}

.mission .intake-screen-blank .intake-blank {
    min-height: 220px;
}

.mission .intake-redo {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 0.75rem 0.9rem;
}

.mission .intake-subhead {
    margin-top: 0.35rem;
    font-size: 0.98rem;
    line-height: 1.35;
}

.mission .intake-group {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.mission .intake-group-sub {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.25;
}

:root[data-theme="light"] .mission .intake-group {
    background: rgba(0, 0, 0, 0.02);
}

.mission .intake-group-title {
    margin: 0.05rem 0 0;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    color: var(--ink);
}

.mission .intake-group[data-pipeline="done_for_you"] {
    border-color: rgba(197, 141, 79, 0.6);
    background: rgba(197, 141, 79, 0.08);
}

:root[data-theme="light"] .mission .intake-group[data-pipeline="done_for_you"] {
    border-color: rgba(231, 163, 77, 0.55);
    background: rgba(231, 163, 77, 0.14);
}

.mission .intake-group[data-pipeline="free_tools"] {
    grid-column: 1;
    grid-row: 1;
}

.mission .intake-group[data-pipeline="diy"] {
    grid-column: 1;
    grid-row: 2;
}

.mission .intake-group[data-pipeline="done_for_you"] {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.mission .intake-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.01);
    color: var(--ink);
    font-weight: 750;
    cursor: pointer;
    transition: none;
}

.mission .intake-check:hover {
    border-color: rgba(197, 141, 79, 0.35);
    transform: none;
}

.mission .intake-check .intake-text {
    line-height: 1.25;
    font-size: 0.98rem;
}

.mission .intake-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex: 0 0 auto;
}

.mission .intake-check:has(input:checked) .intake-icon,
.mission .intake-check.is-checked .intake-icon {
    color: var(--accent);
}

.mission .intake-check input[type="checkbox"],
.mission .intake-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

:root[data-theme="light"] .mission .intake-check {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .mission .intake-check:hover {
    border-color: rgba(230, 160, 40, 0.45);
}

.mission .intake-check:has(input:checked) {
    border-color: rgba(197, 141, 79, 0.55);
    box-shadow: none;
    background: rgba(197, 141, 79, 0.09);
}

.mission .intake-check.is-checked {
    border-color: rgba(197, 141, 79, 0.55);
    box-shadow: none;
    background: rgba(197, 141, 79, 0.09);
}

.mission .intake-fields {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.35rem;
}

.mission .intake-fields label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.mission .intake-fields input,
.mission .intake-book-form input,
.mission .intake-book-form select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font-weight: 600;
}

:root[data-theme="light"] .mission .intake-fields input,
:root[data-theme="light"] .mission .intake-book-form input,
:root[data-theme="light"] .mission .intake-book-form select {
    background: rgba(0, 0, 0, 0.04);
}

.mission .intake-fields input:focus,
.mission .intake-book-form input:focus,
.mission .intake-book-form select:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.mission .intake-form .btn {
    width: 100%;
}

.mission .intake-form #intake-next {
    transition: none;
    padding: 1.05rem 1.1rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.mission .intake-form #intake-next:hover {
    transform: none;
}

.mission .intake-optin {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-weight: 650;
    cursor: pointer;
}

.mission .intake-optin input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

:root[data-theme="light"] .mission .intake-optin {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

.mission .intake-legal {
    display: inline-block;
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.mission .intake-legal:hover {
    color: var(--accent);
}

.mission .offer-trust {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.mission .mission-right .btn {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    font-weight: 750;
}

.mission .mission-right .btn-ghost {
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .mission .mission-right .btn-ghost {
    background: rgba(0, 0, 0, 0.02);
}

.mission .mission-right .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mission .mission-right .btn-primary {
    border-color: rgba(197, 141, 79, 0.35);
    box-shadow: 0 12px 28px rgba(197, 141, 79, 0.22);
}

.mission .mission-right .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(197, 141, 79, 0.3);
}

.mission .intake-state {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.75rem;
}

.mission .intake-state h4 {
    margin: 0;
    font-size: 1.15rem;
}

.mission .intake-actions {
    display: grid;
    gap: 0.6rem;
}

.mission .intake-book-form {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.mission .offer-not-wide {
    margin-top: 1.5rem;
}

.mission .offer-grid {
    margin-bottom: 1.25rem;
}

.mission .offer-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 2px;
}

.mission .offer-link:hover {
    opacity: 0.9;
}

.mission .offer-includes {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mission .offer-list {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.mission .offer-list li {
    margin: 0.4rem 0;
}

.mission .offer-actions {
    margin-top: 1rem;
}

.mission .offer-divider {
    height: 1px;
    background: var(--line);
    margin: 1.25rem 0;
    opacity: 0.9;
}

.mission .offer-card-all .offer-tier h3 {
    margin-top: 0;
}

.mission .offer-card-tiers .offer-tier + .offer-tier {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.mission .offer-card-free {
    border-color: rgba(197, 141, 79, 0.45);
    background: linear-gradient(160deg, rgba(197, 141, 79, 0.11), rgba(255, 255, 255, 0.02));
}

:root[data-theme="light"] .mission .offer-card-free {
    border-color: rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

@media (min-width: 920px) {
    .mission .offer-card-free {
        grid-column: 1 / -1;
    }
}

.mission .offer-not-card {
    margin-top: 0.25rem;
}

.mission .offer-closing {
    margin: 0.9rem 0 0;
    color: var(--ink);
    font-weight: 650;
}

.walmart-overview {
    background: linear-gradient(180deg, rgba(197, 141, 79, 0.08), transparent 35%), var(--bg);
}

:root[data-theme="light"] .walmart-overview {
    background: linear-gradient(180deg, rgba(231, 163, 77, 0.14), transparent 35%), var(--bg);
}

.walmart-embed-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(197, 141, 79, 0.18);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 1rem;
}

:root[data-theme="light"] .walmart-embed-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

.walmart-embed-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.walmart-embed-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.walmart-embed-frame {
    position: relative;
    width: 100%;
    min-height: 520px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .walmart-embed-frame {
    background: #f6efe6;
}

.walmart-embed-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.walmart-embed-note {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .walmart-embed-frame {
        min-height: 420px;
    }
}

.walmart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    z-index: 120;
}

.walmart-overlay.active {
    display: flex;
}

.walmart-overlay-card {
    width: min(1200px, 96vw);
    max-height: 90vh;
    display: grid;
    gap: 0.9rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(197, 141, 79, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] .walmart-overlay-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.walmart-overlay-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.walmart-overlay-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.walmart-overlay-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.walmart-overlay-frame {
    position: relative;
    width: 100%;
    height: min(70vh, 720px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .walmart-overlay-frame {
    background: #f6efe6;
}

.walmart-overlay-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.8rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.walmart-overlay-status {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
}

.walmart-overlay-status.error {
    color: #e06a46;
}

.walmart-overlay-subtext {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 640px;
}

.walmart-overlay-note {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .walmart-overlay {
        padding: 1.25rem 0.9rem;
    }
    .walmart-overlay-frame {
        height: 72vh;
    }
}

.resource-card {
    background: linear-gradient(160deg, #221a13, #19120d);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] .resource-card {
    background: linear-gradient(160deg, #ffffff, #f6efe6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12);
}

.resource-card::after {
    content: '';
    position: absolute;
    inset: -20% auto auto 30%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(197, 141, 79, 0.12), transparent 65%);
    transform: rotate(12deg);
    pointer-events: none;
}

:root[data-theme="light"] .resource-card::after {
    background: radial-gradient(circle, rgba(231, 163, 77, 0.18), transparent 65%);
}

.resource-card h3 {
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.resource-card p {
    position: relative;
    z-index: 1;
}

:root[data-theme="light"] .resource-card p,
:root[data-theme="light"] .resource-card h3,
:root[data-theme="light"] .resource-card .eyebrow {
    color: var(--ink);
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.card-bottom .btn {
    flex: 1;
}

.funnel {
    margin: 2rem 0 1rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.step {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
}

.step-number {
    display: inline-block;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.email-capture {
    margin-top: 2rem;
    padding: 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent-soft);
    background: linear-gradient(140deg, rgba(197, 141, 79, 0.1), rgba(255, 255, 255, 0.02));
}

.capture-form {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr auto;
    gap: 0.85rem;
    margin: 1rem 0;
}

.capture-form input {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
}

.capture-form input::placeholder {
    color: #8c8173;
}

.form-note {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Programs */
.shop {
    background: linear-gradient(180deg, transparent, rgba(197, 141, 79, 0.06) 45%, transparent);
}

:root[data-theme="light"] .shop {
    background: linear-gradient(180deg, transparent, rgba(231, 163, 77, 0.12) 45%, transparent);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 1.2rem;
}

.product-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.product-description {
    color: var(--muted);
    margin-top: 0.4rem;
}

.product-features {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.product-features li {
    padding-left: 1.25rem;
    position: relative;
    color: var(--muted);
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.pricing-toggle {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
}

.price-option {
    flex: 1;
    text-align: center;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.price-option:hover {
    border-color: var(--accent);
}

.price-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #f8ede0;
}

.price-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
}

.pricing-static {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.product-checkout {
    width: 100%;
    justify-content: center;
}

/* Shorts */
.shorts {
    background: linear-gradient(180deg, #0f0b08, #16100c 60%, #0f0b08);
}

:root[data-theme="light"] .shorts {
    background: linear-gradient(180deg, #fffdfb, #f3eee8 60%, #fffdfb);
}

.shorts-grid {
    --shorts-gap: 1.1rem;
    display: flex;
    gap: var(--shorts-gap);
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.25rem 0.35rem;
}

.shorts-carousel {
    position: relative;
}

.shorts-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--panel-glass);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    transition: var(--transition);
    z-index: 2;
}

.shorts-nav:hover {
    border-color: rgba(197, 141, 79, 0.45);
    color: var(--accent);
    transform: translateY(calc(-50% - 1px));
}

.shorts-nav:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.shorts-nav.prev { left: -10px; }
.shorts-nav.next { right: -10px; }

.short-card {
    flex: 0 0 calc((100% - var(--shorts-gap) * 3) / 4);
    min-width: 240px;
    scroll-snap-align: start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.short-card:hover {
    transform: translateY(-8px);
    border-color: rgba(197, 141, 79, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42);
}

:root[data-theme="light"] .short-card {
    background: #fffaf4;
    border-color: rgba(230, 160, 40, 0.28);
    box-shadow: 0 12px 26px rgba(0,0,0,0.14);
}
:root[data-theme="light"] .short-card:hover {
    border-color: rgba(230, 160, 40, 0.48);
    box-shadow: 0 16px 30px rgba(229,170,60,0.24);
}

.short-thumbnail {
    position: relative;
    aspect-ratio: 9 / 16;
    background: linear-gradient(180deg, #1c1610, #0f0b08);
    overflow: hidden;
    border-radius: var(--radius-md);
}

:root[data-theme="light"] .short-thumbnail {
    background: linear-gradient(180deg, #f7ede2, #e8dccf);
}

.short-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.short-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--ink);
    backdrop-filter: blur(6px);
}

:root[data-theme="light"] .short-badge {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(230, 160, 40, 0.45);
    color: #3b2a1a;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.short-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.55));
}

:root[data-theme="light"] .short-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.15));
}

.short-play-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #0c0a08;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border-radius: 50%;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    opacity: 0.92;
    transition: var(--transition);
}

.short-play-icon::before {
    content: '>';
    font-weight: 900;
    font-size: 1.1rem;
}

.short-card:hover .short-play-icon {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

:root[data-theme="light"] .short-play-icon {
    background: linear-gradient(120deg, #f6c762, #e7a34d);
    color: #2b2014;
    box-shadow: 0 10px 22px rgba(229,170,60,0.28);
}
:root[data-theme="light"] .short-card:hover .short-play-icon {
    box-shadow: 0 14px 28px rgba(229,170,60,0.32);
}

.short-info {
    padding: 1rem 1rem 1.3rem;
}

.short-title {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-desc {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nutrition Simplified Funnel */
.nutrition-funnel .ns-wrapper {
    display: grid;
    gap: 1.5rem;
}

.ns-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

:root[data-theme="light"] .ns-card {
    background: #fffaf4;
    border-color: rgba(230, 160, 40, 0.28);
}

.ns-entry {
    display: grid;
    gap: 1rem;
    align-items: center;
}
.ns-entry .ns-actions {
    gap: 0.6rem;
    width: 100%;
}
.ns-entry .btn {
    border-radius: 12px;
    padding: 0.95rem 1.6rem;
    font-weight: 700;
    width: 100%;
}
.ns-entry .btn-primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 32px rgba(197, 141, 79, 0.35);
    border: 1px solid rgba(0,0,0,0.04);
}
.ns-entry .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(197, 141, 79, 0.45);
}
.ns-entry .btn-ghost {
    background: rgba(255,255,255,0.6);
    color: #2b2014;
    border: 1px solid rgba(197,141,79,0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 24px rgba(0,0,0,0.06);
}
:root[data-theme="light"] .ns-entry .btn-ghost {
    background: #fff;
    border-color: rgba(195,123,37,0.35);
}
.ns-entry .btn-ghost:hover {
    border-color: rgba(197,141,79,0.8);
    color: var(--accent-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 12px 28px rgba(0,0,0,0.08);
}

.ns-muted {
    color: var(--muted);
}

.ns-list {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
    margin: 0.5rem 0 0.5rem;
}

.ns-flow {
    display: grid;
    gap: 1.25rem;
}

.ns-progress {
    display: grid;
    gap: 0.45rem;
}

.ns-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--muted);
}

.ns-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

:root[data-theme="light"] .ns-progress-bar {
    background: rgba(0, 0, 0, 0.04);
}

.ns-progress-fill {
    height: 100%;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    width: 33%;
    transition: width 0.35s ease;
}

.ns-loader {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

:root[data-theme="light"] .ns-loader {
    background: rgba(0, 0, 0, 0.05);
}

.ns-loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.2s infinite ease-in-out;
}

.ns-step {
    display: grid;
    gap: 1.1rem;
}

.ns-group {
    display: grid;
    gap: 0.6rem;
}

.ns-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}

.ns-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.ns-pill,
.ns-icon-pill {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 0.9rem;
    color: var(--ink);
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

:root[data-theme="light"] .ns-pill,
:root[data-theme="light"] .ns-icon-pill {
    background: rgba(0, 0, 0, 0.02);
}

.ns-pill:hover,
.ns-icon-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ns-pill.active,
.ns-icon-pill.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--ink);
    box-shadow: 0 12px 24px rgba(197, 141, 79, 0.25);
}

.ns-icon-pill span {
    margin-right: 0.4rem;
}

.ns-duo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.8rem;
}

.ns-field {
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--ink);
}

.ns-field span {
    color: var(--muted);
}

.ns-field input,
.ns-field select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
}

:root[data-theme="light"] .ns-field input,
:root[data-theme="light"] .ns-field select {
    background: rgba(0, 0, 0, 0.03);
}

.ns-field.inline {
    flex: 1;
}

.ns-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.ns-actions.split {
    justify-content: space-between;
}

.ns-actions.column {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.6rem;
}

.ns-actions.column .btn {
    width: 100%;
}

.ns-note {
    color: var(--muted);
    font-size: 0.95rem;
}

#ns-unlock-block {
    margin-top: 0.55rem;
}

.ns-main-col {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
}

.ns-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    width: 100%;
}

.ns-result-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1rem;
    height: 100%;
}

.ns-result-card.primary {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.ns-info {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.35rem;
}

.ns-caption {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.ns-caption.strong {
    font-weight: 700;
}

.ns-handoff-headline {
    margin: 0.3rem 0 0;
    color: var(--ink);
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    font-weight: 950;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ns-handoff-sub {
    margin: 0.25rem 0 0.25rem;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.ns-macros {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    width: 100%;
    margin-top: 0.55rem;
}

.ns-macro-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    height: 100%;
}

.ns-macros.locked .ns-macro-card {
    filter: blur(4px);
    pointer-events: none;
}

.ns-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    color: var(--ink);
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

:root[data-theme="light"] .ns-lock-overlay {
    background: rgba(255, 255, 255, 0.65);
}

.ns-macro-note {
    font-size: 0.85rem;
    margin-top: 0.15rem;
    color: var(--muted);
    text-align: center;
}

.ns-summary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
}
.ns-summary-grid.split-two {
    grid-template-columns: 2fr 1fr;
}

.ns-side-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ns-video-card {
    background: linear-gradient(145deg, rgba(197,141,79,0.08), rgba(0,0,0,0.18)), var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1rem 1.05rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    justify-content: flex-start;
}

.ns-video-card.ns-next-box {
    padding: 1.25rem 1.25rem;
    gap: 1.05rem;
}

.ns-next-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ns-next-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.ns-next-mid {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.1rem;
}

.ns-next-typed {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.05rem, 1.45vw, 1.28rem);
    font-weight: 950;
    letter-spacing: -0.02em;
    line-height: 1.18;
    white-space: pre-line;
}

.ns-next-typed::after {
    content: ' ';
    display: inline-block;
    width: 0.55em;
    height: 1.05em;
    margin-left: 0.12em;
    border-radius: 2px;
    background: rgba(197, 141, 79, 0.7);
    transform: translateY(0.12em);
    animation: nsCaretBlink 1s steps(1, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .ns-next-typed::after {
        animation: none;
        opacity: 0;
    }
}

@keyframes nsCaretBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.ns-next-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.35;
}

.ns-next-bot {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.7rem;
}

.ns-next-bot .btn {
    width: 100%;
}

.ns-video-copy {
    display: grid;
    gap: 0.55rem;
}

.ns-video-copy h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.ns-video-card .ns-handoff-headline {
    margin: 0;
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.18;
}

.ns-video-card .ns-handoff-sub {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.38;
}

.ns-video-muted {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.45;
}

.ns-video-actions {
    margin-top: auto;
    display: grid;
    gap: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.ns-video-actions .btn {
    width: 100%;
}

.ns-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(0,0,0,0.15));
}

.ns-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.02);
}

.ns-video-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.65rem;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.grocery-flow .ns-card {
    margin-top: 1.2rem;
}

.g-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.g-step-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.g-step-checks {
    background: rgba(0,0,0,0.06);
    color: var(--ink);
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    min-width: 220px;
    text-align: right;
}

:root[data-theme="light"] .g-step-checks {
    background: rgba(255,255,255,0.55);
}

.g-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.food-col {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    background: var(--card);
    box-shadow: var(--shadow-sm, 0 10px 25px rgba(0,0,0,0.04));
}

.food-col-head {
    margin-bottom: 0.5rem;
}

.food-list {
    display: grid;
    gap: 0.55rem;
}

.food-item {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.55rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: rgba(255,255,255,0.03);
}

.food-item:hover {
    border-color: var(--line);
    background: rgba(255,255,255,0.06);
}

.food-item input {
    width: 18px;
    height: 18px;
}

.food-meta {
    display: grid;
    line-height: 1.25;
}

.food-name {
    font-weight: 700;
}

.food-macros {
    color: var(--muted);
    font-size: 0.9rem;
}

.ns-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}

.ns-field span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.ns-field select,
.ns-field input[type="number"] {
    width: 100%;
}

@media (max-width: 900px) {
    .g-step-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .g-step-checks {
        width: 100%;
        text-align: left;
    }
}

.ns-video-placeholder {
    display: none;
}

.ns-email {
    display: grid;
    gap: 0.55rem;
    width: 100%;
}

.ns-email-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.ns-email.hidden {
    display: none;
}

.ns-email .ns-field {
    flex: 1;
}

.ns-email input[type="email"] {
    width: 100%;
}

.ns-email .btn {
    flex-shrink: 0;
    width: auto !important;
    min-width: 140px;
    padding: 0.65rem 1rem;
    white-space: nowrap;
}

.ns-email-optin {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.85rem;
    opacity: 0.85;
    user-select: none;
}

.ns-email-optin input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.ns-muted.tight {
    margin-top: -0.15rem;
}

.ns-muted.small {
    font-size: 0.9rem;
}

.ns-handoff {
    display: grid;
    gap: 0.4rem;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes odeGlow {
    0% { box-shadow: 0 0 0 rgba(197, 141, 79, 0); }
    20% { box-shadow: 0 0 0 2px rgba(197, 141, 79, 0.45), 0 0 28px rgba(197, 141, 79, 0.22); }
    100% { box-shadow: 0 0 0 0 rgba(197, 141, 79, 0), 0 0 0 rgba(197, 141, 79, 0); }
}

.nutrition-funnel.ode-glow {
    animation: odeGlow 2.4s ease-out;
    border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
    .ns-summary-grid {
        grid-template-columns: 1fr;
    }
    .ns-summary-grid.split-two {
        grid-template-columns: 1fr;
    }
    .ns-main-col {
        order: 1;
    }
    .ns-side-col {
        order: 2;
    }
    .ns-results {
        grid-template-columns: 1fr;
    }
    .ns-actions.split {
        flex-direction: column;
        align-items: flex-start;
    }
    .ns-email {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }
    .ns-email-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .ns-email .ns-field {
        width: 100%;
    }
    .ns-email .btn {
        width: 100% !important;
    }
}


@media (max-width: 1100px) {
    .short-card {
        flex-basis: calc((100% - var(--shorts-gap) * 2) / 3);
    }
}

@media (max-width: 820px) {
    .short-card {
        flex-basis: calc((100% - var(--shorts-gap)) / 2);
    }
}

@media (max-width: 640px) {
    #ns-step-3 .ns-results .ns-result-card:not(.primary) {
        display: none;
    }
    :root {
        --control-collapsed-width: 52px;
        --control-offset-collapsed: 44px;
        --control-padding-collapsed: 0.75rem 0.55rem 0.9rem;
        --navbar-height: 64px;
    }

    body.control-collapsed,
    body.control-open {
        padding-left: 0 !important;
    }

    .navbar-container {
        padding: 0.55rem 0.85rem;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .navbar-brand {
        font-size: 1rem;
        letter-spacing: 0.02em;
        order: 1;
    }

    .theme-toggle {
        padding: 0.42rem 0.55rem;
        order: 3;
    }

    .hamburger span {
        width: 24px;
    }

    .hamburger {
        order: 4;
        margin-left: auto;
    }

    .container {
        padding: 0 0.9rem;
        padding-left: calc(0.9rem + var(--control-collapsed-width));
    }

    .control-panel {
        max-width: 92vw;
    }

    .nav-menu {
        top: calc(var(--navbar-height) + 8px);
        left: 0.85rem;
        right: 0.85rem;
        padding: 0.9rem;
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        width: 100%;
        padding: 0.6rem 0.8rem;
        border-radius: 12px;
        color: #ffffff;
    }

    .nav-training {
        width: 100%;
        align-items: flex-start;
        border-radius: 12px;
    }

    .nav-training-sub {
        display: inline-flex;
        color: var(--muted);
        font-size: 0.7rem;
        letter-spacing: 0.04em;
    }

    .section-header {
        margin-bottom: 1.15rem;
        text-align: left;
    }

    body {
        font-size: 15px;
        line-height: 1.55;
    }

    section {
        padding: 2.2rem 0;
    }

    .eyebrow {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }

    h1 {
        font-size: clamp(1.9rem, 7vw, 2.5rem);
        line-height: 1.12;
    }

    h2 {
        font-size: clamp(1.35rem, 5.4vw, 1.75rem);
        line-height: 1.15;
    }

    h3 {
        font-size: 1.05rem;
        line-height: 1.18;
    }

    .section-subtitle {
        font-size: 0.95rem;
        line-height: 1.45;
        max-width: 36ch;
    }

    .mission .section-header h2,
    .nutrition-funnel .section-header h2,
    .contact .section-header h2 {
        font-size: clamp(1.25rem, 5.6vw, 1.65rem);
        line-height: 1.2;
        letter-spacing: -0.01em;
    }

    .contact .section-header {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.78rem 1rem;
        font-size: 0.95rem;
    }

    .shorts .section-header h2 {
        font-size: clamp(1.45rem, 5.2vw, 1.9rem);
    }

    .shorts-grid {
        --shorts-gap: 0.85rem;
        overflow-x: auto;
        padding: 0.25rem 1rem 0.9rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .short-card {
        flex: 0 0 78%;
        min-width: 78%;
        scroll-snap-align: center;
    }
    .shorts-nav {
        display: none;
    }

    .short-thumbnail {
        height: 255px;
        aspect-ratio: auto;
        border-radius: var(--radius-md);
    }

    .short-info {
        padding: 0.7rem 0.8rem 0.95rem;
    }

    .short-title {
        -webkit-line-clamp: 3;
    }

    .mission .mission-layout {
        display: block;
    }

    .mission .mission-right {
        display: block;
    }

    .mission .mission-right .offer-save-card {
        margin-top: 0;
    }

    .mission .mission-left .resource-card,
    .mission .mission-right .resource-card {
        padding: 0.95rem;
        border-radius: 14px;
    }

    .mission .mission-right .offer-save-card .card-top {
        margin-bottom: 0.65rem;
    }

    .mission .mission-right .offer-save-card .card-top h3 {
        margin-top: 0.1rem;
    }

    .mission .intake-form {
        gap: 0.65rem;
        margin-top: 0.65rem;
    }

    .mission .intake-q {
        font-size: 1rem;
        line-height: 1.35;
    }

    .mission .intake-helper {
        font-size: 0.9rem;
    }

    .mission .intake-check {
        padding: 0.7rem 0.75rem;
        border-radius: 12px;
    }

    .mission .intake-check .intake-text {
        font-size: 0.95rem;
    }

    .mission .offer-card-all .offer-list {
        display: none;
    }

    .mission .offer-card-all .card-top p {
        margin-top: 0.3rem;
    }

    .mission .offer-card-all .card-top + .offer-divider {
        display: none;
    }

    .mission .offer-card-all .offer-tier {
        padding: 0.85rem 0.9rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background:
            linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    }

    .mission .offer-card-all .offer-divider {
        height: 0;
        margin: 0.7rem 0;
        border-top: 1px solid var(--line);
        background: none;
        opacity: 1;
    }

    .mission .offer-card-all .offer-tier p {
        margin-top: 0.35rem;
    }

    .mission .offer-list {
        margin-top: 0.6rem;
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .mission .offer-list li {
        margin: 0.32rem 0;
    }

    .mission .offer-includes {
        margin-top: 0.75rem;
        font-size: 0.85rem;
    }

    .mission .offer-divider {
        margin: 1rem 0;
    }

    .mission .offer-trust {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .mission .intake-options {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .mission .intake-group[data-pipeline="free_tools"],
    .mission .intake-group[data-pipeline="diy"],
    .mission .intake-group[data-pipeline="done_for_you"] {
        grid-column: auto;
        grid-row: auto;
    }

    .mission .intake-check {
        padding: 0.66rem 0.72rem;
        font-size: 0.88rem;
        gap: 0.5rem;
        border-radius: 12px;
    }

    .mission .intake-check input[type="checkbox"],
    .mission .intake-check input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    .mission .intake-check .intake-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mission .intake-choice-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .mission .intake-fields label {
        font-size: 0.88rem;
    }

    .mission .intake-fields {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        margin-top: 0.2rem;
    }

    .mission .intake-fields label:nth-child(3),
    .mission .intake-fields label:nth-child(4) {
        grid-column: 1 / -1;
    }

    .mission .intake-submit-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .mission .intake-form.is-step-1 .intake-step-2,
    .mission .intake-form.is-step-2 .intake-step-1 {
        display: none;
    }

    .mission .intake-fields input,
    .mission .intake-book-form input,
    .mission .intake-book-form select {
        padding: 0.68rem 0.8rem;
        font-size: 0.95rem;
    }

    .mission .intake-optin {
        padding: 0.65rem 0.72rem;
        font-size: 0.88rem;
    }

    .mission .intake-optin input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .mission .intake-legal {
        font-size: 0.85rem;
    }

    .nutrition-funnel .ns-card {
        padding: 1.1rem;
        border-radius: 14px;
    }

    .nutrition-funnel .ns-card h3 {
        font-size: 1.08rem;
    }

    .ns-summary-grid {
        gap: 0.95rem;
    }

    .ns-results {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ns-result-card {
        padding: 0.9rem;
        border-radius: 14px;
    }

    .ns-result-card h3 {
        font-size: 1.4rem;
        line-height: 1.15;
    }

    .ns-results .ns-list {
        padding-left: 1rem;
        margin: 0.45rem 0 !important;
        font-size: 0.92rem !important;
        gap: 0.3rem;
    }

    .ns-info.small {
        font-size: 0.9rem;
    }

    .ns-macros {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        margin-top: 0.65rem;
    }

    .ns-macro-card {
        padding: 0.85rem 0.95rem;
        border-radius: 14px;
    }

    .ns-handoff-headline {
        font-size: 1.25rem;
    }

    .ns-handoff-sub {
        font-size: 0.95rem;
    }

    .ns-video-card {
        border-radius: 16px;
        padding: 1rem;
    }

    .ns-video-card.ns-next-box {
        padding: 1rem;
        gap: 0.75rem;
    }

    .ns-next-kicker {
        font-size: 0.72rem;
    }

    .ns-next-typed {
        font-size: 1.05rem;
    }

    .ns-button-grid,
    .ns-icon-grid {
        grid-template-columns: 1fr;
    }

    .ns-pill,
    .ns-icon-pill {
        padding: 0.82rem 0.9rem;
        font-size: 0.95rem;
    }

    .ns-field {
        font-size: 0.92rem;
    }

    .contact-social {
        padding: 1.2rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .social-link {
        justify-content: flex-start;
    }

    .footer {
        padding: 2.2rem 0 2.4rem;
    }

    .footer-content {
        gap: 0.85rem;
    }

    .resources-grid,
    .contact-wrapper,
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 0.9rem !important;
    }

    .footer-section {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 0.95rem 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }

    .footer-section ul {
        margin: 0.4rem 0 0;
        padding: 0;
        list-style: none;
        display: grid;
        gap: 0.35rem;
    }

    :root[data-theme="light"] .footer-section {
        background: rgba(255, 255, 255, 0.9);
    }

    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.92rem;
    }

    .footer-bottom {
        margin-top: 0.85rem;
        font-size: 0.85rem;
    }

    .resource-card {
        padding: 0.95rem;
        border-radius: 14px;
    }

    .offer-tier .offer-list {
        display: none;
    }

    .offer-tier h3 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .offer-tier h3::after {
        content: '›';
        color: var(--muted);
        opacity: 0.75;
        font-size: 1.1rem;
        transform: translateY(-1px);
    }
}

/* Testimonials */
.testimonials {
    background: linear-gradient(180deg, rgba(197, 141, 79, 0.07), transparent);
}

:root[data-theme="light"] .testimonials {
    background: linear-gradient(180deg, rgba(231, 163, 77, 0.14), transparent);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.testimonial-card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.testimonial-text {
    color: var(--ink);
    margin-bottom: 0.7rem;
    font-style: italic;
}

.testimonial-author {
    color: var(--muted);
    font-weight: 600;
}

/* Contact */
.contact {
    background: var(--bg);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.5rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-family: var(--font-body);
}

.form-group textarea {
    min-height: 140px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.contact-social {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(197, 141, 79, 0.25);
    background: radial-gradient(circle at 15% 20%, rgba(197, 141, 79, 0.12), transparent 50%), rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    height: fit-content;
    position: relative;
    overflow: hidden;
}

.contact-social::after {
    content: '';
    position: absolute;
    inset: -20% auto auto 40%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(197, 141, 79, 0.14), transparent 70%);
    pointer-events: none;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.social-link {
    color: var(--ink);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 600;
    transition: var(--transition);
}

.social-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(197, 141, 79, 0.18);
}

.social-dot.youtube { background: #ff4444; box-shadow: 0 0 0 5px rgba(255, 68, 68, 0.15); }
.social-dot.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); box-shadow: 0 0 0 5px rgba(221, 42, 123, 0.18); }
.social-dot.linkedin { background: #0a66c2; box-shadow: 0 0 0 5px rgba(10, 102, 194, 0.18); }
.social-dot.tiktok { background: #00f2ea; box-shadow: 0 0 0 5px rgba(0, 242, 234, 0.18); }

.social-link:hover {
    color: #0c0a08;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(197, 141, 79, 0.35);
}

:root[data-theme="light"] .social-link {
    background: #fffaf4;
    border: 1px solid rgba(230, 160, 40, 0.45);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    color: #2b2014;
}
:root[data-theme="light"] .social-link:hover {
    background: linear-gradient(140deg, rgba(246,199,98,0.24), #ffffff);
    border-color: rgba(230, 160, 40, 0.75);
    box-shadow: 0 12px 22px rgba(229,170,60,0.22);
    color: #2b2014;
}

/* Footer */
.footer {
    background: #080705;
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
}

:root[data-theme="light"] .footer {
    background: #f0ebe4;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    margin-bottom: 0.6rem;
}

.footer-section p,
.footer-section a {
    color: var(--muted);
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 30;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-subtitle {
    margin: 0.4rem 0 1rem;
}

/* Grocery Gate Modal Overlay */
.ns-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 999;
}

.ns-modal-overlay.hidden {
    display: none;
}

.ns-modal {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
}

.ns-modal h3 {
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
    color: var(--ink);
}

.ns-modal p {
    margin: 0 0 1.8rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Grocery Start Modal Enhancements */
.ns-modal-grocery {
    padding: 2rem 2.5rem 2rem;
}

.ns-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.ns-modal-close:hover {
    color: var(--ink);
}

.ns-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.ns-modal-subtitle {
    margin: 0 0 1.25rem 0 !important;
    font-size: 1rem !important;
    color: var(--muted);
}

.ns-modal-macros {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ns-modal-macro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.ns-modal-macro-icon {
    font-size: 1.75rem;
}

.ns-modal-macro-label {
    font-size: 0.85rem;
    color: var(--ink);
    font-weight: 500;
}

.ns-modal-info {
    margin: 0 0 1.5rem 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5;
}

.ns-modal-free {
    margin: 1rem 0 0 0 !important;
    font-size: 0.8rem !important;
    color: var(--muted);
    opacity: 0.7;
}

.builder-form {
    display: grid;
    gap: 0.9rem;
}

.builder-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--ink);
}

.builder-form select {
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
}

.builder-output {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    min-height: 120px;
}

.builder-output .plan {
    display: grid;
    gap: 0.6rem;
}

.placeholder {
    color: var(--muted);
}

/* Reveal animation */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        right: 1.25rem;
        left: 1.25rem;
        background: #141311;
        padding: 1rem 1.25rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, opacity 0.25s ease;
        opacity: 0;
        display: none;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    }

    .nav-menu.active {
        max-height: 320px;
        opacity: 1;
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .capture-form {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    section {
        padding: 3.5rem 0;
    }

    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .card-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .hero {
        padding-top: 4.5rem;
    }
}

/* Left control center */
:root {
    --control-width: clamp(240px, 22vw, 320px);
    --control-collapsed-width: 90px;
    --control-offset-collapsed: 70px;
    --control-padding: 0.35rem 0.95rem 1.1rem;
    --control-padding-collapsed: 1rem 0.7rem 1.1rem;
    --control-gap: 0.6rem;
    --control-section-gap: 0.4rem;
    --control-section-space: 0.65rem;
    --control-section-first-space: 0;
    --control-icon-gap-collapsed: 0.75rem;
    --control-transition: 180ms ease;
    --control-accent: #c9a35a;
    --control-accent-soft: rgba(201, 163, 90, 0.16);
}




.control-panel {
    /* Force the control panel to always use the dark palette, regardless of site theme. */
    --panel: #1e1e1c;
    --card: #2a2926;
    --ink: #edeae4;
    --muted: rgba(237, 234, 228, 0.68);
    --line: rgba(237, 234, 228, 0.10);
    --accent: var(--control-accent);
    --accent-soft: var(--control-accent-soft);

    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    left: 0;
    width: var(--control-width);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.14)),
        var(--panel);
    border-right: 0;
    box-shadow: inset -1px 0 0 rgba(237, 234, 228, 0.06);
    backdrop-filter: blur(6px);
    transition: width 200ms ease, background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
    z-index: 60;
    padding: var(--control-padding);
    display: flex;
    flex-direction: column;
    gap: var(--control-gap);
    align-items: stretch;
    max-width: 90vw;
    overflow-y: auto;
}

.control-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 16px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(237, 234, 228, 0.10), rgba(237, 234, 228, 0));
    opacity: 0.28;
}

.control-panel.open {
    width: var(--control-width);
    box-shadow: inset -1px 0 0 rgba(237, 234, 228, 0.06);
}

.control-panel.collapsed {
    width: var(--control-collapsed-width);
    padding: var(--control-padding-collapsed);
}

.control-panel.collapsed .text { display: none; }
.control-panel.collapsed .control-link,
.control-panel.collapsed .side-link-btn {
    justify-content: center;
    gap: var(--control-icon-gap-collapsed);
    margin-top: 0;
}
.control-panel.collapsed .control-search,
.control-panel.collapsed .section-label,
.control-panel.collapsed .brand-mini {
    display: none;
}
.control-panel.collapsed .control-panel-header {
    margin-bottom: var(--control-offset-collapsed);
}

.control-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.1rem 0.3rem 0;
}

.control-close {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--ink);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background var(--control-transition), border-color var(--control-transition), transform var(--control-transition);
}

.control-close:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(237, 234, 228, 0.16);
    transform: translateY(-1px);
}

.control-search { margin-bottom: 0.35rem; }

.control-search input {
    width: 100%;
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.05);
    color: var(--ink);
    font-weight: 600;
    transition: border-color var(--control-transition), background var(--control-transition), outline-color var(--control-transition);
}

.control-search input:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: var(--control-section-gap);
}
.control-section:first-of-type { margin-top: var(--control-section-first-space); }
.control-section + .control-section { margin-top: var(--control-section-space); }
.control-panel:not(.collapsed) .control-section:nth-of-type(2) {
    margin-top: 0;
}

/* Training uses the control panel as a true sidebar. */
.training-page .control-panel:not(.collapsed) .control-section:nth-of-type(2) {
    margin-top: 0;
}

.section-label {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--muted);
}

.control-link,
.side-link-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    color: var(--ink);
    border: 1px solid rgba(237, 234, 228, 0.10);
    background: var(--card);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    position: relative;
    overflow: hidden;
    text-align: left;
    cursor: pointer;
    font-weight: 650;
    opacity: 0.86;
    transition: transform var(--control-transition), background var(--control-transition), border-color var(--control-transition), box-shadow var(--control-transition);
    transform: translateZ(0);
}

.control-link.is-locked {
    opacity: 0.85;
    cursor: not-allowed;
}

.control-link.is-locked:hover {
    transform: none;
    background: var(--card);
    border-color: rgba(237, 234, 228, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.control-link .control-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 650;
    color: var(--muted);
    margin-top: 0.1rem;
    letter-spacing: 0.02em;
}

.coming-soon-link {
    opacity: 0.6;
    cursor: not-allowed;
}

.control-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    border: 1px solid rgba(237, 234, 228, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(237, 234, 228, 0.86);
    white-space: nowrap;
}

.trial-badge {
    position: fixed;
    top: calc(var(--navbar-height) + 10px);
    right: 14px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(230, 160, 40, 0.55);
    background: linear-gradient(135deg, rgba(246, 199, 98, 0.22), rgba(255, 255, 255, 0.06));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    color: rgba(255, 246, 229, 0.96);
    font-weight: 850;
    letter-spacing: 0.02em;
    font-size: 0.78rem;
    white-space: nowrap;
    pointer-events: none;
}

:root[data-theme="light"] .trial-badge {
    color: rgba(55, 35, 20, 0.95);
    background: linear-gradient(135deg, rgba(246, 199, 98, 0.45), rgba(255, 255, 255, 0.85));
    border-color: rgba(230, 160, 40, 0.7);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.10);
}

@media (max-width: 520px) {
    .trial-badge {
        right: 10px;
        top: calc(var(--navbar-height) + 8px);
        font-size: 0.74rem;
        padding: 0.34rem 0.55rem;
    }
}
.control-link:hover,
.side-link-btn:hover {
    transform: translateY(-1px);
    background: rgba(49, 48, 44, 1);
    border-color: rgba(237, 234, 228, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    opacity: 1;
}

.control-link .icon,
.side-link-btn .icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    border: 1px solid rgba(237, 234, 228, 0.12);
    background: rgba(0, 0, 0, 0.10);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    transition: border-color var(--control-transition), background var(--control-transition), color var(--control-transition);
}

.control-link svg,
.side-link-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: color var(--control-transition), transform var(--control-transition);
}

.control-link::before,
.side-link-btn::before {
    content: '';
    position: absolute;
    inset: -28%;
    background: radial-gradient(120% 110% at 12% 10%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0) 58%);
    filter: blur(12px);
    opacity: 0;
    z-index: 0;
    transition: opacity var(--control-transition);
}

.control-link:hover::before,
.side-link-btn:hover::before {
    opacity: 0.28;
}

.control-link > *,
.side-link-btn > * {
    position: relative;
    z-index: 1;
}

.control-link:active,
.side-link-btn:active {
    transform: translateY(0px);
    border-color: rgba(237, 234, 228, 0.22);
}

.control-link.active,
.side-link-btn.active,
.control-link[aria-current="true"],
.side-link-btn[aria-current="true"] {
    background:
        rgba(52, 51, 47, 1);
    border-color: rgba(237, 234, 228, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    opacity: 1;
}
.control-link.active::before,
.side-link-btn.active::before,
.control-link[aria-current="true"]::before,
.side-link-btn[aria-current="true"]::before {
    opacity: 0.40;
}
.control-link.active .icon,
.side-link-btn.active .icon,
.control-link[aria-current="true"] .icon,
.side-link-btn[aria-current="true"] .icon {
    color: var(--accent);
    border-color: rgba(201, 163, 90, 0.35);
    background: rgba(201, 163, 90, 0.10);
}

@media (max-width: 640px) {
    :root {
        --control-width: 78vw;
        --control-section-gap: 0.35rem;
        --control-section-space: 0.5rem;
    }

    .control-panel {
        width: var(--control-width);
        padding: 0.4rem 0.6rem 0.9rem;
        border-right: 1px solid rgba(237, 234, 228, 0.08);
        box-shadow: inset -1px 0 0 rgba(237, 234, 228, 0.06), 12px 0 30px rgba(0, 0, 0, 0.25);
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
        transition: transform 220ms ease, opacity 220ms ease;
    }

    .control-panel.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .control-panel-header {
        padding: 0.35rem 0.25rem;
    }

    .section-label {
        font-size: 0.7rem;
        letter-spacing: 0.06em;
    }

    .control-link,
    .side-link-btn {
        padding: 0.55rem 0.6rem;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .control-link .icon,
    .side-link-btn .icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .control-link svg,
    .side-link-btn svg {
        width: 16px;
        height: 16px;
    }
}

.control-link.active::after,
.side-link-btn.active::after,
.control-link[aria-current="true"]::after,
.side-link-btn[aria-current="true"]::after {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    z-index: 1;
}

.control-pill-row {
    display: flex;
    padding-left: 0.2rem;
    margin-top: 0.2rem;
}

.control-pill-row .control-checkin-pill {
    width: 100%;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.control-pill-row .control-checkin-pill:hover {
    transform: translateY(-1px);
}

.control-pill-row .control-checkin-pill:active {
    transform: translateY(0);
}

.control-panel.collapsed .control-pill-row {
    padding-left: 0;
    margin-top: 0;
}

.control-panel.collapsed .control-pill-row .control-checkin-pill {
    width: 100%;
    justify-content: center;
}

.control-pill {
    appearance: none;
    border: 1px solid rgba(231, 163, 77, 0.35);
    background: rgba(231, 163, 77, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    letter-spacing: -0.01em;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

:root[data-theme="light"] .control-pill {
    color: rgba(25, 18, 12, 0.9);
    border-color: rgba(231, 163, 77, 0.45);
    background: rgba(231, 163, 77, 0.10);
}

.control-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(231, 163, 77, 0.65);
    background: rgba(231, 163, 77, 0.18);
}

.control-pill:active {
    transform: translateY(0px);
}

.checkin-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1000;
}

.checkin-meal-modal {
    z-index: 1100;
}

.checkin-modal.hidden {
    display: none;
}

.checkin-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.checkin-card {
    position: relative;
    width: min(980px, calc(100vw - 28px));
    max-height: min(82vh, 780px);
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 12, 10, 0.88);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    padding: 16px;
}

.dash-checkin-card {
    background:
        radial-gradient(1100px 520px at 18% 0%, rgba(231, 163, 77, 0.22), rgba(0, 0, 0, 0)),
        radial-gradient(900px 480px at 90% 18%, rgba(34, 197, 94, 0.16), rgba(0, 0, 0, 0)),
        rgba(16, 12, 10, 0.90);
    border-color: rgba(231, 163, 77, 0.22);
}

:root[data-theme="light"] .dash-checkin-card {
    background:
        radial-gradient(980px 520px at 18% 0%, rgba(231, 163, 77, 0.18), rgba(255, 255, 255, 0)),
        radial-gradient(900px 480px at 90% 18%, rgba(34, 197, 94, 0.10), rgba(255, 255, 255, 0)),
        rgba(255, 255, 255, 0.94);
    border-color: rgba(231, 163, 77, 0.30);
}

.dash-checkin-card .checkin-head {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

:root[data-theme="light"] .dash-checkin-card .checkin-head {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.meal-log-card {
    width: min(980px, calc(100vw - 28px));
    max-height: min(78vh, 720px);
}

.meal-log-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#cmm-skip {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.10);
}

#cmm-skip:hover {
    border-color: rgba(239, 68, 68, 0.55);
}

.meal-log-table {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    overflow-x: auto;
}

.meal-log-plan {
    margin-top: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .meal-log-plan {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.meal-log-plan-title {
    font-weight: 950;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.meal-log-plan-items {
    display: grid;
    gap: 8px;
}

.meal-log-plan-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .meal-log-plan-item {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.meal-log-plan-name {
    font-weight: 900;
    letter-spacing: -0.02em;
}

:root[data-theme="light"] .meal-log-table {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.meal-log-row {
    display: grid;
    grid-template-columns: 2.2fr 1.1fr 0.7fr 0.5fr 0.5fr 0.5fr 32px;
    gap: 8px;
    padding: 10px 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 820px;
}

:root[data-theme="light"] .meal-log-row {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.meal-log-row-head {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: -0.01em;
    opacity: 0.8;
    border-top: 0;
    background: rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] .meal-log-row-head {
    background: rgba(255, 255, 255, 0.65);
}

.meal-log-input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.92);
    padding: 10px 10px;
    font-weight: 750;
    font-size: 13px;
}

:root[data-theme="light"] .meal-log-input {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

.meal-log-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

:root[data-theme="light"] .meal-log-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.meal-log-del {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-weight: 900;
    display: grid;
    place-items: center;
}

:root[data-theme="light"] .meal-log-del {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    color: rgba(0, 0, 0, 0.72);
}

.meal-log-del:hover {
    transform: translateY(-1px);
    border-color: rgba(239, 68, 68, 0.35);
}

.meal-log-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Progress photos (shared) */
.pp-card {
    width: min(1040px, calc(100vw - 28px));
}

.pp-tabs {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .pp-tabs {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.pp-tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    border-radius: 14px;
    padding: 10px 8px;
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: 12px;
    cursor: pointer;
}

:root[data-theme="light"] .pp-tab {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.pp-tab.active {
    border-color: rgba(231, 163, 77, 0.65);
    background: rgba(231, 163, 77, 0.10);
}

.pp-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 14px;
    align-items: start;
}

.pp-preview {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    position: relative;
    min-height: 340px;
    display: grid;
    place-items: center;
}

:root[data-theme="light"] .pp-preview {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.pp-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: rgba(0, 0, 0, 0.20);
}

.pp-preview img.hidden { display: none; }

.pp-preview-empty {
    padding: 18px;
    text-align: center;
}

.pp-preview-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.pp-preview-sub { margin-top: 6px; font-size: 12px; }

.pp-preview-meta {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.38);
    font-size: 12px;
    font-weight: 850;
}

:root[data-theme="light"] .pp-preview-meta {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.pp-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pp-tip {
    margin-top: 12px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.02);
}

:root[data-theme="light"] .pp-tip {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.pp-tip-title { font-weight: 950; letter-spacing: -0.02em; }

.pp-tip-sub { margin-top: 6px; font-size: 12px; }

.pp-tip-images {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pp-tip-images img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] .pp-tip-images img {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.04);
}

.pp-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 2px;
}

.pp-list-title { font-weight: 950; letter-spacing: -0.02em; }

.pp-list {
    display: grid;
    gap: 8px;
    max-height: 560px;
    overflow: auto;
    padding-right: 2px;
}

.pp-item {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    text-align: left;
}

:root[data-theme="light"] .pp-item {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.pp-item img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    flex: none;
}

.pp-item-day { font-weight: 900; letter-spacing: -0.02em; }
.pp-item-pose { margin-top: 2px; font-size: 12px; opacity: 0.78; }

/* Progress photos gallery (Overview "View all") */
.ppg-card {
    width: min(980px, calc(100vw - 28px));
}

.ppg-list {
    margin-top: 12px;
    display: grid;
    gap: 12px;
    max-height: min(70vh, 720px);
    overflow: auto;
    padding-right: 2px;
}

.ppg-day {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
}

:root[data-theme="light"] .ppg-day {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.01);
}

.ppg-day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}

.ppg-day-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.ppg-day-sub {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.78;
    white-space: nowrap;
}

.ppg-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ppg-thumb {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 8px;
    cursor: pointer;
    text-align: left;
    color: inherit;
    overflow: hidden;
    position: relative;
    min-height: 180px;
}

:root[data-theme="light"] .ppg-thumb {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.ppg-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    display: block;
}

:root[data-theme="light"] .ppg-thumb img {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.04);
}

.ppg-thumb-meta {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.38);
    font-size: 12px;
    font-weight: 850;
}

:root[data-theme="light"] .ppg-thumb-meta {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.78);
}

.ppg-thumb-empty {
    display: grid;
    place-items: center;
    min-height: 220px;
}

.ppg-thumb-label {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.ppg-thumb-sub {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 750;
}

.ppg-empty {
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    padding: 14px;
    text-align: center;
}

:root[data-theme="light"] .ppg-empty {
    border-color: rgba(0, 0, 0, 0.14);
    background: rgba(0, 0, 0, 0.01);
}

.ppg-empty-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.ppg-empty-sub {
    margin-top: 6px;
    font-size: 12px;
}

@media (max-width: 720px) {
    .ppg-grid { grid-template-columns: 1fr; }
    .ppg-thumb img { height: 260px; }
}

.pc-card { width: min(980px, calc(100vw - 28px)); }

.pc-controls {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.pc-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pc-slot {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

:root[data-theme="light"] .pc-slot {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.pc-label {
    padding: 10px 12px;
    font-weight: 950;
    letter-spacing: -0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .pc-label {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.pc-slot img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    display: block;
    background: rgba(0, 0, 0, 0.20);
}

@media (max-width: 880px) {
    .pp-grid { grid-template-columns: 1fr; }
    .pp-list { max-height: 240px; }
    .pc-controls { grid-template-columns: 1fr; }
    .pc-grid { grid-template-columns: 1fr; }
    .pc-slot img { height: 360px; }
}

/* Avatar cropper (shared) */
.avatar-cropper {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1200;
}

.avatar-cropper.hidden { display: none; }

.avatar-cropper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
}

.avatar-cropper-card {
    position: relative;
    width: min(560px, calc(100vw - 28px));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 12, 10, 0.92);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    padding: 16px;
}

html[data-theme="light"] .avatar-cropper-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.10);
}

.avatar-cropper-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.avatar-cropper-title {
    font-weight: 900;
    letter-spacing: -0.03em;
}

.avatar-cropper-sub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.78;
}

.avatar-cropper-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 6px 8px;
    border-radius: 12px;
}

.avatar-cropper-close:hover {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .avatar-cropper-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.avatar-cropper-body { margin-top: 12px; }

.avatar-cropper-viewport {
    --crop-v: 320px;
    width: var(--crop-v);
    height: var(--crop-v);
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    touch-action: none;
    cursor: grab;
}

.avatar-cropper-viewport.is-dragging { cursor: grabbing; }

html[data-theme="light"] .avatar-cropper-viewport {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.06);
}

.avatar-cropper-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(0, 0) scale(1);
    will-change: transform;
    translate: -50% -50%;
    user-select: none;
    -webkit-user-drag: none;
}

.avatar-cropper-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(0, 255, 170, 0.22), inset 0 0 0 999px rgba(0,0,0,0.16);
}

.avatar-cropper-controls {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.avatar-cropper-zoom {
    display: grid;
    gap: 8px;
}

.avatar-cropper-zoom input[type="range"] {
    width: 100%;
}

.avatar-cropper-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

:root[data-theme="light"] .checkin-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.10);
}

.checkin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.checkin-title {
    margin: 0;
    letter-spacing: -0.03em;
}

.checkin-sub {
    margin: 0.35rem 0 0;
    font-size: 12px;
    opacity: 0.78;
}

.checkin-close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    padding: 6px 8px;
}

.checkin-close:hover { opacity: 1; }

.checkin-alert {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(231, 163, 77, 0.35);
    background: rgba(231, 163, 77, 0.12);
    font-size: 12px;
    line-height: 1.25;
}

.checkin-alert.hidden { display: none; }

/* Custom foods + custom macros (reuse check-in modal base) */
.foods-card {
    padding: 16px;
}

.foods-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 14px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .foods-grid {
        grid-template-columns: 1fr;
    }
}

.foods-section-title {
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 6px 4px 10px;
}

.foods-list {
    display: grid;
    gap: 10px;
    padding: 0 4px 8px;
}

.foods-form {
    display: grid;
    gap: 10px;
}

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

@media (max-width: 700px) {
    .foods-row {
        grid-template-columns: 1fr;
    }
}

.foods-image-preview-wrap {
    padding: 0 4px;
}

.foods-image-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .foods-image-preview {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.foods-image-preview.hidden {
    display: none;
}

.foods-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 2px 4px 0;
}

.foods-tip {
    padding: 0 4px;
}

.checkin-card .food-source-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

:root[data-theme="light"] .checkin-card .food-source-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.10);
}

.checkin-card .food-source-thumb {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .checkin-card .food-source-thumb {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.macro-card {
    width: min(720px, calc(100vw - 28px));
}

.macro-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.checkin-progress {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

:root[data-theme="light"] .checkin-progress {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.checkin-progress-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkin-meals-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkin-meal-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkin-meal-btn {
    border-radius: 18px;
    padding: 12px;
    min-height: 108px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
    font-weight: 900;
}

:root[data-theme="light"] .checkin-meal-btn {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.checkin-meal-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(231, 163, 77, 0.45);
}

.checkin-meal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkin-meal-label {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.checkin-meal-badge {
    font-size: 11px;
    font-weight: 950;
    letter-spacing: -0.02em;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(231, 163, 77, 0.35);
    background: rgba(231, 163, 77, 0.10);
}

:root[data-theme="light"] .checkin-meal-badge {
    border-color: rgba(231, 163, 77, 0.45);
    background: rgba(231, 163, 77, 0.10);
}

.checkin-meal-btn.done {
    border-color: rgba(34, 197, 94, 0.45);
    background:
        radial-gradient(460px 140px at 20% 0%, rgba(34, 197, 94, 0.18), rgba(0, 0, 0, 0)),
        rgba(34, 197, 94, 0.10);
}

.checkin-meal-btn.done .checkin-meal-badge {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.16);
}

.checkin-meal-editor {
    margin-top: 10px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .checkin-meal-editor {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.checkin-meal-editor.hidden {
    display: none;
}

.checkin-meal-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.checkin-meal-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.checkin-meal-planned {
    white-space: pre-line;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.92;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .checkin-meal-planned {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.65);
}

.checkin-card textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.92);
    padding: 10px 10px;
    font-weight: 700;
    resize: vertical;
}

:root[data-theme="light"] .checkin-card textarea {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

.checkin-meal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.checkin-progress-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
}

:root[data-theme="light"] .checkin-progress-dots .dot {
    background: rgba(0, 0, 0, 0.18);
}

.checkin-progress-dots .dot.active {
    background: rgba(231, 163, 77, 0.90);
}

.checkin-flow {
    margin-top: 12px;
}

.checkin-date-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: 0;
}

.checkin-weekbar {
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .checkin-weekbar {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.checkin-weekbar-top {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
}

.checkin-day-nav {
    padding: 6px 10px;
    line-height: 1;
    min-width: 42px;
}

.checkin-weekbar-center {
    min-width: 0;
}

.checkin-selected {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.checkin-weekmeta {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.78;
}

.checkin-lock {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(231, 163, 77, 0.95);
}

.checkin-lock.hidden {
    display: none;
}

.checkin-weekbar-days {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.checkin-tabs {
    margin-top: 10px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

:root[data-theme="light"] .checkin-tabs {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.checkin-tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    border-radius: 14px;
    padding: 10px 8px;
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: 12px;
    cursor: pointer;
}

:root[data-theme="light"] .checkin-tab {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.checkin-tab:hover {
    border-color: rgba(231, 163, 77, 0.45);
}

.checkin-tab.active {
    border-color: rgba(231, 163, 77, 0.65);
    background: linear-gradient(135deg, rgba(231, 163, 77, 0.18), rgba(34, 197, 94, 0.10));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.checkin-day {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    border-radius: 14px;
    padding: 8px 6px;
    cursor: pointer;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 12px;
    line-height: 1.1;
}

:root[data-theme="light"] .checkin-day {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.checkin-day:hover {
    border-color: rgba(231, 163, 77, 0.45);
}

.checkin-day.active {
    border-color: rgba(231, 163, 77, 0.65);
    background: rgba(231, 163, 77, 0.10);
}

.checkin-day .dow {
    opacity: 0.80;
    font-weight: 700;
    font-size: 11px;
}

.checkin-day .dom {
    font-weight: 800;
}

.checkin-day.locked {
    opacity: 0.55;
}

.checkin-day:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checkin-step-title {
    margin: 0 0 4px;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.checkin-step-sub {
    margin: 0 0 10px;
    font-size: 12px;
    opacity: 0.78;
}

.checkin-step {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .checkin-step {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.checkin-step-hidden {
    display: none;
}

.checkin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.checkin-pp-field .btn {
    width: 100%;
    margin-top: 8px;
}

.checkin-meals-field {
    grid-column: 1 / -1;
}

#checkin-mealprep-note-wrap,
#checkin-mood-note-wrap {
    grid-column: 1 / -1;
}

.checkin-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.checkin-actions-left,
.checkin-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.checkin-btn-hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .checkin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .checkin-grid { grid-template-columns: 1fr; }
    .checkin-day { padding: 8px 4px; }
    .checkin-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}




.calendar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.18rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2b2014;
}

.calendar-toggle input {
    accent-color: #1b120c;
}

/* ============================================
   MODERN VISUAL ENHANCEMENTS
   ============================================ */

/* Enhanced Plan Page Header */
.plan-top h1 {
    background: linear-gradient(135deg, #1a1612 0%, #3a2c1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Enhanced Summary Bar */
.plan-summary-bar {
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.summary-item .value {
    background: linear-gradient(135deg, #f5a623 0%, #d4860c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Grocery Card Hover */
.grocery-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.03) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Subtle animation on grocery grid */
.grocery-items-grid {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Enhanced Price Display */
.grocery-total-cost {
    position: relative;
    overflow: hidden;
}

.grocery-total-cost::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245,166,35,0.1) 0%, transparent 50%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* Modern Card Shadows on Hover */
.plan-card:hover {
    box-shadow: 0 24px 48px rgba(0,0,0,0.1);
}

/* Enhanced Meal Cards */
.meal-card {
    transition: all 0.3s ease;
}

.meal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* Better Focus States */
.grocery-card:focus-within {
    outline: 2px solid #f5a623;
    outline-offset: 2px;
}

/* Improved Button Styles */
.cart-button {
    background: linear-gradient(135deg, #f5a623 0%, #e89b1c 100%);
    transition: all 0.3s ease;
}

.cart-button:hover {
    background: linear-gradient(135deg, #e89b1c 0%, #d4860c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,166,35,0.3);
}

/* Pill Badge Enhancement */
.pill {
    background: linear-gradient(135deg, #f5a623 0%, #e89b1c 100%);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245,166,35,0.25);
}

/* ============================================
   MACRO TRACKING ESSENTIALS SECTION
   ============================================ */

.essentials-section {
    margin-top: 1rem;
}

.essentials-subtitle {
    color: #6d5c4d;
    font-size: 0.95rem;
    margin: 0 0 1.2rem 0;
}

.essentials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Supplements section uses horizontal cards (image left, info right). */
#supplement-shop .essentials-grid {
    grid-template-columns: 1fr;
}

.essential-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.essential-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.essential-image {
    height: 120px;
    background: #faf8f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
}

.essential-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.supplement-card {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.supplement-card .essential-image {
    width: 240px;
    height: auto;
    min-height: 200px;
    padding: 0;
    border-right: 1px solid rgba(0,0,0,0.06);
}

.supplement-card .image-carousel {
    height: 200px; /* ensure the carousel has a real height in horizontal layout */
    border-radius: 12px 0 0 12px;
}

.supplement-card .carousel-track {
    height: 200px;
}

.supplement-card .carousel-track img {
    height: 200px;
    background: #ffffff;
    mix-blend-mode: normal; /* product images were getting washed out */
}

.supplement-card .essential-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.supplement-card .essential-cta {
    margin-top: auto;
}

.supplement-card .essential-desc {
    margin-bottom: 0;
}

.supplement-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.supplement-buy-row .essential-meta {
    margin-bottom: 0;
    gap: 0.6rem;
}

.supplement-buy-row .essential-cta {
    width: auto;
    margin-top: 0;
    padding: 0.55rem 0.95rem;
    white-space: nowrap;
}

.supplement-footnote {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(93, 79, 67, 0.82);
    line-height: 1.35;
}

@media (max-width: 768px) {
    .supplement-card {
        flex-direction: column;
    }
    .supplement-card .essential-image {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .supplement-card .image-carousel {
        border-radius: 12px 12px 0 0;
    }
}

/* Encoding-safe override for the "no image" cart icon. */
.grocery-card-image.no-image::after {
    content: "\\1F6D2";
}

.essential-body {
    padding: 0.75rem 0.85rem;
}

.essential-body h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1b120c;
}

.essential-desc {
    margin: 0 0 0.55rem 0;
    font-size: 0.85rem;
    color: #6d5c4d;
    line-height: 1.4;
}

.essential-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.essential-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2e7d32;
}

.essential-qty {
    font-size: 0.8rem;
    color: #9d8a76;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.essential-shipping {
    font-size: 0.75rem;
    color: #2e7d32;
    font-weight: 600;
    background: rgba(46, 125, 50, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.essential-cta {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
}

/* CTA Attention Grabbing */
.cta-attention {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #f5efe6 0%, #fdf6eb 100%);
    border: 2px solid #c49a6c;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    height: 125px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(196, 154, 108, 0.15);
}

.cta-attention[data-mode="signedin"] {
    height: auto;
    padding: 1.1rem 1.25rem;
}

.cta-attention[data-mode="signedin"] .cta-signedin {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.cta-attention[data-mode="signedin"] .cta-signedin-head {
    min-width: 0;
}

.cta-attention[data-mode="signedin"] .cta-signedin-title {
    color: #1b120c;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.2;
}

.cta-attention[data-mode="signedin"] .cta-signedin-name {
    background: linear-gradient(180deg, transparent 60%, rgba(245, 166, 35, 0.35) 60%);
    padding: 0 0.25rem;
    border-radius: 6px;
}

.cta-attention[data-mode="signedin"] .cta-signedin-sub {
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

.cta-attention[data-mode="signedin"] .cta-signedin-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cta-attention[data-mode="signedin"] .cta-signedin-badge {
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(27, 18, 12, 0.08);
    color: rgba(27, 18, 12, 0.85);
    border: 1px solid rgba(27, 18, 12, 0.12);
}

/* Confirm modal (custom overlay replacing browser confirm) */
.ode-modal-open {
    overflow: hidden;
}

.ode-confirm-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 10050;
}

.ode-confirm-backdrop.hidden {
    display: none;
}

.ode-confirm-card {
    width: min(520px, 100%);
    border-radius: 16px;
    padding: 14px 14px 12px 14px;
    background: linear-gradient(135deg, #f5efe6 0%, #fff7ec 100%);
    border: 1px solid rgba(196, 154, 108, 0.45);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .ode-confirm-card {
    background: linear-gradient(135deg, #f5efe6 0%, #fff7ec 100%);
}

html:not([data-theme="light"]) .ode-confirm-card {
    background: linear-gradient(135deg, rgba(40, 34, 28, 0.98) 0%, rgba(28, 23, 18, 0.98) 100%);
    border-color: rgba(245, 166, 35, 0.22);
}

.ode-confirm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 4px 10px 4px;
}

.ode-confirm-title {
    font-size: 1.05rem;
    font-weight: 750;
    color: #1b120c;
}

html:not([data-theme="light"]) .ode-confirm-title {
    color: rgba(255, 255, 255, 0.92);
}

.ode-confirm-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(27, 18, 12, 0.14);
    background: rgba(255, 255, 255, 0.65);
    color: rgba(27, 18, 12, 0.8);
    cursor: pointer;
}

html:not([data-theme="light"]) .ode-confirm-close {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.ode-confirm-body {
    padding: 6px 6px 14px 6px;
    color: rgba(27, 18, 12, 0.9);
    font-size: 0.95rem;
    line-height: 1.35;
}

html:not([data-theme="light"]) .ode-confirm-body {
    color: rgba(255, 255, 255, 0.86);
}

.ode-confirm-line + .ode-confirm-line {
    margin-top: 8px;
}

.ode-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 6px 4px 6px;
}

.btn.btn-danger {
    background: #ef4444;
    border-color: rgba(0, 0, 0, 0.08);
}

.btn.btn-danger:hover {
    background: #dc2626;
}

.cta-attention-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, #c49a6c, transparent, #f5a623, transparent);
    animation: rotate-glow 4s linear infinite;
    opacity: 0.08;
}

/* Subtle "jump to CTA" highlight: accent the words (like cta-highlight), not a big glow box. */
.cta-attention.cta-jump .cta-attention-text strong {
    color: #1b120c;
    font-weight: 800;
    background: linear-gradient(180deg, transparent 60%, rgba(245, 166, 35, 0.35) 60%);
    padding: 0 0.2rem;
    border-radius: 6px;
}

.cta-attention.cta-jump .cta-attention-btn span {
    background: linear-gradient(180deg, transparent 60%, rgba(245, 166, 35, 0.35) 60%);
    padding: 0 0.2rem;
    border-radius: 6px;
}

.btn-glow-spin {
    position: relative;
    overflow: hidden;
}

.btn-glow-spin .btn-glow {
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: conic-gradient(from 0deg, transparent, #c49a6c, transparent, #f5a623, transparent);
    animation: rotate-glow 4s linear infinite;
    opacity: 0.16;
    pointer-events: none;
}

.btn-glow-spin .btn-label {
    position: relative;
    z-index: 1;
}

@keyframes rotate-glow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-attention-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.cta-attention-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #c49a6c, #f5a623);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-pulse {
    font-size: 1.5rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.cta-attention-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cta-attention-text strong {
    color: #1b120c;
    font-size: 1.1rem;
    font-weight: 700;
}

.cta-typewriter-wrap {
    display: inline-block;
    min-height: 1.3em;
}

.cta-typewriter {
    color: #6d5c4d;
    font-size: 0.9rem;
    border-right: 2px solid #c49a6c;
    padding-right: 2px;
    animation: blink-cursor 0.8s step-end infinite;
}

.cta-highlight {
    color: #1b120c;
    font-weight: 700;
    background: linear-gradient(180deg, transparent 60%, rgba(245, 166, 35, 0.3) 60%);
}

@keyframes blink-cursor {
    50% { border-color: transparent; }
}

.cta-attention-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.cta-attention-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-secondary-btn {
    background: transparent;
    color: #6d5c4d;
    border: 1px solid #c49a6c;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cta-secondary-btn:hover {
    background: rgba(196, 154, 108, 0.1);
    color: #1b120c;
}

.cta-attention-badge {
    background: linear-gradient(135deg, #f5a623, #e09000);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}

.cta-attention-btn {
    background: linear-gradient(135deg, #1b120c 0%, #2d1f15 100%);
    color: #fff;
    border: 2px solid #c49a6c;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(27, 18, 12, 0.15);
}

.cta-attention-btn svg {
    transition: transform 0.25s ease;
}

.cta-attention-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(27, 18, 12, 0.25);
}

.cta-attention-btn:hover svg {
    transform: translateX(4px);
}

.cta-attention-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .cta-attention {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 1.25rem;
    }
    
    .cta-attention-content {
        flex-direction: column;
    }
    
    .cta-attention-action {
        align-items: center;
        width: 100%;
    }
    
    .cta-attention-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-attention-btn,
    .cta-secondary-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .essentials-grid {
        grid-template-columns: 1fr;
    }
    
    .essential-image {
        height: 120px;
    }
    
    .grocery-intro {
        padding: 1rem;
    }
    
    .grocery-intro-desc {
        font-size: 0.85rem;
    }
    
    .grocery-month-summary {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    
    .month-info, .month-cost {
        text-align: center;
    }
}

/* Image Carousel */
.essential-image.has-carousel {
    padding: 0;
    position: relative;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-track img {
    width: calc(100% / 3);
    height: 140px;
    object-fit: contain;
    flex-shrink: 0;
    padding: 0.8rem;
    background: #f9f9f9;
    mix-blend-mode: multiply;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    z-index: 2;
    color: #1b120c;
    line-height: 1;
    padding-bottom: 2px;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dots .dot.active {
    background: #c49a6c;
    width: 16px;
    border-radius: 3px;
}

/* Supplement cards reuse the grocery-card link icon placement. */
.supplement-card .grocery-card-link {
    top: 0.6rem;
    right: 0.6rem;
}

@media (max-width: 768px) {
    .carousel-track img {
        height: 120px;
    }
}

/* ============================================
   BUDGET WARNING MODAL
   ============================================ */
.budget-warning-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.budget-warning-content {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.budget-warning-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #f59e0b;
    margin-bottom: 1rem;
    text-align: center;
}

.budget-warning-content .warning-text {
    color: var(--ink);
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

.budget-warning-content .tier-info {
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--muted);
}

.budget-warning-content .tier-info strong {
    color: var(--accent);
}

.warning-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.warning-options .btn {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.warning-options .btn-primary {
    background: var(--accent);
    color: #fff;
}

.warning-options .btn-primary:hover {
    background: var(--accent-strong);
}

.warning-options .btn-secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}

.warning-options .btn-secondary:hover {
    background: var(--accent-soft);
}

.warning-options .btn-warning {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.warning-options .btn-warning:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ============================================
   PRICE OVERRIDE SYSTEM
   ============================================ */
.price-adjustment-slider {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.price-adjustment-slider label {
    font-size: 0.875rem;
    color: var(--muted);
    white-space: nowrap;
}

.price-adjustment-slider input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.price-adjustment-value {
    font-weight: 600;
    color: var(--accent);
    min-width: 50px;
    text-align: right;
}

.per-item-override {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    cursor: pointer;
}

.per-item-override:hover {
    opacity: 1;
}

.per-item-override svg {
    width: 14px;
    height: 14px;
}

/* Mode display (read-only) */
.mode-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.mode-display .mode-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.mode-display .mode-value {
    font-weight: 600;
    color: var(--accent);
    text-transform: capitalize;
}

.mode-display .mode-reason {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
}

.advanced-override-toggle {
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
}

.advanced-override-toggle:hover {
    color: var(--accent);
}

/* ============================================
   STORE (AUTO STORE)
   ============================================ */

body.store-page {
    --accent: #e11d2e;
    --accent-strong: #b91c1c;
    --accent-soft: rgba(225, 29, 46, 0.16);
}

.store-page {
    background: #f6f6f6;
    color: #111;
}

.store-shell {
    padding-bottom: 4rem;
}

.store-promo-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.store-promo-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.store-promo-mid,
.store-promo-right {
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
}

.store-promo-mid:hover,
.store-promo-right:hover {
    color: var(--accent);
}

.store-masthead {
    padding: 1.25rem 0 0.9rem;
    background: radial-gradient(1200px 520px at 50% 0%, rgba(255,255,255,0.07), transparent 60%);
}

.store-masthead-inner {
    display: grid;
    grid-template-columns: 110px 220px 1fr 160px;
    align-items: center;
    gap: 1rem;
}

.store-brand {
    text-decoration: none;
    color: var(--ink);
    display: inline-flex;
    flex-direction: column;
    gap: 0.12rem;
}

.store-brand-mark {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.store-brand-sub {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.store-global-search {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(0,0,0,0.10);
}

:root[data-theme="light"] .store-global-search {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0,0,0,0.10);
}

.store-global-search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 0.9rem 3rem 0.9rem 1.05rem;
    font-size: 1rem;
    outline: none;
}

.store-global-search input::placeholder {
    color: rgba(255,255,255,0.55);
}

:root[data-theme="light"] .store-global-search input::placeholder {
    color: rgba(0,0,0,0.45);
}

.store-global-search-btn {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.store-global-search-btn:hover {
    background: var(--accent-strong);
}

.store-masthead-actions {
    display: flex;
    justify-content: flex-end;
}

.store-mast-link {
    text-decoration: none;
    color: var(--ink);
    font-weight: 900;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}

:root[data-theme="light"] .store-mast-link {
    border-color: rgba(0,0,0,0.10);
    background: rgba(0,0,0,0.02);
}

.store-linkbar {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.store-linkbar-inner {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    padding: 0.75rem 0;
    overflow-x: auto;
}

.store-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.01em;
    white-space: nowrap;
    padding: 0.3rem 0.15rem;
    border-bottom: 2px solid transparent;
}

.store-link:hover {
    color: var(--accent);
}

.store-icon-strip {
    padding: 1.25rem 0 0.25rem;
}

.store-icon-strip-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.store-icon-pill {
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    transition: var(--transition);
}

:root[data-theme="light"] .store-icon-pill {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.015);
}

.store-icon-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(225, 29, 46, 0.35);
    background: rgba(225, 29, 46, 0.06);
}

body.store-page .store-icon-circle {
    background: #e11d2e;
}

body.store-page .store-featured,
body.store-page .store-results,
body.store-page .store-checkout,
body.store-page .store-cart,
body.store-page .store-product {
    background: transparent;
}

body.store-page .store-section-head h2 {
    color: #0b0b0b;
}

body.store-page .ns-muted {
    color: rgba(0,0,0,0.62);
}

.store-icon-circle {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 26px rgba(0,0,0,0.25);
}

.store-icon-label {
    font-weight: 900;
    font-size: 0.95rem;
    text-align: center;
}

.store-collection {
    padding: 1.1rem 0 0.4rem;
}

.store-section-head-gnc h2 {
    font-family: var(--font-body);
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.store-section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.store-shop-all {
    border-radius: 0;
}

.store-collection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.store-collection-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    padding: 1rem 1rem 0.95rem;
    text-decoration: none;
    color: #111;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.store-collection-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.store-collection-title {
    font-weight: 950;
    letter-spacing: 0.02em;
}

.store-collection-sub {
    margin-top: 0.35rem;
    color: rgba(0, 0, 0, 0.62);
    font-weight: 650;
    line-height: 1.25;
    font-size: 0.9rem;
}

.store-recent {
    padding: 2.25rem 0 0.5rem;
}

.store-footer {
    margin-top: 3.5rem;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.10);
}

.store-footer-inner {
    padding: 2.25rem 0 1.25rem;
}

.store-footer-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.store-footer-col h4 {
    margin: 0 0 0.85rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}

.store-footer-col a {
    display: block;
    color: rgba(0,0,0,0.72);
    text-decoration: none;
    font-weight: 650;
    padding: 0.35rem 0;
}

.store-footer-col a:hover {
    color: #000;
    text-decoration: underline;
}

.store-footer-card {
    border: 1px solid rgba(0,0,0,0.10);
    padding: 1rem;
    border-radius: 10px;
    background: #fafafa;
}

.store-footer-card h3 {
    margin: 0;
    font-weight: 950;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.store-footer-card p {
    margin: 0.55rem 0 0.85rem;
    color: rgba(0,0,0,0.64);
    font-weight: 650;
}

.store-footer-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    margin-top: 0.65rem;
}

.store-footer-form input {
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: 0;
    padding: 0.75rem 0.8rem;
    font-family: var(--font-body);
    font-weight: 650;
    outline: none;
}

.store-footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.store-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    text-decoration: none;
    color: #111;
    font-weight: 900;
}

.store-footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(0,0,0,0.62);
    font-weight: 650;
}

.store-footer-legal-links {
    display: flex;
    gap: 1rem;
}

.store-footer-legal-links a {
    color: rgba(0,0,0,0.62);
    text-decoration: none;
    font-weight: 650;
}

.store-footer-legal-links a:hover {
    color: #000;
    text-decoration: underline;
}

.store-shop-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    color: #111;
    padding: 0.65rem 0.85rem;
    font-weight: 950;
    letter-spacing: 0.02em;
    border-radius: 0;
    cursor: pointer;
}

.store-shop-trigger:hover {
    background: #f3f3f3;
}

.store-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0,0,0,0.42);
    display: flex;
    justify-content: flex-start;
}

.store-drawer {
    width: min(360px, 86vw);
    height: 100%;
    background: #fff;
    padding: 1rem 1rem 1.25rem;
    overflow: auto;
}

.store-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.10);
}

.store-drawer-title {
    font-weight: 950;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.store-drawer-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.store-drawer-links {
    display: flex;
    flex-direction: column;
    padding-top: 0.75rem;
}

.store-drawer-links a {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    color: #111;
    font-weight: 850;
}

.store-drawer-links a:hover {
    color: var(--accent-strong);
}

@media (max-width: 900px) {
    .store-masthead-inner {
        grid-template-columns: 1fr;
    }
    .store-masthead-actions {
        justify-content: flex-start;
    }
    .store-icon-strip-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .store-icon-circle {
        width: 68px;
        height: 68px;
    }
    .store-collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .store-footer-cols {
        grid-template-columns: 1fr;
    }
    .store-banner-content {
        grid-template-columns: 1fr;
    }
    .store-row-arrow {
        display: none;
    }
}

@media (max-width: 520px) {
    .store-promo-left {
        display: none;
    }
    .store-icon-strip-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.store-notice {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.store-hero {
    padding: 4.5rem 0 2.5rem;
    background: radial-gradient(1200px 600px at 20% 20%, rgba(255,255,255,0.06), transparent 60%),
                radial-gradient(1000px 500px at 80% 0%, rgba(255,255,255,0.04), transparent 60%);
}

.store-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

.store-hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.store-hero-subtitle {
    margin-top: 0.75rem;
    color: var(--muted);
    max-width: 46ch;
}

.store-hero-cta {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.store-preview-pill {
    margin-top: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.store-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.store-hero-panel {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-hero-kicker {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted);
}

.store-hero-micro {
    margin-top: 0.5rem;
    color: var(--muted);
}

.store-hero-badges {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.store-cat-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.store-cat-strip-inner {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
}

.store-cat {
    white-space: nowrap;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.08);
}

.store-cat:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.store-cat.active {
    background: var(--accent-soft);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--accent);
}

.store-cat-deals {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.store-featured {
    padding: 2.25rem 0 2.75rem;
}

.store-section-head h2 {
    margin: 0;
}

.store-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.store-grid-loading {
    padding: 1rem 0;
    color: var(--muted);
}

.store-empty-panel {
    grid-column: 1 / -1;
    padding: 1.25rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}

.store-empty-panel h3 {
    margin: 0 0 0.4rem;
}

.store-empty-panel p {
    margin: 0;
    color: var(--muted);
    max-width: 70ch;
}

.store-empty-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.store-skeleton-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
    padding: 0.85rem;
    display: grid;
    gap: 0.65rem;
}

.store-skel-img {
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    background-size: 240% 100%;
    animation: storeShimmer 1.2s infinite linear;
}

.store-skel-line {
    height: 0.85rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    background-size: 240% 100%;
    animation: storeShimmer 1.2s infinite linear;
}

.store-skel-line.w-80 { width: 80%; }
.store-skel-line.w-55 { width: 55%; }
.store-skel-line.w-90 { width: 90%; }

.store-skel-btn {
    height: 2.6rem;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    background-size: 240% 100%;
    animation: storeShimmer 1.2s infinite linear;
}

@keyframes storeShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 120% 50%; }
}

.store-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.store-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.store-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.store-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.12);
}

.store-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
}

.store-tag {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

.store-card-body {
    padding: 0.85rem 0.85rem 0.75rem;
}

.store-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.store-card-price {
    margin-top: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.store-card-our {
    font-weight: 800;
}

.store-card-market {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: line-through;
}

.store-card-desc {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6em;
}

.store-card-meta {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: var(--text);
    font-weight: 650;
}

.store-card-meta .muted {
    color: var(--muted);
    font-weight: 600;
}

.store-card-actions {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.store-card-brand {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

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

body.store-page .store-card {
    border-radius: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.10);
}

body.store-page .store-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.18);
    background: #fff;
}

body.store-page .store-card-media {
    background: #fff;
}

body.store-page .store-tag {
    top: 0.5rem;
    left: 0.5rem;
    border-radius: 4px;
    background: #111;
    border: 0;
}

body.store-page .store-card-body {
    padding: 0.85rem 0.85rem 0.65rem;
}

body.store-page .store-card-title {
    color: #0b0b0b;
    font-weight: 900;
}

body.store-page .store-card-meta {
    color: #111;
}

body.store-page .store-card-desc {
    color: rgba(0, 0, 0, 0.62);
}

body.store-page .store-card-market {
    color: rgba(0, 0, 0, 0.55);
}

body.store-page .store-card-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

body.store-page .store-add-btn-gnc {
    width: 100%;
    border-radius: 0;
    background: #fff;
    color: #111;
    border: 1px solid rgba(0,0,0,0.14);
    font-weight: 900;
}

body.store-page .store-add-btn-gnc:hover {
    border-color: rgba(0,0,0,0.22);
    background: #f6f6f6;
}

.store-card-anim {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 320ms ease, transform 320ms ease;
    will-change: opacity, transform;
}

.store-card-anim.in {
    opacity: 1;
    transform: translateY(0);
}

.store-banner {
    margin-top: 0.75rem;
}

.store-banner-inner {
    background: linear-gradient(110deg, #0b0b0b 0%, #141414 40%, #8b0f18 100%);
    border-top: 1px solid rgba(0,0,0,0.10);
    border-bottom: 1px solid rgba(0,0,0,0.10);
}

.store-banner-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
    padding: 1.9rem 0;
    align-items: center;
    color: #fff;
}

.store-banner-eyebrow {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
    font-size: 0.8rem;
}

.store-banner-title {
    margin: 0.55rem 0 0;
    font-weight: 950;
    letter-spacing: -0.02em;
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

.store-banner-sub {
    margin: 0.6rem 0 0;
    opacity: 0.85;
    max-width: 56ch;
    font-weight: 650;
}

.store-banner-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.store-cta-gnc {
    border-radius: 0;
}

.store-banner-right {
    display: flex;
    justify-content: flex-end;
}

.store-banner-badge {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    padding: 0.85rem 1rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.store-brand-strip {
    background: #e11d2e;
    color: #fff;
}

.store-brand-strip-inner {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    overflow-x: auto;
    padding: 0.7rem 0;
}

.store-brand-chip {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.32);
    padding: 0.45rem 0.75rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: rgba(0,0,0,0.14);
    white-space: nowrap;
}

.store-brand-chip:hover {
    background: rgba(0,0,0,0.24);
}

.store-row {
    position: relative;
}

.store-grid-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
    gap: 0.9rem;
    padding: 0.25rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.store-grid-row::-webkit-scrollbar {
    display: none;
}

.store-grid-row .store-card {
    scroll-snap-align: start;
}

.store-row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.14);
    background: rgba(255,255,255,0.95);
    color: #111;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 10px 18px rgba(0,0,0,0.12);
}

.store-row-arrow.left { left: -12px; }
.store-row-arrow.right { right: -12px; }

.store-row-arrow:hover {
    background: #fff;
    border-color: rgba(0,0,0,0.22);
}

.store-trust {
    padding: 1.5rem 0 2rem;
}

.store-trust-inner {
    padding: 1.25rem 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.store-trust-text {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.store-browse-head {
    padding: 2.5rem 0 1.25rem;
}

.store-browse-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.store-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.store-browse-title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.store-browse-subtitle {
    margin-top: 0.5rem;
    color: var(--muted);
}

.store-browse-right {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.store-browse-tools {
    padding: 1rem 0 0.5rem;
}

.store-tools-inner {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.store-search input {
    width: min(520px, 85vw);
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255,255,255,0.03);
    color: var(--text);
}

.store-load-row {
    display: flex;
    justify-content: center;
    padding: 1.25rem 0 2rem;
}

.store-product {
    padding: 2.25rem 0 6rem;
}

.store-product-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.store-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.store-product-media {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
}

.store-product-image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.store-product-thumbs {
    margin-top: 0.65rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.store-thumb {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.10);
    border-radius: 10px;
    padding: 0.25rem;
    cursor: pointer;
}

.store-thumb img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}

.store-product-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.store-price-block {
    margin-top: 0.9rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.store-price-block .label {
    color: var(--muted);
    font-size: 0.8rem;
}

.store-price-block .value {
    font-weight: 800;
    font-size: 1.25rem;
    margin-left: 0.25rem;
}

.store-price-market .value {
    color: var(--muted);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: line-through;
}

.store-product-desc {
    margin-top: 0.9rem;
    color: var(--muted);
}

.store-why {
    margin-top: 1.2rem;
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.store-why h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.store-qty-row {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.store-qty input {
    width: 110px;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255,255,255,0.03);
    color: var(--text);
}

.store-product-meta {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.store-product-actions {
    margin-top: 0.75rem;
}

.store-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.75rem 0.9rem;
    background: rgba(0, 0, 0, 0.82);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.store-sticky-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.store-sticky-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 42ch;
}

.store-sticky-price {
    color: rgba(255,255,255,0.82);
    font-weight: 800;
}

.store-cart {
    padding: 2.5rem 0 4rem;
}

.store-cart-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.store-cart-title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.store-cart-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.store-cart-items {
    display: grid;
    gap: 0.85rem;
}

.store-cart-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(600px 240px at 20% 0%, rgba(255,255,255,0.06), transparent 60%),
        linear-gradient(160deg, rgba(255,255,255,0.035), rgba(0,0,0,0.10));
    box-shadow: 0 18px 55px rgba(0,0,0,0.32);
    align-items: start;
}

.store-cart-media {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,0.10);
    border: 1px solid rgba(255,255,255,0.06);
}

.store-cart-img {
    width: 100%;
    height: 92px;
    object-fit: contain;
    display: block;
    padding: 0.5rem;
}

.store-cart-mid {
    min-width: 0;
}

.store-cart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.store-cart-name {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-cart-name:hover {
    text-decoration: underline;
}

.store-cart-remove {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.store-cart-remove:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
}

.store-cart-prices {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.store-cart-our {
    font-weight: 800;
}

.store-cart-market {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.store-cart-row {
    margin-top: 0.65rem;
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.store-qty-stepper {
    display: inline-flex;
    align-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.14);
    overflow: hidden;
}

.store-qty-btn {
    width: 38px;
    height: 38px;
    border: 0;
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.store-qty-btn:hover {
    background: rgba(255,255,255,0.08);
}

.store-qty-stepper .store-cart-qty input {
    width: 56px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: center;
    font-weight: 800;
    -moz-appearance: textfield;
}

.store-qty-stepper .store-cart-qty input::-webkit-outer-spin-button,
.store-qty-stepper .store-cart-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.store-cart-line {
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.store-summary-card {
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.store-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
}

.store-summary-row.muted {
    color: var(--muted);
}

.store-summary-cta {
    width: 100%;
    margin-top: 0.75rem;
}

.store-summary-secondary {
    margin-top: 0.55rem;
}

.store-summary-foot {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.store-summary-premium .value {
    color: var(--accent);
    font-weight: 900;
}

.store-empty {
    padding: 1rem 0;
    color: var(--muted);
}

.store-checkout {
    padding: 2.5rem 0 4rem;
}

.store-checkout-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.store-checkout-form {
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.store-field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.store-field input {
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255,255,255,0.03);
    color: var(--text);
}

.store-handoff {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.65rem;
}

.store-handoff-list {
    display: grid;
    gap: 0.55rem;
}

.store-handoff-link {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.10);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.store-handoff-qty {
    color: var(--muted);
    font-weight: 700;
}

@media (min-width: 900px) {
    .store-hero-inner {
        grid-template-columns: 1.25fr 0.75fr;
    }

    .store-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .store-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem;
    }

    .store-cart-grid {
        grid-template-columns: 1fr 360px;
        align-items: start;
    }

    .store-cart-summary {
        position: sticky;
        top: 5.75rem;
    }

    .store-checkout-grid {
        grid-template-columns: 1fr 360px;
        align-items: start;
    }
}

/* Training app */
.training-shell {
    padding: 6.5rem 0 4.5rem;
}

.training-page .training-shell {
    padding-bottom: 5.75rem;
}

.training-page .training-shell .container {
    max-width: none;
}

.training-page .training-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.training-page .training-panel-bg {
    position: fixed;
    inset: 0;
}

.training-page .training-panel-bg::after {
    display: none;
}

.training-page .training-panel-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(197, 141, 79, 0.18), transparent 44%),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 70% 82%, rgba(197, 141, 79, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.0));
    opacity: 0.9;
}

.training-page .training-panel-inner {
    padding: 0.9rem 0;
}

.training-page .training-layout {
    min-height: calc(100vh - 140px);
}

.training-stage {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
    padding: 1.1rem 0 2.2rem;
    position: relative;
    z-index: 2;
    height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

.training-page .training-stage::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.training-page .training-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.16), transparent 42%),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.06), transparent 42%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.training-page .training-card.training-center {
    outline: 1px solid rgba(197, 141, 79, 0.32);
    outline-offset: 0;
    box-shadow:
        0 0 0 1px rgba(197, 141, 79, 0.10),
        0 30px 90px rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] .training-page .training-card {
    border-color: rgba(0, 0, 0, 0.08);
    background:
        radial-gradient(circle at 20% 0%, rgba(231, 163, 77, 0.16), transparent 45%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] .training-page .training-card.training-center {
    outline-color: rgba(231, 163, 77, 0.34);
    box-shadow:
        0 0 0 1px rgba(231, 163, 77, 0.10),
        0 26px 70px rgba(0, 0, 0, 0.18);
}

.training-page .training-choice {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.10);
}

.training-page .training-choice-grid[style*="repeat(3"] .training-choice {
    align-items: center;
}

.training-page select.auth-input {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(197, 141, 79, 0.9) 50%),
        linear-gradient(135deg, rgba(197, 141, 79, 0.9) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.2rem;
}

.training-photo-block {
    display: grid;
    gap: 0.75rem;
}

.training-photo-picker {
    width: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 1.05rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.12), transparent 48%),
        rgba(255, 255, 255, 0.02);
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

:root[data-theme="light"] .training-photo-picker {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.02);
}

.training-photo-picker:hover {
    border-color: rgba(197, 141, 79, 0.7);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.training-photo-picker:focus-within {
    border-color: rgba(197, 141, 79, 0.85);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.training-photo-picker.dragover {
    border-color: rgba(197, 141, 79, 0.95);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.18), transparent 48%),
        rgba(197, 141, 79, 0.06);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
    transform: translateY(-1px);
}

:root[data-theme="light"] .training-photo-picker.dragover {
    border-color: rgba(230, 160, 40, 0.85);
    background: rgba(231, 163, 77, 0.10);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.training-photo-picker.has-photo {
    border-style: solid;
}

.training-photo-circle {
    width: 98px;
    height: 98px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.07);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 16px 34px rgba(0, 0, 0, 0.30);
    transition: var(--transition);
}

:root[data-theme="light"] .training-photo-circle {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.9);
}

.training-photo-circle svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    fill: none;
    color: rgba(245, 236, 226, 0.88);
}

:root[data-theme="light"] .training-photo-circle svg {
    color: rgba(27, 18, 12, 0.7);
}

.training-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.training-photo-meta {
    display: grid;
    gap: 0.18rem;
}

.training-photo-right {
    display: grid;
    gap: 0.45rem;
}

.training-photo-title {
    font-weight: 920;
    letter-spacing: 0.01em;
}

.training-photo-sub {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.92rem;
}

.training-photo-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.training-photo-btn,
.training-photo-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.52rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 850;
    color: var(--ink);
    transition: var(--transition);
    cursor: pointer;
}

:root[data-theme="light"] .training-photo-btn,
:root[data-theme="light"] .training-photo-cta {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.04);
    color: rgba(27, 18, 12, 0.92);
}

:root[data-theme="light"] .training-photo-btn:hover,
:root[data-theme="light"] .training-photo-cta:hover {
    border-color: rgba(230, 160, 40, 0.65);
    background: rgba(231, 163, 77, 0.10);
}

:root[data-theme="light"] .training-photo-btn.primary {
    border-color: rgba(230, 160, 40, 0.75);
    background: rgba(231, 163, 77, 0.14);
}

:root[data-theme="light"] .training-photo-btn.primary:hover {
    border-color: rgba(230, 160, 40, 0.95);
    background: rgba(231, 163, 77, 0.18);
}

.training-photo-btn:hover,
.training-photo-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(197, 141, 79, 0.60);
    background: rgba(255, 255, 255, 0.08);
}

.training-photo-btn:active,
.training-photo-cta:active {
    transform: translateY(0px);
}

.training-photo-btn.primary {
    border-color: rgba(197, 141, 79, 0.70);
    background: rgba(197, 141, 79, 0.14);
}

.training-photo-btn.primary:hover {
    border-color: rgba(197, 141, 79, 0.92);
    background: rgba(197, 141, 79, 0.18);
}

.training-photo-tip {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.88rem;
    line-height: 1.35;
}

.training-photo-footer {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 520px) {
    .training-photo-picker {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .training-photo-right {
        justify-items: center;
    }
    .training-photo-footer {
        justify-content: center;
    }
}

:root[data-theme="light"] .training-page .training-choice {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.training-page .day-card,
.training-page .exercise-row {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.10);
}

:root[data-theme="light"] .training-page .day-card,
:root[data-theme="light"] .training-page .exercise-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.training-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius-lg) + 4px);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.55);
}

.training-panel-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(197, 141, 79, 0.16), transparent 45%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.06), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.0)),
        rgba(12, 10, 8, 0.9);
}

:root[data-theme="light"] .training-panel-bg {
    background:
        radial-gradient(circle at 18% 12%, rgba(197, 141, 79, 0.14), transparent 45%),
        radial-gradient(circle at 85% 18%, rgba(0, 0, 0, 0.05), transparent 42%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.0)),
        rgba(255, 255, 255, 0.94);
}

.training-panel-bg.has-photo {
    background-size: cover;
    background-position: center;
}

.training-panel-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 56px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 56px),
        rgba(0, 0, 0, 0.12);
    opacity: 0.7;
    pointer-events: none;
}

.training-bg-dashboard {
    position: absolute;
    inset: 0;
    padding: 118px 56px 56px;
    display: grid;
    gap: 1.2rem;
    align-content: start;
    pointer-events: none;
    opacity: 0.72;
    filter: blur(12px) saturate(1.06);
    transform: scale(1.015);
    z-index: 1;
}

@media (max-width: 980px) {
    .training-bg-dashboard {
        padding: 112px 18px 24px;
        opacity: 0.68;
        filter: blur(11px) saturate(1.04);
    }
}

.training-bg-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.2rem;
}

@media (max-width: 980px) {
    .training-bg-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.9rem;
    }
}

.bg-span-3 { grid-column: span 3; }
.bg-span-4 { grid-column: span 4; }
.bg-span-5 { grid-column: span 5; }
.bg-span-6 { grid-column: span 6; }
.bg-span-7 { grid-column: span 7; }
.bg-span-8 { grid-column: span 8; }
.bg-span-12 { grid-column: span 12; }

@media (max-width: 980px) {
    .bg-span-3, .bg-span-4, .bg-span-5, .bg-span-6, .bg-span-7, .bg-span-8, .bg-span-12 {
        grid-column: span 6;
    }
}

.training-bg-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 22% 0%, rgba(197, 141, 79, 0.13), transparent 40%),
        radial-gradient(circle at 88% 72%, rgba(255, 255, 255, 0.06), transparent 50%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
    padding: 1rem 1rem 0.9rem;
}

@media (min-width: 981px) {
    .training-bg-grid > .training-bg-card:nth-child(1) { transform: translateY(10px) rotate(-0.6deg); }
    .training-bg-grid > .training-bg-card:nth-child(2) { transform: translateY(-6px) rotate(0.5deg); }
    .training-bg-grid > .training-bg-card:nth-child(3) { transform: translateY(8px) rotate(0.35deg); }
    .training-bg-grid > .training-bg-card:nth-child(4) { transform: translateY(-10px) rotate(-0.4deg); }
    .training-bg-grid > .training-bg-card:nth-child(5) { transform: translateY(12px) rotate(0.25deg); }
    .training-bg-grid > .training-bg-card:nth-child(6) { transform: translateY(-8px) rotate(-0.25deg); }
    .training-bg-grid > .training-bg-card:nth-child(7) { transform: translateY(14px) rotate(0.35deg); }
}

:root[data-theme="light"] .training-bg-card {
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.08), transparent 40%),
        linear-gradient(160deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.01));
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
}

.training-bg-card .k {
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.training-bg-card .v {
    margin-top: 0.25rem;
    font-weight: 950;
    font-size: 1.9rem;
}

.training-bg-mini {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.training-bg-pill {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 850;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

:root[data-theme="light"] .training-bg-pill {
    border-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}

.training-bg-line svg {
    width: 100%;
    height: 96px;
    margin-top: 0.5rem;
}

/* Training page removes the background grid overlay. */

.training-panel-bg.photo-blur::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(26px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.75;
}

.training-panel-inner {
    position: relative;
    z-index: 1;
    padding: 1.1rem;
}

.training-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0 1rem;
}

.training-topbar-title {
    display: grid;
    gap: 0.15rem;
}

.training-topbar-title h3 {
    margin: 0;
    font-size: 1.15rem;
}

.training-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

@media (min-width: 980px) {
    .training-layout {
        grid-template-columns: 360px 1fr;
        align-items: start;
    }
}

.training-sidebar {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
}

.training-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 18%, rgba(197, 141, 79, 0.16), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06), transparent 55%);
    opacity: 0.75;
}

.training-sidebar > * {
    position: relative;
    z-index: 1;
}

.training-sidebar::-webkit-scrollbar {
    width: 10px;
}

.training-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

:root[data-theme="light"] .training-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}

@media (min-width: 980px) {
    .training-sidebar {
        position: sticky;
        top: 92px;
        max-height: calc(100vh - 120px);
        overflow: auto;
    }
}

.training-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.training-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    flex: 0 0 auto;
}

:root[data-theme="light"] .training-avatar {
    background: rgba(255, 255, 255, 0.98);
}

.training-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.training-sidebar-name {
    display: grid;
    gap: 0.15rem;
}

.training-sidebar-name strong {
    font-weight: 900;
}

.training-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.training-metric {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.training-metric .k {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.86rem;
}

.training-metric .v {
    margin-top: 0.2rem;
    font-weight: 900;
    font-size: 1.05rem;
}

.training-graph {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.45rem;
}

.training-graph-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.training-graph-title span {
    color: var(--muted);
    font-weight: 750;
    font-size: 0.92rem;
}

.training-graph svg {
    width: 100%;
    height: 70px;
}

.training-main {
    display: grid;
    gap: 0.9rem;
}

.training-main-inner {
    width: 100%;
}

.training-main-inner.centered {
    min-height: calc(100vh - 170px);
    display: grid;
    place-items: center;
    padding: 1.25rem 0;
}

.training-main-inner.centered .training-center {
    margin-top: 0;
}

.training-center {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.training-card {
    backdrop-filter: blur(10px);
}
.training-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.12), transparent 38%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
    padding: 1.2rem 1.2rem 1.05rem;
}

.training-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.training-muted {
    color: var(--muted);
}

.training-progress {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1rem;
}

.training-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.training-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.45rem;
}

.training-step-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.38rem 0.55rem;
    font-weight: 750;
    font-size: 0.84rem;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.training-step-pill.active {
    border-color: var(--accent);
    color: var(--ink);
}

.training-step-pill.done {
    color: var(--ink);
    border-color: rgba(197, 141, 79, 0.55);
}

.training-form {
    display: grid;
    gap: 0.75rem;
}

.training-form-intro {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

:root[data-theme="light"] .training-form-intro {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.training-form-section {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.75rem;
}

:root[data-theme="light"] .training-form-section {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.training-section-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.training-section-title {
    font-weight: 920;
    letter-spacing: 0.01em;
    font-size: 1.02rem;
}

.training-section-sub {
    margin-top: 0.18rem;
    color: var(--muted);
    font-weight: 650;
    font-size: 0.92rem;
}

.training-field-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.65rem;
}

.training-field {
    display: grid;
    gap: 0.35rem;
}

.training-field.span-12 { grid-column: span 12; }
.training-field.span-6 { grid-column: span 6; }
.training-field.span-4 { grid-column: span 4; }

@media (max-width: 820px) {
    .training-field.span-6,
    .training-field.span-4 {
        grid-column: span 12;
    }
}

.training-page .auth-label {
    margin-top: 0;
    color: rgba(245, 236, 226, 0.88);
}

:root[data-theme="light"] .training-page .auth-label {
    color: rgba(27, 18, 12, 0.72);
}

.training-page .auth-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="light"] .training-page .auth-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.10);
}

.training-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

 .training-grid-3 {
     display: grid;
     grid-template-columns: 1fr;
     gap: 0.75rem;
 }

@media (min-width: 820px) {
    .training-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .training-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.training-choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

@media (min-width: 700px) {
    .training-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.training-choice {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.9rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.training-choice:hover {
    border-color: var(--accent);
}

.training-choice input {
    margin-top: 0.2rem;
}

.training-choice-title {
    font-weight: 780;
}

.training-choice-sub {
    font-size: 0.92rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.training-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.training-divider {
    height: 1px;
    background: var(--line);
    margin: 0.85rem 0;
}

.training-loading {
    display: grid;
    place-items: center;
    gap: 0.6rem;
    padding: 1.2rem 0;
}

.training-progressbar {
    width: min(520px, 100%);
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    overflow: hidden;
}

.training-progressbar-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0,255,170,0.95), rgba(231,163,77,0.95));
    transition: width 220ms ease;
}

.meal-service-cta {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.02);
    padding: 0.85rem;
    margin-top: 0.9rem;
}

.meal-service-title {
    font-weight: 850;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.meal-service-opt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 750;
    margin-top: 0.65rem;
}

.meal-service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 0.65rem;
}

@media (min-width: 700px) {
    .meal-service-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.meal-service-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.training-spinner {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
    animation: trainingSpin 0.85s linear infinite;
}

@keyframes trainingSpin {
    to {
        transform: rotate(360deg);
    }
}

.plan-shell {
    display: grid;
    gap: 0.85rem;
}

.plan-topbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.training-page .plan-topbar {
    width: 100%;
    max-width: none;
}

.training-loading-inline {
    padding: 0.5rem 0;
}

.exercise-media-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
}

.exercise-media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    border: 0;
}

.exercise-media-modal-card {
    position: relative;
    width: min(820px, calc(100% - 28px));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 15, 18, 0.92);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

:root[data-theme="light"] .exercise-media-modal-card {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.exercise-media-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

:root[data-theme="light"] .exercise-media-modal-head {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.exercise-media-modal-title {
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.exercise-media-modal-close {
    height: 34px;
    width: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

:root[data-theme="light"] .exercise-media-modal-close {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.exercise-media-modal-img,
.exercise-media-modal-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.week-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.week-split {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 920px) {
    .week-split {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }

    .workouts-card {
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 140px);
        overflow: auto;
    }
}

.day-tabs {
    display: flex;
    gap: 0.55rem;
    overflow: auto;
    padding: 0.2rem 0.1rem 0.1rem;
    scroll-snap-type: x mandatory;
}

@media (min-width: 920px) {
    .day-tabs {
        flex-direction: column;
        overflow: visible;
        scroll-snap-type: none;
        padding: 0.2rem 0;
    }
}

.day-tab {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: grid;
    gap: 0.25rem;
    min-width: min(320px, 82vw);
    scroll-snap-align: start;
}

@media (min-width: 920px) {
    .day-tab {
        min-width: 0;
    }
}

.day-tab:hover {
    background: rgba(255, 255, 255, 0.04);
}

.day-tab.active {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}

.day-tab-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-weight: 820;
}

.day-tab-meta {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.92rem;
}

.day-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.day-dot.good {
    background: rgba(90, 220, 150, 0.95);
    border-color: rgba(90, 220, 150, 0.35);
}

.week-tab {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    font-weight: 750;
    transition: var(--transition);
}

.week-tab.active {
    border-color: var(--accent);
    color: var(--ink);
}

.day-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.day-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.day-title {
    font-weight: 820;
    font-size: 1.05rem;
}

.exercise-list {
    display: grid;
    gap: 0.55rem;
}

.exercise-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.exercise-row.has-media {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
        "media meta"
        "inputs inputs";
    gap: 0.85rem;
    padding: 0.85rem;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 158, 212, 0.14), transparent 55%),
        radial-gradient(circle at 85% 25%, rgba(231, 163, 77, 0.10), transparent 50%),
        rgba(255, 255, 255, 0.02);
    border-color: color-mix(in srgb, var(--training-accent) 22%, rgba(255, 255, 255, 0.12));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    transition: transform 140ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.exercise-row.has-media:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--training-accent) 40%, rgba(255, 255, 255, 0.12));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.exercise-row.has-media > .exercise-media-cell {
    grid-area: media;
}

.exercise-row.has-media > .exercise-meta {
    grid-area: meta;
}

.exercise-row.has-media > .exercise-inputs {
    grid-area: inputs;
}

@media (min-width: 820px) {
    .exercise-row {
        grid-template-columns: 1.5fr 1fr;
        align-items: start;
    }

    .exercise-row.has-media {
        grid-template-columns: 92px 1.35fr 1fr;
        grid-template-areas: "media meta inputs";
        align-items: start;
    }
}

.exercise-meta {
    display: grid;
    gap: 0.2rem;
}

.exercise-media-cell {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 30% 0%, rgba(34, 158, 212, 0.16), transparent 55%),
        radial-gradient(circle at 80% 30%, rgba(231, 163, 77, 0.14), transparent 55%),
        rgba(255, 255, 255, 0.02);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: transform 140ms ease, border-color 160ms ease;
}

.exercise-media-cell:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--training-accent) 35%, rgba(255, 255, 255, 0.12));
}

.exercise-media-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.10) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 240% 100%;
    animation: exerciseShimmer 1.15s ease-in-out infinite;
}

.exercise-media-skeleton.hidden {
    display: none;
}

@keyframes exerciseShimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 130% 0; }
}

.exercise-media-frame {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.exercise-media-frame.hidden {
    display: none;
}

.exercise-media-img,
.exercise-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.exercise-media-pair {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.exercise-media-img-a,
.exercise-media-img-b {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exercise-media-img-a {
    animation: exerciseFadeA 3.2s ease-in-out infinite;
}

.exercise-media-img-b {
    animation: exerciseFadeB 3.2s ease-in-out infinite;
}

@keyframes exerciseFadeA {
    0%, 45% { opacity: 1; }
    55%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes exerciseFadeB {
    0%, 45% { opacity: 0; }
    55%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

.exercise-media-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.82);
}

.exercise-media-icon.hidden {
    display: none;
}

.exercise-media-svg {
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
}

.exercise-name {
    font-weight: 800;
}

.exercise-prescription {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.92rem;
}

.exercise-substitutions {
    color: var(--muted);
    font-weight: 650;
    font-size: 0.86rem;
    line-height: 1.35;
}

.workout-goal {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-weight: 720;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

:root[data-theme="light"] .workout-goal {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .exercise-row.has-media {
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 158, 212, 0.10), transparent 55%),
        radial-gradient(circle at 85% 25%, rgba(231, 163, 77, 0.10), transparent 50%),
        rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.10);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.10);
}

:root[data-theme="light"] .exercise-media-cell {
    border-color: rgba(0, 0, 0, 0.10);
    background:
        radial-gradient(circle at 30% 0%, rgba(34, 158, 212, 0.12), transparent 55%),
        radial-gradient(circle at 80% 30%, rgba(231, 163, 77, 0.10), transparent 55%),
        rgba(0, 0, 0, 0.01);
}

.exercise-inputs {
    display: grid;
    gap: 0.45rem;
}

.exercise-inputs .auth-input {
    padding: 0.7rem 0.85rem;
}

.exercise-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.training-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-weight: 750;
    font-size: 0.86rem;
}

.training-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.45rem;
    align-items: start;
}

.training-badge-grid .training-badge {
    width: 100%;
    justify-content: flex-start;
}

.training-badge.good {
    border-color: rgba(90, 220, 150, 0.35);
    color: var(--ink);
}

.upsell-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .upsell-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.upsell-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
}

.upsell-item h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.upsell-item p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

/* ============================================
   TRAINING (Trainerize-style, flat overrides)
   Scope: training.html only via .training-page
   ============================================ */

.training-page {
    background: var(--bg);
}

.training-page .grain {
    display: none;
}

.training-page .training-panel-bg,
.training-page .training-panel-bg.has-photo,
.training-page .training-panel-bg.photo-blur {
    background-image: none !important;
    filter: none !important;
}

.training-page .training-panel-bg::before,
.training-page .training-panel-bg::after {
    display: none !important;
}

.training-page .training-bg-dashboard {
    display: none;
}

.training-page .training-stage {
    width: min(1280px, calc(100% - 24px));
    margin: 0 auto;
    padding: 1.1rem 0 2.2rem;
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: auto;
    -ms-overflow-style: auto;
}

.training-page .training-stage::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.training-page .training-stage::-webkit-scrollbar-thumb {
    background: transparent;
}

:root[data-theme="light"] .training-page .training-stage::-webkit-scrollbar-thumb {
    background: transparent;
}

/* Remove "card/glass" look in Training only */
.training-page .training-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

/* Ensure the Training page scrolls with the document (no nested scroll panels). */
.training-page .training-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
}

.training-page .workouts-card {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
}

/* Layout: Workouts list + workout details (no fixed panels). */
.training-page .plan-shell {
    display: block;
    border: 1px solid var(--line);
    background: var(--panel);
}

:root[data-theme="light"] .training-page .plan-shell {
    background: #ffffff;
}

/* Plan header */
.training-page .plan-topbar {
    display: block;
    padding: 1rem 1.1rem 0.95rem;
    border-bottom: 1px solid var(--line);
}

.training-page .plan-topbar h3 {
    font-size: 1.05rem;
    font-weight: 850;
}

/* Weeks list (legacy; hidden in current UI) */
.training-page .week-tabs {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    align-content: start;
    gap: 0.15rem;
    padding: 0.75rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--line);
    overflow: auto;
    overscroll-behavior: contain;
}

:root[data-theme="light"] .training-page .week-tabs {
    background: #f5f6f8;
}

.training-page .week-tab {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 0.6rem 0.65rem;
    text-align: left;
    font-weight: 750;
}

.training-page .week-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

:root[data-theme="light"] .training-page .week-tab:hover {
    background: rgba(0, 0, 0, 0.04);
}

.training-page .week-tab.active {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 3px 0 0 var(--accent);
}

:root[data-theme="light"] .training-page .week-tab.active {
    background: rgba(0, 0, 0, 0.06);
}

/* Main content area */
.training-page .week-split {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.training-page .workouts-card {
    border-right: 1px solid var(--line);
}

/* Workout toolbar-ish row (existing "Workouts" header) */
.training-page .workouts-card > .training-row {
    position: static;
    padding: 0.75rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--line);
}

:root[data-theme="light"] .training-page .workouts-card > .training-row {
    background: #f5f6f8;
}

/* Workout list rows (day tabs) */
.training-page .day-tabs {
    display: block;
    overflow: visible;
    padding: 0;
}

.training-page .day-tab {
    width: 100%;
    min-width: 0;
    scroll-snap-align: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0.8rem 2.5rem 0.75rem 2.6rem;
    text-align: left;
    position: relative;
}

.training-page .day-tab::before {
    content: "";
    position: absolute;
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid var(--line);
    background: transparent;
}

.training-page .day-tab::after {
    content: "⋯";
    position: absolute;
    right: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
}

.training-page .day-tab:hover {
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .training-page .day-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

.training-page .day-tab.active {
    background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .training-page .day-tab.active {
    background: rgba(0, 0, 0, 0.05);
}

.training-page .day-tab.active::before {
    background: rgba(197, 141, 79, 0.20);
    border-color: rgba(197, 141, 79, 0.55);
}

.training-page .day-tab-title {
    font-weight: 750;
}

.training-page .day-tab-title span:first-child {
    color: #1b66c9;
}

.training-page .day-tab:hover .day-tab-title span:first-child {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.training-page .day-tab-meta {
    font-size: 0.88rem;
}

/* Workout detail: remove card styling and use simple separators */
.training-page .day-card {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 1rem 1.1rem 0.9rem;
    display: grid;
    gap: 0.9rem;
}

.training-page .exercise-list {
    gap: 0;
    border-top: 1px solid var(--line);
}

.training-page .exercise-row {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0.9rem 0;
}

@media (max-width: 920px) {
    .training-page .week-split {
        grid-template-columns: 1fr;
    }

    .training-page .workouts-card {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .training-page .day-tab {
        padding-left: 2.3rem;
        padding-right: 2.1rem;
    }

    .training-page .day-tab::before {
        left: 0.75rem;
    }

    .training-page .day-tab::after {
        right: 0.75rem;
    }
}

@media (max-width: 640px) {
    .training-page .workouts-card {
        border-bottom: 0;
    }

    .training-page .day-tabs {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.45rem;
        padding: 0.5rem 0.6rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid var(--line);
    }

    .training-page .day-tab {
        width: 46px;
        min-width: 46px;
        padding: 0.45rem 0.35rem;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02);
        scroll-snap-align: start;
    }

    .training-page .day-tab::before,
    .training-page .day-tab::after {
        display: none;
    }

    .training-page .day-tab-title {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        font-weight: 800;
    }

    .training-page .day-tab-title span:first-child {
        display: none;
    }

    .training-page .day-tab-abbr {
        display: inline-flex;
        font-size: 0.85rem;
        letter-spacing: 0.02em;
    }

    .training-page .day-tab-meta {
        display: none;
    }
}

/* ============================================
   ONBOARDING TOUR
   ============================================ */

.ode-tour-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    --tour-overlay: rgba(8, 8, 10, 0.58);
    animation: odeTourFadeIn 220ms ease-out both;
}

html[data-theme="light"] .ode-tour-overlay {
    --tour-overlay: rgba(245, 245, 248, 0.70);
}

.ode-tour-shade {
    position: fixed;
    background: var(--tour-overlay);
    backdrop-filter: blur(6px);
    z-index: 10000;
}

.ode-tour-highlight {
    position: relative;
    z-index: 10002;
    pointer-events: none;
    border-radius: 16px;
    outline: 2px solid rgba(0, 255, 170, 0.55);
    outline-offset: 4px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    animation: odeTourPulse 1.55s ease-in-out infinite;
    isolation: isolate;
    filter: none !important;
    transform: translateZ(0);
}

.ode-tour-highlight * {
    filter: none !important;
}

body.ode-tour-active .ode-tour-overlay {
    /* blur handled by overlay slices */
}

html[data-theme="light"] .ode-tour-highlight {
    outline-color: rgba(0, 140, 110, 0.55);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.ode-tour-popover {
    position: fixed;
    z-index: 10003;
    width: min(360px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 24px));
    overflow: auto;
    border-radius: 18px;
    --tour-pop-border: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--tour-pop-border);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.22), transparent 44%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(20, 20, 24, 0.86);
    color: var(--ink);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
    padding: 12px 12px 10px;
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    transition: opacity 180ms ease, transform 180ms ease;
}

html[data-theme="light"] .ode-tour-popover {
    --tour-pop-border: rgba(0, 0, 0, 0.10);
    border-color: var(--tour-pop-border);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.20), transparent 44%),
        linear-gradient(160deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.00)),
        rgba(255, 255, 255, 0.92);
    color: #111;
}

.ode-tour-popover.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ode-tour-title {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.ode-tour-body {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
    font-weight: 650;
}

html[data-theme="light"] .ode-tour-body {
    color: rgba(0, 0, 0, 0.72);
}

.ode-tour-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ode-tour-step {
    font-size: 12px;
    font-weight: 800;
    opacity: 0.85;
}

.ode-tour-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ode-tour-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-weight: 900;
    padding: 8px 12px;
    cursor: pointer;
}

html[data-theme="light"] .ode-tour-btn {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
}

.ode-tour-btn.primary {
    border-color: rgba(0, 255, 170, 0.30);
    background: rgba(0, 255, 170, 0.14);
}

html[data-theme="light"] .ode-tour-btn.primary {
    border-color: rgba(0, 140, 110, 0.28);
    background: rgba(0, 140, 110, 0.12);
}

.ode-tour-btn:hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .ode-tour-overlay {
        animation: none;
    }

    .ode-tour-highlight {
        animation: none;
    }

    .ode-tour-popover {
        transition: none;
    }

    .ode-tour-btn:hover {
        transform: none;
    }
}

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

@keyframes odeTourPulse {
    0%, 100% {
        outline-offset: 4px;
        box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    }
    50% {
        outline-offset: 6px;
        box-shadow: 0 30px 96px rgba(0, 0, 0, 0.52);
    }
}

/* (removed) legacy / invalid training-page-view styles */

.training-page .training-panel-inner {
    padding-top: 0.95rem;
}

/* Restore premium cards (flat overrides set everything to transparent). */
.training-page .training-card {
    border: 1px solid var(--training-border) !important;
    border-radius: 16px !important;
    background:
        radial-gradient(circle at 18% 0%, rgba(197, 141, 79, 0.18), transparent 42%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--training-surface) !important;
    box-shadow: var(--training-shadow) !important;
    backdrop-filter: blur(10px) !important;
    padding: 1.05rem 1.1rem !important;
}

:root[data-theme="light"] .training-page .training-card {
    background:
        radial-gradient(circle at 18% 0%, rgba(231, 163, 77, 0.14), transparent 45%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
        #ffffff !important;
}

.training-page .plan-shell {
    border: 0 !important;
    background: transparent !important;
    gap: 1rem !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important;
}

.training-page .plan-topbar {
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
    position: relative;
    z-index: 2100;
}

.training-page .plan-topbar-main {
    flex: 1 1 260px;
    min-width: 220px;
}

.training-page .plan-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    z-index: 2100;
}

.training-page .plan-topbar-actions .btn {
    white-space: nowrap;
}

.training-page .plan-rules {
    border: 1px solid var(--training-border);
    border-radius: 14px;
    background: var(--training-surface-2);
    padding: 0.6rem 0.75rem;
    min-width: min(420px, 100%);
    max-width: 520px;
}

.training-page .plan-rules-inline {
    padding: 0;
    border: 0;
    background: transparent;
    position: relative;
    min-width: 0;
    max-width: none;
    z-index: 2101;
}

.training-page .plan-rules-inline .plan-rules-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--training-border);
    background: var(--training-surface-2);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.training-page .plan-rules-inline .plan-rules-summary:hover {
    border-color: color-mix(in srgb, var(--training-accent) 55%, var(--training-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--training-accent-weak) 70%, transparent);
    transform: translateY(-1px);
}

.training-page .plan-rules-inline[open] .plan-rules-summary {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--training-accent-weak) 70%, transparent);
}

.training-page .plan-rules-inline .plan-rules-body {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    z-index: 2000;
    min-width: min(420px, 90vw);
    max-width: 520px;
    border-radius: 14px;
    padding: 0.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.98)),
        #ffffff;
    border: 1px solid color-mix(in srgb, var(--training-border) 85%, #000);
    box-shadow:
        0 22px 55px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.training-page .plan-rules-summary {
    cursor: pointer;
    font-weight: 850;
    list-style: none;
}

.training-page .plan-rules summary::-webkit-details-marker {
    display: none;
}

.training-page .plan-rules-body {
    margin-top: 0.6rem;
    display: grid;
    gap: 0.65rem;
}

.training-page .plan-rules-title {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 850;
    margin-bottom: 0.25rem;
}

.training-page .plan-rules-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--ink);
    opacity: 0.9;
    line-height: 1.35;
    font-weight: 650;
    font-size: 0.9rem;
}

.training-page .schedule-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 1.5rem;
}

.training-page .schedule-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 10, 8, 0.68);
    backdrop-filter: blur(2px);
    border: 0;
}

.training-page .schedule-modal-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95)),
        #ffffff;
    border: 1px solid color-mix(in srgb, var(--training-border) 80%, #000);
    border-radius: 18px;
    width: min(520px, 92vw);
    padding: 1.35rem;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    z-index: 1;
}

.training-page .schedule-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.training-page .schedule-modal-title {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.training-page .schedule-modal-close {
    border: 0;
    background: rgba(0, 0, 0, 0.06);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.training-page .schedule-modal-body {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}

.training-page .schedule-day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 520px) {
    .training-page .schedule-day-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.training-page .schedule-day-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: color-mix(in srgb, var(--training-surface-2) 85%, transparent);
    border: 1px solid var(--training-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.training-page .schedule-mode-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.training-page .schedule-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 650;
}

.training-page .schedule-date-input {
    width: min(220px, 100%);
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--training-border) 85%, #000);
    background: var(--training-surface-2);
    color: var(--ink);
}

.training-page .schedule-modal-error {
    color: #d65745;
    font-weight: 650;
    font-size: 0.9rem;
}

.training-page .schedule-modal-actions {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.training-page .btn-compact {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.1;
}

.training-page .exercise-action-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

.training-page .plan-topbar > div:first-child {
    padding: 0 !important;
    border: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

.training-page .week-tabs {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    overflow: visible !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

.training-page .week-tab {
    border: 1px solid var(--training-border);
    background: var(--training-surface-2);
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
}

.training-page .week-tab.active {
    border-color: color-mix(in srgb, var(--training-accent) 55%, var(--training-border));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--training-accent-weak) 75%, transparent);
    color: var(--ink);
}

.training-page .week-split {
    grid-column: auto !important;
    grid-row: auto !important;
    display: grid !important;
    gap: 1rem !important;
    padding: 0 !important;
}

@media (min-width: 920px) {
    .training-page .week-split {
        grid-template-columns: 360px minmax(0, 1fr) !important;
        align-items: start;
    }
}

/* Day selector (card) */
.training-page .workouts-card {
    padding: 0 !important;
    overflow: hidden;
}

.training-page .workouts-card > .training-row {
    padding: 1.05rem 1.1rem;
    border-bottom: 1px solid var(--training-border);
    background: linear-gradient(180deg, var(--training-surface), transparent);
}

.training-page .day-tabs {
    display: flex;
    gap: 0.55rem;
    overflow: auto;
    padding: 0.85rem;
    scroll-snap-type: x mandatory;
}

.training-page .day-tab {
    border: 1px solid var(--training-border);
    background: var(--training-surface-2);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    min-width: min(320px, 78vw);
}

.training-page .day-tab:hover {
    border-color: color-mix(in srgb, var(--training-accent) 28%, var(--training-border));
    background: color-mix(in srgb, var(--training-accent-weak) 25%, var(--training-surface-2));
}

.training-page .day-tab.active {
    border-color: color-mix(in srgb, var(--training-accent) 55%, var(--training-border));
    background: linear-gradient(180deg, var(--training-accent-weak), var(--training-surface-2));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--training-accent-weak) 75%, transparent);
}

.training-page .day-tab::before,
.training-page .day-tab::after {
    content: none !important;
}

.training-page .day-tab-title span:first-child {
    color: var(--ink) !important;
    text-decoration: none !important;
}

.training-page .day-tab:hover .day-tab-title span:first-child {
    text-decoration: none !important;
}

.training-page .day-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--training-border);
    position: relative;
}

.training-page .day-dot.good {
    background: var(--training-accent);
    border-color: color-mix(in srgb, var(--training-accent) 60%, var(--training-border));
}

.training-page .day-dot.good::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
    color: rgba(10, 10, 12, 0.85);
}

:root[data-theme="light"] .training-page .day-dot.good::after {
    color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 920px) {
    .training-page .day-tabs {
        flex-direction: column;
        overflow: visible;
        scroll-snap-type: none;
        padding: 0.9rem;
    }

    .training-page .day-tab {
        min-width: 0;
        width: 100%;
    }
}

/* Workout detail card */
.training-page .day-card {
    border: 1px solid var(--training-border);
    border-radius: 16px;
    background: var(--training-surface);
    box-shadow: var(--training-shadow);
    padding: 1.05rem 1.1rem;
    gap: 0.95rem;
}

.training-page .training-subcard {
    border: 1px solid color-mix(in srgb, var(--training-border) 85%, transparent);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    background: var(--training-surface-2);
}

.training-page .exercise-list {
    gap: 0.8rem;
    border-top: 0 !important;
}

.training-page .exercise-row {
    border: 1px solid var(--training-border);
    border-radius: 16px;
    background: var(--training-surface-2);
    padding: 1rem;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.training-page .exercise-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.training-page .exercise-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.training-page .lastweek-pill,
.training-page .projected-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--training-accent) 30%, var(--training-border));
    background: color-mix(in srgb, var(--training-accent-weak) 75%, var(--training-surface-2));
    color: var(--ink);
    font-weight: 900;
    font-size: 0.86rem;
    letter-spacing: -0.01em;
}

.training-page .lastweek-pill {
    border-color: color-mix(in srgb, rgba(255, 255, 255, 0.16) 60%, var(--training-border));
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-weight: 850;
}

.training-page .projected-pill {
    margin-left: auto;
}

.training-page .exercise-fields input[readonly] {
    cursor: default;
    opacity: 0.9;
    background: color-mix(in srgb, var(--training-surface) 55%, var(--training-surface-2));
}

.training-page .exercise-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.training-page .exercise-notes {
    margin-top: 0.2rem;
}

.training-page .exercise-setlog {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.6rem;
    width: 100%;
}

.training-page .exercise-set-header,
.training-page .exercise-set-row {
    display: grid;
    grid-template-columns: 60px minmax(80px, 0.9fr) minmax(70px, 0.8fr) minmax(170px, 1.6fr);
    gap: 0.7rem;
    align-items: center;
}

.training-page .exercise-set-header {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.training-page .exercise-set-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.training-page .exercise-set-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    justify-self: end;
}

.training-page .exercise-set-row {
    background: color-mix(in srgb, var(--training-surface) 82%, transparent);
    border: 1px solid color-mix(in srgb, var(--training-border) 85%, transparent);
    border-radius: 14px;
    padding: 0.5rem 0.6rem;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.training-page .exercise-set-row .auth-input {
    min-height: 46px;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--training-border) 85%, transparent);
    background: color-mix(in srgb, var(--training-surface-2) 85%, transparent);
    width: 100%;
    min-width: 0;
}

.training-page .exercise-set-row .auth-input::placeholder {
    color: color-mix(in srgb, var(--muted) 65%, transparent);
}

.training-page .exercise-set-row .auth-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--training-accent) 55%, var(--training-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--training-accent-weak) 70%, transparent);
}

.training-page .exercise-set-add {
    height: 40px;
    width: 40px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--training-border) 75%, transparent);
    background: color-mix(in srgb, var(--training-surface-2) 88%, transparent);
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    justify-self: end;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.training-page .exercise-set-add-row {
    display: grid;
    grid-template-columns: 60px minmax(80px, 0.9fr) minmax(70px, 0.8fr) minmax(170px, 1.6fr);
    gap: 0.7rem;
    align-items: center;
    padding-top: 0.35rem;
}

.training-page .exercise-set-add:hover {
    border-color: color-mix(in srgb, var(--training-accent) 40%, var(--training-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--training-accent-weak) 70%, transparent);
    transform: translateY(-1px);
}

.training-page .exercise-set-add:active {
    transform: translateY(0);
}

.training-page .exercise-set-remove {
    height: 34px;
    width: 34px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--training-border) 75%, transparent);
    background: color-mix(in srgb, var(--training-surface-2) 88%, transparent);
    color: var(--muted);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.training-page .exercise-set-remove:hover {
    color: var(--ink);
    border-color: color-mix(in srgb, var(--training-accent) 40%, var(--training-border));
    transform: translateY(-1px);
}

.training-page .exercise-set-remove:active {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .training-page .exercise-set-header,
    .training-page .exercise-set-row {
        grid-template-columns: 60px minmax(100px, 1fr) minmax(80px, 0.9fr) minmax(160px, 1.4fr);
        gap: 0.6rem;
    }

    .training-page .exercise-set-add-row {
        grid-template-columns: 60px minmax(100px, 1fr) minmax(80px, 0.9fr) minmax(160px, 1.4fr);
        gap: 0.6rem;
    }
}

@media (max-width: 640px) {
    .training-page .exercise-set-header {
        display: none;
    }

    .training-page .exercise-set-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "set set"
            "weight reps"
            "notes notes";
        gap: 0.55rem;
        padding: 0.7rem 0.75rem;
    }

    .training-page .exercise-set-row .exercise-set-label {
        grid-area: set;
    }

    .training-page .exercise-set-row input[data-field="setWeight"] { grid-area: weight; }
    .training-page .exercise-set-row input[data-field="setReps"] { grid-area: reps; }
    .training-page .exercise-set-row input[data-field="setNote"] { grid-area: notes; }
    .training-page .exercise-set-add-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "spacer spacer"
            "spacer2 spacer2"
            "add add";
        gap: 0.55rem;
        justify-items: start;
    }

    .training-page .exercise-set-add-row .exercise-set-add {
        grid-area: add;
    }
    .training-page .exercise-set-row .auth-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 820px) {
    .training-page .exercise-row {
        grid-template-columns: 1fr;
    }

    .training-page .exercise-fields {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Exercise media layout overrides (must win over training-page defaults)
   ============================================================ */

.training-page .exercise-row.has-media {
    grid-template-columns: 92px minmax(0, 1fr) minmax(320px, 420px) !important;
    grid-template-areas: "media meta inputs" !important;
    align-items: start !important;
}

.training-page .exercise-row.has-media > .exercise-media-cell {
    grid-area: media;
    align-self: start;
}

.training-page .exercise-row.has-media > .exercise-meta {
    grid-area: meta;
    min-width: 0;
}

.training-page .exercise-row.has-media > .exercise-inputs {
    grid-area: inputs;
    min-width: 0;
    width: 100%;
    max-width: 460px;
    justify-self: end;
}

.training-page .exercise-row.has-media .exercise-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .training-page .exercise-row.has-media {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        grid-template-areas:
            "media meta"
            "inputs inputs" !important;
    }
}

@media (max-width: 520px) {
    .training-page .exercise-row.has-media {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "media"
            "meta"
            "inputs" !important;
    }

    .training-page .exercise-media-cell {
        width: 100%;
        height: 150px;
        border-radius: 18px;
    }
}

/* Save UX */
.training-page .training-save-btn {
    background: linear-gradient(90deg, color-mix(in srgb, var(--training-accent) 92%, #ffffff 0%), rgba(197, 141, 79, 0.85));
    border-color: color-mix(in srgb, var(--training-accent) 55%, var(--training-border));
}

.training-page .training-save-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
}

.training-page .training-save-btn:active {
    transform: translateY(0px);
}

.training-page .training-save-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ============================================
   TRAINING: WORKOUT CONTROL PANEL (RIGHT)
   Scope: training.html only via .training-page
   ============================================ */

.training-page {
    --training-workout-panel-width: 0px;
    --training-workout-panel-top: var(--navbar-height);
}

@media (min-width: 980px) {
    body.training-page.control-open {
        padding-left: var(--control-width);
    }

    body.training-page.control-collapsed {
        padding-left: var(--control-collapsed-width);
    }
}

.training-page .training-workout-panel {
    display: none;
}

@media (min-width: 980px) {
    .training-page .training-workout-panel {
        display: none;
        position: fixed;
        top: calc(var(--training-workout-panel-top) + 10px);
        left: calc(var(--control-width) + 10px);
        width: calc(var(--training-workout-panel-width) - 20px);
        height: calc(100vh - (var(--training-workout-panel-top) + 20px));
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        border-right: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 18px;
        background:
            radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.10), transparent 48%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
            rgba(20, 16, 12, 0.92);
        z-index: 60;
        backdrop-filter: blur(10px);
        box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
    }

    :root[data-theme="light"] .training-page .training-workout-panel {
        background:
            radial-gradient(circle at 20% 0%, rgba(231, 163, 77, 0.14), transparent 55%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent),
            rgba(255, 255, 255, 0.96);
        border-color: rgba(0, 0, 0, 0.10);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    }
}

.training-page .training-workout-panel-header {
    padding: 1rem 0.95rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

:root[data-theme="light"] .training-page .training-workout-panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.training-page .training-workout-panel-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.training-page .training-workout-panel-sub {
    margin-top: 0.2rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
}

.training-page .training-workout-panel-body {
    height: calc(100% - 74px);
    overflow: auto;
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.training-page .twp-list {
    display: grid;
    gap: 0.65rem;
}

.training-page .twp-week-item {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

:root[data-theme="light"] .training-page .twp-week-item {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.training-page .twp-week {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 0.75rem 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 900;
}

.training-page .twp-week-left {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.training-page .twp-week-left::before {
    content: '›';
    display: inline-block;
    color: var(--muted);
    font-weight: 950;
    transform: rotate(0deg);
    transition: var(--transition);
    opacity: 0.75;
}

.training-page .twp-week-item.expanded .twp-week-left::before {
    transform: rotate(90deg);
    color: var(--training-accent);
    opacity: 1;
}

.training-page .twp-week-item.expanded {
    border-color: color-mix(in srgb, var(--training-accent) 22%, rgba(255, 255, 255, 0.10));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

:root[data-theme="light"] .training-page .twp-week-item.expanded {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12);
}

.training-page .twp-week:hover {
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .training-page .twp-week:hover {
    background: rgba(0, 0, 0, 0.03);
}

.training-page .twp-week.active {
    box-shadow: inset 3px 0 0 var(--training-accent);
}

.training-page .twp-week-right {
    color: var(--muted);
    font-weight: 850;
    font-size: 0.9rem;
}

.training-page .twp-days {
    padding: 0.15rem 0.55rem 0.65rem;
    display: grid;
    gap: 0.35rem;
}

.training-page .twp-day {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    border-radius: 12px;
    padding: 0.65rem 0.7rem;
    cursor: pointer;
    display: grid;
    gap: 0.15rem;
    text-align: left;
}

:root[data-theme="light"] .training-page .twp-day {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.training-page .twp-day:hover {
    border-color: color-mix(in srgb, var(--training-accent) 28%, rgba(255, 255, 255, 0.10));
    background: color-mix(in srgb, var(--training-accent-weak) 25%, rgba(255, 255, 255, 0.02));
}

.training-page .twp-day.active {
    border-color: color-mix(in srgb, var(--training-accent) 55%, rgba(255, 255, 255, 0.10));
    background: linear-gradient(180deg, var(--training-accent-weak), rgba(255, 255, 255, 0.02));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--training-accent-weak) 75%, transparent);
}

.training-page .twp-day-title {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.training-page .twp-day.saved .twp-day-title::after {
    content: " \u2713";
    color: var(--training-accent);
    font-weight: 950;
}

.training-page .twp-day.saved {
    border-color: color-mix(in srgb, var(--training-accent) 30%, rgba(255, 255, 255, 0.10));
}

:root[data-theme="light"] .training-page .twp-day.saved {
    border-color: rgba(0, 0, 0, 0.12);
}

.training-page .twp-day-meta {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
}

/* Make sections feel unified + separated by a black line */
.training-page .training-section-line {
    height: 1px;
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0.55;
    border-radius: 999px;
}

:root[data-theme="light"] .training-page .training-section-line {
    background: rgba(0, 0, 0, 0.75);
    opacity: 0.18;
}

/* “Your workout today” header + day scroller */
.training-page .workout-today-bar {
    display: grid;
    gap: 0.65rem;
}

.training-page .workout-today-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.training-page .workout-today-sub {
    color: var(--muted);
    font-weight: 750;
    font-size: 0.92rem;
    margin-top: -0.25rem;
}

.training-page .workouts-toggle {
    height: 36px;
    width: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    cursor: pointer;
    transition: var(--transition);
    flex: 0 0 auto;
}

:root[data-theme="light"] .training-page .workouts-toggle {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.training-page .workouts-toggle:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--training-accent) 28%, rgba(255, 255, 255, 0.10));
}

.training-page .workouts-toggle:active {
    transform: translateY(0px);
}

.training-page .workouts-toggle-icon {
    display: inline-block;
    font-weight: 950;
    transform: rotate(90deg);
    transition: var(--transition);
    opacity: 0.9;
}

.training-page .workouts-card.collapsed .workouts-toggle-icon,
.training-page .workouts-toggle.collapsed .workouts-toggle-icon {
    transform: rotate(0deg);
}

.training-page .workouts-card.collapsed {
    overflow: hidden;
}

/* Collapsed day list becomes a slim "rail" with day initials */
@media (min-width: 920px) {
    .training-page .plan-shell.daylist-collapsed .week-split {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 0.85rem !important;
    }

    .training-page .workouts-card.collapsed .workouts-head-left {
        display: none;
    }

    .training-page .workouts-card.collapsed > .training-row {
        padding: 0.75rem 0.75rem !important;
        justify-content: center !important;
    }

    .training-page .workouts-card.collapsed .workouts-toggle {
        width: 44px;
    }

    .training-page .workouts-card.collapsed .day-tabs {
        padding: 0.6rem 0.65rem 0.75rem !important;
        gap: 0.55rem !important;
    }

    .training-page .workouts-card.collapsed .day-tab {
        min-width: 0 !important;
        width: 100% !important;
        padding: 0.6rem 0.4rem !important;
        border-radius: 18px !important;
        text-align: center !important;
    }

    .training-page .workouts-card.collapsed .day-tab-title {
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        gap: 0.2rem !important;
    }

    .training-page .workouts-card.collapsed .day-tab-title > span:first-child {
        display: none !important;
    }

    .training-page .workouts-card.collapsed .day-tab-abbr {
        display: inline-block !important;
        font-weight: 950 !important;
        letter-spacing: -0.02em !important;
        font-size: 1.02rem !important;
    }

    .training-page .workouts-card.collapsed .day-tab-meta {
        display: none !important;
    }

    .training-page .day-tab-abbr {
        display: none;
    }
}

.training-page .workout-today-nav {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 0.55rem;
    align-items: center;
}

.training-page .workout-rel-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 141, 79, 0.18), transparent 55%),
        rgba(255, 255, 255, 0.02);
    color: var(--ink);
    font-weight: 950;
    letter-spacing: -0.01em;
    padding: 0 0.85rem;
    text-align: center;
}

:root[data-theme="light"] .training-page .workout-rel-label {
    border-color: rgba(0, 0, 0, 0.10);
    background:
        radial-gradient(circle at 20% 0%, rgba(231, 163, 77, 0.18), transparent 55%),
        rgba(0, 0, 0, 0.02);
}

.training-page .workout-nav-btn {
    height: 36px;
    width: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
}

:root[data-theme="light"] .training-page .workout-nav-btn {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
}

.training-page .workout-nav-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--training-accent) 28%, rgba(255, 255, 255, 0.10));
}

.training-page .workout-nav-btn:active {
    transform: translateY(0px);
}

@media (min-width: 980px) {
    /* Remove the extra "right sidebar" spacing now that we use the in-page day selector. */
    body.training-page.control-open {
        padding-left: var(--control-width);
    }

    body.training-page.control-collapsed {
        padding-left: var(--control-collapsed-width);
    }
}

/* ============================================
   TRAINING (Trainerize-inspired layout)
   Scope: training.html only via .training-page
   ============================================ */

.training-page .tz-training {
    --tz-bg: rgba(255, 255, 255, 0.02);
    --tz-card: rgba(255, 255, 255, 0.03);
    --tz-card-2: rgba(255, 255, 255, 0.02);
    --tz-border: rgba(255, 255, 255, 0.12);
    --tz-muted: rgba(245, 236, 226, 0.72);
    --tz-blue: #229ed4;
    --tz-blue-weak: rgba(34, 158, 212, 0.14);
    --tz-radius: 16px;
    --tz-radius-sm: 12px;
    --tz-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
}

:root[data-theme="light"] .training-page .tz-training {
    --tz-bg: #f6f7f9;
    --tz-card: #ffffff;
    --tz-card-2: #fbfbfc;
    --tz-border: rgba(0, 0, 0, 0.10);
    --tz-muted: rgba(27, 18, 12, 0.62);
    --tz-shadow: 0 16px 44px rgba(0, 0, 0, 0.10);
}

.training-page .training-shell .container {
    max-width: none;
}

.training-page .tz-training-layout {
    width: min(1260px, calc(100% - 24px));
    margin: 0 auto;
    padding: 1.2rem 0 2.5rem;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

@media (max-width: 980px) {
    .training-page .tz-training-layout {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding-top: 0.9rem;
    }
}

.training-page .tz-sidebar-card {
    border: 1px solid var(--tz-border);
    border-radius: var(--tz-radius);
    background: var(--tz-card);
    box-shadow: var(--tz-shadow);
    overflow: hidden;
}

.training-page .tz-sidebar-head {
    padding: 1rem 1rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--tz-border) 70%, transparent);
    background: linear-gradient(180deg, var(--tz-bg), transparent);
}

.training-page .tz-sidebar-title {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.training-page .tz-btn {
    border-radius: 999px;
    border: 1px solid var(--tz-border);
    background: var(--tz-card-2);
    color: var(--ink);
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    transition: var(--transition);
    user-select: none;
    white-space: nowrap;
}

.training-page .tz-btn-small {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
}

.training-page .tz-btn-blue {
    border-color: color-mix(in srgb, var(--tz-blue) 55%, var(--tz-border));
    background: linear-gradient(180deg, rgba(34, 158, 212, 0.22), rgba(34, 158, 212, 0.10));
    color: var(--ink);
}

.training-page .tz-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.02);
}

.training-page .tz-btn:active {
    transform: translateY(0px);
}

.training-page .tz-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.9;
}

.training-page .tz-sidebar-body {
    padding: 0.85rem;
}

/* Day list: Trainerize-style sidebar list */
.training-page .tz-daylist {
    display: grid;
    gap: 0.55rem;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.training-page .tz-daylist button {
    width: 100%;
    text-align: left;
    border: 1px solid var(--tz-border);
    background: var(--tz-card-2);
    border-radius: var(--tz-radius-sm);
    padding: 0.8rem 0.85rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.training-page .tz-daylist button::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--tz-border) 75%, transparent);
    background: transparent;
    flex: 0 0 auto;
}

.training-page .tz-daylist button:hover {
    border-color: color-mix(in srgb, var(--tz-blue) 30%, var(--tz-border));
    background: color-mix(in srgb, var(--tz-blue-weak) 30%, var(--tz-card-2));
}

.training-page .tz-daylist button.active {
    border-color: color-mix(in srgb, var(--tz-blue) 55%, var(--tz-border));
    background: linear-gradient(180deg, var(--tz-blue-weak), var(--tz-card-2));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tz-blue-weak) 80%, transparent);
}

.training-page .tz-daylist button.active::after {
    background: var(--tz-blue);
    border-color: color-mix(in srgb, var(--tz-blue) 55%, var(--tz-border));
}

@media (max-width: 980px) {
    .training-page .tz-daylist {
        display: flex;
        overflow: auto;
        gap: 0.55rem;
        padding-bottom: 0.25rem;
        scroll-snap-type: x mandatory;
    }

    .training-page .tz-daylist button {
        min-width: min(260px, 76vw);
        scroll-snap-align: start;
    }
}

/* Content */
.training-page .tz-content-head {
    margin-bottom: 0.9rem;
    padding: 0.1rem 0.2rem;
}

.training-page .tz-content-title {
    margin: 0;
    font-weight: 950;
    letter-spacing: -0.03em;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

.training-page .tz-content-sub {
    margin: 0.25rem 0 0;
    color: var(--tz-muted);
    font-weight: 750;
}

.training-page .training-workout-card {
    border: 1px solid var(--tz-border);
    border-radius: var(--tz-radius);
    background: var(--tz-card);
    box-shadow: var(--tz-shadow);
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.training-page .training-phase-header {
    position: static;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--tz-border) 70%, transparent);
    border-radius: var(--tz-radius-sm);
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    align-items: center;
}

.training-page .training-phase-header .phase-type {
    background: color-mix(in srgb, var(--tz-blue) 88%, #000 0%);
    color: #fff;
    border-radius: 10px;
    padding: 0.25rem 0.6rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    font-size: 0.92rem;
}

.training-page .training-phase-header .phase-week,
.training-page .training-phase-header .phase-goal {
    color: var(--tz-muted);
    font-weight: 850;
}

.training-page .tz-workout-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--tz-border) 70%, transparent);
    border-radius: var(--tz-radius-sm);
    background: var(--tz-card-2);
}

.training-page .tz-workout-toolbar-title {
    font-weight: 950;
    letter-spacing: -0.02em;
}

.training-page .tz-search {
    width: min(420px, 52vw);
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.training-page .tz-search-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--tz-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    padding: 0.62rem 0.9rem;
    font-weight: 750;
    outline: none;
}

:root[data-theme="light"] .training-page .tz-search-input {
    background: rgba(0, 0, 0, 0.02);
}

.training-page .tz-search-input:focus {
    border-color: color-mix(in srgb, var(--tz-blue) 55%, var(--tz-border));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tz-blue-weak) 85%, transparent);
}

/* Exercise cards: keep your existing markup but tighten spacing and match the system */
.training-page .training-exercise-list {
    display: grid;
    gap: 0.85rem;
}

.training-page .training-exercise-row {
    border: 1px solid color-mix(in srgb, var(--tz-border) 80%, transparent);
    border-radius: var(--tz-radius);
    background: var(--tz-card-2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    padding: 0.95rem;
}

.training-page .training-exercise-row .exercise-name {
    color: var(--ink);
}

.training-page .training-exercise-row .exercise-meta {
    color: var(--tz-muted);
    font-weight: 750;
}

.training-page .training-save-btn {
    align-self: end;
    margin-top: 0.35rem;
    border-radius: 999px;
}
