/* ============================================================
   MENUPLAN COMPONENT STYLES
   Uses semantic tokens only — no hardcoded colors.
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--type-base);
    color: var(--text-primary);
    background: var(--bg-app);
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
}

#app {
    height: 100%;
}

/* ── App Shell ── */
.mp-shell {
    display: grid;
    grid-template-rows: var(--header-height) 1fr var(--nav-height);
    height: 100dvh;
    height: 100vh; /* fallback */
    background: var(--bg-app);
    overflow: hidden;
}

/* ── Header ── */
.mp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 50;
}

.mp-header__left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mp-header__wordmark {
    font-family: var(--font-display);
    font-size: var(--type-lg);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

.mp-header__household {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--type-sm);
    font-family: var(--font-body);
    color: var(--text-secondary);
    background: var(--bg-surface-alt);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-header__household:hover {
    border-color: var(--border-default);
    background: var(--bg-surface);
}

.mp-header__household-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.mp-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.mp-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.mp-icon-btn:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

/* ── Scrollable Content Area ── */
.mp-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background: var(--bg-app);
}

.mp-content-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--space-4);
    padding-bottom: calc(var(--space-8) + var(--safe-bottom));
    min-height: 100%;
}

/* ── Bottom Navigation ── */
.mp-nav {
    display: flex;
    align-items: stretch;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
    z-index: 50;
}

.mp-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: var(--space-2) 0 var(--space-3);
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
    position: relative;
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    border: none;
}

.mp-nav__item.active {
    color: var(--accent);
}

.mp-nav__item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    animation: slideIn var(--dur-base) var(--ease-spring) both;
}

@keyframes slideIn {
    from { width: 0; opacity: 0; }
    to   { width: 28px; opacity: 1; }
}

.mp-nav__icon {
    width: 22px;
    height: 22px;
    transition: transform var(--dur-fast) var(--ease-spring);
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mp-nav__item.active .mp-nav__icon {
    transform: scale(1.12);
}

/* ── Cards ── */
.mp-card {
    background: var(--bg-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}

.mp-card:active {
    transform: scale(0.985);
}

/* ── Recipe Cards ── */
.mp-recipe-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mp-recipe-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.mp-recipe-card__thumb {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Skin-specific thumbnail placeholders */
[data-skin="hearth"] .mp-recipe-card__thumb {
    background:
        repeating-linear-gradient(
            45deg,
            var(--h-linen) 0px, var(--h-linen) 1px,
            transparent 1px, transparent 9px
        ),
        repeating-linear-gradient(
            -45deg,
            var(--h-parchment) 0px, var(--h-parchment) 1px,
            var(--h-cream) 1px, var(--h-cream) 9px
        );
}

[data-skin="slate"] .mp-recipe-card__thumb {
    background: repeating-linear-gradient(
        -55deg,
        var(--s-smoke) 0px, var(--s-smoke) 1px,
        var(--s-offwhite) 1px, var(--s-offwhite) 18px
    );
}

[data-skin="grove"] .mp-recipe-card__thumb {
    background-color: var(--g-cream);
    background-image: radial-gradient(circle, var(--g-straw) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
}

/* Dark mode thumbs */
[data-mode="dark"][data-skin="hearth"] .mp-recipe-card__thumb {
    background:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px,
            transparent 1px, transparent 9px
        ),
        var(--skin-bg-surface-alt);
}

[data-mode="dark"][data-skin="slate"] .mp-recipe-card__thumb,
[data-mode="dark"][data-skin="grove"] .mp-recipe-card__thumb {
    background: var(--skin-bg-surface-alt);
    background-image: repeating-linear-gradient(
        -55deg,
        rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px,
        transparent 1px, transparent 18px
    );
}

.mp-recipe-card__thumb-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-default);
}

.mp-recipe-card__thumb-icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.mp-recipe-card__body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mp-recipe-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.mp-recipe-card__title {
    font-family: var(--font-display);
    font-size: var(--type-md);
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0;
}

.mp-recipe-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-1);
}

.mp-recipe-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* ── Meal Type Pills ── */
.mp-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px var(--space-3);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mp-pill--breakfast {
    background: color-mix(in srgb, var(--meal-breakfast) 18%, transparent);
    color: color-mix(in srgb, var(--meal-breakfast) 90%, #000);
}

.mp-pill--lunch {
    background: color-mix(in srgb, var(--meal-lunch) 16%, transparent);
    color: color-mix(in srgb, var(--meal-lunch) 90%, #000);
}

.mp-pill--dinner {
    background: color-mix(in srgb, var(--meal-dinner) 16%, transparent);
    color: var(--meal-dinner);
}

.mp-pill--snack {
    background: color-mix(in srgb, var(--meal-snack) 20%, transparent);
    color: var(--text-secondary);
}

/* Cuisine tag */
.mp-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 500;
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Cook time badge */
.mp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    color: var(--text-muted);
}

.mp-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* Rating stars */
.mp-stars {
    display: flex;
    gap: 2px;
}

.mp-star {
    width: 14px;
    height: 14px;
    color: var(--meal-breakfast);
}

.mp-star--filled path {
    fill: var(--meal-breakfast);
    stroke: none;
}

.mp-star--empty path {
    fill: none;
    stroke: var(--border-default);
    stroke-width: 1.5;
}

/* Ingredient chips */
.mp-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--type-sm);
    font-family: var(--font-body);
}

