/*
 * Build My Bowl setup CSS fallback-removal dry run prototype.
 * Generated by tools/build-setup-css-prune-prototype.cjs.
 * Do not enqueue in production by default.
 * Source: public/calculator.css with setup-only duplicate selectors pruned.
 */
/* Chipotle Nutrition Calculator Styles - mobile UI is the single supported UI */

.bmb-calculator,
.bmb-ingredient-table-container,
.bmb-presets-container,
.bmb-disclaimer {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2d2d2d;
    line-height: 1.5;
    box-sizing: border-box;
}

.bmb-calculator *,
.bmb-ingredient-table-container *,
.bmb-presets-container *,
.bmb-disclaimer * {
    box-sizing: inherit;
}

.bmb-unavailable {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #991b1b;
    font-size: 0.95rem;
}

.bmb-unavailable p {
    margin: 0;
}

/* Base calculator shell and shared card styling. */
.bmb-calculator-shell {
    width: min(100%, 680px);
    max-width: 680px;
    margin: 0 auto 2rem auto;
    box-sizing: border-box;
}

.bmb-calculator {
    background: #faf8f5;
    border: 1px solid #f1ece5;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
    padding: 1rem 0.95rem 6.75rem;
    overflow: visible;
}

.bmb-calculator-header h2 {
    margin: 0 0 1rem;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
    color: #2c2c2c;
}

.bmb-calculator-body,
.bmb-ingredients-section,
.bmb-categories-container {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* Category tabs */
/* Category tab carousel. */
.bmb-category-tabs-panel {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 0.35rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
}

.bmb-tabs-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 0.3rem;
    padding: 0;
    border: 1px solid #f1e4d2;
    border-radius: 999px;
    background: #fffdf7;
    color: #e65100;
    box-shadow: 0 4px 12px rgba(74, 45, 18, 0.08);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    transition: opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.bmb-tabs-nav:hover,
.bmb-tabs-nav:focus {
    background: #fff4e6;
    color: #e65100;
    border-color: #ffd199;
}

.bmb-tabs-nav:focus {
    outline: none;
}

.bmb-tabs-nav:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

.bmb-tabs-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.bmb-tabs-nav:disabled:hover,
.bmb-tabs-nav:disabled:focus {
    background: #fffdf7;
    border-color: #f1e4d2;
}

.bmb-category-tabs-panel.bmb-tabs-no-overflow .bmb-tabs-nav {
    visibility: hidden;
}

.bmb-category-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0.25rem 0.65rem;
    border-bottom: 1px solid #e7e1da;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bmb-category-tabs::-webkit-scrollbar {
    display: none;
}

.bmb-category-tab {
    flex: 0 0 72px;
    min-width: 72px;
    max-width: 82px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 64px;
    padding: 0.35rem 0.35rem 0.45rem;
    margin: 0;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #5d5d5d;
    box-shadow: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.bmb-category-tab:hover,
.bmb-category-tab:focus {
    background: transparent;
    color: #e65100;
}

.bmb-category-tab:focus {
    outline: none;
}

.bmb-category-tab:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
    border-radius: 10px;
}

.bmb-category-tab.bmb-tab-active {
    border-color: #ff8a00;
    color: #e65100;
    font-weight: 800;
}

.bmb-category-tab-icon {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}

.bmb-category-tab-label {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-category-tab-count {
    position: absolute;
    top: 0;
    right: 0.4rem;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    background: #ff8a00;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 18px;
}

/* Active category section */
.bmb-category {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.bmb-category.bmb-category-active {
    display: block;
}

.bmb-category-panel {
    position: relative;
    display: block;
    border: 0;
    background: transparent;
    padding: 0 2.15rem;
}

.bmb-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid #f1e4d2;
    border-radius: 999px;
    background: #fffdf7;
    color: #e65100;
    box-shadow: 0 6px 18px rgba(74, 45, 18, 0.12);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
    transition: opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.bmb-carousel-prev {
    left: 0;
}

.bmb-carousel-next {
    right: 0;
}

.bmb-carousel-nav:hover,
.bmb-carousel-nav:focus {
    background: #fff4e6;
    color: #e65100;
    border-color: #ffd199;
}

.bmb-carousel-nav:focus {
    outline: none;
}

.bmb-carousel-nav:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

.bmb-carousel-nav:disabled {
    opacity: 0.35;
    cursor: default;
    transform: translateY(-50%);
}

.bmb-carousel-nav:disabled:hover,
.bmb-carousel-nav:disabled:focus {
    background: #fffdf7;
    border-color: #f1e4d2;
}

.bmb-category-panel.bmb-carousel-no-overflow .bmb-carousel-nav {
    visibility: hidden;
}

.bmb-category-header {
    margin: 0 0 1rem;
    padding: 0.1rem 0.15rem 0;
}

.bmb-category-header-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.bmb-category-heading {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 800;
    color: #222;
}

.bmb-category-summary-count {
    flex: 0 0 auto;
    color: #ff7a00;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: right;
}

.bmb-category-desc {
    color: #686868;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* Ingredient grid/cards */
.bmb-ingredient-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 0.75rem) / 2);
    grid-template-rows: repeat(2, 118px);
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-height: calc(236px + 0.75rem);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 0.05rem 0 0.2rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bmb-ingredient-scroll::-webkit-scrollbar {
    display: none;
}

.bmb-ingredient-btn,
.bmb-calculator.bmb-layout-compact /* Ingredient cards and selected states. */
.bmb-ingredient-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 118px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.78rem 0.55rem;
    margin: 0;
    border: 1px solid #eae5de;
    border-radius: 12px;
    background: #fff;
    color: #2a2a2a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.035);
    cursor: pointer;
    text-align: center;
    scroll-snap-align: start;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.bmb-ingredient-btn:hover,
.bmb-ingredient-btn:focus {
    background: #fff;
    color: #2a2a2a;
}

.bmb-ingredient-btn:focus {
    outline: none;
}

.bmb-ingredient-btn:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

.bmb-ingredient-btn.bmb-selected,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-btn.bmb-selected {
    border-color: #ff8a00;
    background: #fff8f0;
    box-shadow: 0 0 0 1px #ff8a00, 0 4px 14px rgba(255, 138, 0, 0.12);
}

.bmb-ing-icon-wrap {
    flex: 0 0 auto;
    font-size: 1.65rem;
    line-height: 1;
}

.bmb-ing-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    min-width: 0;
    max-width: 100%;
}

.bmb-ing-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    color: #222;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.bmb-ing-desc,
.bmb-ing-srv {
    display: none;
}

.bmb-ing-meta {
    display: block;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #8b8b8b;
    font-size: 0.7rem;
    line-height: 1.2;
}

.bmb-ing-cal {
    color: #8b8b8b;
    font-size: 0.7rem;
}

.bmb-ing-selected-marker {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid #ddd5cc;
    border-radius: 50%;
    background: #fff;
    color: transparent;
    font-size: 0;
    line-height: 1;
}

.bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker {
    border-color: #ff8a00;
    background: #ff8a00;
}

.bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::after,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}


@media (min-width: 560px) {
    .bmb-ingredient-scroll {
        grid-auto-columns: calc((100% - 1.5rem) / 3);
    }
}

@media (max-width: 380px) {
    .bmb-category-panel {
        padding: 0 1.8rem;
    }

    .bmb-carousel-nav {
        width: 29px;
        height: 42px;
        font-size: 1.55rem;
    }

    .bmb-category-tabs-panel {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        gap: 0.25rem;
    }

    .bmb-tabs-nav {
        width: 28px;
        height: 28px;
        font-size: 1.15rem;
        margin-top: 0.42rem;
    }
}

/* Sticky summary and drawer - used at every viewport width */
.bmb-mobile-result-wrapper {
    position: sticky;
    bottom: 0;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    margin: 1.25rem auto -6.75rem;
    padding: 0 0 max(0.75rem, env(safe-area-inset-bottom));
}

/* Mobile bottom summary dock. */
.bmb-mobile-summary {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    max-width: 680px;
    min-height: 58px;
    margin: 0 auto;
    padding: 0.62rem 0.62rem 0.62rem 0.82rem;
    border: 1px solid #f1e4d2;
    border-bottom: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background: #fffdf7;
    box-shadow: 0 -8px 24px rgba(74, 45, 18, 0.14);
    overflow: hidden;
}

.bmb-mobile-summary-main {
    display: flex;
    align-items: baseline;
    gap: 0.42rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.bmb-mobile-calories {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 0.12rem;
    color: #d64f00;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
}

.bmb-mobile-calories strong {
    font-size: 1.3rem;
    font-weight: 900;
}

.bmb-mobile-macros {
    min-width: 0;
    color: #5f5a54;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-mobile-macros strong {
    color: #2f2b27;
    font-weight: 800;
}

.bmb-mobile-actions {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.bmb-bowl-toggle,
.bmb-mobile-reset,
.bmb-mobile-drawer-close {
    font-family: inherit;
}

.bmb-bowl-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border: 1px solid #ffd199;
    border-radius: 999px;
    background: #fff8ed;
    color: #e65100;
    cursor: pointer;
    font-size: 1.18rem;
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.bmb-bowl-toggle.bmb-drawer-open {
    border-color: #ff8a00;
    background: #fff0dc;
}

.bmb-bowl-toggle:hover,
.bmb-bowl-toggle:focus {
    color: #e65100;
}

.bmb-bowl-toggle:hover {
    transform: translateY(-1px);
}

.bmb-bowl-toggle:focus,
.bmb-mobile-reset:focus,
.bmb-mobile-drawer-close:focus {
    outline: none;
}

.bmb-bowl-toggle:focus-visible,
.bmb-mobile-reset:focus-visible,
.bmb-mobile-drawer-close:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

/* Bowl drawer: mobile bottom drawer, desktop attached analysis panel. */
.bmb-mobile-bowl-drawer {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem 1rem 1.25rem;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background: #fffdfa;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
}

.bmb-mobile-drawer-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 0.9rem;
    border-radius: 999px;
    background: #ddd6ce;
}

.bmb-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.bmb-mobile-drawer-header h3 {
    margin: 0;
    color: #222;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
}

.bmb-mobile-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #555;
    cursor: pointer;
}

.bmb-mobile-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.bmb-mobile-bowl-preview-empty {
    color: #8a8a8a;
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
}

.bmb-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 30px;
    max-width: 100%;
    padding: 0.3rem 0.58rem;
    border: 1px solid #ffdca8;
    border-radius: 999px;
    background: #fff8f0;
    color: #5d5145;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.bmb-chip:hover,
.bmb-chip:focus {
    background: #ffefd9;
    color: #3d342c;
}

.bmb-chip:focus {
    outline: none;
}

.bmb-chip:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

.bmb-mobile-smart-notes {
    margin-bottom: 1rem;
}

.bmb-note {
    padding: 0.72rem 0.82rem;
    border: 1px solid #ffe4bf;
    border-radius: 12px;
    background: #fff7ed;
    color: #5f5144;
    font-size: 0.84rem;
    line-height: 1.4;
}

.bmb-note + .bmb-note {
    margin-top: 0.5rem;
}

.bmb-mobile-reset {
    width: 100%;
    min-height: 44px;
    padding: 0.68rem 0.75rem;
    border: 1px solid #eadfd3;
    border-radius: 10px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
}

.bmb-mobile-reset:hover,
.bmb-mobile-reset:active,
.bmb-mobile-reset:focus {
    background: #fff7ed !important;
    color: #555 !important;
    border-color: #ffd199 !important;
}



.bmb-mobile-bowl-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.bmb-mobile-save-card {
    width: 100%;
    min-height: 46px;
    padding: 0.72rem 0.85rem;
    border: 1px solid #ef7d00;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff8a00 0%, #e45f00 100%);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(228, 95, 0, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.bmb-mobile-save-card:hover,
.bmb-mobile-save-card:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(228, 95, 0, 0.22);
}

.bmb-mobile-save-card:focus {
    outline: none;
}

.bmb-mobile-save-card:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 2px;
}

.bmb-mobile-save-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bmb-mobile-save-feedback {
    min-height: 1.3em;
    margin-top: 0.75rem;
    color: #6d5a45;
    font-size: 0.82rem;
    line-height: 1.35;
}

.bmb-mobile-save-feedback.is-positive {
    color: #3d7a42;
}

.bmb-mobile-save-feedback.is-warning {
    color: #a55b07;
}

.bmb-mobile-save-feedback.is-info {
    color: #6d5a45;
}

@media (min-width: 460px) {
    .bmb-mobile-bowl-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Preset Cards */
.bmb-presets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.bmb-preset-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid #eae5de;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.bmb-preset-icon {
    flex: 0 0 auto;
    padding: 0.75rem;
    border-radius: 50%;
    background: #fff8f0;
    font-size: 2rem;
    line-height: 1;
}

.bmb-preset-content {
    flex: 1;
    min-width: 0;
}

.bmb-preset-header h4 {
    margin: 0 0 0.35rem;
    color: #222;
    font-size: 1rem;
    line-height: 1.25;
}

.bmb-preset-badge,
.bmb-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
}

.bmb-preset-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.bmb-preset-desc {
    margin: 0.75rem 0;
    color: #666;
    font-size: 0.84rem;
    line-height: 1.45;
}

.bmb-preset-nutrition-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.bmb-badge {
    background: #f4f4f4;
    color: #555;
}

.bmb-badge-cal { background: #ffe0b2; color: #e65100; }
.bmb-badge-pro { background: #e3f2fd; color: #0277bd; }
.bmb-badge-carb { background: #f3e5f5; color: #7b1fa2; }

.bmb-btn-load-preset {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ff8a00;
    border-radius: 9px;
    background: #ff8a00;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.bmb-btn-load-preset:hover,
.bmb-btn-load-preset:focus {
    background: #e65100;
    border-color: #e65100;
    color: #fff;
}

/* Ingredient table */
.bmb-ingredient-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 1rem 0 2rem;
}

.bmb-ingredient-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}

.bmb-ingredient-table th,
.bmb-ingredient-table td {
    padding: 0.65rem 0.75rem;
    border: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.bmb-ingredient-table th {
    background: #faf8f5;
    color: #333;
    font-weight: 800;
}

/* Disclaimer */
.bmb-disclaimer {
    margin-top: 1rem;
    color: #888;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

.bmb-disclaimer p {
    margin: 0;
    color: inherit;
    font-size: inherit;
}


/* Phase 46: compact ingredient contribution rows inside the Bowl drawer. */
.bmb-ingredient-contribution-panel {
    margin-top: 0.78rem;
    padding-top: 0.72rem;
    border-top: 1px solid #f1dfc6;
}

.bmb-contribution-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.2rem;
}

.bmb-contribution-head strong {
    display: block;
    color: #2b1b0e;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.15;
}

.bmb-contribution-head span {
    display: block;
    color: #8a6a49;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: right;
}

.bmb-contribution-helper {
    margin: 0 0 0.62rem;
    color: #725d47;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.bmb-contribution-list {
    display: grid;
    gap: 0.48rem;
}

.bmb-contribution-empty {
    padding: 0.66rem 0.72rem;
    border: 1px dashed #efd4ae;
    border-radius: 13px;
    background: #fffaf3;
    color: #82684d;
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.35;
}

.bmb-contribution-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.66rem 0.7rem;
    border: 1px solid #f1d9b8;
    border-radius: 14px;
    background: rgba(255, 252, 247, 0.92);
    box-shadow: 0 8px 18px rgba(74, 45, 18, 0.035);
}

.bmb-contribution-identity {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.52rem;
    align-items: center;
    min-width: 0;
}

.bmb-contribution-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #f2ddbf;
    border-radius: 12px;
    background: #fff8ef;
    box-shadow: 0 5px 12px rgba(74, 45, 18, 0.055);
    font-size: 1.3rem;
    line-height: 1;
}

.bmb-contribution-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.bmb-contribution-copy strong {
    overflow: hidden;
    color: #2b1b0e;
    font-size: 0.79rem;
    font-weight: 950;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmb-contribution-copy span {
    color: #7d654e;
    font-size: 0.68rem;
    font-weight: 780;
    line-height: 1.2;
}

.bmb-contribution-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
}

.bmb-contribution-metric {
    display: grid;
    gap: 0.08rem;
    align-content: center;
    min-width: 0;
    padding: 0.36rem 0.28rem;
    border-radius: 10px;
    background: #fff7ed;
    color: #3b2a1b;
    text-align: center;
}

.bmb-contribution-metric strong {
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmb-contribution-metric small {
    overflow: hidden;
    color: #8a6a49;
    font-size: 0.56rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (min-width: 520px) {
    .bmb-contribution-row {
        grid-template-columns: minmax(150px, 0.92fr) minmax(0, 1.45fr);
        align-items: center;
    }
}
/* v1.0.4 responsive summary + full drawer nutrition */
.bmb-calculator-shell {
    width: min(100%, 780px);
    max-width: 780px;
}

.bmb-calculator {
    padding-bottom: 7.25rem;
}

.bmb-mobile-result-wrapper {
    margin-bottom: -7.25rem;
}

.bmb-mobile-summary {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 0.7rem;
    max-width: 780px;
    min-height: 68px;
    padding: 0.58rem 0.7rem;
}

.bmb-mobile-summary-main {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
    align-items: stretch;
    min-width: 0;
    white-space: normal;
    overflow: visible;
}

.bmb-mobile-summary-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.26rem;
    min-width: 0;
    min-height: 48px;
    padding: 0.34rem 0.4rem;
    border: 1px solid #f6dfc5;
    border-radius: 14px;
    background: #fff8ed;
    color: #35271b;
    line-height: 1;
}

.bmb-mobile-summary-calories {
    background: #fff2dd;
    border-color: #ffd199;
    color: #d64f00;
}

.bmb-summary-emoji {
    flex: 0 0 auto;
    font-size: 1.05rem;
    line-height: 1;
}

.bmb-summary-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    gap: 0.12rem;
}

.bmb-summary-text strong {
    display: block;
    max-width: 100%;
    color: #21160d;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-mobile-summary-calories .bmb-summary-text strong {
    color: #d64f00;
    font-size: 1.02rem;
}

.bmb-summary-text small {
    display: block;
    color: #7e6b56;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bmb-summary-wide-only {
    display: none;
}

.bmb-bowl-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.22rem;
}

.bmb-drawer-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
    margin: 0 0 1rem;
}

.bmb-drawer-nutrition-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "emoji label"
        "emoji value";
    column-gap: 0.45rem;
    align-items: center;
    min-height: 66px;
    padding: 0.62rem 0.68rem;
    border: 1px solid #f3dec4;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffaf2 0%, #fff2df 100%);
    box-shadow: 0 4px 12px rgba(74, 45, 18, 0.04);
}

.bmb-drawer-calories {
    background: linear-gradient(135deg, #fff1dc 0%, #ffe1ba 100%);
    border-color: #ffd19a;
}

.bmb-nutri-emoji {
    grid-area: emoji;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #fff;
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 0, 0.12);
}

.bmb-nutri-label {
    grid-area: label;
    color: #85694c;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bmb-drawer-nutrition-card strong {
    grid-area: value;
    min-width: 0;
    color: #21160d;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-drawer-calories strong {
    color: #d64f00;
}

.bmb-chip-icon {
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1;
}

@media (min-width: 560px) {
    .bmb-summary-wide-only {
        display: inline-flex;
    }

    .bmb-mobile-summary-main {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .bmb-drawer-nutrition-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bmb-drawer-calories {
        grid-column: span 2;
    }
}

@media (max-width: 420px) {
    .bmb-mobile-summary {
        gap: 0.45rem;
        min-height: 62px;
        padding: 0.5rem 0.54rem;
    }

    .bmb-mobile-summary-main {
        gap: 0.28rem;
    }

    .bmb-mobile-summary-tile {
        min-height: 42px;
        padding: 0.28rem 0.22rem;
        border-radius: 12px;
        gap: 0.18rem;
    }

    .bmb-summary-emoji {
        font-size: 0.85rem;
    }

    .bmb-summary-text strong,
    .bmb-mobile-summary-calories .bmb-summary-text strong {
        font-size: 0.78rem;
    }

    .bmb-summary-text small {
        font-size: 0.5rem;
    }

    .bmb-bowl-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* v1.0.5: cleaner four-metric bottom deck; full nutrition stays inside drawer */
.bmb-mobile-summary {
    grid-template-columns: minmax(0, 1fr) 56px;
    max-width: 780px;
    min-height: 66px;
    padding: 0.58rem 0.64rem;
}

.bmb-mobile-summary-main {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.46rem;
    align-items: stretch;
    min-width: 0;
    white-space: normal;
    overflow: visible;
}

.bmb-mobile-summary-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 0.36rem 0.42rem;
    border: 1px solid #f6dfc5;
    border-radius: 14px;
    background: #fff8ed;
    color: #35271b;
    line-height: 1;
}

.bmb-mobile-summary-calories {
    background: #fff2dd;
    border-color: #ffd199;
}

.bmb-summary-emoji,
.bmb-summary-wide-only {
    display: none !important;
}

.bmb-summary-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    gap: 0.12rem;
    text-align: center;
}

.bmb-summary-text strong {
    display: block;
    max-width: 100%;
    color: #21160d;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-mobile-summary-calories .bmb-summary-text strong {
    color: #d64f00;
    font-size: 1.05rem;
}