/* ── Week Calendar ── */
.mp-week-header {
    margin-bottom: var(--space-4);
}

.mp-week-title {
    font-family: var(--font-display);
    font-size: var(--type-xl);
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
    line-height: 1.1;
}

.mp-week-subtitle {
    font-size: var(--type-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
}

.mp-week-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.mp-week-nav__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-out);
    flex-shrink: 0;
}

.mp-week-nav__btn:hover {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

.mp-week-nav__btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.mp-week-nav__label {
    flex: 1;
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.mp-week-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mp-day-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    border-bottom: 1px solid var(--border-subtle);
}

.mp-day-row:last-child {
    border-bottom: none;
}

.mp-day-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-3) var(--space-2) var(--space-3) 0;
    gap: 2px;
}

.mp-day-label__name {
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1;
}

.mp-day-label__num {
    font-family: var(--font-display);
    font-size: var(--type-lg);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mp-day-label__num.today {
    background: var(--accent);
    color: var(--text-on-accent);
}

.mp-day-slots {
    padding: var(--space-3) 0 var(--space-3) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border-left: 1px solid var(--border-subtle);
}

/* Empty meal slot */
.mp-slot-empty {
    border: 1.5px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: var(--type-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    background: transparent;
    width: 100%;
    text-align: left;
}

.mp-slot-empty:hover,
.mp-slot-empty:focus {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.mp-slot-empty svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    flex-shrink: 0;
}

/* Filled meal slot */
.mp-slot-filled {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out);
    border: 1px solid var(--border-subtle);
}

.mp-slot-filled:active {
    transform: scale(0.98);
}

.mp-slot-filled__accent {
    width: 3px;
    border-radius: 2px;
    align-self: stretch;
    flex-shrink: 0;
}

.mp-slot-filled__content {
    flex: 1;
    min-width: 0;
}

.mp-slot-filled__meal {
    font-size: var(--type-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.mp-slot-filled__name {
    font-family: var(--font-display);
    font-size: var(--type-base);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mp-slot-filled__time {
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Empty State ── */
.mp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    text-align: center;
    gap: var(--space-4);
}

.mp-empty-state__icon {
    width: 72px;
    height: 72px;
    color: var(--border-default);
    opacity: 0.6;
}

.mp-empty-state__headline {
    font-family: var(--font-display);
    font-size: var(--type-xl);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.mp-empty-state__sub {
    font-size: var(--type-base);
    color: var(--text-muted);
    margin: 0;
    max-width: 240px;
}

/* ── Section Headers ── */
.mp-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.mp-section-title {
    font-family: var(--font-display);
    font-size: var(--type-lg);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.mp-section-link {
    font-size: var(--type-sm);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-body);
}

.mp-section-link:hover {
    text-decoration: underline;
}

/* ── Page Title ── */
.mp-page-title {
    font-family: var(--font-display);
    font-size: var(--type-2xl);
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mp-page-subtitle {
    font-size: var(--type-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
    margin: 0 0 var(--space-6);
}

/* ── Search / Filter bar ── */
.mp-search {
    position: relative;
    margin-bottom: var(--space-4);
}

.mp-search__input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: var(--type-base);
    color: var(--text-primary);
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
    outline: none;
}

.mp-search__input::placeholder {
    color: var(--text-muted);
}

.mp-search__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.mp-search__icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* ── Filter chips row ── */
.mp-filter-row {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: var(--space-4);
    padding-bottom: 2px;
}

.mp-filter-row::-webkit-scrollbar {
    display: none;
}

.mp-filter-chip {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    white-space: nowrap;
}

.mp-filter-chip:hover,
.mp-filter-chip.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

.mp-filter-chip.active {
    font-weight: 700;
}

/* ── Settings ── */
.mp-settings-group {
    margin-bottom: var(--space-6);
}

.mp-settings-group-label {
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 var(--space-3);
}

.mp-settings-card {
    background: var(--bg-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.mp-settings-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.mp-settings-row:last-child {
    border-bottom: none;
}

.mp-settings-row__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-settings-row__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.mp-settings-row__label {
    flex: 1;
    font-size: var(--type-base);
    color: var(--text-primary);
    font-weight: 500;
}

.mp-settings-row__sub {
    font-size: var(--type-sm);
    color: var(--text-muted);
}

/* Theme skin switcher */
.mp-skin-switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding: var(--space-4);
}

.mp-skin-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background: var(--bg-surface-alt);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mp-skin-btn:hover {
    border-color: var(--border-default);
}

.mp-skin-btn.active {
    border-color: var(--accent);
    background: var(--accent-muted);
    color: var(--accent);
}

.mp-skin-swatch {
    width: 48px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.mp-skin-swatch__half {
    height: 100%;
}

/* Hearth swatch colors */
.mp-skin-btn--hearth .mp-skin-swatch__half:first-child { background: #C1694F; }
.mp-skin-btn--hearth .mp-skin-swatch__half:last-child  { background: #FAF6F0; }

/* Slate swatch colors */
.mp-skin-btn--slate .mp-skin-swatch__half:first-child { background: #4A7C6F; }
.mp-skin-btn--slate .mp-skin-swatch__half:last-child  { background: #FAFCFB; }

/* Grove swatch colors */
.mp-skin-btn--grove .mp-skin-swatch__half:first-child { background: #4A6741; }
.mp-skin-btn--grove .mp-skin-swatch__half:last-child  { background: #FDFAF3; }

/* Dark mode toggle */
.mp-mode-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
}

.mp-mode-toggle-row__label {
    font-size: var(--type-base);
    font-weight: 500;
    color: var(--text-primary);
}

.mp-toggle {
    position: relative;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.mp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.mp-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    background: var(--border-default);
    transition: background var(--dur-base) var(--ease-out);
}

.mp-toggle input:checked + .mp-toggle__track {
    background: var(--accent);
}

.mp-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform var(--dur-base) var(--ease-spring);
}

.mp-toggle input:checked ~ .mp-toggle__thumb {
    transform: translateX(20px);
}

/* ── Version footer ── */
.mp-version-footer {
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    color: var(--text-muted);
    padding: var(--space-6) var(--space-4) var(--space-2);
    text-align: center;
    opacity: 0.6;
}

/* ── Skeleton / Loading ── */
.mp-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface-alt) 25%,
        var(--border-subtle) 50%,
        var(--bg-surface-alt) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ── Responsive: desktop ── */
@media (min-width: 1024px) {
    .mp-shell {
        grid-template-columns: 240px 1fr;
        grid-template-rows: var(--header-height) 1fr;
    }

    .mp-header {
        grid-column: 1 / -1;
    }

    .mp-nav {
        grid-row: 2;
        grid-column: 1;
        flex-direction: column;
        border-top: none;
        border-right: 1px solid var(--border-subtle);
        box-shadow: none;
        padding: var(--space-6) 0;
        padding-bottom: 0;
    }

    .mp-nav__item {
        flex-direction: row;
        gap: var(--space-3);
        padding: var(--space-3) var(--space-6);
        text-transform: none;
        letter-spacing: normal;
        font-size: var(--type-base);
        justify-content: flex-start;
    }

    .mp-nav__item.active::before {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 28px;
        bottom: auto;
        border-radius: var(--radius-sm);
        animation: none;
    }

    .mp-content {
        grid-column: 2;
        grid-row: 2;
    }

    .mp-content-inner {
        max-width: var(--grid-max-width, 900px);
        padding: var(--space-8);
    }

    .mp-recipe-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    .mp-week-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: var(--space-3);
    }

    .mp-week-grid .mp-day-row {
        display: flex;
        flex-direction: column;
        border-bottom: none;
        border-right: 1px solid var(--border-subtle);
        padding-right: var(--space-3);
    }

    .mp-week-grid .mp-day-row:last-child {
        border-right: none;
        padding-right: 0;
    }

    .mp-week-grid .mp-day-label {
        flex-direction: row;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-2) 0 var(--space-3);
        justify-content: flex-start;
    }

    .mp-week-grid .mp-day-slots {
        border-left: none;
        padding-left: 0;
    }
}

@media (min-width: 1280px) {
    .mp-recipe-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Divider ── */
.mp-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-4) 0;
}

/* ── FAB (Floating action) ── */
.mp-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--space-4) + var(--safe-bottom));
    right: var(--space-4);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform var(--dur-fast) var(--ease-spring),
                box-shadow var(--dur-fast) var(--ease-out);
    z-index: 40;
}

.mp-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.mp-fab:active {
    transform: scale(0.96);
}

.mp-fab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
}

/* ── Tab bar (Shopping page) ── */
.mp-tab-bar {
    display: flex;
    gap: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    overflow: hidden;
    margin-bottom: var(--space-5);
}

.mp-tab {
    flex: 1;
    padding: var(--space-3) var(--space-2);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    white-space: nowrap;
}

.mp-tab:last-child {
    border-right: none;
}

.mp-tab:hover {
    color: var(--text-primary);
    background: var(--bg-surface-alt);
}

.mp-tab.active {
    background: var(--accent-muted);
    color: var(--accent);
}

/* ── Shopping progress bar ── */
.mp-shopping-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.mp-shopping-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mp-shopping-progress__bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--border-subtle);
    overflow: hidden;
}

.mp-shopping-progress__fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-pill);
    transition: width var(--dur-base) var(--ease-out);
}

.mp-shopping-progress__label {
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    color: var(--text-muted);
}

/* ── Combine / Separate toggle ── */
.mp-combine-toggle {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.mp-combine-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-default);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
}

.mp-combine-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.mp-combine-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-muted);
}

.mp-combine-btn.active {
    border-color: var(--accent);
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 700;
}

/* ── Combined grocery line (merged across households) ── */
.mp-combined-item {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.mp-combined-item:last-child {
    border-bottom: none;
}

.mp-combined-item__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-1);
}

.mp-combined-item__name {
    font-size: var(--type-base);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.mp-combined-item__total {
    font-family: var(--font-mono);
    font-size: var(--type-sm);
    color: var(--text-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.mp-combined-item__subtotals {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.mp-combined-item__sub {
    font-size: var(--type-xs);
    color: var(--text-muted);
    font-family: var(--font-body);
}

.mp-combined-item__sub + .mp-combined-item__sub::before {
    content: '·';
    margin-right: var(--space-2);
}

/* ── Plan selection option ── */
.mp-plan-option {
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}

.mp-plan-option:hover {
    background: var(--bg-surface-alt);
}

.mp-plan-option.selected {
    background: var(--accent-muted);
}

.mp-plan-option__radio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── Household section (separate mode) ── */
.mp-household-section {
    margin-bottom: var(--space-6);
}

.mp-household-section__header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--type-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.mp-household-section__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* ── Grocery generate panel ── */
.mp-generate-panel {
    /* intentionally minimal — uses shared settings-card + btn styles */
}

/* ── Shopping list ── */
.mp-shopping-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--dur-fast) var(--ease-out);
}

.mp-shopping-item:last-child {
    border-bottom: none;
}

.mp-shopping-item.checked {
    opacity: 0.5;
}

.mp-shopping-item.checked .mp-shopping-item__name {
    text-decoration: line-through;
}

.mp-shopping-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-default);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-out);
    background: transparent;
}