.bmb-summary-text small {
    display: block;
    color: #7e6b56;
    font-size: 0.55rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.bmb-bowl-toggle {
    width: 54px;
    height: 44px;
    min-width: 54px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bmb-bowl-toggle.bmb-drawer-open {
    font-size: 1.4rem;
    line-height: 1;
    text-transform: none;
}

@media (max-width: 420px) {
    .bmb-mobile-summary {
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 0.38rem;
        min-height: 60px;
        padding: 0.46rem 0.48rem;
    }

    .bmb-mobile-summary-main {
        gap: 0.26rem;
    }

    .bmb-mobile-summary-tile {
        min-height: 40px;
        padding: 0.26rem 0.18rem;
        border-radius: 11px;
    }

    .bmb-summary-text strong,
    .bmb-mobile-summary-calories .bmb-summary-text strong {
        font-size: 0.76rem;
    }

    .bmb-summary-text small {
        font-size: 0.46rem;
        letter-spacing: 0.01em;
    }

    .bmb-bowl-toggle {
        width: 46px;
        height: 40px;
        min-width: 46px;
        font-size: 0.62rem;
    }

    .bmb-bowl-toggle.bmb-drawer-open {
        font-size: 1.25rem;
    }
}


/* v1.0.6: protect calculator controls from theme hover colors and refine Bowl button */
.bmb-calculator .bmb-bowl-toggle {
    width: 58px !important;
    height: 42px !important;
    min-width: 58px !important;
    border: 1px solid #ffb766 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #fffaf2 0%, #ffe9c9 100%) !important;
    color: #c95200 !important;
    box-shadow: 0 5px 14px rgba(214, 79, 0, 0.12) !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.bmb-calculator .bmb-bowl-toggle:hover,
.bmb-calculator .bmb-bowl-toggle:focus,
.bmb-calculator .bmb-bowl-toggle:active {
    border-color: #ff8a00 !important;
    background: linear-gradient(135deg, #fff1dc 0%, #ffd7a1 100%) !important;
    color: #a83f00 !important;
    box-shadow: 0 7px 18px rgba(214, 79, 0, 0.18) !important;
    transform: translateY(-1px);
}

.bmb-calculator .bmb-bowl-toggle.bmb-drawer-open,
.bmb-calculator .bmb-bowl-toggle.bmb-drawer-open:hover,
.bmb-calculator .bmb-bowl-toggle.bmb-drawer-open:focus,
.bmb-calculator .bmb-bowl-toggle.bmb-drawer-open:active {
    border-color: #ff8a00 !important;
    background: #fff4e6 !important;
    color: #e65100 !important;
    box-shadow: 0 5px 14px rgba(214, 79, 0, 0.12) !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    text-transform: none !important;
}

.bmb-calculator .bmb-tabs-nav,
.bmb-calculator .bmb-carousel-nav {
    background: #fffdf7 !important;
    color: #e65100 !important;
    border-color: #f1e4d2 !important;
}

.bmb-calculator .bmb-tabs-nav:hover,
.bmb-calculator .bmb-tabs-nav:focus,
.bmb-calculator .bmb-carousel-nav:hover,
.bmb-calculator .bmb-carousel-nav:focus {
    background: #fff4e6 !important;
    color: #c95200 !important;
    border-color: #ffd199 !important;
}

.bmb-calculator .bmb-category-tab,
.bmb-calculator .bmb-category-tab:hover,
.bmb-calculator .bmb-category-tab:focus {
    background: transparent !important;
    box-shadow: none !important;
}

.bmb-calculator .bmb-category-tab:hover,
.bmb-calculator .bmb-category-tab:focus {
    color: #d64f00 !important;
}

.bmb-calculator .bmb-ingredient-btn,
.bmb-calculator .bmb-ingredient-btn:hover,
.bmb-calculator .bmb-ingredient-btn:focus {
    background: #fff !important;
    color: #2a2a2a !important;
}

.bmb-calculator .bmb-ingredient-btn.bmb-selected,
.bmb-calculator .bmb-ingredient-btn.bmb-selected:hover,
.bmb-calculator .bmb-ingredient-btn.bmb-selected:focus {
    background: #fff8f0 !important;
    color: #2a2a2a !important;
    border-color: #ff8a00 !important;
}

.bmb-calculator .bmb-mobile-reset,
.bmb-calculator .bmb-mobile-reset:hover,
.bmb-calculator .bmb-mobile-reset:focus,
.bmb-calculator .bmb-mobile-reset:active {
    background: #fff7ed !important;
    color: #6d5a45 !important;
    border-color: #ffd199 !important;
}

.bmb-calculator .bmb-mobile-save-card,
.bmb-calculator .bmb-mobile-save-card:hover,
.bmb-calculator .bmb-mobile-save-card:focus,
.bmb-calculator .bmb-mobile-save-card:active {
    background: linear-gradient(135deg, #ff8a00 0%, #e45f00 100%) !important;
    color: #ffffff !important;
    border-color: #ef7d00 !important;
}

@media (max-width: 420px) {
    .bmb-calculator .bmb-bowl-toggle {
        width: 50px !important;
        height: 40px !important;
        min-width: 50px !important;
        font-size: 0.68rem !important;
    }

    .bmb-calculator .bmb-bowl-toggle.bmb-drawer-open {
        font-size: 1.25rem !important;
    }
}


/* v1.0.7: smarter carousel density and stronger calorie hierarchy */
.bmb-calculator .bmb-ingredient-scroll {
    grid-auto-columns: calc((100% - 0.75rem) / 2) !important;
    grid-template-rows: repeat(2, 112px) !important;
    min-height: calc(224px + 0.75rem) !important;
}

.bmb-calculator .bmb-ingredient-btn,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
    height: 112px !important;
    padding-top: 0.62rem !important;
    padding-bottom: 0.62rem !important;
}

.bmb-calculator .bmb-ing-icon-wrap {
    font-size: 1.56rem;
}

.bmb-calculator .bmb-ing-name {
    font-size: 0.76rem;
}

/* Medium/tall phones and narrow tablets: 2 columns x 3 rows = 6 items per page. */
@media (min-width: 390px) {
    .bmb-calculator .bmb-ingredient-scroll {
        grid-auto-columns: calc((100% - 0.75rem) / 2) !important;
        grid-template-rows: repeat(3, 108px) !important;
        min-height: calc(324px + 1.5rem) !important;
    }

    .bmb-calculator .bmb-ingredient-btn,
    .bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
        height: 108px !important;
    }
}

/* Wide calculator space: 3 columns x 3 rows = 9 items per page. */
@media (min-width: 640px) {
    .bmb-calculator .bmb-ingredient-scroll {
        grid-auto-columns: calc((100% - 1.5rem) / 3) !important;
        grid-template-rows: repeat(3, 108px) !important;
        min-height: calc(324px + 1.5rem) !important;
    }
}

/* Very small screens: keep 2 columns x 2 rows so the calculator does not feel too tall. */
@media (max-width: 389px) {
    .bmb-calculator .bmb-ingredient-scroll {
        grid-auto-columns: calc((100% - 0.75rem) / 2) !important;
        grid-template-rows: repeat(2, 108px) !important;
        min-height: calc(216px + 0.75rem) !important;
    }

    .bmb-calculator .bmb-ingredient-btn,
    .bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
        height: 108px !important;
        padding-left: 0.42rem !important;
        padding-right: 0.42rem !important;
    }

    .bmb-calculator .bmb-ing-name {
        font-size: 0.72rem;
    }
}

.bmb-calculator .bmb-mobile-summary {
    grid-template-columns: minmax(0, 1fr) 58px !important;
    min-height: 72px !important;
    padding: 0.62rem 0.68rem !important;
}

.bmb-calculator .bmb-mobile-summary-main {
    display: grid !important;
    grid-template-columns: minmax(116px, 1.75fr) repeat(3, minmax(66px, 1fr)) !important;
    gap: 0.5rem !important;
}

.bmb-calculator .bmb-mobile-summary-tile {
    justify-content: center !important;
    min-height: 52px !important;
    padding: 0.38rem 0.46rem !important;
    border-radius: 15px !important;
}

.bmb-calculator .bmb-mobile-summary-calories {
    justify-content: flex-start !important;
    padding-left: 0.78rem !important;
    padding-right: 0.78rem !important;
    background: linear-gradient(135deg, #fff3df 0%, #ffe0b7 100%) !important;
    border-color: #ffbd73 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 0, 0.12) !important;
}

.bmb-calculator .bmb-summary-text {
    align-items: center !important;
    text-align: center !important;
}

.bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text {
    align-items: flex-start !important;
    text-align: left !important;
}

.bmb-calculator .bmb-summary-text strong {
    font-size: clamp(0.78rem, 1.45vw, 1rem) !important;
    letter-spacing: -0.01em !important;
}

.bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text strong {
    color: #d64f00 !important;
    font-size: clamp(1.45rem, 3.6vw, 2.15rem) !important;
    letter-spacing: -0.04em !important;
}

.bmb-calculator .bmb-summary-text small {
    font-size: clamp(0.48rem, 1vw, 0.62rem) !important;
    letter-spacing: 0.025em !important;
}

.bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text small {
    color: #b14a00 !important;
    font-size: clamp(0.56rem, 1.05vw, 0.7rem) !important;
    letter-spacing: 0.035em !important;
}

@media (max-width: 520px) {
    .bmb-calculator .bmb-mobile-summary {
        grid-template-columns: minmax(0, 1fr) 52px !important;
        min-height: 66px !important;
        gap: 0.42rem !important;
        padding: 0.52rem 0.5rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-main {
        grid-template-columns: minmax(92px, 1.55fr) repeat(3, minmax(48px, 0.9fr)) !important;
        gap: 0.28rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile {
        min-height: 46px !important;
        padding: 0.28rem 0.2rem !important;
        border-radius: 12px !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories {
        padding-left: 0.5rem !important;
        padding-right: 0.38rem !important;
    }

    .bmb-calculator .bmb-summary-text strong {
        font-size: clamp(0.68rem, 2.3vw, 0.82rem) !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text strong {
        font-size: clamp(1.14rem, 5.4vw, 1.62rem) !important;
    }

    .bmb-calculator .bmb-summary-text small {
        font-size: clamp(0.42rem, 1.55vw, 0.5rem) !important;
        letter-spacing: 0.005em !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text small {
        font-size: clamp(0.46rem, 1.65vw, 0.56rem) !important;
    }
}

@media (max-width: 360px) {
    .bmb-calculator .bmb-mobile-summary-main {
        grid-template-columns: minmax(82px, 1.45fr) repeat(3, minmax(40px, 0.82fr)) !important;
        gap: 0.22rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile {
        padding-left: 0.12rem !important;
        padding-right: 0.12rem !important;
    }

    .bmb-calculator .bmb-summary-text strong {
        font-size: 0.62rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text strong {
        font-size: 1.05rem !important;
    }

    .bmb-calculator .bmb-summary-text small {
        font-size: 0.39rem !important;
    }
}

/* v1.0.8: Context-aware bottom dock. When the bowl drawer is open,
   the dock becomes an action bar instead of repeating nutrition totals. */
.bmb-calculator .bmb-mobile-dock-actions {
    display: none !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode {
    grid-template-columns: minmax(0, 1fr) 52px !important;
    gap: 0.58rem !important;
    min-height: 70px !important;
    padding: 0.62rem 0.68rem !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-mobile-summary-main {
    display: none !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-mobile-dock-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-mobile-actions {
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0.56rem 0.75rem !important;
    border-radius: 14px !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    box-shadow: none !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:hover,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:focus,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:active {
    border-color: #ef7300 !important;
    background: linear-gradient(135deg, #ff8a00 0%, #e95f00 100%) !important;
    color: #ffffff !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:hover,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 16px rgba(232, 95, 0, 0.18) !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset:hover,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset:focus,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset:active {
    border-color: #ffd199 !important;
    background: #fff8ed !important;
    color: #8a4c16 !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset:hover,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset:focus {
    background: #ffefd8 !important;
    color: #65320b !important;
    transform: translateY(-1px) !important;
}

.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:hover,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:focus,
.bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:active {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-color: #ff8a00 !important;
    background: #fff0dc !important;
    color: #d65200 !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
}

@media (max-width: 380px) {
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode {
        grid-template-columns: minmax(0, 1fr) 44px !important;
        gap: 0.38rem !important;
        min-height: 62px !important;
        padding: 0.48rem 0.46rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-mobile-dock-actions {
        gap: 0.34rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset {
        min-height: 42px !important;
        height: 42px !important;
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
        border-radius: 12px !important;
        font-size: 0.78rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:hover,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:focus,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:active {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        font-size: 1.35rem !important;
    }
}


/* v1.0.9: row-first ingredient pagination */
.bmb-calculator .bmb-ingredient-scroll {
    display: flex !important;
    flex-direction: row !important;
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
    grid-template-rows: none !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    min-height: calc(216px + 0.75rem) !important;
}

.bmb-calculator .bmb-ingredient-page {
    flex: 0 0 100%;
    min-width: 100%;
    display: grid;
    gap: 0.75rem;
    scroll-snap-align: start;
    align-items: stretch;
}

.bmb-calculator .bmb-ingredient-page .bmb-ingredient-btn,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-page .bmb-ingredient-btn {
    width: 100% !important;
    height: 108px !important;
    scroll-snap-align: none !important;
}

.bmb-calculator .bmb-ingredient-page[data-bmb-page-items="1"] {
    grid-template-columns: minmax(0, 1fr) !important;
}

.bmb-calculator .bmb-ingredient-page[data-bmb-page-items="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.bmb-calculator .bmb-ingredient-page[data-bmb-page-items="1"] .bmb-ingredient-btn,
.bmb-calculator .bmb-ingredient-page[data-bmb-page-items="2"] .bmb-ingredient-btn {
    min-height: 108px !important;
}

@media (min-width: 520px) {
    .bmb-calculator .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator.bmb-layout-compact .bmb-ingredient-page .bmb-ingredient-btn {
        height: 108px !important;
    }
}


/* v1.0.10: fixed ingredient viewport height per breakpoint.
   The JS also sets this inline after pagination so every category in the same viewport keeps the dock in the same vertical position. */
@media (min-width: 330px) {
    .bmb-calculator .bmb-ingredient-scroll {
        min-height: calc(324px + 1.5rem) !important;
    }
}

@media (min-width: 520px) {
    .bmb-calculator .bmb-ingredient-scroll {
        min-height: calc(324px + 1.5rem) !important;
    }
}

/* v1.1.0: guided three-step experience foundation */

.bmb-experience-pill-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.15rem;
}

.bmb-experience-pill-list span {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #f3dfc4;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.bmb-experience-pill-list strong {
    color: #33251a;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.15;
}

.bmb-experience-pill-list small {
    color: #8a7660;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
}

.bmb-presets-step .bmb-presets-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 0.8rem 0 0;
}

.bmb-presets-step .bmb-preset-card {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    border-color: #f0e0cc;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(74, 45, 18, 0.055);
}

.bmb-presets-step .bmb-preset-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff4e6;
}

.bmb-presets-step .bmb-preset-header h4 {
    font-size: 1.02rem;
    font-weight: 900;
}

.bmb-presets-step .bmb-preset-badge {
    background: #fff4e6;
    color: #d65b00;
}

.bmb-presets-step .bmb-badge-pro {
    background: #fff4e6;
    color: #d65b00;
}

.bmb-presets-step .bmb-badge-carb {
    background: #f7f3ed;
    color: #675240;
}

.bmb-presets-step .bmb-btn-load-preset,
.bmb-presets-step .bmb-btn-load-preset:hover,
.bmb-presets-step .bmb-btn-load-preset:focus {
    min-height: 42px;
    border-color: #ff7a00;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff8a00 0%, #e65100 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(230, 81, 0, 0.16);
}

.bmb-presets-note {
    margin: 0.85rem 0 0;
    padding: 0.72rem 0.85rem;
    border: 1px solid #f1dfca;
    border-radius: 13px;
    background: #fffaf4;
    color: #725f4c;
    font-size: 0.86rem;
    line-height: 1.45;
}

.bmb-calculator-step {
    padding: 1rem;
}

.bmb-calculator-step > .bmb-calculator {
    margin: 0;
    border: 0;
    box-shadow: none;
    padding: 0 0 6.75rem;
    background: transparent;
}

.bmb-calculator-step .bmb-category-tabs-panel {
    margin-top: 0.25rem;
}

@media (min-width: 760px) {

    .bmb-experience-pill-list {
        grid-column: auto;
        margin-top: 0;
    }
}

@media (min-width: 900px) {
    .bmb-presets-step .bmb-presets-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1120px) {
    .bmb-presets-step .bmb-presets-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {

    .bmb-experience-pill-list {
        grid-template-columns: 1fr;
    }
}

/* v1.1.1: interactive goal coach and goal-filtered presets */

.bmb-guided-shell:not(.bmb-goal-filter-ready) .bmb-presets-step .bmb-preset-card[data-bmb-preset-goal]:not([data-bmb-preset-goal="balanced"]),
.bmb-presets-step .bmb-preset-card[hidden] {
    display: none !important;
}

.bmb-presets-empty {
    margin: 0.85rem 0 0;
    padding: 0.9rem 1rem;
    border: 1px dashed #f0d2a8;
    border-radius: 13px;
    background: #fffaf4;
    color: #7c6045;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.4;
    text-align: center;
}

.bmb-calculator-heading-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bmb-calculator-goal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.28rem 0.58rem;
    border: 1px solid #ffd199;
    border-radius: 999px;
    background: #fff7ed;
    color: #d65b00;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.bmb-presets-step .bmb-preset-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bmb-presets-step .bmb-preset-card:hover {
    transform: translateY(-1px);
    border-color: #ffd199;
    box-shadow: 0 10px 26px rgba(74, 45, 18, 0.085);
}

@media (max-width: 760px) {
    .bmb-presets-step .bmb-preset-card {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.8rem;
    }

    .bmb-presets-step .bmb-preset-card[hidden] {
        display: none !important;
    }

    .bmb-presets-step .bmb-preset-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .bmb-presets-step .bmb-preset-header h4 {
        font-size: 0.95rem;
        line-height: 1.18;
    }

    .bmb-presets-step .bmb-preset-desc {
        margin: 0.42rem 0 0.6rem;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .bmb-presets-step .bmb-preset-nutrition-badges {
        gap: 0.28rem;
        margin-bottom: 0.65rem;
    }

    .bmb-presets-step .bmb-badge {
        padding: 0.22rem 0.36rem;
        font-size: 0.68rem;
    }

    .bmb-presets-step .bmb-btn-load-preset,
    .bmb-presets-step .bmb-btn-load-preset:hover,
    .bmb-presets-step .bmb-btn-load-preset:focus {
        min-height: 38px;
        font-size: 0.84rem;
    }

    .bmb-calculator-heading-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* v1.1.2: goal-aware calculator hints */
.bmb-goal-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-top: 0.08rem;
    padding: 0.16rem 0.36rem;
    border: 1px solid #ffe0b3;
    border-radius: 999px;
    background: #fff7ed;
    color: #b85a00;
    font-size: 0.58rem;
    font-weight: 850;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmb-ingredient-btn[data-bmb-goal-hint="high-protein"] .bmb-goal-hint {
    border-color: #ffd6a8;
    background: #fff4e6;
    color: #c65a00;
}

.bmb-ingredient-btn[data-bmb-goal-hint="low-calorie"] .bmb-goal-hint,
.bmb-ingredient-btn[data-bmb-goal-hint="low-carb"] .bmb-goal-hint,
.bmb-ingredient-btn[data-bmb-goal-hint="low-sodium"] .bmb-goal-hint {
    border-color: #f2dfc8;
    background: #fffaf3;
    color: #7a6045;
}

.bmb-ingredient-btn[data-bmb-goal-hint="vegetarian"] .bmb-goal-hint,
.bmb-ingredient-btn[data-bmb-goal-hint="balanced"] .bmb-goal-hint {
    border-color: #dbecc6;
    background: #f6fbef;
    color: #4d7529;
}

.bmb-loaded-preset-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.28rem 0.58rem;
    border: 1px solid #ead8c1;
    border-radius: 999px;
    background: #fffaf4;
    color: #6d5a45;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.bmb-loaded-preset-badge[hidden] {
    display: none !important;
}

.bmb-summary-goal-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    margin-top: 0.16rem !important;
    padding: 0.14rem 0.38rem !important;
    border-radius: 999px !important;
    background: #eaf7db !important;
    color: #377222 !important;
    font-size: clamp(0.48rem, 0.8vw, 0.58rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

@media (max-width: 520px) {
    .bmb-summary-goal-badge {
        display: none !important;
    }

    .bmb-goal-hint {
        max-width: 92%;
        padding: 0.13rem 0.28rem;
        font-size: 0.52rem;
    }

    .bmb-loaded-preset-badge {
        max-width: 100%;
        font-size: 0.68rem;
        white-space: normal;
        text-align: left;
    }
}

/* v1.1.3: bowl drawer goal analysis */
.bmb-mobile-drawer-title {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 0.38rem;
}

.bmb-drawer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bmb-drawer-meta-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    padding: 0.26rem 0.58rem;
    border: 1px solid #ffd199;
    border-radius: 999px;
    background: #fff7ed;
    color: #d65b00;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.bmb-drawer-preset-pill {
    border-color: #ead8c1;
    background: #fffaf4;
    color: #6d5a45;
}

.bmb-drawer-meta-pill[hidden] {
    display: none !important;
}

.bmb-drawer-goal-analysis {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid #ffd7a3;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff8ef 0%, #fffdf9 100%);
    box-shadow: 0 5px 16px rgba(74, 45, 18, 0.055);
}

.bmb-drawer-analysis-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #ffd199;
    border-radius: 999px;
    background: #fff3e2;
    font-size: 1.25rem;
    line-height: 1;
}

.bmb-drawer-analysis-copy {
    min-width: 0;
}

.bmb-drawer-analysis-copy strong {
    display: block;
    margin: 0 0 0.22rem;
    color: #2a2118;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.2;
}

.bmb-drawer-analysis-copy p {
    margin: 0;
    color: #6f5c47;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.36;
}

@media (max-width: 520px) {
    .bmb-drawer-meta-pill {
        white-space: normal;
        font-size: 0.68rem;
        text-align: left;
    }

    .bmb-drawer-goal-analysis {
        gap: 0.62rem;
        padding: 0.7rem;
    }

    .bmb-drawer-analysis-icon {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
    }

    .bmb-drawer-analysis-copy strong {
        font-size: 0.88rem;
    }

    .bmb-drawer-analysis-copy p {
        font-size: 0.74rem;
    }
}

/* v1.1.4-smart-suggestions-10: drawer smart suggestion cards */
.bmb-drawer-smart-suggestions {
    margin: 0 0 1rem;
    padding: 0.8rem;
    border: 1px solid #ffe0b8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffaf3 0%, #fff5ea 100%);
}

/* Smart Moves drawer cards and Apply/Undo controls. */
.bmb-smart-suggestions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.bmb-smart-suggestions-head strong {
    color: #24170d;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.2;
}

.bmb-smart-suggestions-head span {
    flex: 0 0 auto;
    padding: 0.24rem 0.48rem;
    border: 1px solid #ffd8a8;
    border-radius: 999px;
    background: #fffdf9;
    color: #c05d00;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
}

.bmb-smart-suggestion-list {
    display: grid;
    gap: 0.55rem;
}

.bmb-smart-suggestion-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.68rem;
    border: 1px solid #f3dfc5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(74, 45, 18, 0.04);
}

.bmb-smart-suggestion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0.24rem 0.42rem;
    border-radius: 999px;
    background: #fff2df;
    color: #d85d00;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bmb-smart-suggestion-add .bmb-smart-suggestion-badge,
.bmb-smart-suggestion-start .bmb-smart-suggestion-badge {
    background: #edf8ed;
    color: #32823a;
}

.bmb-smart-suggestion-remove .bmb-smart-suggestion-badge {
    background: #fff0e3;
    color: #d75b00;
}

.bmb-smart-suggestion-swap .bmb-smart-suggestion-badge {
    background: #f1f6ff;
    color: #4168b0;
}

.bmb-smart-suggestion-copy {
    min-width: 0;
}

.bmb-smart-suggestion-copy strong {
    display: block;
    margin-bottom: 0.16rem;
    color: #25190f;
    font-size: 0.83rem;
    font-weight: 900;
    line-height: 1.25;
}

.bmb-smart-suggestion-copy p {
    margin: 0 0 0.36rem;
    color: #6c5b4b;
    font-size: 0.74rem;
    line-height: 1.35;
}

.bmb-smart-suggestion-delta {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.44rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #9d5305;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.2;
}

.bmb-smart-suggestion-empty {
    padding: 0.65rem;
    border: 1px dashed #efd8bb;
    border-radius: 12px;
    background: #fffdf8;
    color: #806b55;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 380px) {
    .bmb-drawer-smart-suggestions {
        padding: 0.68rem;
        border-radius: 14px;
    }

    .bmb-smart-suggestion-card {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 0.62rem;
    }

    .bmb-smart-suggestion-badge {
        justify-self: start;
    }
}

/* v1.1.5-suggestion-polish-11: ranked, clearer drawer suggestions */
.bmb-smart-suggestion-card {
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
    gap: 0.72rem;
    align-items: stretch;
    padding: 0.72rem;
    border-color: #efd6b8;
    background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
}

.bmb-smart-suggestion-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    min-height: 100%;
    padding: 0.45rem 0.5rem;
    border: 1px solid #ffe0b8;
    border-radius: 12px;
    background: #fff6e9;
    color: #b85500;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bmb-smart-suggestion-card:first-child .bmb-smart-suggestion-rank {
    border-color: #ffcf91;
    background: linear-gradient(180deg, #fff1dc 0%, #ffe6c4 100%);
    color: #d65c00;
}

.bmb-smart-suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.28rem;
}

.bmb-smart-suggestion-copy .bmb-smart-suggestion-meta + strong {
    margin-bottom: 0.18rem;
}

.bmb-smart-suggestion-copy p {
    margin-bottom: 0;
}

.bmb-smart-suggestion-delta {
    background: #fffaf2;
    color: #7f4b13;
}

.bmb-smart-suggestion-empty {
    display: block;
    padding: 0.85rem;
    border-style: dashed;
    background: linear-gradient(180deg, #fffdf8 0%, #fff9f1 100%);
}

.bmb-smart-suggestion-empty strong {
    display: block;
    margin: 0 0 0.22rem;
    color: #2b1b0e;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.25;
}

.bmb-smart-suggestion-empty p {
    margin: 0;
    color: #806b55;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.38;
}

@media (max-width: 420px) {
    .bmb-smart-suggestion-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bmb-smart-suggestion-rank {
        justify-content: flex-start;
        min-width: 0;
        min-height: 0;
        padding: 0.34rem 0.48rem;
    }
}

/* v1.1.6-apply-suggestions-12: safe one-click suggestion actions */
.bmb-smart-suggestion-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin: -0.1rem 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #cfe7c8;
    border-radius: 12px;
    background: #f4fbf0;
    color: #315d25;
    font-size: 0.75rem;
    font-weight: 850;
    line-height: 1.3;
}

.bmb-smart-suggestion-status[hidden] {
    display: none !important;
}

.bmb-smart-suggestion-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.58rem;
}

.bmb-smart-suggestion-apply,
.bmb-smart-suggestion-undo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    padding: 0.42rem 0.74rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #e56b00 !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(204, 91, 0, 0.18) !important;
    text-decoration: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease !important;
}

.bmb-smart-suggestion-undo {
    flex: 0 0 auto;
    min-height: 30px !important;
    padding: 0.35rem 0.62rem !important;
    background: #315d25 !important;
    font-size: 0.68rem !important;
    box-shadow: none !important;
}

.bmb-smart-suggestion-apply:hover,
.bmb-smart-suggestion-apply:focus,
.bmb-smart-suggestion-undo:hover,
.bmb-smart-suggestion-undo:focus {
    transform: translateY(-1px) !important;
    background: #c95b00 !important;
    color: #ffffff !important;
    outline: 2px solid rgba(229, 107, 0, 0.22) !important;
    outline-offset: 2px !important;
    box-shadow: 0 10px 22px rgba(204, 91, 0, 0.22) !important;
}

.bmb-smart-suggestion-undo:hover,
.bmb-smart-suggestion-undo:focus {
    background: #244a1b !important;
    outline-color: rgba(49, 93, 37, 0.24) !important;
}

.bmb-smart-suggestion-actionable {
    border-color: #f2c996;
}

.bmb-smart-suggestion-actionable .bmb-smart-suggestion-copy p {
    margin-bottom: 0;
}

@media (max-width: 420px) {
    .bmb-smart-suggestion-status {
        align-items: stretch;
        flex-direction: column;
        gap: 0.5rem;
    }

    .bmb-smart-suggestion-undo,
    .bmb-smart-suggestion-apply {
        width: 100% !important;
    }
}

/* v1.1.7-compare-bowls-13: current bowl vs starting preset drawer panel */
.bmb-drawer-compare-panel {
    margin-top: 0.82rem;
    padding: 0.78rem;
    border: 1px solid #efd6b8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff7ed 100%);
    box-shadow: 0 10px 24px rgba(79, 45, 16, 0.06);
}

.bmb-drawer-compare-panel[hidden] {
    display: none !important;
}

.bmb-compare-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.68rem;
}

.bmb-compare-head strong {
    display: block;
    color: #2b1b0e;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.15;
}

.bmb-compare-head span {
    display: block;
    margin-top: 0.16rem;
    color: #7d6040;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
}

.bmb-compare-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto;
    min-height: 31px !important;
    padding: 0.36rem 0.58rem !important;
    border: 1px solid #f0c99d !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #a24f00 !important;
    font-size: 0.66rem !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.bmb-compare-reset:hover,
.bmb-compare-reset:focus {
    background: #fff0dc !important;
    color: #d65c00 !important;
    outline: 2px solid rgba(229, 107, 0, 0.18) !important;
    outline-offset: 2px !important;
}

.bmb-compare-list {
    display: grid;
    gap: 0.46rem;
}

.bmb-compare-row {
    display: grid;
    grid-template-columns: minmax(72px, 0.75fr) minmax(110px, 1.1fr) auto;
    gap: 0.4rem 0.56rem;
    align-items: center;
    padding: 0.58rem;
    border: 1px solid #f0ddc4;
    border-radius: 13px;
    background: #ffffff;
}

.bmb-compare-name {
    color: #4c3722;
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1.2;
}

.bmb-compare-values {
    color: #2a1a0d;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.25;
}

.bmb-compare-delta {
    justify-self: end;
    padding: 0.24rem 0.42rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #7b5635;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.1;
}

.bmb-compare-badge {
    grid-column: 2 / 4;
    justify-self: start;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    background: #f7efe5;
    color: #79624c;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 950;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bmb-compare-good .bmb-compare-delta,
.bmb-compare-good .bmb-compare-badge {
    background: #f0f9eb;
    color: #315d25;
}

.bmb-compare-watch .bmb-compare-delta,
.bmb-compare-watch .bmb-compare-badge {
    background: #fff0e3;
    color: #c95600;
}

.bmb-compare-no-change .bmb-compare-head span::after {
    content: ' · no changes yet';
    color: #a3815d;
}

@media (max-width: 420px) {
    .bmb-compare-head {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .bmb-compare-reset {
        width: 100% !important;
    }

    .bmb-compare-row {
        grid-template-columns: 1fr auto;
    }

    .bmb-compare-values {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .bmb-compare-delta {
        grid-column: 2;
        grid-row: 1;
    }

    .bmb-compare-badge {
        grid-column: 1 / 3;
    }
}

/* v1.1.9-mobile-polish-15: focused mobile and drawer polish */
.bmb-mobile-drawer-body {
    display: grid;
    gap: 0.78rem;
    padding-bottom: max(1.8rem, env(safe-area-inset-bottom));
}

.bmb-drawer-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.58rem;
}

.bmb-drawer-section-head strong {
    display: block;
    color: #2b1b0e;
    font-size: 0.88rem;
    font-weight: 950;
    line-height: 1.15;
}

.bmb-drawer-section-head span {
    display: block;
    color: #81654b;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: right;
}

.bmb-drawer-nutrition-panel,
.bmb-drawer-selected-panel,
.bmb-mobile-smart-notes {
    padding: 0.78rem;
    border: 1px solid #efd6b8;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf9 0%, #fff8ef 100%);
    box-shadow: 0 10px 24px rgba(79, 45, 16, 0.045);
}

.bmb-drawer-nutrition-panel .bmb-drawer-nutrition-grid {
    margin: 0;
}

.bmb-drawer-selected-panel .bmb-mobile-selected-chips {
    margin-bottom: 0;
}

.bmb-mobile-smart-notes {
    display: grid;
    gap: 0.48rem;
}

.bmb-mobile-smart-notes .bmb-note {
    margin: 0;
}

.bmb-drawer-goal-analysis,
.bmb-drawer-smart-suggestions,
.bmb-drawer-compare-panel,
.bmb-drawer-nutrition-panel,
.bmb-drawer-selected-panel,
.bmb-mobile-smart-notes {
    scroll-margin-bottom: 7.5rem;
}

.bmb-smart-suggestion-copy strong {
    font-size: 0.88rem;
}

.bmb-smart-suggestion-copy p {
    font-size: 0.76rem;
}

.bmb-smart-suggestion-apply,
.bmb-smart-suggestion-undo {
    min-height: 42px !important;
}

.bmb-compare-values {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.38rem;
}

.bmb-compare-start,
.bmb-compare-current {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.bmb-compare-arrow {
    color: #b98c5f;
    font-weight: 950;
}

@media (max-width: 760px) {
    .bmb-calculator-step {
        padding: 0.78rem;
    }

    .bmb-calculator-step > .bmb-calculator {
        padding-bottom: 7.35rem;
    }

    .bmb-mobile-result-wrapper {
        padding-bottom: max(0.92rem, env(safe-area-inset-bottom));
    }

    .bmb-mobile-bowl-drawer {
        max-height: min(78vh, calc(100dvh - 118px));
        padding: 0.48rem 0.82rem max(2rem, env(safe-area-inset-bottom));
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        overscroll-behavior: contain;
    }

    .bmb-mobile-drawer-handle {
        margin-bottom: 0.65rem;
        background: #d8c5ad;
    }

    .bmb-mobile-drawer-header {
        position: sticky;
        top: -0.48rem;
        z-index: 3;
        margin: 0 -0.82rem 0.72rem;
        padding: 0.55rem 0.82rem 0.68rem;
        border-bottom: 1px solid rgba(239, 214, 184, 0.8);
        background: rgba(255, 253, 250, 0.96);
        backdrop-filter: blur(10px);
    }

    .bmb-mobile-drawer-header h3 {
        font-size: 1.05rem;
    }

    .bmb-drawer-meta {
        gap: 0.34rem;
    }

    .bmb-drawer-meta-pill {
        max-width: 100%;
        font-size: 0.66rem;
    }

    .bmb-mobile-drawer-body {
        gap: 0.68rem;
        padding-bottom: 7.1rem;
    }

    .bmb-drawer-goal-analysis,
    .bmb-drawer-smart-suggestions,
    .bmb-drawer-compare-panel,
    .bmb-drawer-nutrition-panel,
    .bmb-drawer-selected-panel,
    .bmb-mobile-smart-notes {
        margin-top: 0;
        padding: 0.72rem;
        border-radius: 15px;
    }

    .bmb-drawer-goal-analysis {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 0.62rem;
    }

    .bmb-drawer-analysis-icon {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }

    .bmb-smart-suggestions-head,
    .bmb-compare-head,
    .bmb-drawer-section-head {
        margin-bottom: 0.55rem;
    }

    .bmb-smart-suggestions-head strong,
    .bmb-compare-head strong,
    .bmb-drawer-section-head strong {
        font-size: 0.86rem;
    }

    .bmb-smart-suggestions-head span,
    .bmb-compare-head span,
    .bmb-drawer-section-head span {
        font-size: 0.66rem;
    }

    .bmb-smart-suggestion-list,
    .bmb-compare-list {
        gap: 0.52rem;
    }

    .bmb-smart-suggestion-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.68rem;
        border-radius: 14px;
    }

    .bmb-smart-suggestion-rank {
        justify-content: flex-start;
        min-height: 0;
        min-width: 0;
        padding: 0.36rem 0.52rem;
        font-size: 0.64rem;
    }

    .bmb-smart-suggestion-meta {
        gap: 0.32rem;
        margin-bottom: 0.25rem;
    }

    .bmb-smart-suggestion-badge,
    .bmb-smart-suggestion-delta {
        font-size: 0.65rem;
    }

    .bmb-smart-suggestion-actions {
        margin-top: 0.62rem;
    }

    .bmb-smart-suggestion-apply,
    .bmb-smart-suggestion-undo {
        width: 100% !important;
        min-height: 46px !important;
        border-radius: 13px !important;
        font-size: 0.82rem !important;
    }

    .bmb-smart-suggestion-status {
        align-items: stretch;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.58rem;
        padding: 0.62rem;
        border-radius: 13px;
    }

    .bmb-compare-head {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .bmb-compare-reset {
        width: 100% !important;
        min-height: 42px !important;
        border-radius: 13px !important;
        font-size: 0.76rem !important;
    }

    .bmb-compare-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.45rem 0.5rem;
        align-items: start;
        padding: 0.68rem;
        border-radius: 14px;
    }

    .bmb-compare-name {
        font-size: 0.78rem;
    }

    .bmb-compare-values {
        grid-column: 1 / 3;
        grid-row: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 0.28rem;
        padding: 0.5rem 0.54rem;
        border-radius: 12px;
        background: #fffaf3;
        font-size: 0.72rem;
    }

    .bmb-compare-arrow {
        display: none;
    }

    .bmb-compare-start,
    .bmb-compare-current {
        justify-content: space-between;
        white-space: normal;
    }

    .bmb-compare-delta {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        justify-self: end;
        font-size: 0.68rem;
    }

    .bmb-compare-badge {
        grid-column: 1 / 3;
        justify-self: start;
        font-size: 0.62rem;
    }

    .bmb-drawer-nutrition-grid {
        gap: 0.5rem;
    }

    .bmb-drawer-nutrition-card {
        min-height: 58px;
        padding: 0.52rem 0.58rem;
        border-radius: 13px;
    }

    .bmb-nutri-emoji {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .bmb-drawer-nutrition-card strong {
        font-size: 0.98rem;
    }

    .bmb-chip {
        min-height: 34px;
        padding: 0.36rem 0.62rem;
        font-size: 0.76rem;
    }

    .bmb-calculator .bmb-mobile-summary {
        grid-template-columns: minmax(0, 1fr) 54px !important;
        gap: 0.5rem !important;
        min-height: 66px !important;
        padding: 0.52rem 0.58rem !important;
        border-radius: 18px 18px 0 0 !important;
    }

    .bmb-calculator .bmb-mobile-summary-main {
        grid-template-columns: minmax(92px, 1.6fr) repeat(3, minmax(48px, 1fr)) !important;
        gap: 0.34rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile {
        min-height: 46px !important;
        padding: 0.28rem 0.3rem !important;
        border-radius: 13px !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-calories .bmb-summary-text strong {
        font-size: 1.08rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile:not(.bmb-mobile-summary-calories) .bmb-summary-text strong {
        font-size: 0.78rem !important;
    }

    .bmb-summary-text small {
        font-size: 0.54rem;
    }

    .bmb-summary-goal-badge {
        display: none !important;
    }

    .bmb-bowl-toggle {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 15px !important;
        font-size: 0.74rem !important;
        font-weight: 950 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.02em !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode {
        grid-template-columns: minmax(0, 1fr) 48px !important;
        min-height: 66px !important;
        padding: 0.52rem 0.58rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-mobile-dock-actions {
        gap: 0.42rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-share,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-dock-reset {
        min-height: 46px !important;
        height: 46px !important;
        border-radius: 13px !important;
        font-size: 0.84rem !important;
    }

    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:hover,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:focus,
    .bmb-calculator .bmb-mobile-summary.bmb-drawer-mode .bmb-bowl-toggle:active {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        border-radius: 13px !important;
        font-size: 1.28rem !important;
    }

    .bmb-presets-step .bmb-presets-container {
        gap: 0.62rem;
    }

    .bmb-presets-step .bmb-preset-card {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0.58rem;
        padding: 0.68rem;
        border-radius: 14px;
    }

    .bmb-presets-step .bmb-preset-icon {
        width: 36px;
        height: 36px;
        font-size: 1.12rem;
    }

    .bmb-presets-step .bmb-preset-header h4 {
        font-size: 0.9rem;
    }

    .bmb-presets-step .bmb-preset-desc {
        margin: 0.32rem 0 0.5rem;
        font-size: 0.74rem;
    }

    .bmb-presets-step .bmb-preset-nutrition-badges {
        gap: 0.24rem;
        margin-bottom: 0.52rem;
    }

    .bmb-presets-step .bmb-badge {
        padding: 0.19rem 0.32rem;
        font-size: 0.64rem;
    }

    .bmb-presets-step .bmb-btn-load-preset,
    .bmb-presets-step .bmb-btn-load-preset:hover,
    .bmb-presets-step .bmb-btn-load-preset:focus {
        min-height: 40px;
        border-radius: 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .bmb-mobile-bowl-drawer {
        padding-left: 0.68rem;
        padding-right: 0.68rem;
    }

    .bmb-mobile-drawer-header {
        margin-left: -0.68rem;
        margin-right: -0.68rem;
        padding-left: 0.68rem;
        padding-right: 0.68rem;
    }

    .bmb-mobile-drawer-body {
        gap: 0.58rem;
    }

    .bmb-drawer-goal-analysis,
    .bmb-drawer-smart-suggestions,
    .bmb-drawer-compare-panel,
    .bmb-drawer-nutrition-panel,
    .bmb-drawer-selected-panel,
    .bmb-mobile-smart-notes {
        padding: 0.62rem;
        border-radius: 14px;
    }

    .bmb-calculator .bmb-mobile-summary-main {
        grid-template-columns: minmax(82px, 1.45fr) repeat(3, minmax(42px, 1fr)) !important;
        gap: 0.24rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile {
        padding-left: 0.18rem !important;
        padding-right: 0.18rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-tile:not(.bmb-mobile-summary-calories) .bmb-summary-text strong {
        font-size: 0.72rem !important;
    }

    .bmb-summary-text small {
        font-size: 0.5rem;
    }
}


/* v1.1.11-side-panel-layout-17: desktop side-panel layout and larger horizontal ingredient cards.
   Mobile keeps the existing drawer + bottom summary behavior. */
/* Desktop layout breakpoint: side panel, attached drawer, and horizontal ingredient cards. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-calculator {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(304px, 27vw, 368px);
        align-items: start;
        gap: 1.15rem;
        padding: 1.1rem !important;
        overflow: visible;
    }

    .bmb-calculator-step .bmb-calculator-body,
    .bmb-calculator-step .bmb-ingredients-section,
    .bmb-calculator-step .bmb-categories-container {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-mobile-result-wrapper {
        position: sticky !important;
        top: 1rem;
        bottom: auto !important;
        z-index: 4;
        align-self: start;
        width: 100%;
        max-width: none;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bmb-calculator-step .bmb-mobile-summary {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer,
    .bmb-calculator-step .bmb-mobile-bowl-drawer[hidden] {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
        padding: 1rem !important;
        border: 1px solid #f1dfc5;
        border-radius: 22px !important;
        background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%);
        box-shadow: 0 16px 40px rgba(74, 45, 18, 0.12);
    }

    .bmb-calculator-step .bmb-mobile-drawer-handle,
    .bmb-calculator-step .bmb-mobile-drawer-close {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-drawer-header {
        position: static !important;
        margin: 0 0 0.8rem !important;
        padding: 0 0 0.75rem !important;
        border-bottom: 1px solid #f0dfc7;
        background: transparent !important;
        box-shadow: none !important;
    }

    .bmb-calculator-step .bmb-mobile-drawer-header h3 {
        font-size: 1.15rem;
        letter-spacing: -0.025em;
    }

    .bmb-calculator-step .bmb-drawer-meta {
        gap: 0.32rem;
        margin-top: 0.35rem;
    }

    .bmb-calculator-step .bmb-drawer-meta-pill {
        min-height: 23px;
        padding: 0.24rem 0.5rem;
        font-size: 0.66rem;
    }

    .bmb-calculator-step .bmb-mobile-drawer-body {
        display: flex;
        flex-direction: column;
        gap: 0.72rem;
        padding: 0 0 0.15rem !important;
    }

    .bmb-calculator-step .bmb-drawer-goal-analysis,
    .bmb-calculator-step .bmb-drawer-smart-suggestions,
    .bmb-calculator-step .bmb-drawer-compare-panel,
    .bmb-calculator-step .bmb-drawer-nutrition-panel,
    .bmb-calculator-step .bmb-drawer-selected-panel,
    .bmb-calculator-step .bmb-mobile-smart-notes {
        margin: 0 !important;
        padding: 0.72rem !important;
        border-radius: 16px !important;
    }

    .bmb-calculator-step .bmb-drawer-goal-analysis {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0.62rem;
    }

    .bmb-calculator-step .bmb-drawer-analysis-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .bmb-calculator-step .bmb-drawer-analysis-copy strong,
    .bmb-calculator-step .bmb-smart-suggestions-head strong,
    .bmb-calculator-step .bmb-drawer-section-head strong,
    .bmb-calculator-step .bmb-compare-head strong {
        font-size: 0.88rem;
    }

    .bmb-calculator-step .bmb-drawer-analysis-copy p,
    .bmb-calculator-step .bmb-smart-suggestions-head span,
    .bmb-calculator-step .bmb-drawer-section-head span,
    .bmb-calculator-step .bmb-compare-head span,
    .bmb-calculator-step .bmb-smart-suggestion-copy p,
    .bmb-calculator-step .bmb-note {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .bmb-calculator-step .bmb-smart-suggestion-card {
        gap: 0.54rem;
        padding: 0.62rem;
        border-radius: 14px;
    }

    .bmb-calculator-step .bmb-smart-suggestion-rank,
    .bmb-calculator-step .bmb-smart-suggestion-badge,
    .bmb-calculator-step .bmb-smart-suggestion-delta,
    .bmb-calculator-step .bmb-compare-badge,
    .bmb-calculator-step .bmb-compare-delta {
        font-size: 0.62rem;
    }

    .bmb-calculator-step .bmb-smart-suggestion-apply,
    .bmb-calculator-step .bmb-smart-suggestion-undo,
    .bmb-calculator-step .bmb-compare-reset,
    .bmb-calculator-step .bmb-mobile-reset,
    .bmb-calculator-step .bmb-mobile-save-card {
        min-height: 36px;
        border-radius: 11px;
        font-size: 0.74rem;
    }

    .bmb-calculator-step .bmb-drawer-nutrition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .bmb-calculator-step .bmb-drawer-calories {
        grid-column: 1 / -1;
    }

    .bmb-calculator-step .bmb-drawer-nutrition-card {
        min-height: 64px;
        padding: 0.55rem;
        border-radius: 14px;
    }

    .bmb-calculator-step .bmb-drawer-nutrition-card strong {
        font-size: 1rem;
    }

    .bmb-calculator-step .bmb-drawer-calories strong {
        font-size: 1.45rem;
    }

    .bmb-calculator-step .bmb-mobile-selected-chips {
        gap: 0.34rem;
        margin-bottom: 0;
    }

    .bmb-calculator-step .bmb-chip {
        min-height: 30px;
        padding: 0.28rem 0.5rem;
        font-size: 0.68rem;
    }


    .bmb-calculator-step .bmb-contribution-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.46rem;
        padding: 0.58rem;
    }

    .bmb-calculator-step .bmb-contribution-metrics {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.22rem;
    }

    .bmb-calculator-step .bmb-contribution-metric {
        padding: 0.3rem 0.18rem;
    }

    .bmb-calculator-step .bmb-contribution-metric strong {
        font-size: 0.66rem;
    }

    .bmb-calculator-step .bmb-contribution-metric small {
        font-size: 0.5rem;
    }

    .bmb-calculator-step .bmb-mobile-save-feedback {
        min-height: 0;
        margin-top: 0.1rem;
        font-size: 0.72rem;
    }

    .bmb-calculator-step .bmb-category-tabs-panel {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        gap: 0.28rem;
        margin-bottom: 0.95rem;
    }

    .bmb-calculator-step .bmb-tabs-nav {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        box-shadow: 0 3px 10px rgba(74, 45, 18, 0.06);
    }

    .bmb-calculator-step .bmb-category-tab {
        border-radius: 14px 14px 0 0;
        min-height: 62px;
        transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }

    .bmb-calculator-step .bmb-category-tab.bmb-tab-active {
        background: #fff5e7;
        box-shadow: inset 0 0 0 1px #ffe0b3;
    }

    .bmb-calculator-step .bmb-category-panel {
        padding: 0 1.45rem;
    }

    .bmb-calculator-step .bmb-carousel-nav {
        width: 30px;
        height: 52px;
        border-radius: 999px;
        box-shadow: 0 5px 16px rgba(74, 45, 18, 0.08);
    }

    .bmb-calculator-step .bmb-carousel-prev {
        left: 0.05rem;
    }

    .bmb-calculator-step .bmb-carousel-next {
        right: 0.05rem;
    }

    .bmb-calculator-step .bmb-ingredient-scroll {
        min-height: calc(354px + 1.5rem) !important;
    }

    .bmb-calculator-step .bmb-ingredient-page {
        gap: 0.75rem;
    }

    .bmb-calculator-step .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
        height: 118px !important;
        min-height: 118px !important;
        display: grid !important;
        grid-template-columns: 62px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
        justify-content: stretch;
        gap: 0.7rem;
        padding: 0.74rem 2.05rem 0.74rem 0.86rem !important;
        text-align: left;
    }

    .bmb-calculator-step .bmb-ing-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 62px;
        height: 62px;
        border: 1px solid #f6e8d4;
        border-radius: 18px;
        background: #fffaf3;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        font-size: 2.75rem;
    }

    .bmb-calculator-step .bmb-ing-icon {
        font-size: 2.75rem;
        line-height: 1;
    }

    .bmb-calculator-step .bmb-ing-details {
        align-items: flex-start;
        justify-content: center;
        gap: 0.16rem;
        min-width: 0;
        text-align: left;
    }

    .bmb-calculator-step .bmb-ing-name {
        font-size: 0.88rem;
        line-height: 1.15;
        text-align: left;
        -webkit-line-clamp: 2;
    }

    .bmb-calculator-step .bmb-ing-meta {
        color: #7d766e;
        font-size: 0.76rem;
        line-height: 1.2;
    }

    .bmb-calculator-step .bmb-ing-cal {
        color: #7d766e;
        font-size: 0.76rem;
        font-weight: 750;
    }

    .bmb-calculator-step .bmb-goal-hint {
        justify-content: flex-start;
        margin-top: 0.12rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.64rem;
        max-width: 100%;
    }

    .bmb-calculator-step .bmb-ing-selected-marker {
        top: 0.62rem;
        right: 0.62rem;
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 1180px) {
    .bmb-calculator-step .bmb-calculator {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 1.35rem;
    }
}

/* v1.1.11 desktop side panel actions. Hidden by default so mobile stays unchanged. */
.bmb-desktop-side-actions {
    display: none;
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-desktop-side-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        margin-top: 0.05rem;
    }

    .bmb-calculator-step .bmb-desktop-side-actions .bmb-dock-share,
    .bmb-calculator-step .bmb-desktop-side-actions .bmb-dock-reset {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        width: 100%;
        border-radius: 13px;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 950;
    }
}

/* v1.1.12-side-panel-trim-18: compact desktop nutrition panel.
   Desktop side panel is summary-only and never scrolls; the Bowl drawer keeps deeper analysis/actions.
   Desktop drawer hides the nutrition grid to avoid duplicating values already shown in the side panel. */
/* Desktop nutrition side panel; compact no-scroll summary only. */
.bmb-desktop-nutrition-side-panel {
    display: none;
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-mobile-result-wrapper {
        position: sticky !important;
        top: 1rem;
        align-self: start;
        width: 100%;
        max-width: none;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        display: block;
        width: 100%;
        padding: 1rem;
        border: 1px solid #f0d8b6;
        border-radius: 22px;
        background: linear-gradient(180deg, #fffdf8 0%, #fff7eb 100%);
        box-shadow: 0 16px 38px rgba(74, 45, 18, 0.1);
    }

    .bmb-calculator-step .bmb-desktop-side-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.74rem;
        border-bottom: 1px solid #efdcc1;
    }

    .bmb-calculator-step .bmb-desktop-side-head strong {
        display: block;
        color: #241409;
        font-size: 1.06rem;
        font-weight: 950;
        letter-spacing: -0.02em;
        line-height: 1.1;
    }

    .bmb-calculator-step .bmb-desktop-side-head span {
        display: block;
        color: #7f6248;
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1.25;
    }

    .bmb-calculator-step .bmb-desktop-side-meta {
        gap: 0.35rem;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.56rem;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        grid-template-areas:
            "icon label"
            "icon value";
        align-items: center;
        min-height: 68px;
        padding: 0.62rem;
        border: 1px solid #f1d5ad;
        border-radius: 16px;
        background: rgba(255, 252, 247, 0.92);
        box-shadow: 0 8px 18px rgba(74, 45, 18, 0.045);
    }

    .bmb-calculator-step .bmb-desktop-side-calories {
        grid-column: 1 / -1;
        min-height: 76px;
        background: linear-gradient(135deg, #fff3dc 0%, #ffe2b6 100%);
        border-color: #ffad52;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card .bmb-nutri-emoji {
        grid-area: icon;
        width: 34px;
        height: 34px;
        background: #fff;
        box-shadow: 0 8px 16px rgba(74, 45, 18, 0.08);
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card .bmb-nutri-label {
        grid-area: label;
        color: #76583c;
        font-size: 0.68rem;
        font-weight: 950;
        letter-spacing: 0.045em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card strong {
        grid-area: value;
        color: #231307;
        font-size: 1.08rem;
        font-weight: 950;
        line-height: 1.05;
    }

    .bmb-calculator-step .bmb-desktop-side-calories strong {
        color: #e85b00;
        font-size: 1.62rem;
        letter-spacing: -0.05em;
    }

    .bmb-calculator-step .bmb-desktop-side-hint {
        display: grid;
        gap: 0.18rem;
        margin-top: 0.8rem;
        padding: 0.72rem 0.78rem;
        border: 1px solid #f1d5ad;
        border-radius: 16px;
        background: #fffaf2;
    }

    .bmb-calculator-step .bmb-desktop-side-hint strong {
        color: #2b1a0e;
        font-size: 0.82rem;
        font-weight: 950;
        line-height: 1.18;
    }

    .bmb-calculator-step .bmb-desktop-side-hint span {
        color: #7f6248;
        font-size: 0.7rem;
        font-weight: 750;
        line-height: 1.35;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr 0.85fr;
        gap: 0.48rem;
        margin-top: 0.82rem;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        width: 100%;
        border-radius: 13px;
        font-family: inherit;
        font-size: 0.8rem;
        font-weight: 950;
        line-height: 1;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:active {
        border: 1px solid #ff7a00 !important;
        background: #ff6a00 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(255, 106, 0, 0.2) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-mobile-save-feedback {
        min-height: 0;
        margin-top: 0.45rem;
        font-size: 0.72rem;
    }

    .bmb-calculator-step .bmb-mobile-summary {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer[hidden] {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        display: block !important;
        position: fixed !important;
        inset: 1rem 1rem auto auto !important;
        width: min(480px, calc(100vw - 2rem)) !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
        padding: 1rem !important;
        border: 1px solid #f1dfc5;
        border-radius: 22px !important;
        background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%);
        box-shadow: 0 22px 64px rgba(42, 24, 9, 0.22);
        z-index: 9999;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-drawer-nutrition-panel {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-handle,
    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close {
        display: inline-flex !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-handle {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-header {
        position: sticky !important;
        top: -1rem;
        z-index: 2;
        margin: -1rem -1rem 0.8rem !important;
        padding: 0.82rem 1rem 0.75rem !important;
        border-bottom: 1px solid #f0dfc7;
        background: rgba(255, 253, 248, 0.97) !important;
        backdrop-filter: blur(10px);
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-body {
        gap: 0.72rem;
        padding-bottom: 0.35rem !important;
    }
}

/* v1.1.13-attached-bowl-drawer-19: desktop drawer is attached to the nutrition side panel.
   The side panel remains compact/no-scroll. The drawer holds analysis/actions and does not repeat nutrition values on desktop. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-mobile-result-wrapper {
        position: sticky !important;
        top: 1rem;
        overflow: visible !important;
        isolation: isolate;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        position: relative;
        z-index: 12;
        overflow: visible;
        transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .bmb-calculator-step .bmb-drawer-open-state .bmb-desktop-nutrition-side-panel {
        border-color: #ffb163;
        box-shadow: 0 18px 44px rgba(74, 45, 18, 0.15);
    }

    .bmb-calculator-step .bmb-drawer-open-state .bmb-desktop-nutrition-side-panel::before {
        content: "";
        position: absolute;
        top: 2.25rem;
        left: -15px;
        width: 16px;
        height: 76px;
        border-top: 1px solid #f1dfc5;
        border-bottom: 1px solid #f1dfc5;
        background: linear-gradient(90deg, #fff8ee 0%, #fffdf8 100%);
        box-shadow: -8px 10px 22px rgba(74, 45, 18, 0.08);
        pointer-events: none;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:active {
        background: #241409 !important;
        border-color: #241409 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(36, 20, 9, 0.18) !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer[hidden] {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        display: block !important;
        position: absolute !important;
        inset: 0 calc(100% + 0.9rem) auto auto !important;
        width: min(720px, calc(100vw - 380px)) !important;
        min-width: min(520px, calc(100vw - 380px)) !important;
        max-width: calc(100vw - 380px) !important;
        max-height: min(760px, calc(100vh - 2rem)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 1rem !important;
        border: 1px solid #f1dfc5;
        border-radius: 22px !important;
        background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%);
        box-shadow: 0 22px 64px rgba(42, 24, 9, 0.22);
        z-index: 11;
        transform-origin: right top;
        animation: bmb-attached-drawer-in 0.18s ease-out;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden])::after {
        content: "";
        position: absolute;
        top: 2.25rem;
        right: -0.92rem;
        width: 0.94rem;
        height: 76px;
        border-top: 1px solid #f1dfc5;
        border-bottom: 1px solid #f1dfc5;
        background: linear-gradient(90deg, #fff8ee 0%, #fffdf8 100%);
        pointer-events: none;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-drawer-nutrition-panel {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-desktop-side-actions {
        display: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 1px solid #f1d5ad;
        border-radius: 999px;
        background: #fff8ee;
        color: #7a3a0d;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close:hover,
    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close:focus {
        border-color: #ff9b39;
        color: #f05f00;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(600px, calc(100vw - 350px)) !important;
        min-width: min(460px, calc(100vw - 350px)) !important;
        max-width: calc(100vw - 350px) !important;
    }
}

@keyframes bmb-attached-drawer-in {
    from {
        opacity: 0;
        transform: translateX(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* v1.1.14-drawer-actions-scroll-20: desktop action buttons + drawer scroll lock polish. */
html.bmb-bowl-scroll-locked,
body.bmb-bowl-scroll-locked {
    overflow: hidden !important;
    scrollbar-gutter: stable;
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        grid-template-columns: minmax(0, 1fr) 48px 48px !important;
        align-items: stretch;
        gap: 0.58rem;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle {
        min-width: 0;
        padding: 0.72rem 0.9rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.86rem !important;
        letter-spacing: -0.01em;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:active,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:active {
        border-color: #ff7a00 !important;
        background: #ff6a00 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(255, 106, 0, 0.2) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 !important;
        border-radius: 15px !important;
        font-size: 1.25rem !important;
        line-height: 1 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action:focus {
        border-color: #ff7a00 !important;
        background: #ff6a00 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(255, 106, 0, 0.16) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action:focus {
        border-color: #f0cfaa !important;
        background: #fff8ef !important;
        color: #805838 !important;
        box-shadow: none !important;
    }

    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        overscroll-behavior: contain;
    }

    .bmb-calculator-step .bmb-smart-suggestion-status {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.8rem;
        padding: 0.72rem 0.78rem;
    }

    .bmb-calculator-step .bmb-smart-suggestion-status span {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-smart-suggestion-undo,
    .bmb-calculator-step .bmb-smart-suggestion-undo:hover,
    .bmb-calculator-step .bmb-smart-suggestion-undo:focus {
        width: auto !important;
        min-width: 72px !important;
        min-height: 36px !important;
        padding: 0.52rem 0.82rem !important;
        border-radius: 12px !important;
        font-size: 0.72rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        box-shadow: none !important;
    }
}

/* v1.1.15-desktop-action-fix-21: scoped desktop action fixes + drawn selected marker. */
.bmb-calculator .bmb-ing-selected-marker {
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.bmb-calculator .bmb-ing-selected-marker::after,
.bmb-calculator.bmb-layout-compact .bmb-ing-selected-marker::after {
    content: '' !important;
    display: none !important;
    width: 5px !important;
    height: 9px !important;
    border: solid #fff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) translate(-1px, -1px) !important;
    text-indent: 0 !important;
}

.bmb-calculator .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::after,
.bmb-calculator.bmb-layout-compact .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::after {
    display: block !important;
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 46px 46px !important;
        align-items: stretch !important;
        gap: 0.48rem !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions > * {
        min-width: 0 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:active,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:active {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 0.62rem !important;
        border: 1px solid #ff7a00 !important;
        border-radius: 16px !important;
        background: #ff6a00 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(255, 106, 0, 0.2) !important;
        font-size: 0.76rem !important;
        font-weight: 950 !important;
        letter-spacing: -0.03em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:active {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
        padding: 0 !important;
        border-radius: 15px !important;
        font-size: 1.15rem !important;
        font-weight: 950 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-indent: 0 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-share.bmb-desktop-icon-action:active {
        border: 1px solid #ff7a00 !important;
        background: #ff6a00 !important;
        color: #fff !important;
        box-shadow: 0 10px 20px rgba(255, 106, 0, 0.16) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action:hover,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action:focus,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-dock-reset.bmb-desktop-icon-action:active {
        border: 1px solid #f0cfaa !important;
        background: #fff8ef !important;
        color: #805838 !important;
        box-shadow: none !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:disabled {
        cursor: not-allowed !important;
        opacity: 0.58 !important;
    }
}


/* v1.1.47-desktop-dashboard-shell-foundation-54: desktop-only dashboard shell.
   This pass keeps the existing calculator workflow and drawer logic intact while
   making the Step 3 desktop rail behave as a stable, persistent right column. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell {
        grid-template-columns: minmax(0, 1fr) clamp(322px, 29vw, 392px);
        gap: clamp(1rem, 1.7vw, 1.45rem);
        align-items: start;
        padding: clamp(1rem, 1.45vw, 1.25rem) !important;
        border-radius: 28px;
        background:
            radial-gradient(circle at 0% 0%, rgba(255, 180, 94, 0.16), transparent 31%),
            linear-gradient(135deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 248, 236, 0.92) 100%);
    }

    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-calculator-body {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-mobile-result-wrapper {
        grid-column: 2;
        grid-row: 1;
        position: sticky !important;
        top: clamp(0.75rem, 1.7vw, 1.25rem);
        align-self: start;
        min-width: 0;
        isolation: isolate;
    }

    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-ingredients-section {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-desktop-nutrition-side-panel {
        border-color: rgba(240, 205, 166, 0.95);
        box-shadow: 0 18px 42px rgba(74, 45, 18, 0.11);
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell {
        grid-template-columns: minmax(0, 1fr) clamp(300px, 31vw, 340px);
        gap: 1rem;
    }

    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-mobile-result-wrapper {
        top: 0.85rem;
    }
}

@media (max-width: 1079.98px) {
    .bmb-calculator.bmb-desktop-dashboard-shell {
        display: block;
    }
}

/* v1.1.48-desktop-dashboard-panel-content-55: persistent desktop rail content preview.
   Desktop now shows selected chips and a compact ingredient contribution preview
   without changing mobile drawer behavior or the full Bowl drawer details. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        scrollbar-gutter: stable;
    }

    .bmb-calculator-step .bmb-desktop-side-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.52rem;
    }

    .bmb-calculator-step .bmb-desktop-side-section-head strong {
        color: #2b1b0e;
        font-size: 0.82rem;
        font-weight: 950;
        line-height: 1.15;
    }

    .bmb-calculator-step .bmb-desktop-side-section-head span {
        color: #8a6a49;
        font-size: 0.64rem;
        font-weight: 850;
        letter-spacing: 0.02em;
        line-height: 1;
        text-transform: uppercase;
    }

    .bmb-calculator-step .bmb-desktop-side-selected-panel {
        margin-top: 0.82rem;
        padding: 0.72rem;
        border: 1px solid #f1d9b8;
        border-radius: 16px;
        background: rgba(255, 252, 247, 0.88);
    }

    .bmb-calculator-step .bmb-desktop-side-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.34rem;
        max-height: 92px;
        overflow: hidden;
    }

    .bmb-calculator-step .bmb-desktop-side-chips .bmb-chip {
        min-height: 28px;
        padding: 0.3rem 0.42rem;
        border-radius: 999px;
        font-size: 0.66rem;
        line-height: 1;
    }

    .bmb-calculator-step .bmb-desktop-side-chips .bmb-chip-icon {
        font-size: 0.88rem;
    }

    .bmb-calculator-step .bmb-chip-more {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: 0.3rem 0.48rem;
        border: 1px dashed #e7c69b;
        border-radius: 999px;
        background: #fff8ef;
        color: #8a5d32;
        font-size: 0.66rem;
        font-weight: 900;
        line-height: 1;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel {
        margin-top: 0.7rem;
        padding: 0.72rem;
        border: 1px solid #f1d9b8;
        border-radius: 16px;
        background: rgba(255, 250, 242, 0.9);
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-helper {
        margin-bottom: 0.48rem;
        font-size: 0.66rem;
        line-height: 1.32;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-list {
        gap: 0.36rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.36rem;
        padding: 0.5rem;
        border-radius: 13px;
        box-shadow: none;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-identity {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 0.42rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-icon {
        width: 28px;
        height: 28px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-copy strong {
        font-size: 0.72rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-copy span {
        font-size: 0.62rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.24rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric {
        padding: 0.3rem 0.2rem;
        border-radius: 9px;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric strong {
        font-size: 0.66rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric small {
        font-size: 0.5rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric-carbs,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric-fat {
        display: none;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-empty,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-more {
        padding: 0.56rem 0.62rem;
        border: 1px dashed #e7c69b;
        border-radius: 12px;
        background: #fff8ef;
        color: #82684d;
        font-size: 0.68rem;
        font-weight: 850;
        line-height: 1.32;
    }
}
/* v1.1.19-release-hardening-25: desktop drawer stability + interaction feedback.
   These overrides are intentionally scoped to desktop attached-drawer controls so the
   mobile dock/drawer keeps the same layout and behavior that passed QA. */
html.bmb-bowl-scroll-locked {
    scrollbar-gutter: stable both-edges;
}

@media (min-width: 1080px) {
    /* Keep viewport-based attached-drawer sizing stable when body scroll is locked. */
    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(720px, calc(100vw - 380px - var(--bmb-scrollbar-compensation, 0px))) !important;
        min-width: min(520px, calc(100vw - 380px - var(--bmb-scrollbar-compensation, 0px))) !important;
        max-width: calc(100vw - 380px - var(--bmb-scrollbar-compensation, 0px)) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action,
    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close,
    .bmb-calculator-step .bmb-smart-suggestion-apply,
    .bmb-calculator-step .bmb-smart-suggestion-undo,
    .bmb-calculator-step .bmb-btn-load-preset,
    .bmb-calculator-step .bmb-goal-option {
        transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease !important;
        touch-action: manipulation;
    }

    /* Open/Close Bowl is the primary side-panel action; hover lifts and active presses. */
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 13px 25px rgba(255, 106, 0, 0.24) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:hover {
        box-shadow: 0 13px 25px rgba(36, 20, 9, 0.22) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:active,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:active {
        transform: translateY(1px) scale(0.985) !important;
        box-shadow: 0 5px 12px rgba(36, 20, 9, 0.16) !important;
    }

    /* Icon buttons keep their compact footprint while still showing click feedback. */
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:hover:not(:disabled) {
        transform: translateY(-1px) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:active:not(:disabled) {
        transform: translateY(1px) scale(0.94) !important;
        box-shadow: 0 4px 10px rgba(42, 24, 9, 0.14) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:disabled {
        transform: none !important;
    }

    /* Visible keyboard focus without changing button dimensions or causing layout shifts. */
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:focus-visible,
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:focus-visible,
    .bmb-calculator-step .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close:focus-visible,
    .bmb-calculator-step .bmb-smart-suggestion-apply:focus-visible,
    .bmb-calculator-step .bmb-smart-suggestion-undo:focus-visible,
    .bmb-calculator-step .bmb-btn-load-preset:focus-visible,
    .bmb-calculator-step .bmb-goal-option:focus-visible {
        outline: 3px solid rgba(255, 122, 0, 0.38) !important;
        outline-offset: 3px !important;
    }

    .bmb-calculator-step .bmb-smart-suggestion-apply:hover,
    .bmb-calculator-step .bmb-smart-suggestion-undo:hover,
    .bmb-calculator-step .bmb-btn-load-preset:hover,
    .bmb-calculator-step .bmb-goal-option:hover {
        transform: translateY(-1px) !important;
    }

    .bmb-calculator-step .bmb-smart-suggestion-apply:active,
    .bmb-calculator-step .bmb-smart-suggestion-undo:active,
    .bmb-calculator-step .bmb-btn-load-preset:active,
    .bmb-calculator-step .bmb-goal-option:active {
        transform: translateY(1px) scale(0.985) !important;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(600px, calc(100vw - 350px - var(--bmb-scrollbar-compensation, 0px))) !important;
        min-width: min(460px, calc(100vw - 350px - var(--bmb-scrollbar-compensation, 0px))) !important;
        max-width: calc(100vw - 350px - var(--bmb-scrollbar-compensation, 0px)) !important;
    }
}

/* v1.1.20-ui-style-foundation-26: shared interaction tokens, press feedback, and no-shift drawer scroll guard.
   This foundation sits at the end of the file so it can safely normalize older pass-specific overrides.
   It intentionally uses transform/outline/filter instead of layout properties so desktop and mobile sizes stay stable. */
.bmb-guided-shell,
.bmb-calculator {
    --bmb-ui-orange: #ff6a00;
    --bmb-ui-orange-hover: #ff7a00;
    --bmb-ui-orange-pressed: #e85b00;
    --bmb-ui-cream: #fff8ef;
    --bmb-ui-cream-strong: #fff3e2;
    --bmb-ui-brown: #241409;
    --bmb-ui-border: #f1d5ad;
    --bmb-ui-border-active: #ff9a35;
    --bmb-ui-focus-ring: rgba(255, 122, 0, 0.42);
    --bmb-ui-hover-shadow: 0 10px 24px rgba(74, 45, 18, 0.12);
    --bmb-ui-press-shadow: 0 4px 10px rgba(74, 45, 18, 0.12);
}

/* Scroll guard class does not hide overflow or add padding; JS prevents outside-wheel/touch scroll instead.
   Keeping the browser scrollbar present prevents the desktop calculator from changing width when the drawer opens. */
html.bmb-bowl-scroll-guarded,
body.bmb-bowl-scroll-guarded,
html.bmb-bowl-scroll-locked,
body.bmb-bowl-scroll-locked {
    overflow: visible !important;
    padding-right: 0 !important;
    scrollbar-gutter: auto !important;
}

/* Shared interaction standard for BMB controls. These rules add feedback without changing element dimensions. */
.bmb-guided-shell button,
.bmb-calculator button,
.bmb-calculator .bmb-chip {
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease !important;
    -webkit-tap-highlight-color: rgba(255, 106, 0, 0.14);
    touch-action: manipulation;
}

.bmb-guided-shell button:not(:disabled),
.bmb-calculator button:not(:disabled),
.bmb-calculator .bmb-chip:not([aria-disabled="true"]) {
    cursor: pointer;
}

.bmb-guided-shell button:disabled,
.bmb-calculator button:disabled {
    cursor: not-allowed !important;
    opacity: 0.62;
    transform: none !important;
    filter: none !important;
}

.bmb-guided-shell button:focus-visible,
.bmb-calculator button:focus-visible,
.bmb-calculator .bmb-chip:focus-visible {
    outline: 3px solid var(--bmb-ui-focus-ring) !important;
    outline-offset: 3px !important;
}

/* Immediate press class from JS. It works on mouse, touch, and keyboard without relying on fragile :active timing. */
.bmb-guided-shell button.bmb-is-pressing:not(:disabled),
.bmb-calculator button.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-chip.bmb-is-pressing:not([aria-disabled="true"]) {
    transform: translateY(1px) scale(0.985) !important;
    filter: brightness(0.96) saturate(1.04) !important;
    box-shadow: var(--bmb-ui-press-shadow) !important;
}

/* Goal buttons are outside the calculator body, so they need their own explicit hover/pressed polish. */
.bmb-guided-shell .bmb-goal-chip:hover:not(:disabled) {
    border-color: var(--bmb-ui-border-active) !important;
    background: var(--bmb-ui-cream) !important;
    box-shadow: var(--bmb-ui-hover-shadow) !important;
    transform: translateY(-1px) !important;
}

.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-active:hover:not(:disabled) {
    background: var(--bmb-ui-cream-strong) !important;
    color: var(--bmb-ui-orange-pressed) !important;
}

.bmb-guided-shell .bmb-goal-chip.bmb-is-pressing:not(:disabled) {
    background: #ffe8ca !important;
    border-color: var(--bmb-ui-orange) !important;
}

/* Ingredient cards, tabs, and carousel arrows follow the same physical interaction language. */
.bmb-calculator .bmb-ingredient-btn:hover:not(:disabled),
.bmb-calculator .bmb-category-tab:hover:not(:disabled),
.bmb-calculator .bmb-carousel-nav:hover:not(:disabled),
.bmb-calculator .bmb-tabs-nav:hover:not(:disabled) {
    border-color: var(--bmb-ui-border-active) !important;
    box-shadow: var(--bmb-ui-hover-shadow) !important;
    filter: brightness(1.025) saturate(1.03) !important;
    transform: translateY(-1px) !important;
}

.bmb-calculator .bmb-ingredient-btn.bmb-selected:hover:not(:disabled),
.bmb-calculator .bmb-category-tab.bmb-tab-active:hover:not(:disabled) {
    border-color: var(--bmb-ui-orange) !important;
    background: #fff4e8 !important;
}

.bmb-calculator .bmb-ingredient-btn.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-category-tab.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-carousel-nav.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-tabs-nav.bmb-is-pressing:not(:disabled) {
    border-color: var(--bmb-ui-orange) !important;
}

/* Primary CTAs and secondary action buttons get readable hover and instant pressed states. */
.bmb-calculator .bmb-btn-load-preset:hover:not(:disabled),
.bmb-calculator .bmb-smart-suggestion-apply:hover:not(:disabled),
.bmb-calculator .bmb-smart-suggestion-undo:hover:not(:disabled),
.bmb-calculator .bmb-compare-reset:hover:not(:disabled),
.bmb-calculator .bmb-mobile-save-card:hover:not(:disabled),
.bmb-calculator .bmb-mobile-reset:hover:not(:disabled),
.bmb-calculator .bmb-mobile-drawer-close:hover:not(:disabled),
.bmb-calculator .bmb-bowl-toggle:hover:not(:disabled) {
    filter: brightness(1.045) saturate(1.05) !important;
    box-shadow: var(--bmb-ui-hover-shadow) !important;
    transform: translateY(-1px) !important;
}

.bmb-calculator .bmb-btn-load-preset.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-smart-suggestion-apply.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-smart-suggestion-undo.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-compare-reset.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-mobile-save-card.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-mobile-reset.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-mobile-drawer-close.bmb-is-pressing:not(:disabled),
.bmb-calculator .bmb-bowl-toggle.bmb-is-pressing:not(:disabled) {
    transform: translateY(1px) scale(0.985) !important;
    filter: brightness(0.96) saturate(1.04) !important;
    box-shadow: var(--bmb-ui-press-shadow) !important;
}

@media (min-width: 1080px) {
    /* Desktop drawer sizing no longer depends on scrollbar compensation because body width is never mutated. */
    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(720px, calc(100vw - 380px)) !important;
        min-width: min(520px, calc(100vw - 380px)) !important;
        max-width: calc(100vw - 380px) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        grid-template-columns: minmax(136px, 1fr) 46px 46px !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl:hover:not(:disabled) {
        background: var(--bmb-ui-orange-hover) !important;
        border-color: var(--bmb-ui-orange-hover) !important;
        box-shadow: 0 14px 26px rgba(255, 106, 0, 0.26) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open:hover:not(:disabled) {
        background: #342013 !important;
        border-color: #342013 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-is-pressing:not(:disabled) {
        background: var(--bmb-ui-orange-pressed) !important;
        border-color: var(--bmb-ui-orange-pressed) !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-open-bowl.bmb-drawer-open.bmb-is-pressing:not(:disabled) {
        background: #130904 !important;
        border-color: #130904 !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-icon-action:hover:not(:disabled) {
        border-color: var(--bmb-ui-border-active) !important;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator-step .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(600px, calc(100vw - 350px)) !important;
        min-width: min(460px, calc(100vw - 350px)) !important;
        max-width: calc(100vw - 350px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bmb-guided-shell button,
    .bmb-calculator button,
    .bmb-calculator .bmb-chip {
        transition: none !important;
    }
}


/* v1.1.21-mobile-polish-27: light mobile polish and desktop ingredient-grid breathing room.
   This pass intentionally avoids feature logic and layout architecture changes. Mobile updates only adjust
   spacing, readable labels, tap targets, and carousel visual weight; desktop gets a small ingredient-grid inset
   so hover/pressed card animations do not touch the ingredient viewport border. */
@media (min-width: 1080px) {
    /* Give desktop ingredient pages enough inset for hover/pressed shadows and borders to breathe. */
    .bmb-calculator-step .bmb-ingredient-scroll {
        padding: 0.55rem !important;
        min-height: calc(324px + 1.5rem + 1.1rem) !important;
    }

    .bmb-calculator-step .bmb-ingredient-page {
        flex-basis: calc(100% - 1.1rem) !important;
        min-width: calc(100% - 1.1rem) !important;
        margin: 0 !important;
    }
}

@media (max-width: 760px) {
    /* Keep the mobile category rail compact enough to show full words more often on 360px-class phones. */
    .bmb-calculator-step .bmb-category-tabs-panel {
        grid-template-columns: 28px minmax(0, 1fr) 28px !important;
        gap: 0.22rem !important;
        margin-bottom: 0.82rem !important;
    }

    .bmb-calculator-step .bmb-category-tabs {
        gap: 0.16rem !important;
        padding: 0 0.1rem 0.55rem !important;
        scroll-padding-inline: 0.35rem;
    }

    .bmb-calculator-step .bmb-category-tab {
        flex: 0 0 58px !important;
        min-width: 58px !important;
        max-width: 62px !important;
        min-height: 58px !important;
        padding: 0.3rem 0.22rem 0.42rem !important;
        font-size: 0.68rem !important;
        line-height: 1.08 !important;
        scroll-snap-align: center;
    }

    .bmb-calculator-step .bmb-category-tab-icon {
        font-size: 1.36rem !important;
    }

    .bmb-calculator-step .bmb-category-tab-label {
        max-width: 100%;
        letter-spacing: -0.01em;
    }

    .bmb-calculator-step .bmb-category-tab-count {
        top: -0.1rem;
        right: 0.12rem;
        min-width: 17px;
        height: 17px;
        font-size: 0.62rem;
        line-height: 17px;
    }

    /* Quiet the mobile carousel arrows so they support the flow without competing with the cards. */
    .bmb-calculator-step .bmb-tabs-nav,
    .bmb-calculator-step .bmb-carousel-nav {
        width: 28px !important;
        min-width: 28px !important;
        border-color: #f3e4d1 !important;
        background: rgba(255, 253, 248, 0.88) !important;
        color: #f06a00 !important;
        box-shadow: 0 3px 10px rgba(74, 45, 18, 0.055) !important;
    }

    .bmb-calculator-step .bmb-tabs-nav {
        height: 28px !important;
        margin-top: 0.4rem !important;
        font-size: 1.05rem !important;
    }

    .bmb-calculator-step .bmb-carousel-nav {
        height: 48px !important;
        font-size: 1.38rem !important;
    }

    .bmb-calculator-step .bmb-category-panel {
        padding: 0 1.28rem !important;
    }

    .bmb-calculator-step .bmb-carousel-prev {
        left: 0 !important;
    }

    .bmb-calculator-step .bmb-carousel-next {
        right: 0 !important;
    }

    /* Mobile ingredient cards stay in the current two-column structure, with slightly better type and icon balance. */
    .bmb-calculator-step .bmb-ingredient-scroll {
        min-height: calc(342px + 1.5rem) !important;
        padding-top: 0.2rem !important;
        padding-bottom: 0.35rem !important;
    }

    .bmb-calculator-step .bmb-ingredient-page {
        gap: 0.72rem !important;
    }

    .bmb-calculator-step .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
        height: 112px !important;
        min-height: 112px !important;
        padding: 0.64rem 0.42rem 0.58rem !important;
        border-radius: 14px !important;
    }

    .bmb-calculator-step .bmb-ing-icon-wrap {
        font-size: 1.82rem !important;
        margin-bottom: 0.16rem !important;
    }

    .bmb-calculator-step .bmb-ing-icon {
        font-size: 1.82rem !important;
        line-height: 1 !important;
    }

    .bmb-calculator-step .bmb-ing-details {
        gap: 0.12rem !important;
    }

    .bmb-calculator-step .bmb-ing-name {
        font-size: 0.74rem !important;
        line-height: 1.14 !important;
        -webkit-line-clamp: 2;
    }

    .bmb-calculator-step .bmb-ing-meta,
    .bmb-calculator-step .bmb-ing-cal {
        font-size: 0.68rem !important;
        line-height: 1.15 !important;
    }

    .bmb-calculator-step .bmb-goal-hint {
        margin-top: 0.12rem !important;
        padding: 0.18rem 0.38rem !important;
        border-radius: 999px !important;
        font-size: 0.58rem !important;
        line-height: 1.05 !important;
    }

    .bmb-calculator-step .bmb-ing-selected-marker {
        top: 0.48rem !important;
        right: 0.48rem !important;
        width: 21px !important;
        height: 21px !important;
    }

    /* Keep the dock dimensions stable, but give its contents just enough room to breathe on phones. */
    .bmb-calculator .bmb-mobile-summary {
        gap: 0.42rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .bmb-calculator .bmb-mobile-summary-main {
        gap: 0.3rem !important;
    }
}

@media (max-width: 380px) {
    /* Extra-small screens need slightly smaller tabs and cards, but the hierarchy stays the same. */
    .bmb-calculator-step .bmb-category-tab {
        flex-basis: 54px !important;
        min-width: 54px !important;
        max-width: 58px !important;
        font-size: 0.64rem !important;
    }

    .bmb-calculator-step .bmb-category-tab-icon {
        font-size: 1.28rem !important;
    }

    .bmb-calculator-step .bmb-category-panel {
        padding: 0 1.18rem !important;
    }

    .bmb-calculator-step .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-ingredient-btn,
    .bmb-calculator-step .bmb-calculator.bmb-layout-compact .bmb-ingredient-btn {
        height: 106px !important;
        min-height: 106px !important;
    }

    .bmb-calculator-step .bmb-ing-name {
        font-size: 0.69rem !important;
    }

    .bmb-calculator-step .bmb-ing-meta,
    .bmb-calculator-step .bmb-ing-cal {
        font-size: 0.64rem !important;
    }
}

/* v1.1.22-floating-notifications-28: temporary confirmations move into toasts.
   Persistent context (goal, starter source, nutrition, compare values) stays in the UI. */
.bmb-calculator .bmb-toast-region {
    position: fixed;
    z-index: 100000;
    display: grid;
    gap: 0.6rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.bmb-calculator .bmb-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 0.78rem;
    border: 1px solid var(--bmb-ui-border, #f1d5ad);
    border-radius: 16px;
    background: rgba(255, 250, 242, 0.98);
    color: var(--bmb-ui-brown, #2b170c);
    box-shadow: 0 16px 36px rgba(43, 23, 12, 0.15), 0 2px 8px rgba(255, 106, 0, 0.08);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.32;
    backdrop-filter: blur(10px);
    animation: bmb-toast-enter 180ms ease-out both;
}

.bmb-calculator .bmb-toast-success {
    border-color: #cfe7c8;
    background: rgba(246, 253, 241, 0.98);
    color: #285b24;
}

.bmb-calculator .bmb-toast-warning {
    border-color: #f4c47c;
    background: rgba(255, 247, 232, 0.98);
    color: #7b4212;
}

.bmb-calculator .bmb-toast-info {
    border-color: #ecd5b8;
    background: rgba(255, 250, 242, 0.98);
    color: #6d4b2f;
}

.bmb-calculator .bmb-toast-message {
    min-width: 0;
}

.bmb-calculator .bmb-toast-action,
.bmb-calculator .bmb-toast-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    font-family: inherit !important;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.bmb-calculator .bmb-toast-action {
    min-height: 32px !important;
    padding: 0.38rem 0.66rem !important;
    border-radius: 999px !important;
    background: var(--bmb-ui-orange, #ff6a00) !important;
    color: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(255, 106, 0, 0.2) !important;
}

.bmb-calculator .bmb-toast-close {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    color: #7a5638 !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.bmb-calculator .bmb-toast-action:hover,
.bmb-calculator .bmb-toast-close:hover {
    transform: translateY(-1px);
}

.bmb-calculator .bmb-toast-action:active,
.bmb-calculator .bmb-toast-close:active,
.bmb-calculator .bmb-toast-action.bmb-is-pressing,
.bmb-calculator .bmb-toast-close.bmb-is-pressing {
    transform: translateY(1px) scale(0.98);
}

.bmb-calculator .bmb-toast-action:focus-visible,
.bmb-calculator .bmb-toast-close:focus-visible {
    outline: 3px solid var(--bmb-ui-focus-ring, rgba(255, 122, 0, 0.35)) !important;
    outline-offset: 2px !important;
}

.bmb-calculator .bmb-toast-leaving {
    animation: bmb-toast-leave 180ms ease-in both;
}

@keyframes bmb-toast-enter {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bmb-toast-leave {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@media (min-width: 1080px) {
    .bmb-calculator .bmb-toast-region {
        right: max(1rem, calc((100vw - 1180px) / 2 + 1rem));
        bottom: 1rem;
    }
}

@media (max-width: 1079.98px) {
    .bmb-calculator .bmb-toast-region {
        top: calc(env(safe-area-inset-top, 0px) + 0.85rem);
        left: 50%;
        transform: translateX(-50%);
    }

    body.admin-bar .bmb-calculator .bmb-toast-region {
        top: calc(46px + env(safe-area-inset-top, 0px) + 0.65rem);
    }

    .bmb-calculator .bmb-toast {
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding: 0.66rem 0.7rem;
        font-size: 0.78rem;
        border-radius: 14px;
    }
}

@media (min-width: 783px) and (max-width: 1079.98px) {
    body.admin-bar .bmb-calculator .bmb-toast-region {
        top: calc(32px + env(safe-area-inset-top, 0px) + 0.75rem);
    }
}

/* Phase 29: static source transparency note. No new script, asset, or external request. */
.bmb-source-transparency-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin: -0.35rem 0 1rem;
    padding: 0.72rem 0.9rem;
    border: 1px solid #f1e4d2;
    border-radius: 14px;
    background: #fffdf7;
    color: #6f6254;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
    box-shadow: 0 6px 18px rgba(74, 45, 18, 0.045);
}

.bmb-source-transparency-note strong {
    color: #33251a;
    font-weight: 850;
}

@media (max-width: 760px) {
    .bmb-source-transparency-note {
        margin-top: -0.2rem;
        padding: 0.65rem 0.75rem;
        font-size: 0.76rem;
    }
}

/* Phase 33 / M5.1: desktop side-panel regression guard.
   M4/M5 changed JS delivery, not layout intent. These late, scoped rules make
   the desktop live Bowl panel visible at the 1080px desktop breakpoint even if older
   responsive blocks or theme styles leave the result wrapper/panel hidden. Mobile
   remains unchanged below 1080px. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-calculator {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(304px, 27vw, 368px) !important;
        align-items: start !important;
        gap: 1.15rem !important;
    }

    .bmb-calculator-step .bmb-mobile-result-wrapper {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        position: sticky !important;
        top: 1rem !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .bmb-calculator-step .bmb-mobile-summary {
        display: none !important;
    }
}

@media (max-width: 1079.98px) {
    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        display: none !important;
    }
}

/* Phase 47: Ingredient Breakdown readability polish and regression guards. */
.bmb-contribution-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.22rem 0.48rem;
    border: 1px solid #f1d9b8;
    border-radius: 999px;
    background: #fff8ef;
    color: #8a4b13;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.bmb-contribution-row {
    position: relative;
    gap: 0.58rem;
}

.bmb-contribution-copy strong {
    overflow-wrap: anywhere;
}

.bmb-contribution-copy span {
    overflow-wrap: anywhere;
}

.bmb-contribution-metrics {
    align-items: stretch;
}

.bmb-contribution-metric {
    min-height: 42px;
}

.bmb-contribution-metric-calories strong,
.bmb-contribution-metric-protein strong {
    color: #2b1b0e;
}

.bmb-contribution-metric-sodium {
    background: #fff3e4;
}

@media (max-width: 519px) {
    .bmb-contribution-row {
        padding: 0.72rem;
    }

    .bmb-contribution-identity {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .bmb-contribution-icon {
        width: 32px;
        height: 32px;
        border-radius: 11px;
        font-size: 1.18rem;
    }

    .bmb-contribution-metrics {
        display: flex;
        flex-wrap: wrap;
        gap: 0.28rem;
    }

    .bmb-contribution-metric {
        flex: 1 1 54px;
        min-width: 54px;
        padding: 0.34rem 0.25rem;
    }

    .bmb-contribution-metric-sodium {
        flex-basis: 72px;
    }
}

@media (min-width: 720px) {
    .bmb-contribution-row {
        grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.35fr);
    }
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-contribution-row {
        gap: 0.5rem;
        padding: 0.64rem;
    }

    .bmb-calculator-step .bmb-contribution-metrics {
        display: flex;
        flex-wrap: wrap;
        gap: 0.22rem;
    }

    .bmb-calculator-step .bmb-contribution-metric {
        flex: 1 1 50px;
        min-height: 38px;
        min-width: 50px;
    }

    .bmb-calculator-step .bmb-contribution-metric-sodium {
        flex-basis: 68px;
    }
}

/* Phase 51: Desktop dashboard rail polish and regression guards.
   This layer is desktop-scoped and keeps mobile dock/drawer behavior unchanged. */
@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell .bmb-mobile-result-wrapper {
        max-height: calc(100dvh - 1.5rem);
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        max-height: calc(100dvh - 1.5rem) !important;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(171, 112, 48, 0.36) rgba(255, 248, 236, 0.72);
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel::-webkit-scrollbar {
        width: 8px;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel::-webkit-scrollbar-track {
        background: rgba(255, 248, 236, 0.72);
        border-radius: 999px;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel::-webkit-scrollbar-thumb {
        background: rgba(171, 112, 48, 0.32);
        border-radius: 999px;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-head {
        align-items: flex-start;
        gap: 0.65rem;
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-head > div:first-child {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-meta {
        justify-content: flex-end;
        max-width: 58%;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-drawer-meta-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-side-nutrition-card strong,
    .bmb-calculator-step .bmb-desktop-side-nutrition-card .bmb-nutri-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-calculator-step .bmb-desktop-side-chips .bmb-chip {
        max-width: 100%;
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-side-chips .bmb-chip span:not(.bmb-chip-icon) {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-row {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-copy,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-copy strong,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-copy span {
        min-width: 0;
        max-width: 100%;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric {
        min-width: 0;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric strong,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-metric small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        position: sticky;
        bottom: -1px;
        z-index: 2;
        margin: 0.82rem -0.1rem -0.1rem;
        padding: 0.65rem 0.1rem 0.1rem;
        border-top: 1px solid rgba(240, 217, 184, 0.86);
        background:
            linear-gradient(180deg, rgba(255, 250, 242, 0) 0%, rgba(255, 250, 242, 0.96) 34%, rgba(255, 250, 242, 0.99) 100%);
        backdrop-filter: blur(4px);
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator-step .bmb-calculator.bmb-desktop-dashboard-shell {
        grid-template-columns: minmax(0, 1fr) clamp(292px, 30vw, 330px) !important;
        gap: 0.9rem !important;
    }

    .bmb-calculator-step .bmb-desktop-nutrition-side-panel {
        padding: 0.78rem !important;
    }

    .bmb-calculator-step .bmb-desktop-side-selected-panel,
    .bmb-calculator-step .bmb-desktop-side-contribution-panel {
        padding: 0.62rem;
    }

    .bmb-calculator-step .bmb-desktop-side-section-head strong,
    .bmb-calculator-step .bmb-contribution-head strong {
        font-size: 0.78rem;
    }
}

/* Phase 52: approved desktop dashboard mockup implementation.
   The calculator root now owns both the left workflow and the persistent right
   Bowl rail. These rules are scoped to the new approved-dashboard class so the
   mobile dock/drawer model and legacy standalone calculator layouts remain safe. */
.bmb-calculator.bmb-approved-dashboard {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 7.25rem;
}

.bmb-approved-dashboard .bmb-dashboard-main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.bmb-approved-dashboard .bmb-experience-header,
.bmb-approved-dashboard .bmb-experience-step {
    margin-bottom: 0;
}

.bmb-approved-dashboard .bmb-desktop-edit-name {
    cursor: not-allowed;
}

@media (min-width: 1080px) {
    .bmb-calculator-shell.bmb-guided-shell:has(.bmb-approved-dashboard) {
        width: min(100%, 1640px) !important;
        max-width: 1640px !important;
    }

    .bmb-calculator.bmb-approved-dashboard {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(400px, 29vw, 520px) !important;
        gap: clamp(1rem, 1.35vw, 1.35rem) !important;
        align-items: start !important;
        overflow: visible !important;
        padding: 0 !important;
        color: #21160d;
    }

    .bmb-approved-dashboard .bmb-dashboard-main {
        grid-column: 1;
        gap: 1rem;
        min-width: 0;
    }

    .bmb-approved-dashboard > .bmb-mobile-result-wrapper {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        position: sticky !important;
        top: 1.25rem !important;
        bottom: auto !important;
        z-index: 9 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        max-height: calc(100dvh - 2.5rem) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        isolation: isolate;
    }

    .bmb-approved-dashboard .bmb-mobile-summary {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-source-transparency-note {
        display: none;
    }

    .bmb-approved-dashboard .bmb-experience-header {
        min-height: 120px;
        padding: clamp(1.15rem, 1.7vw, 1.55rem);
        border-color: #f1dfc8;
        border-radius: 22px;
        background:
            radial-gradient(circle at 0% 0%, rgba(255, 164, 71, 0.12), transparent 36%),
            linear-gradient(135deg, #fffdf9 0%, #fff8ef 100%);
        box-shadow: 0 12px 32px rgba(74, 45, 18, 0.055);
    }

    .bmb-approved-dashboard .bmb-experience-brand-mark {
        width: 58px;
        height: 58px;
        border-color: #ffbd72;
        background: #fff6eb;
        font-size: 1.8rem;
    }

    .bmb-approved-dashboard .bmb-experience-title-block h2 {
        font-size: clamp(1.75rem, 2vw, 2.2rem);
        font-weight: 950;
        letter-spacing: -0.045em;
    }

    .bmb-approved-dashboard .bmb-experience-title-block p {
        color: #6f6254;
        font-size: 0.98rem;
    }

    .bmb-approved-dashboard .bmb-experience-pill-list span {
        min-height: 58px;
        justify-content: center;
        padding: 0.72rem 0.86rem;
        border-color: #f0dcc3;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: 0 6px 18px rgba(74, 45, 18, 0.035);
    }

    .bmb-approved-dashboard .bmb-experience-pill-list strong {
        font-size: 0.78rem;
        font-weight: 900;
    }

    .bmb-approved-dashboard .bmb-experience-pill-list small {
        color: #745f49;
        font-size: 0.68rem;
        font-weight: 760;
    }

    .bmb-approved-dashboard .bmb-experience-step {
        padding: clamp(1.15rem, 1.45vw, 1.45rem);
        border-color: #f1dfc8;
        border-radius: 22px;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 196, 116, 0.09), transparent 36%),
            #fffdf9;
        box-shadow: 0 12px 32px rgba(74, 45, 18, 0.05);
    }

    .bmb-approved-dashboard .bmb-step-number {
        width: 34px;
        height: 34px;
        background: linear-gradient(135deg, #ff8a00 0%, #ff5a00 100%);
        box-shadow: 0 9px 18px rgba(255, 106, 0, 0.2);
    }

    .bmb-approved-dashboard .bmb-step-head h3 {
        font-size: clamp(1.32rem, 1.7vw, 1.72rem);
        letter-spacing: -0.035em;
    }

    .bmb-approved-dashboard .bmb-step-head p {
        color: #6d6257;
        font-size: 0.91rem;
    }

    .bmb-approved-dashboard .bmb-goal-coach-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.95rem;
    }

    .bmb-approved-dashboard .bmb-goal-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.78rem;
    }

    .bmb-approved-dashboard .bmb-goal-chip,
    .bmb-approved-dashboard .bmb-goal-chip:hover,
    .bmb-approved-dashboard .bmb-goal-chip:focus,
    .bmb-approved-dashboard .bmb-goal-chip:active {
        min-height: 44px;
        border-color: #eadbc9;
        border-radius: 10px;
        background: #fff;
        color: #21160d;
        font-size: 0.84rem;
        box-shadow: 0 5px 14px rgba(74, 45, 18, 0.035);
    }

    .bmb-approved-dashboard .bmb-goal-chip-active,
    .bmb-approved-dashboard .bmb-goal-chip-active:hover,
    .bmb-approved-dashboard .bmb-goal-chip-active:focus,
    .bmb-approved-dashboard .bmb-goal-chip-active:active {
        border-color: #ff6a00;
        background: #fff7ef;
        color: #f05f00;
        box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.08);
    }

    .bmb-approved-dashboard .bmb-goal-preview-card {
        min-height: 86px;
        grid-template-columns: 58px minmax(0, 1fr);
        padding: 1rem 1.15rem;
        border-color: #efd5b5;
        border-radius: 16px;
        background: linear-gradient(135deg, #fffaf2 0%, #fffdf9 100%);
    }

    .bmb-approved-dashboard .bmb-goal-preview-icon {
        width: 50px;
        height: 50px;
        font-size: 1.42rem;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-presets-container {
        grid-template-columns: minmax(280px, 380px) !important;
        gap: 0.9rem;
    }

    .bmb-approved-dashboard .bmb-preset-card {
        min-height: 200px;
        align-items: flex-start;
        padding: 1rem;
        border-color: #eee0cf;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(74, 45, 18, 0.06);
    }

    .bmb-approved-dashboard .bmb-preset-icon {
        width: 56px;
        height: 56px;
        border-radius: 999px;
        background: #fff8ef;
        box-shadow: 0 4px 12px rgba(74, 45, 18, 0.08);
        font-size: 1.9rem;
    }

    .bmb-approved-dashboard .bmb-preset-header h4 {
        font-size: 1.04rem;
        line-height: 1.18;
    }

    .bmb-approved-dashboard .bmb-preset-badge {
        background: #fff2df;
        color: #f05f00;
    }

    .bmb-approved-dashboard .bmb-preset-nutrition-badges {
        margin: 0.82rem 0;
        gap: 0.42rem;
    }

    .bmb-approved-dashboard .bmb-badge {
        border-radius: 999px;
        background: #fff7ef;
        color: #cc5200;
        font-size: 0.68rem;
        font-weight: 900;
    }

    .bmb-approved-dashboard .bmb-btn-load-preset,
    .bmb-approved-dashboard .bmb-btn-load-preset:hover,
    .bmb-approved-dashboard .bmb-btn-load-preset:focus,
    .bmb-approved-dashboard .bmb-btn-load-preset:active {
        min-height: 48px;
        width: 100%;
        border: 1px solid #f76300 !important;
        border-radius: 9px !important;
        background: linear-gradient(180deg, #ff7200 0%, #f45d00 100%) !important;
        color: #fff !important;
        box-shadow: 0 10px 18px rgba(255, 106, 0, 0.2) !important;
        font-size: 0.94rem;
        font-weight: 950;
    }

    .bmb-approved-dashboard .bmb-presets-note {
        margin-top: 0.95rem;
        border-color: #efd9bc;
        background: #fffaf2;
    }

    .bmb-approved-dashboard .bmb-calculator-heading-row {
        gap: 0.55rem;
    }

    .bmb-approved-dashboard .bmb-calculator-goal-badge,
    .bmb-approved-dashboard .bmb-loaded-preset-badge {
        border-color: #f1d9b8;
        background: #fff7ed;
        color: #f05f00;
    }

    .bmb-approved-dashboard .bmb-calculator-step .bmb-category-tabs-panel {
        margin-top: 0.75rem;
    }

    .bmb-approved-dashboard .bmb-calculator-step .bmb-category-tabs {
        border-bottom-color: #f0d9b8;
    }

    .bmb-approved-dashboard .bmb-calculator-step .bmb-category-tab {
        min-height: 64px;
        border-bottom-width: 3px;
        border-radius: 13px 13px 0 0;
        color: #42352a;
        font-size: 0.74rem;
    }

    .bmb-approved-dashboard .bmb-calculator-step .bmb-category-tab.bmb-tab-active {
        border-color: #ff6a00;
        background: #fff5e8;
        color: #f05f00;
    }

    .bmb-approved-dashboard .bmb-category-header-top {
        align-items: center;
    }

    .bmb-approved-dashboard .bmb-category-heading {
        color: #21160d;
        font-size: 1.02rem;
        font-weight: 950;
    }

    .bmb-approved-dashboard .bmb-category-summary-count {
        color: #f05f00;
        font-weight: 900;
    }

    .bmb-approved-dashboard .bmb-ingredient-btn {
        border-color: #eee0d2;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(74, 45, 18, 0.055);
    }

    .bmb-approved-dashboard .bmb-ingredient-btn.bmb-selected {
        border-color: #ff6a00;
        background: #fff8ef;
    }

    .bmb-approved-dashboard .bmb-ing-selected-marker {
        background: #ff7a00;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel.bmb-approved-bowl-panel {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-height: calc(100dvh - 2.5rem) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        padding: clamp(1.25rem, 1.85vw, 1.7rem) !important;
        border: 1px solid #efd9be !important;
        border-radius: 16px !important;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 181, 92, 0.10), transparent 33%),
            linear-gradient(180deg, #fffdf9 0%, #fff8ef 100%) !important;
        box-shadow: 0 18px 44px rgba(74, 45, 18, 0.105) !important;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: rgba(171, 112, 48, 0.32) rgba(255, 248, 236, 0.72);
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel::-webkit-scrollbar {
        width: 8px;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel::-webkit-scrollbar-track {
        background: rgba(255, 248, 236, 0.72);
        border-radius: 999px;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel::-webkit-scrollbar-thumb {
        background: rgba(171, 112, 48, 0.32);
        border-radius: 999px;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1.35rem;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-panel-head h3 {
        margin: 0;
        color: #21160d;
        font-size: clamp(1.35rem, 1.55vw, 1.65rem);
        font-weight: 950;
        letter-spacing: -0.04em;
        line-height: 1;
    }

    .bmb-approved-dashboard .bmb-desktop-edit-name,
    .bmb-approved-dashboard .bmb-desktop-edit-name:hover,
    .bmb-approved-dashboard .bmb-desktop-edit-name:focus {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: 0;
        border: 0 !important;
        background: transparent !important;
        color: #f05f00 !important;
        box-shadow: none !important;
        font-size: 0.76rem;
        font-weight: 900;
        line-height: 1;
        opacity: 0.82;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-hero {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: center;
        gap: 0.95rem;
        margin-bottom: 1.3rem;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        border: 2px solid #f1dfc6;
        border-radius: 999px;
        background: #fffaf2;
        box-shadow: 0 8px 16px rgba(74, 45, 18, 0.075), inset 0 0 0 4px rgba(255, 255, 255, 0.7);
        font-size: 2rem;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-title-block {
        display: grid;
        gap: 0.2rem;
        min-width: 0;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-title-block strong {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: #21160d;
        font-size: 1.04rem;
        font-weight: 950;
        line-height: 1.16;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-desktop-bowl-title-block span {
        color: #f05f00;
        font-size: 0.76rem;
        font-weight: 900;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0 !important;
        margin: 0.15rem 0 1.18rem;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip .bmb-desktop-side-nutrition-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-areas: none !important;
        align-content: start;
        min-height: 58px !important;
        padding: 0 0.74rem !important;
        border: 0 !important;
        border-left: 1px solid #eadbc8 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: left;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip .bmb-desktop-side-nutrition-card:first-child {
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip .bmb-desktop-optional-metric {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip .bmb-nutri-emoji {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip strong {
        display: block;
        grid-area: auto !important;
        margin: 0 0 0.18rem;
        color: #21160d !important;
        font-size: clamp(1.18rem, 1.35vw, 1.42rem) !important;
        font-weight: 950 !important;
        letter-spacing: -0.045em;
        line-height: 1 !important;
    }

    .bmb-approved-dashboard .bmb-mockup-stat-strip .bmb-nutri-label {
        display: block;
        grid-area: auto !important;
        color: #75675a !important;
        font-size: 0.72rem !important;
        font-weight: 720 !important;
        letter-spacing: 0 !important;
        line-height: 1.15 !important;
        text-transform: none !important;
    }

    .bmb-approved-dashboard .bmb-desktop-goal-meter {
        display: grid;
        grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.42fr) minmax(0, 0.22fr);
        gap: 4px;
        height: 7px;
        margin: 0.35rem 0 0.72rem;
    }

    .bmb-approved-dashboard .bmb-meter-segment {
        display: block;
        min-width: 0;
        height: 7px;
        border-radius: 999px;
        background: #cfd3d2;
    }

    .bmb-approved-dashboard .bmb-meter-segment-green {
        background: #7cc242;
    }

    .bmb-approved-dashboard .bmb-meter-segment-orange {
        background: #ff6a00;
    }

    .bmb-approved-dashboard .bmb-desktop-goal-meter[data-bmb-meter-state="empty"] .bmb-meter-segment-green,
    .bmb-approved-dashboard .bmb-desktop-goal-meter[data-bmb-meter-state="empty"] .bmb-meter-segment-orange {
        background: #d7dbd9;
    }

    .bmb-approved-dashboard .bmb-desktop-goal-meter[data-bmb-meter-state="good"] .bmb-meter-segment-orange {
        background: #7cc242;
    }

    .bmb-approved-dashboard .bmb-desktop-goal-meter[data-bmb-meter-state="watch"] .bmb-meter-segment-orange {
        background: #ff6a00;
    }

    .bmb-approved-dashboard .bmb-desktop-goal-message {
        margin: 0 0 1.5rem;
        padding-bottom: 1.2rem;
        border-bottom: 1px solid #ead9c3;
        color: #685a4b;
        font-size: 0.82rem;
        font-weight: 650;
        line-height: 1.42;
    }

    .bmb-approved-dashboard .bmb-desktop-side-selected-panel {
        margin: 0 0 1.35rem !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-section-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        justify-content: stretch;
        gap: 0.5rem;
        margin-bottom: 0.7rem !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-section-head strong {
        color: #21160d;
        font-size: 0.88rem !important;
        font-weight: 950;
        letter-spacing: -0.015em;
        line-height: 1.15;
    }

    .bmb-approved-dashboard .bmb-desktop-side-section-head strong span {
        color: inherit;
        font: inherit;
    }

    .bmb-approved-dashboard .bmb-desktop-clear-all,
    .bmb-approved-dashboard .bmb-desktop-clear-all:hover,
    .bmb-approved-dashboard .bmb-desktop-clear-all:focus {
        justify-self: end !important;
        align-self: start !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 20px !important;
        padding: 0.05rem 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #f05f00 !important;
        box-shadow: none !important;
        font-size: 0.68rem !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        text-align: right !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.62rem !important;
        max-height: 128px !important;
        overflow: hidden;
        margin: 0 !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip {
        min-height: 34px;
        max-width: 100%;
        padding: 0.3rem 0.55rem 0.3rem 0.34rem;
        border: 1px solid #ecd9c4;
        border-radius: 999px;
        background: #fff7ee;
        color: #39291c;
        box-shadow: 0 4px 10px rgba(74, 45, 18, 0.06);
        font-size: 0.74rem;
        font-weight: 850;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 3px 8px rgba(74, 45, 18, 0.08);
        font-size: 0.95rem;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-mobile-bowl-preview-empty {
        width: 100%;
        padding: 0.72rem 0.8rem;
        border: 1px dashed #e6c9a9;
        border-radius: 12px;
        background: #fff9f1;
        color: #7d6d5f;
        font-size: 0.78rem;
        font-weight: 760;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel {
        margin: 0 0 1.25rem !important;
        padding: 1rem !important;
        border: 1px solid #ead7bd !important;
        border-radius: 12px !important;
        background: rgba(255, 252, 247, 0.92) !important;
        box-shadow: none !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel .bmb-contribution-head {
        align-items: center;
        margin-bottom: 0.36rem;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel .bmb-contribution-head strong {
        color: #21160d;
        font-size: 0.88rem;
        font-weight: 950;
        letter-spacing: -0.015em;
    }

    .bmb-approved-dashboard .bmb-info-dot {
        color: #8d8175;
        font-size: 0.84em;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel .bmb-contribution-head > span {
        display: none;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel .bmb-contribution-helper {
        margin: 0 0 1rem !important;
        color: #7a6c5d;
        font-size: 0.72rem !important;
        line-height: 1.35;
    }

    .bmb-approved-dashboard .bmb-desktop-breakdown-table {
        display: grid;
        width: 100%;
        min-width: 0;
        border-collapse: collapse;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-row {
        display: grid;
        grid-template-columns: minmax(116px, 1.2fr) minmax(70px, 0.72fr) minmax(42px, 0.45fr) minmax(54px, 0.55fr) minmax(50px, 0.5fr) minmax(42px, 0.45fr) minmax(62px, 0.62fr);
        gap: 0;
        align-items: center;
        min-width: 0;
        border-bottom: 1px solid #ead9c4;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-head {
        min-height: 32px;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-body .bmb-breakdown-table-row {
        min-height: 58px;
    }

    .bmb-approved-dashboard .bmb-breakdown-total-row {
        min-height: 46px;
        border-bottom: 0;
        font-weight: 950;
    }

    .bmb-approved-dashboard .bmb-breakdown-cell {
        min-width: 0;
        overflow: hidden;
        padding: 0.44rem 0.28rem;
        color: #4b4036;
        font-size: 0.68rem;
        font-weight: 760;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-breakdown-head-cell {
        color: #756b60;
        font-size: 0.61rem;
        font-weight: 950;
    }

    .bmb-approved-dashboard .bmb-breakdown-ingredient-cell {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: center;
        gap: 0.45rem;
        padding-left: 0;
        color: #241409;
        font-weight: 950;
    }

    .bmb-approved-dashboard .bmb-breakdown-ingredient-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 3px 8px rgba(74, 45, 18, 0.09);
        font-size: 0.96rem;
    }

    .bmb-approved-dashboard .bmb-breakdown-ingredient-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-breakdown-serving-cell {
        color: #71665a;
        font-size: 0.65rem;
    }

    .bmb-approved-dashboard .bmb-breakdown-total-label {
        grid-column: span 2;
        padding-left: 0;
        color: #21160d;
        font-size: 0.74rem;
    }

    .bmb-approved-dashboard .bmb-breakdown-total-label + .bmb-breakdown-serving-cell {
        display: none;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel .bmb-contribution-empty {
        padding: 0.72rem 0.82rem;
        border: 1px dashed #e3c6a4;
        border-radius: 10px;
        background: #fff8ef;
        color: #7d6d5f;
        font-size: 0.75rem;
        font-weight: 760;
        line-height: 1.35;
    }

    .bmb-approved-dashboard .bmb-desktop-source-note {
        margin: 0 0 1.25rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid #ead9c3;
        color: #6f6254;
        font-size: 0.74rem;
        font-weight: 620;
        line-height: 1.45;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        position: sticky;
        bottom: -1px;
        z-index: 2;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.82rem !important;
        margin: 0 -0.2rem -0.2rem !important;
        padding: 0.8rem 0.2rem 0.2rem !important;
        border-top: 0 !important;
        background: linear-gradient(180deg, rgba(255, 250, 242, 0) 0%, rgba(255, 250, 242, 0.94) 34%, rgba(255, 250, 242, 1) 100%);
        backdrop-filter: blur(4px);
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-share,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-reset {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        height: auto !important;
        padding: 0.65rem 0.75rem !important;
        border: 1px solid #ead7bd !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.88) !important;
        color: #5f4b38 !important;
        box-shadow: 0 5px 14px rgba(74, 45, 18, 0.045) !important;
        font-size: 0.78rem !important;
        font-weight: 950 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:hover,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-share:hover,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-reset:hover {
        border-color: #ffb163 !important;
        color: #f05f00 !important;
        transform: translateY(-1px);
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-share:disabled {
        opacity: 0.52 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer[hidden] {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer:not([hidden]) {
        display: block !important;
        position: absolute !important;
        inset: 0 calc(100% + 0.9rem) auto auto !important;
        width: min(720px, calc(100vw - 560px)) !important;
        min-width: min(520px, calc(100vw - 560px)) !important;
        max-width: calc(100vw - 560px) !important;
        max-height: min(760px, calc(100vh - 2rem)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 1rem !important;
        border: 1px solid #f1dfc5;
        border-radius: 22px !important;
        background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%);
        box-shadow: 0 22px 64px rgba(42, 24, 9, 0.22);
        z-index: 11;
        transform-origin: right top;
        animation: bmb-attached-drawer-in 0.18s ease-out;
        overscroll-behavior: contain;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-drawer-nutrition-panel {
        display: none !important;
    }

    /* Phase 55: desktop drawer no longer repeats selected chips or ingredient breakdown rows. */
    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-drawer-selected-panel {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-desktop-side-actions {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-mobile-drawer-handle {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-mobile-drawer-header {
        position: sticky !important;
        top: -1rem;
        z-index: 2;
        margin: -1rem -1rem 0.8rem !important;
        padding: 0.82rem 1rem 0.75rem !important;
        border-bottom: 1px solid #f0dfc7;
        background: rgba(255, 253, 248, 0.97) !important;
        backdrop-filter: blur(10px);
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 1px solid #f1d5ad;
        border-radius: 999px;
        background: #fff8ee;
        color: #7a3a0d;
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer .bmb-mobile-drawer-body {
        display: flex;
        flex-direction: column;
        gap: 0.72rem;
        padding: 0 0 0.35rem !important;
    }
}

@media (min-width: 1080px) and (max-width: 1220px) {
    .bmb-calculator.bmb-approved-dashboard {
        grid-template-columns: minmax(0, 1fr) clamp(360px, 32vw, 420px) !important;
        gap: 0.9rem !important;
    }

    .bmb-approved-dashboard .bmb-experience-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .bmb-approved-dashboard .bmb-experience-pill-list {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bmb-approved-dashboard .bmb-goal-coach-grid {
        grid-template-columns: 1fr;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-row {
        grid-template-columns: minmax(108px, 1.18fr) minmax(54px, 0.55fr) minmax(38px, 0.4fr) minmax(46px, 0.5fr) minmax(44px, 0.46fr) minmax(38px, 0.4fr) minmax(54px, 0.55fr);
    }

    .bmb-approved-dashboard .bmb-breakdown-serving-cell,
    .bmb-approved-dashboard .bmb-breakdown-col-1 {
        display: none;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-row {
        grid-template-columns: minmax(108px, 1.2fr) minmax(38px, 0.42fr) minmax(46px, 0.5fr) minmax(44px, 0.48fr) minmax(38px, 0.42fr) minmax(54px, 0.56fr);
    }

    .bmb-approved-dashboard .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(620px, calc(100vw - 430px)) !important;
        min-width: min(460px, calc(100vw - 430px)) !important;
        max-width: calc(100vw - 430px) !important;
    }
}

@media (max-width: 1079.98px) {
    .bmb-calculator.bmb-approved-dashboard {
        display: block !important;
        width: 100%;
        max-width: 100%;
        padding-bottom: 7.25rem;
    }

    .bmb-approved-dashboard .bmb-dashboard-main {
        display: grid;
        gap: 1rem;
    }

    .bmb-approved-dashboard > .bmb-mobile-result-wrapper {
        position: sticky;
        bottom: 0;
        z-index: 20;
        width: 100%;
        max-width: 100%;
        margin: 1.25rem auto -7.25rem;
        padding: 0 0 max(0.75rem, env(safe-area-inset-bottom));
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel.bmb-approved-bowl-panel {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-source-transparency-note {
        display: block;
    }
}

@media (min-width: 1080px) and (max-width: 1220px) {
    .bmb-approved-dashboard .bmb-breakdown-total-label {
        grid-column: span 1;
    }
}

/* Phase 53: targeted desktop dashboard fixes from screenshot QA.
   Keep the existing page/container max-width intact while widening the internal
   right rail, removing the rail scrollbar, tightening the preset carousel,
   preventing breakdown-table overflow, hiding unselected check markers, and
   giving the Show/Close Bowl action room after removing the duplicate Reset. */
@media (min-width: 1080px) {
    .bmb-calculator.bmb-approved-dashboard {
        grid-template-columns: minmax(0, 1fr) clamp(430px, 32vw, 560px) !important;
    }

    .bmb-approved-dashboard > .bmb-mobile-result-wrapper {
        max-height: none !important;
        overflow: visible !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel.bmb-approved-bowl-panel {
        max-height: none !important;
        overflow: visible !important;
        scrollbar-gutter: auto !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
    }

    .bmb-approved-dashboard .bmb-ing-selected-marker {
        display: none !important;
        border-color: #ff7a00 !important;
        background: #ff7a00 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker {
        display: flex !important;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-presets-container {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 1rem !important;
        align-items: stretch !important;
        max-width: 100% !important;
        margin: 1rem 0 0 !important;
        padding: 0.08rem 0.16rem 0.58rem !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-padding-inline: 0.16rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-preset-card {
        display: flex !important;
        flex: 0 0 clamp(306px, 46%, 390px) !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        min-width: 306px !important;
        max-width: 390px !important;
        min-height: 218px !important;
        padding: 1.22rem 1.22rem 1.12rem !important;
        scroll-snap-align: start;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-preset-card[hidden] {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-preset-content {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-width: 0;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-preset-desc {
        margin: 0.38rem 0 0.82rem;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-preset-nutrition-badges {
        margin: auto 0 0.82rem !important;
    }

    .bmb-approved-dashboard .bmb-presets-step .bmb-btn-load-preset {
        margin-top: 0 !important;
    }

    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel,
    .bmb-approved-dashboard .bmb-desktop-contribution-preview,
    .bmb-approved-dashboard .bmb-desktop-breakdown-table {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-row {
        grid-template-columns: minmax(0, 1.68fr) minmax(0, 0.64fr) minmax(30px, 0.42fr) minmax(36px, 0.48fr) minmax(34px, 0.46fr) minmax(30px, 0.42fr) minmax(44px, 0.56fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-cell {
        min-width: 0 !important;
        padding-right: 0.16rem !important;
        padding-left: 0.16rem !important;
        font-size: 0.64rem !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-head-cell {
        font-size: 0.58rem !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-ingredient-cell {
        grid-template-columns: 28px minmax(0, 1fr) !important;
        gap: 0.36rem !important;
        padding-left: 0 !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-ingredient-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-desktop-side-actions {
        position: static !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1.25fr) minmax(112px, 0.75fr) !important;
        gap: 0.8rem !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-dock-share {
        min-height: 44px !important;
        border-radius: 11px !important;
        font-size: 0.84rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:hover,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle:focus {
        border-color: #ff7a00 !important;
        background: linear-gradient(180deg, #ff7200 0%, #f45d00 100%) !important;
        color: #fff !important;
        box-shadow: 0 10px 18px rgba(255, 106, 0, 0.18) !important;
    }

    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:hover,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel .bmb-bowl-toggle.bmb-drawer-open:focus {
        border-color: #ff7a00 !important;
        background: #fff7ef !important;
        color: #f05f00 !important;
        box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.08), 0 6px 14px rgba(74, 45, 18, 0.05) !important;
    }
}

@media (min-width: 1080px) and (max-width: 1220px) {
    .bmb-calculator.bmb-approved-dashboard {
        grid-template-columns: minmax(0, 1fr) minmax(380px, 40%) !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-serving-cell,
    .bmb-approved-dashboard .bmb-breakdown-col-1 {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-table-row {
        grid-template-columns: minmax(0, 1.76fr) minmax(30px, 0.43fr) minmax(36px, 0.52fr) minmax(34px, 0.48fr) minmax(30px, 0.43fr) minmax(44px, 0.6fr) !important;
    }

    .bmb-approved-dashboard .bmb-breakdown-total-label {
        grid-column: span 1 !important;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-calculator.bmb-approved-dashboard {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 38%) !important;
    }
}

/* Phase 54: move item-level nutrition out of the desktop right rail and into
   the ingredient picker itself. Mobile keeps the existing card carousel. */
.bmb-ingredient-list-head,
.bmb-ing-breakdown {
    display: none;
}

@media (min-width: 1080px) {
    .bmb-approved-dashboard .bmb-desktop-side-contribution-panel {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-category-panel {
        padding: 0 1.55rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell {
        overflow: hidden;
        border: 1px solid #efdcc4;
        border-radius: 16px;
        background: rgba(255, 253, 248, 0.96);
        box-shadow: 0 10px 24px rgba(74, 45, 18, 0.055);
    }

    .bmb-approved-dashboard .bmb-ingredient-list-head {
        display: grid !important;
        grid-template-columns: 52px minmax(138px, 1.18fr) 64px 48px 56px 52px 48px 64px 28px;
        align-items: center;
        gap: 0.5rem;
        min-height: 36px;
        padding: 0 0.72rem;
        border-bottom: 1px solid #ead7bf;
        background: #fff9ef;
        color: #7b6250;
        font-size: 0.62rem;
        font-weight: 900;
        letter-spacing: -0.01em;
        line-height: 1.1;
        text-transform: none;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-head span:first-child {
        grid-column: 1 / 3;
        text-align: left;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-head span:not(:first-child) {
        text-align: center;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-head span:last-child {
        grid-column: 9;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-scroll {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(171, 112, 48, 0.34) rgba(255, 248, 236, 0.72) !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-scroll::-webkit-scrollbar {
        display: block !important;
        height: 8px;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-scroll::-webkit-scrollbar-track {
        background: rgba(255, 248, 236, 0.72);
        border-radius: 999px;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-scroll::-webkit-scrollbar-thumb {
        background: rgba(171, 112, 48, 0.34);
        border-radius: 999px;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        gap: 0 !important;
        margin: 0 !important;
        scroll-snap-align: start !important;
        align-items: stretch !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page[data-bmb-page-items="1"],
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page[data-bmb-page-items="2"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-approved-dashboard.bmb-layout-compact .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn {
        display: grid !important;
        grid-template-columns: 52px minmax(138px, 1.18fr) 64px 48px 56px 52px 48px 64px 28px !important;
        grid-template-rows: 1fr !important;
        align-items: center !important;
        justify-content: stretch !important;
        gap: 0.5rem !important;
        width: 100% !important;
        height: 76px !important;
        min-height: 76px !important;
        padding: 0 0.72rem !important;
        border: 0 !important;
        border-bottom: 1px solid #f0dfca !important;
        border-radius: 0 !important;
        background: #fffdf9 !important;
        box-shadow: none !important;
        text-align: left !important;
        scroll-snap-align: none !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn:last-child {
        border-bottom: 0 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn:hover,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn:focus {
        background: #fff8ef !important;
        box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.22) !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn.bmb-selected,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn.bmb-selected:hover,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn.bmb-selected:focus {
        border-bottom-color: #ffd0a1 !important;
        background: #fff4e8 !important;
        box-shadow: inset 3px 0 0 #ff6a00, inset 0 0 0 1px #ff8a00 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap {
        grid-column: 1;
        width: 44px !important;
        height: 44px !important;
        border-radius: 14px !important;
        font-size: 1.9rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon {
        font-size: 1.9rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-details {
        grid-column: 2;
        align-items: flex-start !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-name {
        color: #1f160d !important;
        font-size: 0.86rem !important;
        font-weight: 950 !important;
        line-height: 1.1 !important;
        text-align: left !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        -webkit-line-clamp: 2 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-meta {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-breakdown {
        display: contents !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-breakdown span {
        min-width: 0;
        color: #44382e;
        font-size: 0.72rem;
        font-weight: 850;
        line-height: 1.15;
        text-align: center;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-breakdown .bmb-ing-breakdown-serving {
        color: #7d6b5a;
        font-size: 0.66rem;
        font-weight: 850;
        white-space: normal;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-selected-marker {
        position: static !important;
        grid-column: 9;
        justify-self: center;
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-goal-hint {
        display: inline-flex;
        max-width: 100%;
        margin-top: 0.18rem;
        padding: 0.16rem 0.4rem;
        font-size: 0.6rem;
        line-height: 1.05;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-approved-dashboard .bmb-ingredient-list-head,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-approved-dashboard.bmb-layout-compact .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn {
        grid-template-columns: 46px minmax(118px, 1.1fr) 52px 40px 48px 44px 40px 54px 26px !important;
        gap: 0.42rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.7rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon {
        font-size: 1.7rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-name {
        font-size: 0.78rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-breakdown span {
        font-size: 0.66rem !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-breakdown .bmb-ing-breakdown-serving,
    .bmb-approved-dashboard .bmb-ingredient-list-head {
        font-size: 0.58rem !important;
    }
}

/* Phase 57: remove lower-value desktop copy blocks and empty slots that were
   taking vertical space after the ingredient list became the main breakdown UI. */
@media (min-width: 1080px) {
    .bmb-approved-dashboard .bmb-experience-header {
        min-height: 0 !important;
        padding: clamp(0.95rem, 1.35vw, 1.25rem) !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
    }

    .bmb-approved-dashboard .bmb-experience-pill-list,
    .bmb-approved-dashboard .bmb-category-header,
    .bmb-approved-dashboard .bmb-category-heading,
    .bmb-approved-dashboard .bmb-category-desc,
    .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel > .bmb-mobile-save-feedback {
        display: none !important;
    }

    .bmb-approved-dashboard .bmb-calculator-step .bmb-category-tabs-panel {
        margin-bottom: 0.72rem !important;
    }

    .bmb-approved-dashboard .bmb-category-panel {
        padding-top: 0 !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-meta,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-cal {
        display: none !important;
    }
}

/* Phase 58/59: keep the desktop right-rail selected chips compact while still
   allowing every selected ingredient to be reviewed with horizontal scrolling.
   The chip viewport reserves room for the horizontal scrollbar so it does not
   sit on top of the third row, and chip names cannot push the remove affordance
   out of view. */
@media (min-width: 1080px) {
    .bmb-approved-dashboard .bmb-desktop-side-selected-panel {
        overflow: hidden;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: max-content !important;
        grid-template-rows: repeat(3, 36px) !important;
        align-items: start !important;
        align-content: start !important;
        justify-content: start !important;
        column-gap: 0.5rem !important;
        row-gap: 0.42rem !important;
        max-width: 100% !important;
        max-height: calc((36px * 3) + (0.42rem * 2) + 1.35rem) !important;
        margin: 0 !important;
        padding: 0 0 1.05rem !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-inline: contain;
        scroll-padding-inline: 0.1rem;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips::-webkit-scrollbar {
        height: 8px;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips::-webkit-scrollbar-track {
        margin-inline: 0.25rem;
        border-radius: 999px;
        background: rgba(229, 200, 163, 0.38);
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(200, 154, 96, 0.72);
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip {
        display: grid !important;
        grid-template-columns: 26px minmax(0, 1fr) 12px;
        align-items: center;
        justify-content: stretch;
        gap: 0.34rem;
        flex: none !important;
        width: 158px !important;
        max-width: 158px !important;
        min-height: 34px;
        height: 34px;
        padding: 0.26rem 0.48rem 0.26rem 0.34rem;
        scroll-snap-align: start;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-name,
    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip span:nth-child(2):not(.bmb-chip-icon) {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-remove,
    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip span:last-child:not(.bmb-chip-icon) {
        justify-self: end;
        width: 12px;
        min-width: 12px;
        max-width: 12px;
        overflow: visible;
        text-align: center;
        line-height: 1;
        white-space: nowrap;
    }

    .bmb-approved-dashboard .bmb-desktop-side-chips .bmb-mobile-bowl-preview-empty {
        grid-row: 1 / span 3;
        min-width: 100%;
        margin: 0;
    }
}

/* Phase 60: transparent portion multipliers reuse the existing icon slot. The
   emoji stays visible while unselected; selected ingredients replace that slot
   with a compact orange Normal / Extra-Double / Light control so desktop rows and mobile cards do
   not gain extra controls or shift their layout. */
.bmb-calculator .bmb-ing-icon-wrap {
    position: relative;
}

.bmb-calculator .bmb-ing-icon-wrap.bmb-portion-control-active {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border: 1px solid #ff6a00 !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #ff8a00 0%, #ff5c00 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(255, 106, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    cursor: pointer;
}

.bmb-calculator .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 950 !important;
    letter-spacing: -0.04em;
    line-height: 1 !important;
    text-transform: none;
}

.bmb-calculator .bmb-ingredient-btn .bmb-ing-selected-marker {
    display: none !important;
}

.bmb-calculator .bmb-ingredient-btn[data-bmb-portion-active="true"] .bmb-ing-icon-wrap.bmb-portion-control-active:hover,
.bmb-calculator .bmb-ingredient-btn[data-bmb-portion-active="true"] .bmb-ing-icon-wrap.bmb-portion-control-active:focus {
    background: linear-gradient(180deg, #ff9b1c 0%, #ff6500 100%) !important;
}

@media (min-width: 1080px) {
    .bmb-approved-dashboard .bmb-ingredient-list-head,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-approved-dashboard.bmb-layout-compact .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn {
        grid-template-columns: 52px minmax(138px, 1.18fr) 64px 48px 56px 52px 48px 64px !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-head span:last-child {
        display: none !important;
        grid-column: auto !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.82rem !important;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-approved-dashboard .bmb-ingredient-list-head,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-btn,
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-approved-dashboard.bmb-layout-compact .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn {
        grid-template-columns: 46px minmax(118px, 1.1fr) 52px 40px 48px 44px 40px 54px !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.76rem !important;
    }
}

@media (max-width: 520px) {
    .bmb-calculator-step .bmb-ing-icon-wrap.bmb-portion-control-active {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
    }

    .bmb-calculator-step .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.82rem !important;
    }
}


/* Phase 62: portion-control stability guard. Hide only the legacy selected
   marker element. The functional orange icon-slot portion control remains the
   selected-state control and continues cycling Normal → Extra/Double → Light → Normal. */
.bmb-calculator .bmb-ing-selected-marker,
.bmb-calculator .bmb-ing-selected-marker::before,
.bmb-calculator .bmb-ing-selected-marker::after,
.bmb-calculator .bmb-ingredient-btn .bmb-ing-selected-marker,
.bmb-calculator .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker,
.bmb-calculator .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::before,
.bmb-calculator .bmb-ingredient-btn.bmb-selected .bmb-ing-selected-marker::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Phase 63: bowl identity and local autosave history UI.
   This layer adds compact restore/name/history surfaces without touching the
   functional portion control or nutrition calculation rules. */
.bmb-restore-card,
.bmb-bowl-name-editor,
.bmb-saved-bowls-panel {
    border: 1px solid rgba(229, 200, 163, 0.85);
    border-radius: 18px;
    background: #fffaf3;
    box-shadow: 0 8px 22px rgba(60, 36, 16, 0.08);
}

.bmb-restore-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0.85rem 0 0;
    padding: 0.85rem 1rem;
}

.bmb-restore-card[hidden],
.bmb-bowl-name-editor[hidden] {
    display: none !important;
}

.bmb-restore-copy {
    min-width: 0;
}

.bmb-restore-copy strong,
.bmb-saved-bowl-copy strong {
    display: block;
    color: #2b1d11;
    font-weight: 900;
    line-height: 1.15;
}

.bmb-restore-copy p,
.bmb-saved-bowl-copy span {
    margin: 0.22rem 0 0;
    color: #7d6b5a;
    font-size: 0.78rem;
    line-height: 1.25;
}

.bmb-restore-actions,
.bmb-bowl-name-editor-actions,
.bmb-saved-bowl-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.bmb-restore-actions button,
.bmb-bowl-name-editor-actions button,
.bmb-saved-bowl-actions button,
.bmb-drawer-edit-name {
    min-height: 32px;
    padding: 0.42rem 0.68rem;
    border: 1px solid #f0d7b9;
    border-radius: 999px;
    background: #fff;
    color: #3a2818;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
}

.bmb-restore-load,
.bmb-bowl-name-editor-actions [data-bmb-name-save],
.bmb-saved-bowl-actions button:first-child {
    border-color: #ff8a00;
    background: #ff8a00;
    color: #fff;
}

.bmb-bowl-name-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    margin: 0.65rem 0 0;
    padding: 0.65rem;
}

.bmb-bowl-name-editor label,
.bmb-bowl-name-editor input {
    width: 100%;
    min-width: 0;
}

.bmb-bowl-name-editor input {
    min-height: 38px;
    border: 1px solid #ecd7bd;
    border-radius: 12px;
    padding: 0.5rem 0.65rem;
    background: #fff;
    color: #1f160d;
    font-size: 0.9rem;
    font-weight: 850;
}

.bmb-drawer-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.bmb-drawer-title-row h3 {
    margin: 0;
}

.bmb-drawer-edit-name {
    min-height: 28px;
    padding: 0.36rem 0.58rem;
    font-size: 0.68rem;
}

.bmb-bowl-name-editor-drawer {
    margin: 0 0 0.75rem;
}

.bmb-saved-bowls-panel {
    margin: 0 0 0.85rem;
    padding: 0.75rem;
}

.bmb-saved-bowls-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.6rem;
}

.bmb-saved-bowls-empty {
    color: #7d6b5a;
    font-size: 0.8rem;
    line-height: 1.35;
}

.bmb-saved-bowl-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.62rem;
    border: 1px solid rgba(236, 215, 189, 0.9);
    border-radius: 14px;
    background: #fff;
}

.bmb-saved-bowl-copy {
    min-width: 0;
}

.bmb-saved-bowl-copy strong,
.bmb-saved-bowl-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmb-saved-bowl-actions button[data-confirm="true"] {
    border-color: #b9381d;
    background: #b9381d;
    color: #fff;
}

@media (max-width: 1079.98px) {
    .bmb-restore-card,
    .bmb-bowl-name-editor,
    .bmb-saved-bowl-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .bmb-restore-card {
        display: grid;
    }

    .bmb-restore-actions,
    .bmb-bowl-name-editor-actions,
    .bmb-saved-bowl-actions {
        width: 100%;
    }

    .bmb-restore-actions button,
    .bmb-bowl-name-editor-actions button,
    .bmb-saved-bowl-actions button {
        flex: 1 1 auto;
    }
}


/* Phase 64: local history UX polish.
   Keep the autosave/history behavior from Phase 63 intact while making the
   browser-local nature of saved bowls easier to understand and improving the
   compact drawer list readability on desktop and mobile. */
.bmb-restore-card {
    background: linear-gradient(180deg, #fffaf3 0%, #fff4e8 100%);
}

.bmb-restore-copy strong::before {
    content: '↩ ';
    color: #ff8a00;
}

.bmb-saved-bowls-panel .bmb-drawer-section-head span {
    color: #8a6d52;
}

.bmb-saved-bowls-note {
    margin: 0.65rem 0 0;
    color: #8a6d52;
    font-size: 0.72rem;
    line-height: 1.3;
}

.bmb-saved-bowls-empty {
    padding: 0.65rem;
    border: 1px dashed rgba(229, 200, 163, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.64);
}

.bmb-saved-bowl-item {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.bmb-saved-bowl-item:hover {
    border-color: rgba(255, 138, 0, 0.42);
    box-shadow: 0 8px 18px rgba(60, 36, 16, 0.08);
    transform: translateY(-1px);
}

.bmb-saved-bowl-copy span {
    color: #6f5d4c;
}

.bmb-saved-bowl-actions button[data-confirm="true"] {
    min-width: 106px;
}

@media (max-width: 1079.98px) {
    .bmb-saved-bowls-panel {
        padding: 0.72rem;
    }

    .bmb-saved-bowl-item:hover {
        transform: none;
    }
}


/* Phase 65: portion guidance and source trust polish.
   This is an explanation/accessibility pass only: no portion math, autosave,
   saved-bowl state, or share-card behavior is changed. */
.bmb-portion-guidance {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0.42rem 0 0;
    padding: 0.42rem 0.62rem;
    border: 1px solid rgba(255, 138, 0, 0.24);
    border-radius: 999px;
    background: rgba(255, 247, 236, 0.92);
    color: #725033;
    font-size: 0.76rem;
    font-weight: 720;
    line-height: 1.25;
}

.bmb-portion-guidance strong {
    color: #3b2819;
    font-weight: 900;
}

.bmb-source-transparency-note {
    align-items: flex-start;
}

.bmb-calculation-trust-panel {
    margin: 0 0 0.82rem;
    padding: 0.74rem 0.82rem;
    border: 1px solid rgba(236, 215, 189, 0.92);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.92);
}

.bmb-calculation-trust-panel summary {
    cursor: pointer;
    color: #2d1e12;
    font-size: 0.88rem;
    font-weight: 950;
    line-height: 1.2;
}

.bmb-calculation-trust-copy {
    margin-top: 0.62rem;
    color: #6f5d4c;
    font-size: 0.78rem;
    line-height: 1.38;
}

.bmb-calculation-trust-copy p {
    margin: 0 0 0.52rem;
}

.bmb-calculation-trust-copy p:last-child {
    margin-bottom: 0;
}

.bmb-calculation-trust-copy ul {
    display: grid;
    gap: 0.32rem;
    margin: 0 0 0.6rem 1.05rem;
    padding: 0;
}

.bmb-calculation-trust-copy li {
    margin: 0;
}

.bmb-desktop-source-note {
    line-height: 1.35;
}

@media (max-width: 1079.98px) {
    .bmb-portion-guidance {
        display: flex;
        width: auto;
        border-radius: 14px;
        font-size: 0.72rem;
    }

    .bmb-calculation-trust-panel {
        padding: 0.68rem 0.72rem;
    }
}

/* Phase 67: dedicated bowl comparison shortcode */
.bmb-bowl-compare {
    width: min(100%, 720px);
    margin: 1rem auto;
}

.bmb-bowl-compare-card {
    padding: 1.1rem;
    border: 1px solid rgba(227, 204, 176, 0.92);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(251, 246, 239, 0.96));
    box-shadow: 0 18px 40px rgba(48, 30, 10, 0.08);
}

.bmb-bowl-compare-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.bmb-bowl-compare-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid rgba(255, 138, 0, 0.34);
    border-radius: 999px;
    background: #fff;
    font-size: 1.4rem;
}

.bmb-bowl-compare-head h3 {
    margin: 0;
    color: #ed7400;
    font-size: 1.85rem;
    line-height: 1.05;
}

.bmb-bowl-compare-head p,
.bmb-bowl-compare-empty,
.bmb-bowl-compare-source-note,
.bmb-compare-section-head p,
.bmb-compare-summary span,
.bmb-compare-table td,
.bmb-compare-table th,
.bmb-compare-diff-group li {
    color: #5e4938;
}

.bmb-bowl-compare-head p {
    margin: 0.22rem 0 0;
    font-size: 0.94rem;
    line-height: 1.4;
}

.bmb-bowl-compare-controls {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.bmb-compare-slot {
    display: grid;
    gap: 0.42rem;
}

.bmb-compare-label {
    color: #2d1e12;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bmb-compare-select {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.76rem 0.92rem;
    border: 1px solid rgba(224, 199, 170, 0.94);
    border-radius: 16px;
    background: #fff;
    color: #2d1e12;
    font-size: 1rem;
    font-weight: 760;
}

.bmb-compare-select:disabled {
    opacity: 0.78;
    cursor: not-allowed;
}

.bmb-compare-summary {
    display: grid;
    gap: 0.22rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(234, 218, 197, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.bmb-compare-summary strong {
    color: #20130a;
    font-size: 1.05rem;
    line-height: 1.2;
}

.bmb-compare-summary span {
    font-size: 0.9rem;
    line-height: 1.35;
}

.bmb-compare-summary .bmb-goal-chip {
    justify-self: start;
    margin-top: 0.18rem;
}

.bmb-compare-goal-balanced { background: #fff5dd; color: #8a5c0a; }
.bmb-compare-goal-high-protein { background: #dff1dd; color: #256534; }
.bmb-compare-goal-low-carb { background: #e0ebf8; color: #2f567e; }
.bmb-compare-goal-low-calorie { background: #fbe6dc; color: #95511f; }
.bmb-compare-goal-low-sodium { background: #ebe8ff; color: #5144a5; }
.bmb-compare-goal-vegetarian { background: #e0f4d8; color: #2b6d2d; }

.bmb-bowl-compare-empty {
    padding: 1rem 1.05rem;
    border: 1px dashed rgba(214, 188, 160, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.64);
    font-size: 0.94rem;
    line-height: 1.45;
}

.bmb-compare-section-head {
    margin-bottom: 0.72rem;
}

.bmb-compare-section-head h4 {
    margin: 0;
    color: #1f140c;
    font-size: 1.28rem;
    line-height: 1.2;
}

.bmb-compare-section-head p {
    margin: 0.22rem 0 0;
    font-size: 0.9rem;
}

.bmb-compare-table-wrap {
    margin-bottom: 1rem;
}

.bmb-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(231, 214, 191, 0.94);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.bmb-compare-table thead th {
    padding: 0.78rem 0.72rem;
    background: rgba(248, 240, 228, 0.95);
    color: #3a2a1a;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: center;
}

.bmb-compare-table thead th:first-child,
.bmb-compare-table tbody th {
    text-align: left;
}

.bmb-compare-table tbody th,
.bmb-compare-table tbody td {
    padding: 0.74rem 0.72rem;
    border-top: 1px solid rgba(238, 225, 206, 0.92);
    font-size: 0.95rem;
    line-height: 1.25;
}

.bmb-compare-table tbody th {
    color: #24170d;
    font-weight: 860;
}

.bmb-compare-table tbody td {
    text-align: center;
    color: #2e2014;
    font-weight: 720;
}

.bmb-compare-diff-negative { color: #2f8b45 !important; }
.bmb-compare-diff-positive { color: #d55f08 !important; }
.bmb-compare-diff-neutral { color: #6d5a48 !important; }

.bmb-compare-diff-groups {
    display: grid;
    gap: 0.82rem;
    margin-bottom: 0.9rem;
}

.bmb-compare-diff-group {
    padding: 0.86rem 0.92rem;
    border: 1px solid rgba(231, 214, 191, 0.94);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.bmb-compare-diff-title {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.58rem;
    align-items: center;
    margin-bottom: 0.56rem;
}

.bmb-compare-diff-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 900;
}

.bmb-diff-added .bmb-compare-diff-title span { background: #e5f6e3; color: #2f8b45; }
.bmb-diff-removed .bmb-compare-diff-title span { background: #fee9e6; color: #c93f2c; }
.bmb-diff-changed .bmb-compare-diff-title span { background: #fff0df; color: #e07c00; }
.bmb-diff-added strong { color: #2f8b45; }
.bmb-diff-removed strong { color: #c93f2c; }
.bmb-diff-changed strong { color: #e07c00; }

.bmb-compare-diff-group ul {
    display: grid;
    gap: 0.34rem;
    margin: 0;
    padding: 0 0 0 1.15rem;
}

.bmb-compare-diff-group li {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.4;
}

.bmb-compare-empty-item {
    list-style: none;
    margin-left: -1.15rem;
    color: #7d6b5a;
    font-style: italic;
}

.bmb-bowl-compare-source-note {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (min-width: 680px) {
    .bmb-bowl-compare-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 699.98px) {
    .bmb-bowl-compare {
        width: 100%;
        margin: 0.85rem auto;
    }

    .bmb-bowl-compare-card {
        padding: 0.92rem;
        border-radius: 20px;
    }

    .bmb-bowl-compare-head h3 {
        font-size: 1.52rem;
    }

    .bmb-bowl-compare-head p,
    .bmb-compare-summary span,
    .bmb-bowl-compare-source-note,
    .bmb-compare-diff-group li {
        font-size: 0.85rem;
    }

    .bmb-compare-table thead th,
    .bmb-compare-table tbody th,
    .bmb-compare-table tbody td {
        padding: 0.64rem 0.46rem;
        font-size: 0.84rem;
    }

    .bmb-compare-table thead th:nth-child(2),
    .bmb-compare-table thead th:nth-child(3),
    .bmb-compare-table thead th:nth-child(4) {
        font-size: 0.8rem;
    }
}

/* Phase 68: unified source history, update history, and calculation trust panel. */
.bmb-source-history-panel,
.bmb-source-transparency-note.bmb-source-history-panel,
.bmb-disclaimer-source-history {
    display: grid;
    gap: 0.58rem;
    align-items: stretch;
    border: 1px solid rgba(238, 214, 185, 0.95);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8ef 100%);
    color: #6f5d4c;
    box-shadow: 0 8px 22px rgba(74, 45, 18, 0.055);
}

.bmb-source-transparency-note.bmb-source-history-panel {
    margin: -0.35rem 0 1rem;
    padding: 0.78rem 0.92rem;
}

.bmb-disclaimer-source-history {
    max-width: 860px;
    margin: 1rem auto;
    padding: 0.92rem 1rem;
}

.bmb-bowl-compare-source-note {
    line-height: 1.45;
}

@media (max-width: 760px) {
    .bmb-source-transparency-note.bmb-source-history-panel,
    .bmb-disclaimer-source-history {
        padding: 0.7rem 0.78rem;
        border-radius: 14px;
    }
}

/* Phase 69: left-aligned source/disclaimer readability and shortcode reference packaging. */
.bmb-source-history-panel,
.bmb-source-history-panel *,
.bmb-disclaimer-source-history,
.bmb-disclaimer-source-history * {
    text-align: left;
}

/* Phase 70: live substitution differences inside the Bowl drawer. */
.bmb-swap-panel {
    display: grid;
    gap: 0.68rem;
    margin: 0 0 0.85rem;
    padding: 0.75rem;
    border: 1px solid rgba(229, 200, 163, 0.85);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffaf3 0%, #fff5eb 100%);
    box-shadow: 0 8px 22px rgba(60, 36, 16, 0.08);
}

.bmb-swap-helper,
.bmb-swap-portion-note,
.bmb-swap-status,
.bmb-swap-empty {
    margin: 0;
    color: #7a6550;
    font-size: 0.78rem;
    line-height: 1.38;
}

.bmb-swap-empty,
.bmb-swap-status {
    padding: 0.65rem;
    border: 1px dashed rgba(229, 200, 163, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
}

.bmb-swap-summary {
    display: grid;
    gap: 0.42rem;
    padding: 0.68rem;
    border: 1px solid rgba(255, 186, 99, 0.62);
    border-radius: 14px;
    background: rgba(255, 250, 243, 0.9);
}

.bmb-swap-summary[hidden] {
    display: none !important;
}

.bmb-swap-summary strong {
    color: #2d1d10;
    font-size: 0.9rem;
    line-height: 1.22;
}

.bmb-swap-summary-meta {
    color: #765d45;
    font-size: 0.75rem;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.bmb-swap-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bmb-swap-summary-list li {
    padding: 0.25rem 0.42rem;
    border: 1px solid rgba(229, 200, 163, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #5f4b38;
    font-size: 0.72rem;
    font-weight: 860;
}

.bmb-swap-summary-list li[data-bmb-swap-impact-highlight="helpful"] {
    border-color: rgba(47, 139, 69, 0.26);
    background: rgba(237, 249, 240, 0.88);
    color: #2f7d43;
}

.bmb-swap-summary-list li[data-bmb-swap-impact-highlight="tradeoff"] {
    border-color: rgba(213, 95, 8, 0.25);
    background: rgba(255, 246, 235, 0.9);
    color: #a94c06;
}

.bmb-swap-ui {
    display: grid;
    gap: 0.66rem;
}

.bmb-swap-ui[hidden],
.bmb-swap-empty[hidden],
.bmb-swap-status[hidden],
.bmb-swap-table-wrap[hidden] {
    display: none !important;
}

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

.bmb-swap-controls label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.bmb-swap-controls label > span {
    color: #2f2116;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bmb-swap-controls select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #ecd7bd;
    border-radius: 12px;
    padding: 0.48rem 0.56rem;
    background: #fff;
    color: #21150c;
    font-size: 0.82rem;
    font-weight: 760;
}

.bmb-swap-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(231, 214, 191, 0.94);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.bmb-swap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.bmb-swap-table thead th {
    padding: 0.62rem 0.48rem;
    background: rgba(248, 240, 228, 0.95);
    color: #342517;
    font-size: 0.76rem;
    font-weight: 900;
    text-align: center;
}

.bmb-swap-table thead th:first-child,
.bmb-swap-table tbody th {
    text-align: left;
}

.bmb-swap-table tbody th,
.bmb-swap-table tbody td {
    padding: 0.58rem 0.48rem;
    border-top: 1px solid rgba(238, 225, 206, 0.92);
    color: #2e2014;
    font-size: 0.78rem;
    line-height: 1.25;
}

.bmb-swap-table tbody th {
    font-weight: 860;
}

.bmb-swap-table tbody td {
    text-align: center;
    font-weight: 760;
}

.bmb-swap-diff-negative,
.bmb-swap-diff-helpful { color: #2f8b45 !important; }
.bmb-swap-diff-positive,
.bmb-swap-diff-tradeoff { color: #d55f08 !important; }
.bmb-swap-diff-neutral { color: #6d5a48 !important; }

.bmb-swap-apply {
    min-height: 40px;
    justify-self: start;
    padding: 0.6rem 0.95rem;
    border: 1px solid #ff8a00;
    border-radius: 999px;
    background: #ff8a00;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 7px 14px rgba(255, 138, 0, 0.18);
}

.bmb-swap-apply:disabled {
    border-color: #ead6bd;
    background: #f6eadb;
    color: #a18a73;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 520px) {
    .bmb-swap-controls {
        grid-template-columns: 1fr;
    }

    .bmb-swap-table thead th,
    .bmb-swap-table tbody th,
    .bmb-swap-table tbody td {
        padding: 0.54rem 0.36rem;
        font-size: 0.72rem;
    }

    .bmb-swap-apply {
        width: 100%;
    }
}

/* Phase 71: QA polish for article widgets, source panel, and live swaps. */

.bmb-bowl-compare {
    box-sizing: border-box;
}

.bmb-compare-section-head p,
.bmb-swap-portion-note {
    color: #6d5845;
    font-weight: 720;
}

.bmb-compare-table th,
.bmb-compare-table td,
.bmb-swap-table th,
.bmb-swap-table td {
    vertical-align: middle;
}

.bmb-compare-table td:last-child,
.bmb-swap-table td:last-child {
    font-weight: 900;
    white-space: nowrap;
}

.bmb-swap-controls select:disabled {
    background: #fbf4ec;
    color: #8d7966;
    cursor: not-allowed;
}

.bmb-swap-status:not([hidden]) {
    border-style: solid;
    background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 430px) {
    .bmb-compare-table thead th,
    .bmb-compare-table tbody th,
    .bmb-compare-table tbody td {
        padding-right: 0.34rem;
        padding-left: 0.34rem;
        font-size: 0.78rem;
    }

    .bmb-compare-table td:last-child,
    .bmb-swap-table td:last-child {
        letter-spacing: -0.01em;
    }
}

/* Phase 72: print-friendly output without visible print buttons. */
.bmb-print-bowl-summary {
    display: none;
}

@media print {
    .bmb-calculator,
    .bmb-bowl-compare,
    .bmb-disclaimer {
        color: #111 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .bmb-calculator > :not(.bmb-print-bowl-summary),
    .bmb-calculator .bmb-toast-region,
    .bmb-calculator button,
    .bmb-bowl-compare select,
    .bmb-bowl-compare button {
        display: none !important;
    }

    .bmb-print-bowl-summary {
        display: block !important;
        width: 100%;
        margin: 0 0 1rem;
        padding: 0;
        break-inside: avoid;
        page-break-inside: avoid;
        background: #fff !important;
        color: #111 !important;
        font-size: 11pt;
        line-height: 1.35;
    }

    .bmb-print-summary-head {
        margin-bottom: 0.8rem;
        padding-bottom: 0.55rem;
        border-bottom: 1px solid #777;
    }

    .bmb-print-kicker {
        margin: 0 0 0.18rem;
        color: #444 !important;
        font-size: 9pt;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .bmb-print-summary-head h2 {
        margin: 0 0 0.25rem;
        color: #111 !important;
        font-size: 20pt;
        line-height: 1.1;
    }

    .bmb-print-summary-head p,
    .bmb-print-source-note {
        margin: 0;
        color: #333 !important;
        font-size: 9.5pt;
    }

    .bmb-print-nutrition-table,
    .bmb-bowl-compare .bmb-compare-table {
        width: 100%;
        margin: 0 0 0.85rem;
        border-collapse: collapse !important;
        border: 1px solid #777 !important;
        background: #fff !important;
        color: #111 !important;
    }

    .bmb-print-nutrition-table th,
    .bmb-print-nutrition-table td,
    .bmb-bowl-compare .bmb-compare-table th,
    .bmb-bowl-compare .bmb-compare-table td {
        padding: 0.32rem 0.38rem !important;
        border: 1px solid #999 !important;
        background: #fff !important;
        color: #111 !important;
        font-size: 9.5pt !important;
        text-align: left !important;
    }

    .bmb-print-nutrition-table td,
    .bmb-bowl-compare .bmb-compare-table td {
        font-weight: 700;
    }

    .bmb-print-ingredients h3 {
        margin: 0.65rem 0 0.34rem;
        color: #111 !important;
        font-size: 13pt;
    }

    .bmb-print-ingredients ul,
    .bmb-bowl-compare .bmb-compare-diff-group ul,
    .bmb-source-history-copy ul {
        margin: 0 0 0.75rem 1.1rem !important;
        padding: 0 !important;
    }

    .bmb-print-ingredients li,
    .bmb-bowl-compare .bmb-compare-diff-group li,
    .bmb-source-history-copy li {
        margin: 0 0 0.2rem !important;
        color: #111 !important;
        font-size: 9.5pt !important;
        line-height: 1.35 !important;
    }

    .bmb-bowl-compare,
    .bmb-bowl-compare-card,
    .bmb-disclaimer-source-history,
    .bmb-source-history-panel {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 1rem !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .bmb-bowl-compare-head,
    .bmb-bowl-compare-controls,
    .bmb-compare-section-head,
    .bmb-compare-diff-group,
    .bmb-source-history-summary,
    .bmb-source-history-copy section,
    .bmb-source-history-footnote {
        margin: 0 0 0.65rem !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .bmb-bowl-compare-icon,
    .bmb-compare-diff-title span,
    .bmb-goal-chip,
    .bmb-mobile-summary,
    .bmb-mobile-bowl-drawer,
    .bmb-source-history-details summary {
        display: none !important;
    }

    .bmb-source-history-details,
    .bmb-source-history-details[open],
    .bmb-source-history-copy {
        display: block !important;
    }

    .bmb-bowl-compare-head h3,
    .bmb-source-history-copy h4 {
        margin: 0 0 0.28rem !important;
        color: #111 !important;
        font-size: 14pt !important;
    }

    .bmb-bowl-compare-head p,
    .bmb-compare-section-head p,
    .bmb-bowl-compare-source-note,
    .bmb-source-history-summary,
    .bmb-source-history-copy p,
    .bmb-source-history-footnote {
        color: #111 !important;
        font-size: 9.5pt !important;
        line-height: 1.35 !important;
        text-align: left !important;
    }
}

@media print {
    .bmb-source-history-details:not([open]) > .bmb-source-history-copy {
        display: block !important;
    }
}

/* Phase 73: saved/shared/printed outputs must show every ingredient, not '+ more'. */
@media print {
    .bmb-print-ingredients ul {
        margin-left: 0 !important;
        list-style: none !important;
    }

    .bmb-print-ingredients .bmb-print-ingredient-line {
        padding: 0.38rem 0.46rem !important;
        border: 1px solid #999 !important;
        background: #fff !important;
        font-weight: 700 !important;
    }
}


/* Phase 79: standalone ingredient swap article shortcode */
.bmb-ingredient-swap {
    width: min(100%, 680px);
    margin: 1rem auto;
}

.bmb-ingredient-swap-card {
    padding: 1.05rem;
    border: 1px solid rgba(227, 204, 176, 0.92);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(251, 246, 239, 0.96));
    box-shadow: 0 16px 34px rgba(48, 30, 10, 0.08);
}

.bmb-ingredient-swap-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.78rem;
    align-items: center;
    margin-bottom: 0.95rem;
}

.bmb-ingredient-swap-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    background: #fff4e6;
    color: #c25e00;
    font-size: 1.35rem;
    font-weight: 950;
}

.bmb-ingredient-swap-head h3 {
    margin: 0;
    color: #ed7400;
    font-size: 1.45rem;
    line-height: 1.1;
}

.bmb-ingredient-swap-head p,
.bmb-ingredient-swap-note,
.bmb-ingredient-swap-empty {
    margin: 0.2rem 0 0;
    color: #5e4938;
    font-size: 0.9rem;
    line-height: 1.42;
}

.bmb-ingredient-swap-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.72rem;
    align-items: stretch;
    margin-bottom: 0.95rem;
}

.bmb-swap-food-card {
    display: grid;
    gap: 0.24rem;
    padding: 0.82rem;
    border: 1px solid rgba(232, 213, 189, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.bmb-swap-food-card > span {
    font-size: 1.45rem;
}

.bmb-swap-food-card strong {
    color: #22150c;
    font-size: 0.98rem;
    line-height: 1.24;
}

.bmb-swap-food-card em {
    color: #7c624c;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.bmb-swap-food-card-target {
    border-color: rgba(255, 174, 84, 0.7);
    background: rgba(255, 248, 239, 0.9);
}

.bmb-swap-arrow {
    align-self: center;
    color: #d06a00;
    font-size: 1.35rem;
    font-weight: 950;
}

.bmb-ingredient-swap-table {
    width: 100%;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(231, 214, 191, 0.94);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.bmb-ingredient-swap-table th,
.bmb-ingredient-swap-table td {
    padding: 0.68rem 0.58rem;
    border-top: 1px solid rgba(238, 225, 206, 0.92);
    color: #2e2014;
    font-size: 0.88rem;
    line-height: 1.24;
    text-align: center;
}

.bmb-ingredient-swap-table thead th {
    border-top: 0;
    background: rgba(248, 240, 228, 0.95);
    color: #3a2a1a;
    font-weight: 950;
}

.bmb-ingredient-swap-table th:first-child {
    text-align: left;
}

.bmb-swap-diff-negative,
.bmb-swap-diff-helpful { color: #2f8b45 !important; font-weight: 900; }
.bmb-swap-diff-positive,
.bmb-swap-diff-tradeoff { color: #d55f08 !important; font-weight: 900; }
.bmb-swap-diff-neutral { color: #6d5a48 !important; font-weight: 900; }

.bmb-ingredient-swap-note {
    margin-top: 0.72rem;
    font-size: 0.78rem;
}

.bmb-ingredient-swap-empty code {
    white-space: normal;
}

@media (max-width: 520px) {
    .bmb-ingredient-swap-card {
        padding: 0.9rem;
        border-radius: 20px;
    }

    .bmb-ingredient-swap-route {
        grid-template-columns: 1fr;
    }

    .bmb-swap-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .bmb-ingredient-swap-table th,
    .bmb-ingredient-swap-table td {
        padding: 0.58rem 0.42rem;
        font-size: 0.8rem;
    }
}

/* Phase 82: article nutrition widgets. These static article blocks reuse the
   calculator visual language while avoiding any dependency on calculator JS. */
.bmb-article-metric,
.bmb-article-ingredient-card,
.bmb-article-category-summary {
    box-sizing: border-box;
    color: #2b1b10;
    font-family: inherit;
}

.bmb-article-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    max-width: 100%;
    margin: 0.15rem 0.2rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(227, 198, 163, 0.95);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(255, 244, 229, 0.96));
    box-shadow: 0 10px 24px rgba(66, 37, 14, 0.08);
    font-size: 0.92rem;
    line-height: 1.2;
    vertical-align: middle;
}

.bmb-article-metric-icon {
    display: inline-flex;
    width: 1.55rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.95);
}

.bmb-article-metric-name {
    color: #725033;
    font-weight: 800;
}

.bmb-article-metric strong {
    color: #b84724;
    font-weight: 950;
}

.bmb-article-metric-label {
    color: #6f5a45;
    font-weight: 750;
}

.bmb-article-metric-empty,
.bmb-article-widget-empty {
    color: #7a5737;
    font-weight: 750;
}

.bmb-article-ingredient-card,
.bmb-article-category-summary {
    margin: 1.15rem 0;
    padding: 1rem;
    border: 1px solid rgba(227, 198, 163, 0.95);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(255, 246, 233, 0.98));
    box-shadow: 0 16px 34px rgba(66, 37, 14, 0.09);
}

.bmb-article-card-head,
.bmb-article-category-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.bmb-article-card-icon,
.bmb-article-category-head > span {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(224, 195, 159, 0.96);
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.96);
    font-size: 1.35rem;
}

.bmb-article-card-head h3,
.bmb-article-category-head h3 {
    margin: 0;
    color: #2a190f;
    font-size: 1.1rem;
    font-weight: 950;
    line-height: 1.18;
}

.bmb-article-card-head p,
.bmb-article-category-head p {
    margin: 0.18rem 0 0;
    color: #73553a;
    font-size: 0.86rem;
    font-weight: 750;
}

.bmb-article-card-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.58rem;
}

.bmb-article-card-metric {
    min-width: 0;
    padding: 0.65rem 0.58rem;
    border: 1px solid rgba(232, 210, 184, 0.96);
    border-radius: 16px;
    background: rgba(255, 250, 244, 0.96);
}

.bmb-article-card-metric span {
    display: block;
    color: #725033;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.bmb-article-card-metric strong {
    display: block;
    margin-top: 0.14rem;
    color: #24170f;
    font-size: 1.18rem;
    font-weight: 950;
    line-height: 1.1;
}

.bmb-article-widget-note {
    margin: 0.8rem 0 0;
    color: #75583c;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
}

.bmb-article-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(232, 210, 184, 0.96);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.bmb-article-category-table {
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
}

.bmb-article-category-table th,
.bmb-article-category-table td {
    padding: 0.66rem 0.58rem;
    border-top: 1px solid rgba(239, 224, 205, 0.92);
    color: #2d1f14;
    font-size: 0.86rem;
    line-height: 1.25;
    text-align: right;
    white-space: nowrap;
}

.bmb-article-category-table thead th {
    border-top: 0;
    background: rgba(249, 240, 228, 0.96);
    color: #5e4027;
    font-weight: 950;
}

.bmb-article-category-table th:first-child,
.bmb-article-category-table td:first-child {
    text-align: left;
}

.bmb-article-category-table tbody th {
    font-weight: 850;
}

@media (max-width: 640px) {
    .bmb-article-card-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-article-card-metric:first-child {
        grid-column: 1 / -1;
    }
}

/* Phase 83: full official ingredient nutrition table. */
.bmb-ingredient-table-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    margin: 0 0 0.7rem;
    color: #3a2618;
}

.bmb-ingredient-table-heading strong {
    font-size: 1rem;
    font-weight: 950;
}

.bmb-ingredient-table-heading span {
    color: #76573c;
    font-size: 0.8rem;
    font-weight: 750;
}

.bmb-ingredient-table-full {
    min-width: 1180px;
}

.bmb-ingredient-table-compact {
    min-width: 760px;
}

.bmb-ingredient-table-full th,
.bmb-ingredient-table-full td {
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Phase 86: official-style meal type step. */

.bmb-desktop-bowl-title-block [data-bmb-meal-type-summary] {
  color: #7a5737;
  font-size: 0.82rem;
  font-weight: 800;
}

/* Phase 87: official-style ingredient group notes. */
.bmb-official-group-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8ec;
  border: 1px solid rgba(92, 45, 18, 0.14);
  color: #6d5037;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.bmb-category-tab-label {
  white-space: normal;
}

@media (max-width: 640px) {
  .bmb-official-group-note {
    font-size: 0.8rem;
  }
}


/* Phase 88: meal-aware preset filtering and match notes. */
.bmb-presets-step .bmb-presets-container {
  align-items: stretch;
}

.bmb-preset-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.bmb-preset-card-meal-match {
  border-color: rgba(84, 113, 42, 0.42);
  box-shadow: 0 16px 30px rgba(84, 113, 42, 0.1);
}

.bmb-preset-card-secondary-match {
  opacity: 0.9;
}

.bmb-preset-meal-badge {
  background: #f7efe3;
  color: #6b492f;
}

.bmb-preset-match-note {
  margin: -0.15rem 0 0.65rem;
  color: #6d5037;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.bmb-preset-card-meal-match .bmb-preset-match-note {
  color: #5f7f2f;
}


/* Phase 89: soft official ordering guidance. */
.bmb-official-ordering-guidance {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(92, 45, 18, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff8ee 100%);
  color: #3a2618;
}

.bmb-official-ordering-guidance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.bmb-official-ordering-guidance-head strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.bmb-official-ordering-guidance-head span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f4eadb;
  color: #7a5737;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bmb-official-ordering-guidance p {
  margin: 0 0 9px;
  color: #6d5037;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
}

.bmb-official-ordering-guidance ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bmb-official-ordering-guidance li {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff4e4;
  color: #5f3d25;
  font-size: 0.8rem;
  font-weight: 850;
}

.bmb-official-ordering-status {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #eef5da;
  color: #54712a;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.bmb-official-ordering-status-warning {
  background: #fff0d6;
  color: #a44a12;
}


/* Phase 92: official portion-language layer.
   The same multiplier states remain in place, but the visible control now uses
   restaurant-native language: Normal, Extra/Double, and Light. */
.bmb-calculator .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
    font-size: 0.62rem !important;
    letter-spacing: -0.045em !important;
    white-space: nowrap !important;
}

@media (min-width: 1080px) {
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.58rem !important;
    }
}

@media (min-width: 1080px) and (max-width: 1120px) {
    .bmb-approved-dashboard .bmb-ingredient-list-shell .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.52rem !important;
    }
}

@media (max-width: 520px) {
    .bmb-calculator-step .bmb-ing-icon-wrap.bmb-portion-control-active .bmb-ing-icon {
        font-size: 0.58rem !important;
    }
}

/* Phase 93: meal-type flow UX polish.
   Keep the new official-ordering layer compact and easier to scan without
   changing ingredient math, saved state, or enforcement rules. */

.bmb-calculator-heading-row {
  align-items: center;
  flex-wrap: wrap;
}

.bmb-calculator-meal-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4e4;
  color: #6b492f;
  border: 1px solid rgba(92, 45, 18, 0.12);
  font-size: 0.75rem;
  font-weight: 900;
}

.bmb-official-ordering-guidance.bmb-official-ordering-guidance-enforced {
  border-color: rgba(84, 113, 42, 0.24);
  background: linear-gradient(180deg, #fffdf9 0%, #f7fbec 100%);
}

.bmb-official-ordering-guidance.bmb-official-ordering-guidance-enforced .bmb-official-ordering-guidance-head span {
  background: #eef5da;
  color: #54712a;
}

/* 1.1.96: Context-filtered ingredients must remain hidden even when card display rules are highly specific. */
.bmb-calculator .bmb-ingredient-btn[hidden],
.bmb-calculator .bmb-ingredient-btn.bmb-ingredient-hidden-by-context,
.bmb-calculator .bmb-category[hidden],
.bmb-calculator .bmb-category.bmb-category-hidden-by-context,
.bmb-calculator .bmb-category-tab[hidden],
.bmb-calculator .bmb-category-tab.bmb-category-tab-hidden-by-context {
    display: none !important;
}

/* Phase 97: included/locked starter ingredients visibility layer. */
.bmb-included-ingredients-card {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(84, 113, 42, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #f7fbec 100%);
  color: #3a2618;
}

.bmb-included-ingredients-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.bmb-included-ingredients-head strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.bmb-included-ingredients-head span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef5da;
  color: #54712a;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.bmb-included-ingredients-card p {
  margin: 0 0 10px;
  color: #6d5037;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.4;
}

.bmb-included-ingredients-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.bmb-included-ingredient-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 15px;
  border: 1px solid rgba(84, 113, 42, 0.18);
  background: #fff;
  box-shadow: 0 8px 18px rgba(92, 45, 18, 0.06);
}

.bmb-included-ingredient-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff4e4;
  font-size: 1.1rem;
}

.bmb-included-ingredient-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bmb-included-ingredient-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2d1a10;
  font-size: 0.9rem;
  font-weight: 950;
}

.bmb-included-ingredient-body small {
  color: #7a5737;
  font-size: 0.76rem;
  font-weight: 800;
}

.bmb-included-ingredient-lock {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef5da;
  color: #54712a;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bmb-chip.bmb-chip-included {
  cursor: help;
  border-color: rgba(84, 113, 42, 0.24);
  background: #f7fbec;
}

.bmb-chip.bmb-chip-included .bmb-chip-remove {
  width: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef5da;
  color: #54712a;
  font-size: 0.65rem;
  font-weight: 950;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .bmb-included-ingredients-card {
    padding: 12px;
    border-radius: 16px;
  }

  .bmb-included-ingredients-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .bmb-included-ingredients-list {
    grid-template-columns: 1fr;
  }
}

/* Phase 109: starter-aware summary chips. The summary rail now separates locked
   included ingredients from user-selected ingredients, so future meal starters
   do not reuse the old flat selected-list layout. */
.bmb-mobile-selected-chips {
  min-width: 0;
  overflow: hidden;
}

.bmb-chip-section {
  display: grid;
  gap: 0.42rem;
  width: 100%;
  min-width: 0;
}

.bmb-chip-section + .bmb-chip-section {
  margin-top: 0.35rem;
}

.bmb-chip-section-heading {
  color: #7c6048;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.bmb-chip-section-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  max-width: 100%;
  min-width: 0;
}

.bmb-chip-section-list .bmb-chip {
  max-width: 100%;
  min-width: 0;
}

.bmb-chip-section-list .bmb-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bmb-approved-dashboard .bmb-desktop-side-chips {
  align-content: flex-start;
  overflow-x: hidden !important;
  overflow-y: auto;
}

.bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-section {
  flex: 0 0 100%;
  width: 100%;
}

.bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-section-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.bmb-approved-dashboard .bmb-desktop-side-chips .bmb-chip-section-list .bmb-chip {
  width: 100% !important;
  max-width: 100% !important;
}


/* Phase 111: quarantine unstable live features while official-starter state is rebuilt. */
.bmb-calculator [data-bmb-quarantined-feature],
.bmb-calculator [data-bmb-smart-suggestions],
.bmb-calculator .bmb-mobile-smart-notes,
.bmb-calculator [data-bmb-swap-panel],
.bmb-calculator [data-bmb-compare-panel],
.bmb-calculator [data-bmb-saved-bowls-panel],
.bmb-calculator [data-bmb-restore-card],
.bmb-calculator [data-bmb-print-summary],
.bmb-calculator .bmb-mobile-save-card {
  display: none !important;
}

@media print {
  .bmb-print-bowl-summary {
    display: none !important;
  }
}

/* Phase 122: completed read-only Changes from Starter panel. */
.bmb-starter-changes-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid rgba(109, 64, 32, 0.16);
    border-radius: 18px;
    background: #fffaf5;
    box-shadow: 0 10px 26px rgba(62, 31, 12, 0.07);
}

.bmb-starter-changes-panel[hidden],
.bmb-starter-changes-content[hidden],
.bmb-starter-changes-empty[hidden] {
    display: none !important;
}

.bmb-starter-changes-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.bmb-starter-changes-head strong {
    color: #32180b;
    font-size: 1rem;
}

.bmb-starter-changes-head span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f4e6d8;
    color: #6d3b16;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.bmb-starter-changes-helper,
.bmb-starter-changes-empty,
.bmb-starter-changes-state {
    margin: 0 0 12px;
    color: #765842;
    font-size: 0.84rem;
    line-height: 1.45;
}

.bmb-starter-changes-state {
    border-radius: 12px;
    border: 1px solid rgba(109, 64, 32, 0.1);
    background: rgba(255,255,255,0.72);
    padding: 8px 10px;
}

.bmb-starter-delta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.bmb-starter-delta-card {
    border-radius: 13px;
    border: 1px solid rgba(109, 64, 32, 0.12);
    background: #fff;
    padding: 8px;
    min-width: 0;
}

.bmb-starter-delta-card small {
    display: block;
    color: #8b705b;
    font-size: 0.68rem;
    line-height: 1.1;
    margin-bottom: 4px;
}

.bmb-starter-delta-card strong {
    display: block;
    color: #32180b;
    font-size: 0.86rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.bmb-starter-delta-card[data-bmb-starter-delta-state="positive"] strong {
    color: #a45115;
}

.bmb-starter-delta-card[data-bmb-starter-delta-state="negative"] strong {
    color: #2f7e42;
}

.bmb-starter-changes-groups {
    display: grid;
    gap: 10px;
}

.bmb-starter-changes-group-removed {
    border-style: dashed;
}

.bmb-starter-changes-group {
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(109, 64, 32, 0.1);
    padding: 10px;
}

.bmb-starter-changes-group > strong {
    display: block;
    color: #4a2310;
    font-size: 0.84rem;
    margin-bottom: 7px;
}

.bmb-starter-changes-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 7px;
}

.bmb-starter-changes-group li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #32180b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.bmb-starter-changes-group li > span:first-child {
    min-width: 0;
}

.bmb-starter-change-title {
    font-weight: 800;
}

.bmb-starter-change-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    border-radius: 999px;
    padding: 2px 6px;
    background: rgba(244, 230, 216, 0.86);
    color: #6d3b16;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    vertical-align: middle;
}

.bmb-starter-changes-group li small {
    color: #856a55;
    text-align: right;
    flex: 0 1 56%;
    overflow-wrap: anywhere;
}

.bmb-starter-changes-group-empty li {
    color: #8b705b;
    font-style: italic;
}

@media (max-width: 520px) {
    .bmb-starter-delta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-starter-changes-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bmb-starter-changes-group li {
        display: block;
    }

    .bmb-starter-changes-group li small {
        display: block;
        text-align: left;
        margin-top: 2px;
    }

    .bmb-starter-change-badge {
        margin-left: 4px;
    }
}

/* Phase 123: starter-aware Ingredient Breakdown groups and source badges. */
.bmb-contribution-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.42rem 0.62rem;
    border: 1px solid #ecd6b7;
    border-radius: 12px;
    background: #fff8ef;
    color: #7c4a1d;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
}

.bmb-contribution-section {
    display: grid;
    gap: 0.4rem;
    padding: 0.5rem;
    border: 1px solid #efd9ba;
    border-radius: 14px;
    background: rgba(255, 250, 244, 0.78);
}

.bmb-contribution-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.bmb-contribution-section-head strong {
    color: #2b1b0e;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.bmb-contribution-section-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0.18rem 0.44rem;
    border: 1px solid #edd4b2;
    border-radius: 999px;
    background: #fffaf3;
    color: #8a4b13;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.bmb-contribution-section-helper {
    margin: -0.2rem 0 0;
    color: #7c6651;
    font-size: 0.65rem;
    font-weight: 720;
    line-height: 1.3;
}

.bmb-contribution-section-list {
    display: grid;
    gap: 0.44rem;
}

.bmb-contribution-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem;
    min-width: 0;
}

.bmb-contribution-title-line strong {
    min-width: 0;
}

.bmb-contribution-meta {
    display: block;
}

.bmb-contribution-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.bmb-contribution-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0.12rem 0.34rem;
    border: 1px solid #ead2ae;
    border-radius: 999px;
    background: #fffaf3;
    color: #86521e;
    font-size: 0.52rem;
    font-style: normal;
    font-weight: 950;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.bmb-contribution-badge-locked,
.bmb-contribution-badge-starter {
    background: #f5fff4;
    color: #356b37;
}

.bmb-contribution-badge-added {
    background: #fff7ed;
    color: #9b5217;
}

.bmb-contribution-badge-portion {
    background: #f8f3ff;
    color: #66509b;
}

.bmb-contribution-row-starter {
    border-color: #d9edcf;
}

.bmb-contribution-row-added {
    border-color: #f0d4ab;
}

.bmb-contribution-row-adjusted {
    border-color: #ded1f3;
}

.bmb-desktop-breakdown-table-starter-aware .bmb-breakdown-table-row {
    grid-template-columns: minmax(116px, 1.16fr) minmax(66px, 0.64fr) minmax(70px, 0.7fr) minmax(42px, 0.42fr) minmax(54px, 0.52fr) minmax(50px, 0.48fr) minmax(42px, 0.42fr) minmax(62px, 0.58fr);
}

.bmb-breakdown-source-cell {
    color: #8a4b13;
    font-weight: 900;
}

@media (max-width: 519px) {
    .bmb-contribution-section {
        padding: 0.46rem;
    }

    .bmb-contribution-section-head,
    .bmb-contribution-title-line {
        align-items: flex-start;
    }
}

@media (min-width: 1080px) {
    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-section {
        padding: 0.46rem;
    }

    .bmb-calculator-step .bmb-desktop-side-contribution-panel .bmb-contribution-section-helper {
        display: none;
    }
}

/* Phase 127: official Tacos one/three quantity control. */
.bmb-tacos-quantity-card {
    margin: 16px 0 18px;
    padding: 16px;
    border: 1px solid rgba(120, 72, 32, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 251, 240, 0.96), rgba(255, 244, 226, 0.92));
    box-shadow: 0 10px 28px rgba(96, 56, 24, 0.08);
}

.bmb-tacos-quantity-card[hidden] {
    display: none !important;
}

.bmb-tacos-quantity-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.bmb-tacos-quantity-head strong {
    display: block;
    color: #321c12;
    font-size: 1rem;
}

.bmb-tacos-quantity-head p,
.bmb-tacos-quantity-summary {
    margin: 4px 0 0;
    color: #6f5a49;
    font-size: 0.86rem;
    line-height: 1.45;
}

.bmb-tacos-quantity-head span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(152, 59, 32, 0.12);
    color: #8b2f18;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bmb-tacos-quantity-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bmb-tacos-quantity-option {
    border: 1px solid rgba(120, 72, 32, 0.2);
    border-radius: 16px;
    background: #fffaf3;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bmb-tacos-quantity-option:hover,
.bmb-tacos-quantity-option:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(152, 59, 32, 0.44);
    box-shadow: 0 8px 18px rgba(96, 56, 24, 0.12);
    outline: none;
}

.bmb-tacos-quantity-option strong,
.bmb-tacos-quantity-option small {
    display: block;
}

.bmb-tacos-quantity-option strong {
    color: #2e1a11;
    font-size: 0.94rem;
}

.bmb-tacos-quantity-option small {
    margin-top: 4px;
    color: #7a6656;
    font-size: 0.78rem;
    line-height: 1.35;
}

.bmb-tacos-quantity-option-active {
    border-color: rgba(152, 59, 32, 0.72);
    background: #fff2df;
    box-shadow: inset 0 0 0 1px rgba(152, 59, 32, 0.16), 0 8px 20px rgba(96, 56, 24, 0.1);
}

@media (max-width: 520px) {
    .bmb-tacos-quantity-head,
    .bmb-tacos-quantity-options {
        grid-template-columns: 1fr;
    }

    .bmb-tacos-quantity-head {
        display: grid;
    }
}

/* Phase 132: receipt preview polish and mobile fit. */
.bmb-receipt-preview-panel {
    margin-top: 18px;
    padding: clamp(14px, 2.2vw, 20px);
    border: 1px solid rgba(114, 53, 20, 0.16);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(255, 246, 233, 0.94));
    box-shadow: 0 14px 32px rgba(69, 38, 18, 0.08);
    overflow: hidden;
}

.bmb-receipt-preview-panel[hidden],
.bmb-receipt-preview[hidden],
.bmb-receipt-preview-empty[hidden] {
    display: none !important;
}

.bmb-receipt-preview-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.bmb-receipt-preview-head strong {
    display: block;
    color: #27150b;
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    line-height: 1.2;
}

.bmb-receipt-preview-head p,
.bmb-receipt-preview-empty,
.bmb-receipt-source,
.bmb-receipt-disclaimer,
.bmb-receipt-section-empty {
    margin: 4px 0 0;
    color: #6f5b49;
    font-size: 0.85rem;
    line-height: 1.5;
}

.bmb-receipt-preview-empty {
    padding: 12px 14px;
    border: 1px dashed rgba(114, 53, 20, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.bmb-receipt-preview-head > span {
    max-width: 12rem;
    overflow-wrap: anywhere;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 112, 0, 0.12);
    color: #8a3d00;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bmb-receipt-card {
    min-width: 0;
    padding: clamp(13px, 2vw, 18px);
    border: 1px dashed rgba(114, 53, 20, 0.24);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
}

.bmb-receipt-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 42%);
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(114, 53, 20, 0.12);
}

.bmb-receipt-card-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #201008;
    font-size: clamp(1rem, 1.9vw, 1.14rem);
    line-height: 1.22;
}

.bmb-receipt-card-head span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #6f5b49;
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: right;
}

.bmb-receipt-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.bmb-receipt-chip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(39, 21, 11, 0.06);
    color: #4b2b17;
    font-size: 0.78rem;
    line-height: 1.25;
}

.bmb-receipt-chip strong,
.bmb-receipt-chip span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bmb-receipt-chip strong {
    flex: 0 0 auto;
    font-weight: 900;
}

.bmb-receipt-total-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(5.3rem, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.bmb-receipt-total-card {
    min-width: 0;
    padding: 10px 9px;
    border-radius: 14px;
    background: rgba(255, 112, 0, 0.08);
}

.bmb-receipt-total-card span,
.bmb-receipt-total-card strong {
    display: block;
    overflow-wrap: anywhere;
}

.bmb-receipt-total-card span {
    color: #7a624e;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bmb-receipt-total-card strong {
    margin-top: 3px;
    color: #201008;
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    line-height: 1.2;
}

.bmb-receipt-sections {
    display: grid;
    gap: 10px;
}

.bmb-receipt-section {
    min-width: 0;
    padding: 12px;
    border-radius: 16px;
    background: rgba(248, 240, 229, 0.72);
}

.bmb-receipt-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bmb-receipt-section-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #27150b;
    font-size: 0.9rem;
}

.bmb-receipt-section-head span {
    color: #8a3d00;
    font-size: 0.75rem;
    font-weight: 900;
    white-space: nowrap;
}

.bmb-receipt-section-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bmb-receipt-line {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8.5rem, auto);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-top: 1px solid rgba(114, 53, 20, 0.10);
}

.bmb-receipt-line:first-child {
    border-top: 0;
    padding-top: 0;
}

.bmb-receipt-line-copy,
.bmb-receipt-line-copy strong,
.bmb-receipt-line-copy span,
.bmb-receipt-line-nutrition {
    min-width: 0;
}

.bmb-receipt-line-copy strong,
.bmb-receipt-line-copy span,
.bmb-receipt-line-nutrition {
    display: block;
    overflow-wrap: anywhere;
}

.bmb-receipt-line-copy strong {
    color: #2a150b;
    font-size: 0.88rem;
    line-height: 1.25;
}

.bmb-receipt-line-copy span {
    margin-top: 2px;
    color: #7a624e;
    font-size: 0.76rem;
    line-height: 1.4;
}

.bmb-receipt-line-nutrition {
    color: #4b2b17;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.4;
    text-align: right;
}

.bmb-receipt-source {
    margin-top: 13px;
    padding-top: 10px;
    border-top: 1px solid rgba(114, 53, 20, 0.12);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.bmb-receipt-disclaimer {
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .bmb-receipt-total-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .bmb-receipt-preview-panel {
        margin-top: 14px;
        padding: 12px;
        border-radius: 20px;
    }

    .bmb-receipt-preview-head,
    .bmb-receipt-card-head,
    .bmb-receipt-section-head,
    .bmb-receipt-line {
        grid-template-columns: minmax(0, 1fr);
    }

    .bmb-receipt-preview-head > span {
        max-width: 100%;
        justify-self: flex-start;
    }

    .bmb-receipt-card-head span {
        text-align: left;
    }

    .bmb-receipt-chip-row {
        gap: 7px;
    }

    .bmb-receipt-chip {
        border-radius: 14px;
    }

    .bmb-receipt-total-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-receipt-line-nutrition {
        margin-top: 4px;
        text-align: left;
    }
}

@media (max-width: 420px) {
    .bmb-receipt-total-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .bmb-receipt-card,
    .bmb-receipt-section {
        padding: 11px;
    }

    .bmb-receipt-source,
    .bmb-receipt-disclaimer {
        font-size: 0.74rem;
    }
}

/* Phase 133: printable order summary from receipt preview. */
.bmb-receipt-preview-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: max-content;
}

.bmb-receipt-print-button,
.bmb-receipt-export-button {
    align-items: center;
    background: #1f2937;
    border: 1px solid rgba(31, 41, 55, 0.16);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 36px;
    padding: 0 14px;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    white-space: nowrap;
}

.bmb-receipt-print-button:hover:not(:disabled),
.bmb-receipt-print-button:focus-visible:not(:disabled),
.bmb-receipt-export-button:hover:not(:disabled),
.bmb-receipt-export-button:focus-visible:not(:disabled) {
    box-shadow: 0 10px 22px rgba(31, 41, 55, 0.18);
    transform: translateY(-1px);
}

.bmb-receipt-print-button:disabled,
.bmb-receipt-print-button[aria-disabled="true"],
.bmb-receipt-export-button:disabled,
.bmb-receipt-export-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.48;
}

.bmb-calculator[data-bmb-print-summary-ready="true"] .bmb-receipt-card {
    border-color: rgba(31, 41, 55, 0.18);
}

@media (max-width: 680px) {
    .bmb-receipt-preview-actions {
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }

    .bmb-receipt-print-button,
.bmb-receipt-export-button {
        width: 100%;
    }
}

@media print {
    body[data-bmb-printing-receipt="true"] * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator * {
        visibility: hidden !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"],
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-preview,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-card,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-card * {
        visibility: visible !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] {
        background: #fff !important;
        color: #111827 !important;
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        position: static !important;
        width: auto !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-preview-panel {
        background: #fff !important;
        border: 0 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        width: auto !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-preview-head,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-preview-empty,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-print-button,
.bmb-receipt-export-button {
        display: none !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-card {
        background: #fff !important;
        border: 1px solid #d1d5db !important;
        color: #111827 !important;
        display: block !important;
        left: 0 !important;
        margin: 0 auto !important;
        max-height: none !important;
        max-width: 7.5in !important;
        overflow: visible !important;
        padding: 0.3in !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        width: calc(100% - 0.2in) !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-total-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-section,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-line,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-total-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-source,
    body[data-bmb-printing-receipt="true"] .bmb-calculator[data-bmb-printing-receipt="true"] .bmb-receipt-disclaimer {
        color: #374151 !important;
    }
}

/* Phase 134: receipt image export preparation without enabling export UI. */
.bmb-receipt-card[data-bmb-receipt-export-target] {
    --bmb-receipt-export-width: 720px;
    background: #fff;
    color: #111827;
    contain: layout style paint;
    isolation: isolate;
    max-width: min(100%, var(--bmb-receipt-export-width));
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
}

.bmb-receipt-card[data-bmb-receipt-export-target] *,
.bmb-receipt-card[data-bmb-receipt-export-target] *::before,
.bmb-receipt-card[data-bmb-receipt-export-target] *::after {
    box-sizing: border-box;
}

.bmb-receipt-card[data-bmb-receipt-image-export-ready="true"] {
}

.bmb-receipt-card[data-bmb-receipt-export-target] .bmb-receipt-source,
.bmb-receipt-card[data-bmb-receipt-export-target] .bmb-receipt-disclaimer,
.bmb-receipt-card[data-bmb-receipt-export-target] [data-bmb-receipt-line-name] {
    overflow-wrap: anywhere;
    word-break: normal;
}

.bmb-receipt-card[data-bmb-receipt-export-target] .bmb-receipt-chip,
.bmb-receipt-card[data-bmb-receipt-export-target] .bmb-receipt-total-card,
.bmb-receipt-card[data-bmb-receipt-export-target] .bmb-receipt-line {
    backface-visibility: hidden;
}

.bmb-calculator[data-bmb-receipt-image-export-prep="1.1.135"] .bmb-receipt-preview-panel {
    scroll-margin-bottom: 96px;
}


/* Phase 135: model-driven receipt PNG export. */
.bmb-receipt-export-button {
    background: #0f766e;
    border-color: rgba(15, 118, 110, 0.22);
}

.bmb-calculator[data-bmb-receipt-image-export-ready="true"] .bmb-receipt-card {
    border-color: rgba(15, 118, 110, 0.22);
}

.bmb-calculator[data-bmb-receipt-image-export-status="working"] .bmb-receipt-export-button {
    cursor: progress;
    opacity: 0.74;
}

.bmb-calculator[data-bmb-receipt-image-export-status="exported"] .bmb-receipt-export-button {
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.bmb-receipt-card[data-bmb-last-receipt-image-export-at] {
    outline: 1px solid rgba(15, 118, 110, 0.12);
    outline-offset: 2px;
}

/* 1.1.137 Saved Orders UI MVP */
.bmb-saved-orders-panel {
    margin: 18px 0 0;
    padding: 16px;
    border: 1px solid rgba(23, 37, 84, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.bmb-saved-orders-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bmb-saved-orders-head strong {
    display: block;
    font-size: 1rem;
    color: #18212f;
}

.bmb-saved-orders-head p,
.bmb-saved-orders-status,
.bmb-saved-orders-empty {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.45;
}

.bmb-saved-orders-head [data-bmb-saved-orders-count] {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-weight: 800;
    font-size: 0.76rem;
}

.bmb-saved-orders-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0;
}

.bmb-saved-orders-name-label {
    display: grid;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
}

.bmb-saved-orders-name-label input {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    padding: 10px 11px;
    font: inherit;
    color: #18212f;
    background: #fff;
}

.bmb-saved-orders-save,
.bmb-saved-orders-clear,
.bmb-saved-order-actions button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.bmb-saved-orders-save {
    background: #166534;
    color: #fff;
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.22);
}

.bmb-saved-orders-clear {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.bmb-saved-orders-save:hover,
.bmb-saved-orders-clear:hover,
.bmb-saved-order-actions button:hover {
    transform: translateY(-1px);
}

.bmb-saved-orders-save:disabled,
.bmb-saved-orders-clear:disabled,
.bmb-saved-order-actions button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bmb-saved-orders-status[data-bmb-saved-orders-status-type="success"] {
    color: #047857;
}

.bmb-saved-orders-status[data-bmb-saved-orders-status-type="error"] {
    color: #b91c1c;
}

.bmb-saved-orders-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
}

.bmb-saved-order-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.bmb-saved-order-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.bmb-saved-order-copy strong,
.bmb-saved-order-copy span {
    overflow-wrap: anywhere;
}

.bmb-saved-order-copy strong {
    color: #18212f;
    font-size: 0.92rem;
}

.bmb-saved-order-copy span {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.bmb-saved-order-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bmb-saved-order-actions button[data-bmb-saved-order-restore] {
    background: #0f766e;
    color: #fff;
}

.bmb-saved-order-actions button[data-bmb-saved-order-delete] {
    background: rgba(185, 28, 28, 0.1);
    color: #991b1b;
}

@media (max-width: 680px) {
    .bmb-saved-orders-controls {
        grid-template-columns: 1fr;
    }

    .bmb-saved-orders-save,
    .bmb-saved-orders-clear {
        width: 100%;
    }

    .bmb-saved-order-item {
        align-items: stretch;
        flex-direction: column;
    }

    .bmb-saved-order-actions {
        justify-content: stretch;
    }

    .bmb-saved-order-actions button {
        flex: 1 1 120px;
    }
}

@media print {
    .bmb-saved-orders-panel {
        display: none !important;
    }
}

/* 1.1.138 Saved Orders Polish / Compatibility */
.bmb-saved-orders-panel[data-bmb-saved-orders-polished="1.1.138"] {
    border-color: rgba(15, 118, 110, 0.18);
}

.bmb-saved-orders-compatibility {
    margin: 10px 0 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    font-size: 0.78rem;
    line-height: 1.4;
    font-weight: 800;
}

.bmb-saved-order-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.bmb-saved-order-compatibility-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.bmb-saved-order-compatibility-badge[data-bmb-saved-order-compatibility-badge="ready"] {
    background: rgba(16, 185, 129, 0.13);
    color: #047857;
}

.bmb-saved-order-compatibility-badge[data-bmb-saved-order-compatibility-badge="warning"] {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.bmb-saved-order-compatibility-badge[data-bmb-saved-order-compatibility-badge="blocked"] {
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
}

.bmb-saved-order-compatibility-note {
    display: block;
    color: #92400e;
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.bmb-saved-order-item[data-bmb-saved-order-compatibility="blocked"] {
    background: rgba(254, 242, 242, 0.88);
    border-color: rgba(185, 28, 28, 0.18);
}

.bmb-saved-order-item[data-bmb-saved-order-compatibility="warning"] {
    background: rgba(255, 251, 235, 0.88);
    border-color: rgba(245, 158, 11, 0.2);
}

.bmb-saved-order-actions button[data-bmb-saved-order-rename] {
    background: rgba(14, 116, 144, 0.1);
    color: #155e75;
}

.bmb-saved-order-actions button[data-bmb-saved-order-duplicate] {
    background: rgba(79, 70, 229, 0.1);
    color: #3730a3;
}

@media (max-width: 520px) {
    .bmb-saved-orders-head {
        flex-direction: column;
    }

    .bmb-saved-order-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-saved-order-actions button {
        width: 100%;
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 1.1.143 Nutrition Suggestions Polish / Ranking */
.bmb-nutrition-suggestions-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(95, 56, 24, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,247,237,0.88));
    box-shadow: 0 12px 30px rgba(70, 39, 16, 0.07);
}

.bmb-nutrition-suggestions-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bmb-nutrition-suggestions-head strong {
    display: block;
    color: #3f2f22;
    font-size: 0.98rem;
    font-weight: 900;
}

.bmb-nutrition-suggestions-head p,
.bmb-nutrition-suggestions-empty,
.bmb-nutrition-suggestions-disclaimer {
    margin: 4px 0 0;
    color: #7a6654;
    font-size: 0.78rem;
    line-height: 1.42;
}

.bmb-nutrition-suggestions-head [data-bmb-nutrition-suggestions-ui-status] {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(245, 124, 0, 0.1);
    color: #9a4f02;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}

.bmb-nutrition-suggestions-list {
    display: grid;
    gap: 10px;
}

.bmb-nutrition-suggestions-list[hidden],
.bmb-nutrition-suggestions-empty[hidden],
.bmb-nutrition-suggestions-disclaimer[hidden] {
    display: none !important;
}

.bmb-nutrition-suggestion-card {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(95, 56, 24, 0.1);
    border-radius: 15px;
    background: rgba(255,255,255,0.88);
    overflow-wrap: anywhere;
}

.bmb-nutrition-suggestion-card-head,
.bmb-nutrition-suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.bmb-nutrition-suggestion-rank,
.bmb-nutrition-suggestion-kind,
.bmb-nutrition-suggestion-delta,
.bmb-nutrition-suggestion-score,
.bmb-nutrition-suggestion-action-note {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.1;
}

.bmb-nutrition-suggestion-rank {
    background: #3f2f22;
    color: #fff;
}

.bmb-nutrition-suggestion-kind {
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
}

.bmb-nutrition-suggestion-delta {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}

.bmb-nutrition-suggestion-score {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.bmb-nutrition-suggestion-action-note {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

.bmb-nutrition-suggestion-card > strong {
    color: #3f2f22;
    font-size: 0.9rem;
    font-weight: 900;
}

.bmb-nutrition-suggestion-copy {
    margin: 0;
    color: #6b5a4a;
    font-size: 0.78rem;
    line-height: 1.42;
}

.bmb-nutrition-suggestion-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -1px;
}

.bmb-nutrition-suggestion-focus-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(15, 118, 110, 0.08);
    color: #38675f;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: capitalize;
}

.bmb-nutrition-suggestion-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.bmb-nutrition-suggestion-apply {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: #5c2d12;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(92, 45, 18, 0.16);
}

.bmb-nutrition-suggestion-apply:hover,
.bmb-nutrition-suggestion-apply:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(92, 45, 18, 0.2);
}

.bmb-nutrition-suggestion-apply:disabled,
.bmb-nutrition-suggestion-apply[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.bmb-nutrition-suggestions-disclaimer {
    padding-top: 10px;
    border-top: 1px solid rgba(95, 56, 24, 0.08);
}

@media (max-width: 560px) {
    .bmb-nutrition-suggestions-head {
        flex-direction: column;
    }

    .bmb-nutrition-suggestions-head [data-bmb-nutrition-suggestions-ui-status] {
        align-self: flex-start;
    }

    .bmb-nutrition-suggestion-actions {
        justify-content: stretch;
    }

    .bmb-nutrition-suggestion-apply {
        width: 100%;
    }
}

@media print {
    .bmb-nutrition-suggestions-panel {
        display: none !important;
    }
}

/* 1.1.148 — Goal-focused starter selection UI. */
.bmb-presets-container[data-bmb-goal-starter-ui="1.1.148"] {
    gap: 18px;
}

.bmb-preset-group {
    display: grid;
    gap: 12px;
}

.bmb-preset-group[hidden] {
    display: none !important;
}

.bmb-preset-group-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 0;
}

.bmb-preset-group-heading strong {
    color: #23180f;
    font-size: 0.96rem;
}

.bmb-preset-group-heading span {
    color: rgba(35, 24, 15, 0.68);
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: right;
}

.bmb-goal-starter-card {
    border-color: rgba(111, 78, 55, 0.32);
    background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 255, 255, 0.98));
}

.bmb-goal-starter-card.bmb-preset-card-goal-starter-match {
    box-shadow: 0 12px 30px rgba(68, 44, 24, 0.12);
}

.bmb-goal-starter-badge {
    background: rgba(111, 78, 55, 0.12);
    color: #5e3b20;
}

.bmb-goal-starter-preview {
    margin: 4px 0 8px;
    color: rgba(35, 24, 15, 0.76);
    font-size: 0.86rem;
    line-height: 1.45;
}

.bmb-goal-starter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 4px;
}

.bmb-goal-starter-tags span {
    border: 1px solid rgba(111, 78, 55, 0.22);
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.8);
    color: #5e3b20;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 4px 8px;
    text-transform: capitalize;
}

.bmb-goal-starter-caution {
    margin: 6px 0 8px;
    color: rgba(35, 24, 15, 0.68);
    font-size: 0.78rem;
    line-height: 1.4;
}

.bmb-badge-sodium {
    background: rgba(35, 24, 15, 0.07);
}

@media (max-width: 680px) {
    .bmb-preset-group-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .bmb-preset-group-heading span {
        text-align: left;
    }
}

/* 1.1.153 — Goal Selector Availability UI */
.bmb-goal-availability-note {
    margin: 0.85rem 0 0;
    padding: 0.78rem 0.9rem;
    border: 1px solid rgba(148, 113, 84, 0.22);
    border-radius: 16px;
    background: rgba(255, 248, 235, 0.86);
    color: #5b4636;
    font-size: 0.9rem;
    line-height: 1.45;
}

.bmb-goal-availability-note[hidden] {
    display: none !important;
}

.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable,
.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable:hover,
.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable:focus,
.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable:active {
    opacity: 0.56;
    cursor: not-allowed;
    filter: grayscale(0.2);
    transform: none;
}

.bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable::after {
    content: "Unavailable";
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(91, 70, 54, 0.72);
}

@media (max-width: 520px) {
    .bmb-goal-availability-note {
        font-size: 0.84rem;
        padding: 0.68rem 0.76rem;
    }

    .bmb-guided-shell .bmb-goal-chip.bmb-goal-chip-unavailable::after {
        font-size: 0.62rem;
    }
}

/* 1.1.156 — Starter Card Rotation / Show More Ideas. */
.bmb-presets-container[data-bmb-starter-card-rotation-ui="1.1.156"] .bmb-preset-card-rotation-hidden {
    display: none !important;
}

.bmb-starter-rotation-note {
    margin: 0 2px 2px;
    padding: 0.65rem 0.78rem;
    border: 1px dashed rgba(111, 78, 55, 0.22);
    border-radius: 14px;
    background: rgba(255, 248, 238, 0.72);
    color: rgba(35, 24, 15, 0.68);
    font-size: 0.82rem;
    line-height: 1.4;
}

.bmb-starter-rotation-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.bmb-starter-rotation-actions[hidden] {
    display: none !important;
}

.bmb-starter-rotation-next {
    min-width: min(100%, 260px);
}

.bmb-goal-starter-variety-note {
    margin: 6px 0 2px;
    color: rgba(92, 62, 35, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 680px) {
    .bmb-starter-rotation-actions {
        justify-content: stretch;
    }

    .bmb-starter-rotation-next {
        width: 100%;
    }
}

/* 1.1.159 — Starter List Structure Cleanup. Keeps compact rows in one unified starter list. */
/* 1.1.160 — Starter Row Noise Cleanup. Keeps one simple row type badge and removes visible match/rank notes. */
/* 1.1.161 — Table-Like Macro Alignment. Aligns starter nutrition values to the shared row/header grid. */
.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] {
    --bmb-starter-row-grid-columns: 54px minmax(250px, 1fr) repeat(5, minmax(70px, 0.17fr));
    display: grid;
    gap: 16px;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-group {
    display: grid;
    gap: 10px;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-group-heading {
    align-items: end;
    border-bottom: 1px solid rgba(111, 78, 55, 0.14);
    padding-bottom: 8px;
}

.bmb-starter-list-header {
    display: grid;
    grid-template-columns: var(--bmb-starter-row-grid-columns);
    gap: 14px;
    align-items: center;
    padding: 0.48rem 0.95rem;
    border: 1px solid rgba(111, 78, 55, 0.12);
    border-radius: 14px;
    background: rgba(255, 248, 238, 0.72);
    color: rgba(35, 24, 15, 0.62);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bmb-starter-list-header span:nth-child(n+3) {
    text-align: center;
}

.bmb-starter-list-header-icon,
.bmb-starter-list-header-main {
    min-width: 0;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row {
    display: grid;
    grid-template-columns: var(--bmb-starter-row-grid-columns);
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 88px;
    padding: 0.92rem 0.95rem;
    border: 1px solid rgba(111, 78, 55, 0.18);
    border-radius: 16px;
    background: #fffdf9;
    color: #23180f;
    cursor: pointer;
    font: inherit;
    text-align: left;
    box-shadow: none;
    transform: none;
    appearance: none;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row:hover,
.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row:focus-visible {
    border-color: rgba(230, 92, 0, 0.42);
    box-shadow: 0 10px 22px rgba(92, 45, 18, 0.1);
    outline: none;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row-active {
    border-color: #e85d04;
    background: linear-gradient(180deg, #fffaf2 0%, #fffdf9 100%);
    box-shadow: 0 12px 28px rgba(232, 93, 4, 0.16);
}

.bmb-starter-row-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(111, 78, 55, 0.18);
    border-radius: 14px;
    background: rgba(255, 248, 238, 0.9);
    font-size: 1.25rem;
}

.bmb-starter-row-main {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.bmb-starter-row-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.bmb-starter-row-name {
    color: #1f160f;
    font-size: 0.96rem;
    font-weight: 950;
    line-height: 1.2;
}

.bmb-starter-row-summary {
    color: rgba(35, 24, 15, 0.7);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
    max-width: 58ch;
}

.bmb-starter-row-type-badge {
    justify-self: start;
    width: fit-content;
}

.bmb-starter-row-metrics {
    display: contents;
}

.bmb-starter-row-metrics span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100%;
    text-align: center;
}

.bmb-starter-row-metrics strong {
    color: #24160c;
    font-size: 0.92rem;
    font-weight: 950;
    line-height: 1;
}

.bmb-starter-row-metrics em {
    display: none;
    color: rgba(35, 24, 15, 0.48);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-starter-rotation-actions,
.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-starter-rotation-next {
    display: none !important;
}

.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card-rotation-hidden {
    display: grid !important;
}

@media (max-width: 900px) {
    .bmb-starter-list-header {
        display: none;
    }

    .bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row {
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-areas:
            "icon main"
            "metrics metrics";
        gap: 10px;
        min-height: 0;
        padding: 0.72rem;
    }

    .bmb-starter-row-icon { grid-area: icon; }
    .bmb-starter-row-main { grid-area: main; }
    .bmb-starter-row-metrics {
        display: grid;
        grid-area: metrics;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        padding-top: 0.55rem;
        border-top: 1px solid rgba(111, 78, 55, 0.12);
    }

    .bmb-starter-row-metrics span {
        display: grid;
        gap: 2px;
        min-height: 0;
    }

    .bmb-starter-row-metrics em {
        display: block;
    }
}

@media (max-width: 520px) {
    .bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-group-heading {
        gap: 4px;
    }

    .bmb-starter-row-name {
        font-size: 0.9rem;
    }

    .bmb-starter-row-summary {
        font-size: 0.76rem;
    }

    .bmb-starter-row-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        text-align: left;
    }

    .bmb-starter-row-metrics span {
        align-items: start;
        justify-items: start;
    }

    .bmb-starter-row-metrics strong {
        font-size: 0.84rem;
    }

    .bmb-starter-row-metrics em {
        font-size: 0.56rem;
    }
}

/* 1.1.162 — Row Identity and Selected State. Tightens starter row identity, active state, and prevents narrow-dashboard macro collapse. */
.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] {
    --bmb-starter-row-grid-columns: 46px minmax(165px, 1fr) repeat(5, minmax(46px, 0.28fr));
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr) !important;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-group {
    min-width: 0;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-list-header {
    grid-template-columns: var(--bmb-starter-row-grid-columns);
    gap: 10px;
    min-width: 0;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row {
    position: relative;
    grid-template-columns: 46px minmax(165px, 1fr) minmax(250px, 0.92fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-main {
    min-width: 0;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics span {
    min-width: 0;
    min-height: 0;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-icon {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    flex: 0 0 auto;
    overflow: visible;
}

.bmb-starter-row-glyph {
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.bmb-starter-row-check {
    position: absolute;
    top: -7px;
    left: -7px;
    z-index: 1;
    display: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #23180f;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 0 0 2px #fffdf9;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row-active,
.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
    border-color: #23180f;
    box-shadow: 0 10px 24px rgba(35, 24, 15, 0.12);
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row-active .bmb-starter-row-check,
.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] .bmb-starter-row-check {
    display: inline-grid;
}

.bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@container (max-width: 720px) {
    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-list-header {
        display: none;
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-preset-card.bmb-starter-row {
        grid-template-columns: 46px minmax(0, 1fr);
        grid-template-areas:
            "icon main"
            "metrics metrics";
        align-items: start;
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-icon {
        grid-area: icon;
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-main {
        grid-area: main;
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics {
        grid-area: metrics;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding-top: 0.55rem;
        border-top: 1px solid rgba(111, 78, 55, 0.12);
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics span {
        display: grid;
        gap: 2px;
        justify-items: center;
    }

    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics em {
        display: block;
    }
}

@container (max-width: 460px) {
    .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 1.1.163 — Show More Starter Ideas. Simple progressive reveal; no rotation/reranking/color work. */
.bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-starter-row-reveal-hidden,
.bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-starter-row[data-bmb-starter-progressive-hidden="true"] {
    display: none !important;
}

.bmb-starter-reveal-actions {
    display: flex;
    justify-content: center;
    padding: 0.4rem 0 0.1rem;
    width: 100%;
    order: 999;
}

.bmb-starter-reveal-actions[hidden] {
    display: none !important;
}

.bmb-starter-reveal-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: min(100%, 280px);
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    border: 1px solid rgba(111, 78, 55, 0.22);
    border-radius: 14px;
    background: #fffdf9;
    color: #23180f;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    line-height: 1.1;
}

.bmb-starter-reveal-more:hover,
.bmb-starter-reveal-more:focus-visible {
    border-color: rgba(111, 78, 55, 0.38);
    outline: none;
    box-shadow: 0 10px 22px rgba(92, 45, 18, 0.08);
}

.bmb-starter-reveal-more:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.bmb-starter-reveal-chevron {
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

.bmb-approved-dashboard .bmb-presets-step .bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
    max-width: 100% !important;
    margin: 0.8rem 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
}

.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-preset-group-starter-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    width: 100% !important;
}

.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-preset-card.bmb-starter-row {
    display: grid !important;
    flex: initial !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    scroll-snap-align: unset !important;
}

.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-preset-card.bmb-starter-row[hidden],
.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-progressive-disclosure-ui="1.1.163"] .bmb-preset-card.bmb-starter-row-reveal-hidden {
    display: none !important;
}

@media (max-width: 680px) {
    .bmb-starter-reveal-actions {
        justify-content: stretch;
    }

    .bmb-starter-reveal-more {
        width: 100%;
    }
}

/* 1.1.164 — Mobile and Responsive Layout. Keeps starter-row behavior intact while syncing active visuals with ingredient selection and improving narrower-width readability. */
.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row,
.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row:hover,
.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row:focus-visible {
    background: #fff8ef;
    box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.22), 0 10px 22px rgba(92, 45, 18, 0.08);
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row-active,
.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"],
.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row-active,
.bmb-approved-dashboard .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
    border-color: #ffd0a1;
    background: #fff4e8;
    box-shadow: inset 3px 0 0 #ff6a00, inset 0 0 0 1px #ff8a00, 0 10px 24px rgba(255, 106, 0, 0.1);
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-icon {
    overflow: hidden;
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-check {
    position: static;
    inset: auto;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(180deg, #ff8a00 0%, #ff5c00 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(255, 106, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row-active .bmb-starter-row-check,
.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] .bmb-starter-row-check {
    display: inline-grid;
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row-active .bmb-starter-row-glyph,
.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] .bmb-starter-row-glyph {
    display: none;
}

.bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-summary {
    max-width: 62ch;
}

@container (max-width: 820px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-list-header {
        display: none;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row {
        grid-template-columns: 46px minmax(0, 1fr);
        grid-template-areas:
            "icon main"
            "metrics metrics";
        align-items: start;
        gap: 10px;
        padding: 0.8rem 0.85rem;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-icon {
        grid-area: icon;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-main {
        grid-area: main;
        gap: 0.3rem;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics {
        display: grid;
        grid-area: metrics;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(111, 78, 55, 0.12);
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics span {
        display: grid;
        gap: 2px;
        align-items: start;
        justify-items: center;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics em {
        display: block;
    }
}

@media (max-width: 680px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-reveal-actions {
        justify-content: stretch;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-reveal-more {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row {
        padding: 0.75rem;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-summary {
        font-size: 0.78rem;
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics span {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 400px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-name {
        font-size: 0.9rem;
    }
}

@container (max-width: 760px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-summary {
        max-width: none;
    }
}

@container (max-width: 560px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container (max-width: 390px) {
    .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 1.1.165 — Desktop Starter Polish / Visual Consistency. Official starter is pinned first; starter active treatment stays aligned with selected ingredient rows. */
.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-group-starter-list[data-bmb-official-starter-pin-position="top"] .bmb-official-starter-card {
    order: 0;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-group-starter-list[data-bmb-official-starter-pin-position="top"] .bmb-goal-starter-card {
    order: 100;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row {
    align-items: center;
    min-height: 82px;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-starter-row-main {
    gap: 0.22rem;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-starter-row-summary {
    line-height: 1.32;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-starter-row-metrics {
    align-self: stretch;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-starter-row-metrics span {
    align-content: center;
    justify-content: center;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-starter-row-type-badge {
    margin-top: 0.05rem;
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row-active,
.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
    border-color: #ff6a00;
    background: linear-gradient(180deg, #fff6eb 0%, #fffdf9 100%);
    box-shadow: 0 12px 28px rgba(255, 106, 0, 0.15);
}

.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row-active .bmb-starter-row-check,
.bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] .bmb-starter-row-check {
    background: linear-gradient(180deg, #ff8a00 0%, #ff5c00 100%);
}

@container (min-width: 761px) {
    .bmb-presets-container[data-bmb-starter-desktop-polish-ui="1.1.165"] .bmb-preset-card.bmb-starter-row {
        grid-template-columns: 46px minmax(180px, 1fr) minmax(270px, 0.92fr);
    }
}


/* 1.1.166 — Desktop Visual Hierarchy Polish (experimental). Reduces visual competition without removing app features. */
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] {
    --bmb-polish-border: rgba(111, 78, 55, 0.14);
    --bmb-polish-border-strong: rgba(255, 106, 0, 0.42);
    --bmb-polish-surface: rgba(255, 253, 249, 0.96);
    --bmb-polish-surface-soft: rgba(255, 248, 238, 0.58);
    --bmb-polish-selected: rgba(255, 106, 0, 0.08);
    --bmb-polish-shadow: 0 10px 24px rgba(74, 45, 18, 0.045);
    --bmb-polish-shadow-active: 0 12px 28px rgba(255, 106, 0, 0.12);
}

/* Public source/build block: keep it available, make calculation help the primary visible affordance. */
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-source-history-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.62rem 0.8rem;
    border-color: var(--bmb-polish-border);
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.74);
    box-shadow: none;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-source-history-summary {
    color: rgba(35, 24, 15, 0.50);
    font-size: 0.74rem;
    font-weight: 720;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-build-version-label {
    color: rgba(35, 24, 15, 0.62);
    font-weight: 850;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-source-history-details {
    margin: 0;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-source-history-details summary {
    color: #f05f00;
    font-size: 0.78rem;
    font-weight: 900;
}

/* Section rhythm: same structure, quieter containers. */
@media (min-width: 900px) {
    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-experience-step {
        padding: clamp(1.05rem, 1.28vw, 1.32rem);
        border-color: rgba(111, 78, 55, 0.13);
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 196, 116, 0.055), transparent 34%),
            var(--bmb-polish-surface);
        box-shadow: var(--bmb-polish-shadow);
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-step-head {
        margin-bottom: 0.85rem;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-step-head h3 {
        letter-spacing: -0.035em;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-step-head p {
        color: rgba(35, 24, 15, 0.58);
        line-height: 1.38;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-step-number {
        box-shadow: 0 7px 15px rgba(255, 106, 0, 0.16);
    }
}

/* Badge hierarchy: preserve badges, reduce low-priority competition. */
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-starter-row-type-badge,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-calculator-meal-badge,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-calculator-goal-badge,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-loaded-preset-badge,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-goal-match-pill {
    border-color: rgba(255, 106, 0, 0.18);
    background: rgba(255, 248, 238, 0.66);
    color: rgba(191, 78, 0, 0.86);
    box-shadow: none;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-starter-row-type-badge {
    padding: 0.12rem 0.42rem;
    font-size: 0.62rem;
    line-height: 1.1;
}

/* Selection language: consistent orange border + soft fill while keeping each control's existing behavior. */
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-meal-type-card.bmb-meal-type-active,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-goal-chip-active,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-calculator-step .bmb-category-tab.bmb-tab-active,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-ingredient-btn.bmb-selected {
    border-color: #ff6a00;
    background: #fff8ef;
    box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.055);
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row-active,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
    border-color: #ff6a00;
    background: #fff8ef;
    box-shadow: var(--bmb-polish-shadow-active);
}

/* Starter rows: keep all information, reduce nested-card weight. */
@container (min-width: 761px) {
    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row {
        min-height: 78px;
        padding: 0.78rem 0.88rem;
        border-color: rgba(111, 78, 55, 0.13);
        background: rgba(255, 253, 249, 0.92);
        box-shadow: none;
    }

    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row:hover,
    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row:focus-visible {
        border-color: rgba(255, 106, 0, 0.34);
        box-shadow: 0 10px 20px rgba(74, 45, 18, 0.055);
    }

    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-starter-row-name {
        font-size: 0.94rem;
        letter-spacing: -0.02em;
    }

    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-starter-row-summary {
        color: rgba(35, 24, 15, 0.62);
        font-size: 0.77rem;
        font-weight: 620;
    }

    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-starter-row-metrics strong {
        font-size: 0.9rem;
    }

    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row-active,
    .bmb-presets-container[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
        background: #fff8ef;
    }
}

/* Notes and guidance: still present, visually quieter. */
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-presets-note,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-official-ordering-guidance,
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] [data-bmb-starter-included-panel],
.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] [data-bmb-goal-status-card] {
    border-color: rgba(111, 78, 55, 0.12);
    background: rgba(255, 253, 249, 0.72);
    box-shadow: none;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-presets-note {
    margin-top: 0.75rem;
    padding: 0.62rem 0.72rem;
    color: rgba(35, 24, 15, 0.66);
    font-size: 0.76rem;
    line-height: 1.38;
}

.bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-presets-note strong {
    color: rgba(35, 24, 15, 0.76);
}

/* Ingredient workbench: keep table power, lower card heaviness. */
@media (min-width: 900px) {
    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-ingredient-list-shell,
    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-category-tabs-panel {
        border-color: rgba(111, 78, 55, 0.12);
        box-shadow: none;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-ingredient-btn {
        border-color: rgba(111, 78, 55, 0.10);
        background: rgba(255, 253, 249, 0.92);
        box-shadow: none;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-ingredient-btn:hover,
    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-ingredient-btn:focus-visible {
        border-color: rgba(255, 106, 0, 0.30);
        box-shadow: 0 8px 18px rgba(74, 45, 18, 0.045);
    }
}

/* Right summary card: same content, more dashboard-like hierarchy. */
@media (min-width: 1080px) {
    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-nutrition-side-panel.bmb-approved-bowl-panel {
        padding: clamp(1.15rem, 1.55vw, 1.45rem) !important;
        border-color: rgba(111, 78, 55, 0.14) !important;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 181, 92, 0.065), transparent 31%),
            #fffdf9 !important;
        box-shadow: 0 16px 36px rgba(74, 45, 18, 0.075) !important;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-bowl-panel-head {
        margin-bottom: 1rem;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-bowl-hero {
        margin-bottom: 0.9rem;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-bowl-title-block strong {
        font-size: clamp(1.05rem, 1.05vw, 1.22rem);
        letter-spacing: -0.03em;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-bowl-title-block span {
        color: rgba(240, 95, 0, 0.82);
        font-size: 0.72rem;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-mockup-stat-strip {
        margin: 0.25rem 0 1.05rem;
        padding-bottom: 0.86rem;
        border-bottom: 1px solid rgba(111, 78, 55, 0.10);
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-mockup-stat-strip .bmb-desktop-side-nutrition-card {
        border-left-color: rgba(111, 78, 55, 0.12) !important;
        padding: 0 0.58rem !important;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-mockup-stat-strip strong {
        font-size: clamp(1.1rem, 1.18vw, 1.32rem) !important;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-side-selected-panel {
        padding-top: 0.8rem;
        border-top: 1px solid rgba(111, 78, 55, 0.10);
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-side-chips {
        gap: 0.4rem;
    }

    .bmb-approved-dashboard[data-bmb-desktop-visual-hierarchy-ui="1.1.166"] .bmb-desktop-source-note {
        color: rgba(35, 24, 15, 0.38);
        font-size: 0.68rem;
    }
}

/* 1.1.167 — Highlighted Guidance Removal Experiment. Removes the highlighted guidance/description elements from the visible UI without changing calculator behavior. */
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-guided-flow-rail,
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-meal-type-preview-card,
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-goal-availability-note,
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-official-ordering-guidance,
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-presets-step .bmb-step-head p,
.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-meal-type-copy small {
    display: none !important;
}

.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-meal-type-copy {
    gap: 0 !important;
}

.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-meal-type-card {
    align-items: center;
}

.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-presets-step .bmb-step-head-inline {
    align-items: center;
}

.bmb-approved-dashboard[data-bmb-highlighted-guidance-removal-ui="1.1.167"] .bmb-calculator-step .bmb-step-head {
    margin-bottom: 0.8rem;
}


/* 1.1.168 — Decorative Meal / Goal Dropdown Experiment. Compresses meal and goal button groups behind large summary selectors while keeping the original option buttons intact. */
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-step,
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-coach-step {
    overflow: visible;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-step .bmb-step-head,
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-coach-step .bmb-step-head {
    margin-bottom: 0.75rem;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-coach-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.bmb-decorative-selector-trigger {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    min-height: 74px;
    margin: 0.15rem 0 0;
    padding: 0.82rem 0.95rem;
    border: 1px solid rgba(111, 78, 55, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 181, 92, 0.075), transparent 31%),
        rgba(255, 253, 249, 0.94);
    color: #23180f;
    cursor: pointer;
    font: inherit;
    text-align: left;
    box-shadow: 0 8px 18px rgba(74, 45, 18, 0.04);
    appearance: none;
}

.bmb-decorative-selector-trigger:hover,
.bmb-decorative-selector-trigger:focus-visible,
.bmb-decorative-selector-trigger.bmb-decorative-selector-open {
    border-color: rgba(255, 106, 0, 0.42);
    box-shadow: 0 10px 22px rgba(255, 106, 0, 0.075);
    outline: none;
}

.bmb-decorative-selector-trigger:focus-visible {
    outline: 2px solid #ff6a00;
    outline-offset: 3px;
}

.bmb-decorative-selector-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 106, 0, 0.22);
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.94);
    font-size: 1.15rem;
    line-height: 1;
}

.bmb-decorative-selector-copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.bmb-decorative-selector-label {
    color: rgba(35, 24, 15, 0.54);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    line-height: 1.1;
    text-transform: uppercase;
}

.bmb-decorative-selector-value {
    color: #1f160f;
    font-size: clamp(1.02rem, 1.25vw, 1.22rem);
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.bmb-decorative-selector-subcopy {
    color: rgba(35, 24, 15, 0.58);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.25;
}

.bmb-decorative-selector-chevron {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.9);
    color: rgba(35, 24, 15, 0.68);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1;
    transition: transform 130ms ease;
}

.bmb-decorative-selector-open .bmb-decorative-selector-chevron {
    transform: rotate(180deg);
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-grid.bmb-decorative-selector-panel,
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-options.bmb-decorative-selector-panel {
    margin-top: 0.65rem;
    padding: 0.72rem;
    border: 1px solid rgba(111, 78, 55, 0.13);
    border-radius: 18px;
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 16px 34px rgba(74, 45, 18, 0.085);
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-grid.bmb-decorative-selector-panel[hidden],
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-options.bmb-decorative-selector-panel[hidden] {
    display: none !important;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-grid.bmb-decorative-selector-panel-open {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-options.bmb-decorative-selector-panel-open {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.65rem;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-card,
.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-chip {
    min-height: 52px;
}

.bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-preview-card {
    margin-top: 0.75rem;
}

@media (min-width: 900px) {
    .bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-step,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-coach-step {
        padding-bottom: 1rem;
    }
}

@media (max-width: 680px) {
    .bmb-decorative-selector-trigger {
        grid-template-columns: 40px minmax(0, 1fr) 30px;
        min-height: 66px;
        padding: 0.72rem;
    }

    .bmb-decorative-selector-icon {
        width: 38px;
        height: 38px;
    }

    .bmb-decorative-selector-subcopy {
        display: none;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-meal-type-grid.bmb-decorative-selector-panel-open,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-ui="1.1.168"] .bmb-goal-options.bmb-decorative-selector-panel-open {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* 1.1.169 — Decorative Selector Desktop Minimal Experiment. Removes redundant selector guidance from desktop view while preserving the decorative dropdown controls and original option buttons. */
@media (min-width: 781px) {
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-meal-type-step .bmb-step-head p,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-goal-coach-step .bmb-step-head p,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-decorative-selector-label,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-decorative-selector-subcopy,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-goal-preview-card {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-meal-type-step .bmb-step-head,
    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-goal-coach-step .bmb-step-head {
        margin-bottom: 0.58rem;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-decorative-selector-trigger {
        min-height: 62px;
        padding-block: 0.66rem;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-decorative-selector-copy {
        gap: 0;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-decorative-selector-value {
        line-height: 1.15;
    }

    .bmb-approved-dashboard[data-bmb-decorative-selectors-desktop-minimal-ui="1.1.169"] .bmb-goal-coach-grid {
        gap: 0.55rem;
    }
}


/* 1.1.170 — Default Burrito / Balanced / Official Starter Reset. State-only marker; visual dropdown experiments remain unchanged. */
.bmb-approved-dashboard[data-bmb-default-state-reset-ui="1.1.170"] {
    --bmb-default-state-reset-active: 1;
}


/* 1.1.173 — Ingredient Merge Schema / Canonical IDs. Planning-only pass; no visual rules required. */

/* 1.1.174 — Adult Core Ingredient Additions. Data/visibility pass only; no visual behavior changes. */

/* 1.1.175 — Adult Side / Sauce Variant Additions. Data/visibility pass marker only; no visual rule changes. */

/* 1.1.186 — Post-Merge UI Review / Meal Section UX Polish.
   Keeps the expanded official sections easier to scan after the ingredient merge. */
.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.72rem;
    padding: 0.58rem 0.68rem;
    border: 1px solid rgba(111, 78, 55, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(255, 248, 238, 0.82));
    color: rgba(64, 42, 28, 0.78);
    box-shadow: 0 8px 20px rgba(74, 45, 18, 0.045);
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-summary[hidden] {
    display: none !important;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: rgba(75, 49, 32, 0.72);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.12;
    white-space: nowrap;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-chip-active {
    background: rgba(245, 124, 0, 0.10);
    color: #8f4500;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-chip-has-selection {
    background: rgba(34, 117, 73, 0.10);
    color: #2f6b43;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tabs-panel {
    margin-bottom: 0.72rem;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tabs {
    gap: 0.38rem;
    padding-bottom: 0.56rem;
    border-bottom-color: rgba(111, 78, 55, 0.10);
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab {
    flex-basis: 92px;
    min-width: 92px;
    max-width: 112px;
    min-height: 58px;
    padding: 0.42rem 0.45rem 0.48rem;
    border: 1px solid rgba(111, 78, 55, 0.10);
    border-bottom-width: 1px;
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.72);
    color: rgba(66, 43, 28, 0.72);
    box-shadow: none;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab:hover,
.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab:focus {
    border-color: rgba(255, 106, 0, 0.24);
    background: rgba(255, 248, 238, 0.86);
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab.bmb-tab-active {
    border-color: rgba(255, 106, 0, 0.55);
    background: #fff7ec;
    color: #c95700;
    box-shadow: inset 0 -3px 0 rgba(255, 106, 0, 0.66), 0 8px 16px rgba(74, 45, 18, 0.055);
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.15em;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab-count {
    top: -0.28rem;
    right: -0.18rem;
    box-shadow: 0 0 0 2px #fffdf8;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-official-group-note {
    display: flex;
    align-items: flex-start;
    gap: 0.44rem;
    margin-bottom: 0.54rem;
    padding: 0.52rem 0.62rem;
    border-color: rgba(111, 78, 55, 0.10);
    background: rgba(255, 250, 242, 0.72);
    color: rgba(74, 53, 37, 0.64);
    font-size: 0.72rem;
    font-weight: 760;
}

.bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-official-group-note::before {
    content: 'Section';
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.1rem 0.34rem;
    background: rgba(245, 124, 0, 0.09);
    color: rgba(166, 80, 0, 0.78);
    font-size: 0.62rem;
    font-weight: 950;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

@media (min-width: 1080px) {
    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-summary {
        position: sticky;
        top: 0;
        z-index: 8;
        backdrop-filter: blur(10px);
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab {
        flex-basis: 104px;
        max-width: 124px;
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-ingredient-list-head,
    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-ingredient-list-shell .bmb-ingredient-btn,
    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn,
    .bmb-approved-dashboard.bmb-layout-compact[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-ingredient-list-shell .bmb-ingredient-page .bmb-ingredient-btn {
        grid-template-columns: 50px minmax(168px, 1.35fr) 70px 48px 54px 50px 48px 58px 28px !important;
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-ingredient-list-shell .bmb-ing-breakdown .bmb-ing-breakdown-serving {
        font-size: 0.62rem;
    }
}

@media (max-width: 640px) {
    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-summary {
        gap: 0.35rem;
        padding: 0.5rem;
        border-radius: 14px;
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-chip {
        max-width: 100%;
        font-size: 0.66rem;
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-section-ux-chip-active {
        flex: 1 1 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .bmb-approved-dashboard[data-bmb-post-merge-ui-polish="1.1.186"] .bmb-category-tab {
        flex-basis: 84px;
        min-width: 84px;
        min-height: 56px;
    }
}



/* 1.1.190 — Mobile UI Copy + Chrome Cleanup.
   Tightens calculator-owned mobile chrome only. Theme title/footer and page sample content stay out of scope. */
.bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-title-block p {
    max-width: 58ch;
}

.bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-details summary {
    white-space: nowrap;
}

.bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-heading-row {
    align-items: center;
}

@media (max-width: 760px) {
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-dashboard-main {
        gap: 0.78rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-header {
        min-height: 0;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 0.62rem;
        padding: 0.82rem 0.86rem;
        border-radius: 16px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-brand-mark {
        width: 42px;
        height: 42px;
        font-size: 1.28rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-title-block h2 {
        font-size: 1.06rem;
        letter-spacing: -0.035em;
        line-height: 1.06;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-title-block p {
        margin-top: 0.18rem;
        font-size: 0.72rem;
        line-height: 1.32;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-transparency-note.bmb-source-history-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.36rem 0.48rem;
        padding: 0.46rem 0.56rem;
        border-radius: 12px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-summary {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.58rem;
        line-height: 1.22;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-details {
        justify-self: end;
        margin: 0;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-details[open] {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-details summary {
        min-height: 24px;
        padding: 0.14rem 0.28rem;
        font-size: 0.62rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-source-history-copy {
        margin-top: 0.48rem;
        font-size: 0.72rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-experience-step {
        padding: 0.82rem 0.72rem;
        border-radius: 16px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-step-head,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-step-head-inline {
        gap: 0.52rem;
        margin-bottom: 0.62rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-step-head h3 {
        font-size: 1rem;
        letter-spacing: -0.03em;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-step-head p {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-step .bmb-step-head p,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-step .bmb-step-head p {
        display: none;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-goal-match-pill {
        padding: 0.18rem 0.42rem;
        font-size: 0.58rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-preset-card.bmb-starter-row {
        gap: 0.48rem;
        padding: 0.58rem 0.62rem;
        border-radius: 13px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-icon,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-icon {
        width: 38px;
        height: 38px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-name {
        font-size: 0.82rem;
        line-height: 1.14;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-summary {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 0.68rem;
        line-height: 1.22;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-type-badge {
        padding: 0.08rem 0.26rem;
        font-size: 0.5rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-container[data-bmb-starter-mobile-responsive-ui="1.1.164"] .bmb-starter-row-metrics,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-presets-container[data-bmb-starter-row-selected-state-ui="1.1.162"] .bmb-starter-row-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.28rem;
        padding-top: 0.42rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-metrics span[data-bmb-starter-row-metric="sodium"] {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-metrics strong {
        font-size: 0.75rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-row-metrics em {
        font-size: 0.48rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-reveal-actions {
        padding-top: 0.3rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-starter-reveal-more {
        min-height: 36px;
        padding: 0.52rem 0.78rem;
        font-size: 0.8rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-heading-row {
        gap: 0.32rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-heading-row .bmb-calculator-meal-badge,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-heading-row .bmb-calculator-goal-badge,
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-calculator-heading-row .bmb-loaded-preset-badge {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-included-ingredients-card {
        margin: 0 0 0.58rem;
        padding: 0.6rem 0.64rem;
        border-radius: 14px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-included-ingredients-head {
        margin-bottom: 0.36rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-included-ingredients-head strong {
        font-size: 0.8rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-included-ingredients-head span {
        padding: 0.2rem 0.42rem;
        font-size: 0.56rem;
        letter-spacing: 0.02em;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-included-ingredients-card p {
        display: none;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-section-ux-summary {
        margin: 0 0 0.48rem;
        padding: 0.38rem 0.42rem;
        border-radius: 12px;
        background: rgba(255, 251, 245, 0.78);
        box-shadow: none;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-section-ux-chip-meal {
        display: none;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-section-ux-chip {
        min-height: 20px;
        padding: 0.17rem 0.38rem;
        font-size: 0.58rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tabs-panel {
        margin: 0 0 0.48rem;
        padding: 0;
        border: 0;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-tabs-nav {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tabs {
        gap: 0.32rem;
        padding: 0 0 0.42rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tab {
        flex: 0 0 72px;
        min-width: 72px;
        max-width: 82px;
        min-height: 48px;
        padding: 0.32rem 0.28rem 0.36rem;
        border-radius: 12px;
        scroll-snap-align: start;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tab-icon {
        font-size: 0.92rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tab-label {
        min-height: 1.9em;
        font-size: 0.58rem;
        line-height: 0.98;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tab-count {
        top: -0.22rem;
        right: -0.12rem;
        min-width: 16px;
        height: 16px;
        font-size: 0.54rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-official-group-note {
        gap: 0.32rem;
        margin-bottom: 0.4rem;
        padding: 0.38rem 0.44rem;
        font-size: 0.62rem;
        line-height: 1.22;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-official-group-note::before {
        padding: 0.07rem 0.25rem;
        font-size: 0.5rem;
    }
}

@media (max-width: 390px) {
    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-category-tab {
        flex-basis: 68px;
        min-width: 68px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-ui-chrome-cleanup="1.1.190"] .bmb-section-ux-chip-selected {
        display: none;
    }
}


/* 1.1.191 rebased from 1.1.190: mobile tab rail correction.
   Keep the mobile chrome cleanup from 1.1.190, but restore tab arrows because
   hiding them clipped the first visible category tab on narrow screens. */
@media (max-width: 760px) {
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-presets-step .bmb-step-head-inline {
        align-items: flex-start !important;
        text-align: left;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-presets-step .bmb-step-head-main {
        align-self: stretch;
        justify-content: flex-start;
        text-align: left;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-presets-step .bmb-goal-match-pill {
        align-self: flex-start;
        margin-left: 40px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-included-ingredients-head span,
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-included-ingredient-lock {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-category-tabs-panel {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        align-items: center;
        gap: 0.28rem;
        overflow: visible;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-tabs-nav {
        display: inline-flex !important;
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-category-tabs {
        min-width: 0;
        width: 100%;
        gap: 0.32rem;
        padding: 0 0 0.38rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-fix="1.1.191"] .bmb-category-tab {
        flex: 0 0 72px;
        min-width: 72px;
        max-width: 82px;
        scroll-snap-align: start;
    }
}


/* 1.1.193 — Mobile tab rail polish (rebased on 1.1.190 cleanup + 1.1.191 rail restoration).
   Fixes top clipping in mobile category tabs and removes redundant selector chrome. */
@media (max-width: 760px) {
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-decorative-selector-label,
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-goal-preview-card,
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-included-ingredients-head span,
    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-included-ingredient-lock {
        display: none !important;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-decorative-selector-trigger {
        min-height: 60px;
        padding: 0.7rem 0.78rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-decorative-selector-copy {
        gap: 0.08rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-category-tabs-panel {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        align-items: start;
        gap: 0.28rem;
        overflow: visible;
        padding-top: 0.18rem;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-tabs-nav {
        display: inline-flex !important;
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        padding: 0;
        align-items: center;
        justify-content: center;
        align-self: start;
        margin-top: 0.22rem;
        border-radius: 999px;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-category-tabs {
        min-width: 0;
        width: 100%;
        gap: 0.32rem;
        padding: 0.14rem 0 0.42rem;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-category-tab {
        flex: 0 0 72px;
        min-width: 72px;
        max-width: 82px;
        min-height: 58px;
        padding: 0.42rem 0.28rem 0.38rem;
        justify-content: flex-start;
        overflow: visible;
        scroll-snap-align: start;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-category-tab-label {
        min-height: 1.95em;
        line-height: 1.02;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .bmb-approved-dashboard[data-bmb-mobile-tab-rail-polish="1.1.193"] .bmb-category-tab-count {
        top: -0.1rem;
        right: -0.04rem;
    }
}

/* 1.1.195 — Setup Collapse / Builder Handoff Prototype.
   Collapses completed setup into a compact summary after a user loads a starter. */
.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-card[hidden] {
    display: none !important;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 0.92rem 1rem;
    border: 1px solid rgba(255, 138, 0, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff8ed 0%, #fffdf9 100%);
    box-shadow: 0 8px 24px rgba(74, 45, 18, 0.055);
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-main {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-kicker {
    color: rgba(35, 24, 15, 0.58);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
    min-width: 0;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-pill {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.54rem 0.62rem;
    border: 1px solid rgba(111, 78, 55, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-pill small {
    color: rgba(35, 24, 15, 0.54);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-pill strong {
    min-width: 0;
    color: #21160d;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit,
.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:hover,
.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:focus,
.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.62rem 0.86rem;
    border: 1px solid rgba(255, 106, 0, 0.36);
    border-radius: 999px;
    background: #fff;
    color: #d65b00;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(74, 45, 18, 0.055);
}

.bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:focus-visible {
    outline: 2px solid #ff8a00;
    outline-offset: 3px;
}

.bmb-guided-shell[data-bmb-setup-flow-state="collapsed"] .bmb-calculator-step {
    border-color: rgba(255, 138, 0, 0.24);
    box-shadow: 0 10px 30px rgba(74, 45, 18, 0.07);
}

@media (max-width: 760px) {
    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.82rem;
    }

    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-values {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.36rem;
    }

    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-pill {
        grid-template-columns: 4.6rem minmax(0, 1fr);
        align-items: center;
        padding: 0.5rem 0.58rem;
    }

    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit,
    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:hover,
    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:focus,
    .bmb-approved-dashboard[data-bmb-setup-collapse-prototype="1.1.195"] .bmb-setup-summary-edit:active {
        width: 100%;
    }
}

/* 1.1.214 — Progress handoff / builder reveal UX. */
.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-card[hidden] {
    display: none !important;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-card {
    display: grid;
    gap: 0.85rem;
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid rgba(220, 132, 38, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff8ed 0%, #ffffff 100%);
    box-shadow: 0 10px 28px rgba(74, 45, 18, 0.08);
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #fff0d8;
    border: 1px solid #ffd49a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    line-height: 1;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-copy {
    min-width: 0;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-copy strong {
    display: block;
    margin: 0 0 0.2rem;
    color: #2b2118;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-copy p {
    margin: 0;
    color: #6a5844;
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.38;
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-progress {
    position: relative;
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: rgba(111, 78, 55, 0.12);
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d65b00 0%, #ff9f1c 100%);
    transition: width 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"][data-bmb-flow-stage="handoff_loading"] .bmb-flow-chip[data-bmb-flow-chip="builder"] {
    border-color: #ffd199;
    background: #fff3df;
    color: #d65b00;
}

@media (max-width: 640px) {
    .bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-card {
        margin-bottom: 0.85rem;
        padding: 0.88rem;
        border-radius: 16px;
    }

    .bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-main {
        align-items: flex-start;
        gap: 0.68rem;
    }

    .bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-copy strong {
        font-size: 0.92rem;
    }

    .bmb-approved-dashboard[data-bmb-progress-handoff-builder-reveal="1.1.214"] .bmb-builder-handoff-copy p {
        font-size: 0.77rem;
    }
}

/* 1.1.220 — JS split prototype QA: keep builder chrome gated until Step 4 is visible.
   The result dock/desktop bowl panel lives beside the builder step in the approved
   dashboard shell, so the Step 4 hidden attribute alone cannot prevent early chrome
   leakage during setup-only and handoff states. */
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-builder-gated="true"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper,
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-flow-stage="setup"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper,
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-flow-stage="handoff_loading"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper,
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper[hidden],
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"] [data-bmb-builder-result-wrapper][hidden] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-builder-gated="false"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper:not([hidden]) {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* 1.1.240 — Rebased Unified Meal Dialog / Drawer Replacement
 * Base: 1.1.231 final optimization checkpoint.
 * The legacy desktop meal side panel stays default-off. The existing mobile
 * drawer content is presented as one shared modal dialog on every viewport.
 */
html.bmb-meal-dialog-scroll-locked,
body.bmb-meal-dialog-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard {
    position: relative;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard.bmb-meal-dialog-open-state::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 980;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(4px);
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard .bmb-desktop-nutrition-side-panel {
    display: none !important;
}

@media (min-width: 761px) {
    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] {
        max-width: min(100%, 1280px) !important;
    }

    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard {
        display: block !important;
        max-width: min(100%, 1180px) !important;
        padding-bottom: 8.75rem !important;
    }

    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-dashboard-main {
        width: min(100%, 980px) !important;
        max-width: 980px !important;
        margin: 0 auto !important;
    }
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper[hidden],
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-builder-gated="true"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper,
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-flow-stage="setup"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper,
.bmb-guided-shell[data-bmb-builder-chrome-guard="1.1.220"][data-bmb-flow-stage="handoff_loading"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper {
    display: none !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"][data-bmb-builder-gated="false"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper:not([hidden]),
.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"][data-bmb-flow-stage="builder"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper:not([hidden]) {
    display: block !important;
    position: fixed !important;
    z-index: 1010 !important;
    right: auto !important;
    top: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    width: min(calc(100vw - 1.5rem), 780px) !important;
    min-width: 0 !important;
    max-width: 780px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 0 max(0.75rem, env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
    transform: translateX(-50%) !important;
    pointer-events: none;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper > .bmb-mobile-summary {
    position: relative !important;
    z-index: 1020 !important;
    display: grid !important;
    pointer-events: auto;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper > .bmb-mobile-summary .bmb-bowl-toggle,
.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper > .bmb-mobile-summary .bmb-dock-reset {
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer[hidden] {
    display: none !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer:not([hidden]) {
    display: block !important;
    position: fixed !important;
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    z-index: 1015 !important;
    width: min(calc(100vw - 1.5rem), 780px) !important;
    min-width: 0 !important;
    max-width: 780px !important;
    max-height: min(78dvh, 760px) !important;
    margin: 0 !important;
    padding: 0.72rem 1rem 1.15rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 1px solid #f1dcc1 !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%) !important;
    box-shadow: 0 28px 80px rgba(40, 24, 10, 0.30) !important;
    transform: translate(-50%, -50%) !important;
    overscroll-behavior: contain !important;
    pointer-events: auto;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-mobile-drawer-handle {
    display: block !important;
    width: 42px !important;
    height: 4px !important;
    margin: 0 auto 0.8rem !important;
    border-radius: 999px !important;
    background: #d9cab8 !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-mobile-drawer-header {
    position: sticky !important;
    top: -0.72rem !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin: 0 -1rem 0.9rem !important;
    padding: 0.72rem 1rem 0.82rem !important;
    border-bottom: 1px solid rgba(239, 214, 184, 0.88) !important;
    background: rgba(255, 253, 248, 0.97) !important;
    backdrop-filter: blur(10px) !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-mobile-drawer-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border: 1px solid #ffbf7d !important;
    border-radius: 999px !important;
    background: #fff8ee !important;
    color: #e65100 !important;
    box-shadow: 0 6px 16px rgba(74, 45, 18, 0.08) !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-mobile-drawer-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.82rem !important;
    padding: 0 0 0.35rem !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-drawer-nutrition-panel,
.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-drawer-selected-panel,
.bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-desktop-side-actions {
    display: block !important;
}

@media (max-width: 760px) {
    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(calc(100vw - 1rem), 520px) !important;
        max-height: min(78dvh, calc(100dvh - 8.75rem)) !important;
        padding: 0.56rem 0.82rem max(1.5rem, env(safe-area-inset-bottom)) !important;
        border-radius: 22px !important;
    }

    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-mobile-bowl-drawer .bmb-mobile-drawer-header {
        top: -0.56rem !important;
        margin: 0 -0.82rem 0.72rem !important;
        padding: 0.6rem 0.82rem 0.7rem !important;
    }

    .bmb-guided-shell[data-bmb-unified-meal-dialog="1.1.240"] .bmb-approved-dashboard > .bmb-mobile-result-wrapper:not([hidden]) {
        width: min(calc(100vw - 0.5rem), 680px) !important;
        padding-bottom: max(0.55rem, env(safe-area-inset-bottom)) !important;
    }
}

/* 1.1.241 — Centered Meal Dialog / Bottom Dock Separation
 * Keep the shared mobile drawer content, but present it as a normal centered
 * modal dialog on every viewport. While the dialog is open, hide the bottom
 * dock so it does not attach to or overlap the dialog body.
 */
.bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(17, 24, 39, 0.44);
    backdrop-filter: blur(5px);
}

.bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state > .bmb-mobile-result-wrapper:not([hidden]) {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1030 !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    transform: none !important;
    pointer-events: none !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state > .bmb-mobile-result-wrapper > .bmb-mobile-summary {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state .bmb-mobile-bowl-drawer:not([hidden]) {
    display: block !important;
    position: fixed !important;
    inset: auto !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    z-index: 1040 !important;
    width: min(calc(100vw - 2rem), 820px) !important;
    min-width: 0 !important;
    max-width: 820px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(84dvh, 760px) !important;
    margin: 0 !important;
    padding: 0.72rem 1rem 1.15rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: 1px solid #f1dcc1 !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8ee 100%) !important;
    box-shadow: 0 28px 90px rgba(40, 24, 10, 0.32) !important;
    transform: translate(-50%, -50%) !important;
    overscroll-behavior: contain !important;
    pointer-events: auto !important;
}

.bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state .bmb-mobile-bowl-drawer .bmb-mobile-drawer-header {
    position: sticky !important;
    top: -0.72rem !important;
    z-index: 3 !important;
}

@media (max-width: 760px) {
    .bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state > .bmb-mobile-result-wrapper:not([hidden]) {
        padding: max(0.7rem, env(safe-area-inset-top)) 0.7rem max(0.7rem, env(safe-area-inset-bottom)) !important;
    }

    .bmb-guided-shell[data-bmb-unified-meal-dialog-centered="1.1.241"] .bmb-approved-dashboard.bmb-meal-dialog-open-state .bmb-mobile-bowl-drawer:not([hidden]) {
        width: min(calc(100vw - 1rem), 560px) !important;
        max-height: min(84dvh, calc(100dvh - 1.4rem)) !important;
        padding: 0.56rem 0.82rem max(1rem, env(safe-area-inset-bottom)) !important;
        border-radius: 22px !important;
    }
}

/* 1.1.247 — Section tab count icon / hover clearance.
 * Replace the floating selected-count badge with an in-icon count state so section
 * counts no longer clip against the top/right of the horizontal tab rail. Category
 * tabs also stop using the global hover lift; the rail gets a little breathing room
 * for focus/hover shadows without moving the controls upward.
 */
.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs-panel,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs-panel {
    overflow: visible;
    padding-top: 0.16rem;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs {
    gap: 0.46rem;
    padding: 0.22rem 0.42rem 0.66rem !important;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab {
    overflow: visible;
    transform: none !important;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab:hover:not(:disabled),
.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab:focus:not(:disabled),
.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-tab-active:hover:not(:disabled),
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab:hover:not(:disabled),
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab:focus:not(:disabled),
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-tab-active:hover:not(:disabled) {
    transform: none !important;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-count,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-count {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    line-height: 1;
    margin-bottom: 0.04rem;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
    min-width: 2.14rem;
    height: 2.14rem;
    padding: 0 0.48rem;
    border: 1px solid color-mix(in srgb, var(--bmb-ui-orange, #ff6a00) 34%, #ffffff 66%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bmb-ui-orange, #ff6a00) 14%, #ffffff 86%);
    color: var(--bmb-ui-orange-pressed, #e85b00) !important;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bmb-ui-orange, #ff6a00) 10%, #ffffff 90%);
}

@media (max-width: 760px) {
    .bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs,
    .bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tabs {
        gap: 0.38rem;
        padding: 0.2rem 0.34rem 0.58rem !important;
    }

    .bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
    .bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
        min-width: 1.82rem;
        height: 1.82rem;
        padding: 0 0.38rem;
        font-size: 0.98rem;
    }
}

/* 1.1.248 — Section tab count portion-chip polish.
 * Keep the 1.1.247 count-in-icon behavior, but make selected section counts use
 * the same visual language as ingredient portion controls: a true circular,
 * filled primary chip with white type, soft depth, and no vertical hover motion.
 */
.bmb-guided-shell[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
    box-sizing: border-box;
    width: 2.2rem;
    min-width: 2.2rem;
    height: 2.2rem;
    min-height: 2.2rem;
    padding: 0;
    border: 1px solid var(--bmb-ui-orange, #ff6a00);
    border-radius: 50%;
    background: linear-gradient(180deg, #ff8a00 0%, #ff5c00 100%);
    color: #fff !important;
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(89, 35, 0, 0.2);
    box-shadow: 0 6px 14px rgba(255, 106, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bmb-guided-shell[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection:hover:not(:disabled) .bmb-category-tab-icon,
.bmb-guided-shell[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection:focus-visible .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection:hover:not(:disabled) .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection:focus-visible .bmb-category-tab-icon {
    filter: saturate(1.05) brightness(1.025);
}

@media (max-width: 760px) {
    .bmb-guided-shell[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
    .bmb-calculator[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
        width: 1.94rem;
        min-width: 1.94rem;
        height: 1.94rem;
        min-height: 1.94rem;
        padding: 0;
        font-size: 0.98rem;
        box-shadow: 0 5px 11px rgba(255, 106, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }
}