.mp-shopping-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.mp-shopping-item__name {
    flex: 1;
    font-size: var(--type-base);
    color: var(--text-primary);
    font-weight: 500;
}

.mp-shopping-item__amount {
    font-family: var(--font-mono);
    font-size: var(--type-sm);
    color: var(--text-muted);
}

.mp-category-header {
    padding: var(--space-3) var(--space-4) var(--space-2);
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-surface-alt);
}

/* ============================================================
   SHARED COMPONENT STYLES (Task 208)
   ============================================================ */

/* ── AppButton ── */
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--type-base);
    font-weight: 600;
    line-height: 1;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-spring),
                box-shadow var(--dur-fast) var(--ease-out);
}

.mp-btn:active { transform: scale(0.97); }

.mp-btn--primary {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.mp-btn--primary:hover { filter: brightness(1.06); }

.mp-btn--secondary {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}
.mp-btn--secondary:hover { background: var(--bg-elevated); }

.mp-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}
.mp-btn--ghost:hover { background: var(--bg-surface-alt); }

.mp-btn--danger {
    background: var(--color-red, #D94040);
    color: #fff;
}
.mp-btn--danger:hover { filter: brightness(1.08); }

.mp-btn--full { width: 100%; }

.mp-btn--sm {
    font-size: var(--type-sm);
    padding: var(--space-2) var(--space-4);
}

.mp-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.mp-btn__icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

/* ── LoadingSpinner ── */
.mp-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mp-spinner svg {
    animation: spin 0.9s linear infinite;
    color: var(--accent);
}
.mp-spinner--sm svg { width: 18px; height: 18px; }
.mp-spinner--md svg { width: 32px; height: 32px; }
.mp-spinner--lg svg { width: 48px; height: 48px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PageHeader ── */
.mp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}
.mp-page-header__text { flex: 1; }
.mp-page-header__trail { flex-shrink: 0; }

/* ── CardItem ── */
.mp-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: var(--space-4);
    transition: box-shadow var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-spring);
}
.mp-card--clickable {
    cursor: pointer;
}
.mp-card--clickable:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.mp-card--clickable:active { transform: none; }
.mp-card__body { flex: 1; min-width: 0; }
.mp-card__lead { flex-shrink: 0; }
.mp-card__trail { flex-shrink: 0; }

/* ── EmptyState ── */
.mp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-12) var(--space-6);
    gap: var(--space-3);
}
.mp-empty-state__icon {
    width: 56px;
    height: 56px;
    stroke: var(--text-muted);
    margin-bottom: var(--space-2);
}
.mp-empty-state__headline {
    font-size: var(--type-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.mp-empty-state__sub {
    font-size: var(--type-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* ── FormInput / FormTextarea / FormSelect ── */
.mp-field { display: flex; flex-direction: column; gap: var(--space-1); }

.mp-field__label {
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.mp-field__input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--type-base);
    color: var(--text-primary);
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
    outline: none;
    -webkit-appearance: none;
}

.mp-field__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.mp-field__input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mp-field--error .mp-field__input {
    border-color: var(--color-red, #D94040);
}

.mp-field__error {
    font-size: var(--type-xs);
    color: var(--color-red, #D94040);
    margin: 0;
}

.mp-field__hint {
    font-size: var(--type-xs);
    color: var(--text-muted);
    margin: 0;
}

.mp-field__textarea {
    resize: vertical;
    min-height: 80px;
}

/* Select wrapper for custom chevron */
.mp-field__select-wrap {
    position: relative;
}
.mp-field__select {
    padding-right: var(--space-8);
    cursor: pointer;
}
.mp-field__select-chevron {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

/* ── ToggleSwitch ── */
.mp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    cursor: pointer;
    gap: var(--space-4);
}
.mp-toggle-row__label {
    font-size: var(--type-base);
    font-weight: 500;
    color: var(--text-primary);
}

/* ── ServingsStepper ── */
.mp-stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-surface-alt);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-3);
}
.mp-stepper__btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-spring);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.mp-stepper__btn:hover { background: var(--accent-muted); color: var(--accent); }
.mp-stepper__btn:active { transform: scale(0.9); }
.mp-stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.mp-stepper__btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; }
.mp-stepper__value {
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

/* ── AppDialog (bottom-sheet on mobile, centered on desktop) ── */
.mp-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.48);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.18s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mp-dialog {
    width: 100%;
    max-width: 600px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.22s var(--ease-spring);
    overflow: hidden;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.mp-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-5) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.mp-dialog__title {
    font-size: var(--type-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.mp-dialog__close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-surface-alt);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: background var(--dur-fast) var(--ease-out);
}
.mp-dialog__close:hover { background: var(--border-subtle); }
.mp-dialog__close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.mp-dialog__body {
    padding: var(--space-5);
    overflow-y: auto;
    flex: 1;
}
.mp-dialog__footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-3);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .mp-dialog-backdrop { align-items: center; }
    .mp-dialog {
        border-radius: var(--radius-lg);
        animation: scaleIn 0.2s var(--ease-spring);
    }
    @keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

/* ── ConfirmDialog ── */
.mp-confirm-dialog__msg {
    font-size: var(--type-base);
    color: var(--text-secondary);
    margin: 0 0 var(--space-5);
}
.mp-confirm-dialog__actions {
    display: flex;
    gap: var(--space-3);
    flex-direction: column;
}
@media (min-width: 480px) {
    .mp-confirm-dialog__actions { flex-direction: row-reverse; }
}

/* ── ToastHost ── */
.mp-toast-host {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--space-4));
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
    width: calc(100% - var(--space-8));
    max-width: 400px;
}

.mp-toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-inverse, #1A1A1A);
    color: var(--text-on-dark, #F5F5F5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    animation: toastIn 0.22s var(--ease-spring);
    font-size: var(--type-sm);
}
.mp-toast--out { animation: toastOut 0.22s var(--ease-out) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(8px); } }

.mp-toast--success { background: var(--color-green-800, #166534); }
.mp-toast--error   { background: var(--color-red, #D94040); }
.mp-toast--info    { background: var(--bg-inverse, #1A1A1A); }

.mp-toast__icon { font-size: 1.1em; }
.mp-toast__msg  { flex: 1; }
.mp-toast__close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    opacity: 0.7;
    pointer-events: all;
    padding: 0;
    display: flex;
    align-items: center;
}
.mp-toast__close:hover { opacity: 1; }
.mp-toast__close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ============================================================
   RECIPE SCREENS — Task 209
   ============================================================ */

/* ── Back button (shared between detail + form) ── */
.mp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: var(--space-4);
}
.mp-back-btn svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none;
    stroke-width: 2.2; stroke-linecap: round;
}

/* ── Recipe Detail ── */
.mp-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}
.mp-detail-header__actions {
    display: flex;
    gap: var(--space-2);
}

.mp-detail-hero {
    margin-bottom: var(--space-6);
}
.mp-detail-thumb {
    width: 100%;
    height: 160px;
    background: var(--accent-muted);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: var(--accent);
}
.mp-detail-thumb svg {
    width: 56px; height: 56px;
    stroke: currentColor; fill: none;
    stroke-width: 1; stroke-linecap: round;
    opacity: 0.5;
}
.mp-detail-title {
    font-family: var(--font-display);
    font-size: var(--type-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.mp-detail-desc {
    font-size: var(--type-base);
    color: var(--text-secondary);
    margin: 0 0 var(--space-3);
    line-height: 1.5;
}
.mp-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* ── Detail sections ── */
.mp-detail-section {
    margin-bottom: var(--space-6);
}
.mp-detail-section__title {
    font-family: var(--font-display);
    font-size: var(--type-md);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--accent-muted);
}
.mp-detail-empty {
    font-size: var(--type-sm);
    color: var(--text-muted);
    margin: 0;
}

/* ── Ingredients list ── */
.mp-ingredient-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.mp-ingredient-item {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    font-size: var(--type-base);
}
.mp-ingredient-item__qty {
    font-family: var(--font-mono);
    font-size: var(--type-sm);
    color: var(--accent);
    font-weight: 600;
    min-width: 60px;
    flex-shrink: 0;
}
.mp-ingredient-item__name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}
.mp-ingredient-item__prep {
    font-size: var(--type-sm);
    color: var(--text-muted);
    font-style: italic;
}

/* ── Steps list ── */
.mp-steps-list {
    margin: 0;
    padding: 0 0 0 var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.mp-steps-item {
    font-size: var(--type-base);
    color: var(--text-primary);
    line-height: 1.6;
    padding-left: var(--space-2);
}

/* ── Rating: aggregate + own ── */
.mp-rating-aggregate {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}
.mp-rating-aggregate__label {
    font-size: var(--type-sm);
    color: var(--text-secondary);
    margin: 0;
}

.mp-own-rating { }
.mp-own-rating__label {
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 var(--space-2);
}

/* ── Stars ── */
.mp-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}
.mp-star {
    width: 18px; height: 18px;
    stroke: var(--accent); fill: none;
    stroke-width: 1.4; stroke-linecap: round;
}
.mp-star--filled { fill: var(--accent); }
.mp-star--empty  { fill: transparent; }
.mp-stars--lg .mp-star { width: 22px; height: 22px; }
.mp-stars--interactive { gap: var(--space-1); }

.mp-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: transform var(--dur-fast) var(--ease-spring);
}
.mp-star-btn:hover { transform: scale(1.2); }
.mp-star-btn:disabled { cursor: not-allowed; opacity: 0.6; transform: none; }
.mp-star-btn svg { display: block; }

/* ── Skeleton block (used in detail) ── */
.mp-detail-skeleton {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) 0;
}

/* ── Recipe Form ── */
.mp-form-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.mp-form-title {
    font-family: var(--font-display);
    font-size: var(--type-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}
.mp-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* ============================================================
   TASK-210 — Plan calendar interactions + Menus
   ============================================================ */

/* ── Filled slot: recurring indicator + chevron ── */
.mp-slot-filled {
    position: relative;
}
.mp-slot-filled__chevron {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
}
.mp-slot-filled--recurring {
    border-left: 3px solid var(--accent);
}
.mp-slot-filled__recur-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
}

/* ── Slot dialog ── */
.mp-slot-dialog {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}
.mp-form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-top: var(--space-2);
    padding-bottom: var(--space-12);
}

.mp-field__hint-inline {
    font-size: var(--type-xs);
    color: var(--text-muted);
    font-weight: 400;
}

/* ── URL Import panel ── */
.mp-url-import {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mp-url-import__label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.mp-url-import__hint {
    font-size: var(--type-xs);
    font-weight: 400;
    color: var(--text-muted);
}

.mp-url-import__row {
    display: flex;
    gap: var(--space-2);
    align-items: stretch;
}

.mp-url-import__input {
    flex: 1;
    min-width: 0;
}

.mp-url-import__btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
    padding: 0 var(--space-4);
    height: 44px;
}

.mp-url-import__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mp-spin 0.7s linear infinite;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

.mp-url-import__success {
    margin: 0;
    font-size: var(--type-sm);
    color: #15803d;
    padding: var(--space-2) var(--space-3);
    background: #dcfce7;
    border-radius: var(--radius-sm);
}

.mp-url-import__error {
    font-size: var(--type-sm);
    color: #b91c1c;
    padding: var(--space-2) var(--space-3);
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
}

.mp-url-import__error p {
    margin: 0;
}

.mp-url-import__error-hint {
    margin-top: var(--space-1) !important;
    color: #991b1b;
    font-style: italic;
}

/* ── Ingredient Matcher results ── */
.mp-matcher-results {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}
.mp-matcher-results__title {
    font-size: var(--type-sm);
    font-weight: 700;
    color: var(--text-secondary);
    padding: var(--space-3) var(--space-4);
    margin: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface-alt);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mp-matcher-row {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.mp-matcher-row:last-child { border-bottom: none; }

/* Status color left-border */
.mp-matcher-row--auto    { border-left: 3px solid var(--color-green, #16a34a); }
.mp-matcher-row--medium  { border-left: 3px solid var(--accent-2, #d97706); }
.mp-matcher-row--low     { border-left: 3px solid var(--color-red, #D94040); }
.mp-matcher-row--manual  { border-left: 3px solid var(--accent); }
.mp-matcher-row--unmatched { border-left: 3px solid var(--border-default); }

.mp-matcher-row__raw {
    font-size: var(--type-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.mp-matcher-row__match {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.mp-matcher-row__name {
    font-size: var(--type-base);
    font-weight: 600;
    color: var(--text-primary);
}
.mp-matcher-row__override {
    font-size: var(--type-sm) !important;
    padding: var(--space-1) var(--space-3) !important;
    flex: 1;
    min-width: 120px;
}
.mp-matcher-row__override-btn {
    font-size: var(--type-xs);
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-muted);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}
.mp-matcher-row__override-btn:hover { filter: brightness(0.95); }

/* Matcher confidence badges */
.mp-matcher-badge {
    display: inline-flex;
    align-items: center;
    font-size: var(--type-xs);
    font-weight: 700;
    padding: 2px var(--space-2);
    border-radius: var(--radius-pill);
    white-space: nowrap;
}
.mp-matcher-badge--auto    { background: #dcfce7; color: #15803d; }
.mp-matcher-badge--medium  { background: #fef3c7; color: #b45309; }
.mp-matcher-badge--low     { background: #fee2e2; color: #b91c1c; }
.mp-matcher-badge--manual  { background: var(--accent-muted); color: var(--accent); }
.mp-matcher-badge--unmatched { background: var(--bg-surface-alt); color: var(--text-muted); }

/* ── SkeletonBlock component styles ── */
.mp-skeleton-block {
    background: linear-gradient(
        90deg,
        var(--bg-surface-alt) 25%,
        var(--border-subtle) 50%,
        var(--bg-surface-alt) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
    display: block;
}

.mp-slot-dialog__tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.mp-slot-dialog__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: none;
    background: var(--bg-surface-alt);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.mp-slot-dialog__tab svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.mp-slot-dialog__tab.active {
    background: var(--accent-muted);
    color: var(--accent);
}

.mp-slot-dialog__tab + .mp-slot-dialog__tab {
    border-left: 1px solid var(--border-default);
}

.mp-slot-dialog__section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Meal type selector */
.mp-slot-dialog__meal-types {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.mp-slot-dialog__meal-type-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    opacity: 0.55;
}

.mp-slot-dialog__meal-type-btn.active {
    opacity: 1;
    border-color: currentColor;
    box-shadow: 0 0 0 2px var(--accent-muted);
}

/* Recipe search results */
.mp-slot-dialog__recipe-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}

.mp-slot-dialog__recipe-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: var(--type-base);
    color: var(--text-primary);
    transition: background var(--dur-fast) var(--ease-out);
}

.mp-slot-dialog__recipe-row:hover,
.mp-slot-dialog__recipe-row.selected {
    background: var(--accent-muted);
    color: var(--accent);
}

.mp-slot-dialog__recipe-name {
    flex: 1;
}

.mp-slot-dialog__check {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    flex-shrink: 0;
}

.mp-slot-dialog__recipe-hint {
    font-size: var(--type-sm);
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-3) 0;
    margin: 0;
}

.mp-slot-dialog__selected-recipe {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--accent-muted);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: var(--type-sm);
    font-weight: 600;
}

.mp-slot-dialog__selected-recipe svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    flex-shrink: 0;
}

/* Recurrence badge (on edit of recurring meal) */
.mp-slot-dialog__recurrence-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: var(--type-sm);
    color: var(--accent);
    font-weight: 500;
}

.mp-slot-dialog__recurrence-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
}

.mp-slot-dialog__break-link {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--accent);
    font-size: var(--type-sm);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

/* Recurrence toggle button */
.mp-slot-dialog__recurrence-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all var(--dur-fast) var(--ease-out);
}

.mp-slot-dialog__recurrence-toggle svg:first-child {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0;
}

.mp-slot-dialog__chevron {
    margin-left: auto;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform var(--dur-fast) var(--ease-out);
}

.mp-slot-dialog__recurrence-toggle.open .mp-slot-dialog__chevron {
    transform: rotate(180deg);
}

.mp-slot-dialog__recurrence-toggle:hover,
.mp-slot-dialog__recurrence-toggle.open {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

.mp-slot-dialog__recurrence-form {
    padding: var(--space-4);
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Day picker (for recurrence) */
.mp-slot-dialog__day-picker {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.mp-slot-dialog__day-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--type-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-out);
}

.mp-slot-dialog__day-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mp-slot-dialog__day-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

/* Dialog action bar */
.mp-slot-dialog__actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

/* ── Menus list ── */
.mp-menus-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mp-menus-list__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mp-menus-list__icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.mp-menus-list__name {
    font-family: var(--font-display);
    font-size: var(--type-md);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mp-menus-list__meta {
    font-size: var(--type-sm);
    color: var(--text-muted);
}

.mp-menus-list__chevron {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ── Menu item day badge ── */
.mp-menu-item__day {
    font-family: var(--font-mono);
    font-size: var(--type-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    min-width: 38px;
    text-align: center;
}

/* ── Apply menu result ── */
.mp-menus-apply {
    padding: var(--space-5);
    background: var(--bg-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    margin-top: var(--space-4);
}

.mp-menus-apply__result {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: var(--type-sm);
    color: var(--accent);
    font-weight: 500;
}

.mp-menus-apply__result svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    flex-shrink: 0;
}

/* App.css already handles layout; just ensure menus page scrolls on mobile */
@media (max-width: 639px) {
    .mp-menus-apply {
        margin: var(--space-4) 0;
    }
}
/* ============================================================
   HOUSEHOLDS + PANTRY COMPONENT STYLES (Task 212)
   ============================================================ */

/* ── Badge pill (role / active indicator) ── */
.mp-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-3);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: var(--type-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.mp-badge-pill--accent {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
}

/* ── Household card ── */
.mp-household-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--bg-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    padding: var(--space-4);
    transition: box-shadow var(--dur-fast) var(--ease-out);
}

.mp-household-card--active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted), var(--shadow-card);
}

.mp-household-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mp-household-card__name {
    font-family: var(--font-display);
    font-size: var(--type-md);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-household-card__meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.mp-household-card__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* ── Pantry item row ── */
.mp-pantry-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.mp-pantry-item:last-child {
    border-bottom: none;
}

.mp-pantry-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mp-pantry-item__name {
    font-size: var(--type-base);
    font-weight: 500;
    color: var(--text-primary);
}

.mp-pantry-item__meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.mp-pantry-item__actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

/* ── Invite token display box ── */
.mp-invite-token-box {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mp-invite-token-box__label {
    font-size: var(--type-sm);
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0;
}

.mp-invite-token-box__token {
    font-family: var(--font-mono);
    font-size: var(--type-base);
    color: var(--accent);
    word-break: break-all;
    padding: var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    user-select: all;
}

.mp-invite-token-box__expires {
    font-size: var(--type-xs);
    color: var(--text-muted);
    margin: 0;
}

/* ── Accept invite success ── */
.mp-invite-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-12) var(--space-6);
    gap: var(--space-4);
}

.mp-invite-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-invite-success__headline {
    font-family: var(--font-display);
    font-size: var(--type-xl);
    color: var(--text-primary);
    margin: 0;
}

.mp-invite-success__sub {
    font-size: var(--type-base);
    color: var(--text-secondary);
    margin: 0;
    max-width: 280px;
}

/* ── Settings row hover (for link rows) ── */
.mp-settings-row--link {
    transition: background var(--dur-fast) var(--ease-out);
    color: inherit;
}

.mp-settings-row--link:hover {
    background: var(--bg-surface-alt);
}

/* ════════════════════════════════════════════════════════════════════════════
   SW Update Banner — non-intrusive "New version available" prompt
   ════════════════════════════════════════════════════════════════════════════ */

.mp-sw-update-banner {
    position: fixed;
    bottom: calc(var(--nav-height, 64px) + var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-inverse, #1A1A1A);
    color: var(--text-on-inverse, #fff);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-full, 999px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.28);
    z-index: 900;
    white-space: nowrap;
    animation: swBannerIn 0.25s var(--ease-out) both;
    max-width: calc(100vw - var(--space-8));
}

@keyframes swBannerIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mp-sw-update-banner__text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--type-sm);
}

.mp-sw-update-banner__text svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.mp-sw-update-banner__btn {
    background: var(--color-accent, #C1694F);
    color: #fff;
    border: none;
    border-radius: var(--radius-full, 999px);
    padding: var(--space-1) var(--space-3);
    font-size: var(--type-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.mp-sw-update-banner__btn:hover {
    filter: brightness(1.1);
}

.mp-sw-update-banner__dismiss {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
}

.mp-sw-update-banner__dismiss:hover { opacity: 1; }

.mp-sw-update-banner__dismiss svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round;
}

/* ════════════════════════════════════════════════════════════════════════════
   Version Skew Banner — stronger "update required" alert
   ════════════════════════════════════════════════════════════════════════════ */

.mp-skew-banner {
    position: sticky;
    top: 0;
    z-index: 800;
    background: var(--color-warning-bg, #7C2D12);
    color: #fff;
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

.mp-skew-banner__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 640px;
    margin: 0 auto;
}

.mp-skew-banner__inner svg {
    width: 20px; height: 20px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round;
    flex-shrink: 0;
}

.mp-skew-banner__inner > div {
    flex: 1;
    font-size: var(--type-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mp-skew-banner__inner strong {
    font-weight: 700;
    font-size: var(--type-base);
}

.mp-skew-banner__btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-full, 999px);
    padding: var(--space-1) var(--space-3);
    font-size: var(--type-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Connectivity / offline status bar ─────────────────────────────────────── */

.mp-connectivity-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--type-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    transition: background var(--dur-base) var(--ease-out),
                color var(--dur-base) var(--ease-out);
}

.mp-connectivity-bar--online {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

.mp-connectivity-bar--offline {
    background: color-mix(in srgb, #d97706 12%, transparent);
    color: #b45309;
}

[data-mode="dark"] .mp-connectivity-bar--offline {
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    color: #fbbf24;
}

.mp-connectivity-bar--syncing {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--text-secondary);
}

.mp-connectivity-bar__icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.mp-connectivity-bar__icon--spin {
    animation: mp-spin 1s linear infinite;
}

@keyframes mp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.mp-connectivity-bar__action {
    margin-left: auto;
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    border-radius: var(--radius-pill);
    padding: 2px var(--space-3);
    font-size: var(--type-xs);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-body);
    transition: opacity var(--dur-fast);
}

.mp-connectivity-bar__action:hover { opacity: 0.75; }

/* ── Add-manual-item panel ─────────────────────────────────────────────────── */

.mp-add-manual {
    margin-top: var(--space-2);
    margin-bottom: var(--space-6);
}

.mp-add-manual__trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: var(--type-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color var(--dur-fast), color var(--dur-fast);
}

.mp-add-manual__trigger:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mp-add-manual__form {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    box-shadow: var(--shadow-sm);
}

.mp-add-manual__input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-app);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--type-base);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--dur-fast);
}

.mp-add-manual__input:focus {
    border-color: var(--accent);
}

.mp-add-manual__input--sm {
    flex: 1;
}

.mp-add-manual__row {
    display: flex;
    gap: var(--space-2);
}

.mp-add-manual__actions {
    display: flex;
    gap: var(--space-2);
}

/* ── Remove button on manual shopping items ───────────────────────────────── */

.mp-shopping-item__remove {
    flex-shrink: 0;
    margin-left: var(--space-2);
    padding: var(--space-1);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--dur-fast), color var(--dur-fast);
}

.mp-shopping-item:hover .mp-shopping-item__remove,
.mp-shopping-item:focus-within .mp-shopping-item__remove {
    opacity: 1;
}

.mp-shopping-item__remove:hover {
    color: #dc2626;
}

/* On touch devices always show the remove button (no hover state) */
@media (pointer: coarse) {
    .mp-shopping-item__remove {
        opacity: 1;
    }
}

.mp-skew-banner__btn:hover { background: rgba(255,255,255,0.3); }
