/**
 * BuildMyBowl setup-shell CSS real extraction phase 1.
 *
 * 1.1.201 moves a safe above-the-fold setup subset into this future shell
 * stylesheet while the dry-run filter remains default-off. When enabled,
 * public/setup-shell.css loads before public/calculator.css, and calculator.css
 * remains the compatibility fallback/authority for the full builder.
 *
 * Ownership: setup frame, intro/header, source/version card, flow rail,
 * Steps 1–3 controls, starter rows, and setup completion summary.
 * Not included yet: ingredient tabs, ingredient rows, drawers, receipts,
 * comparison, swaps, saved builds, or builder deferral.
 *
 * 1.1.204 visual regression fix: backs out the high-specificity 1.1.203
 * starter/summary runtime selectors because they overrode later accepted
 * calculator.css starter-row selected-state rules in the dry-run path.
 *
 * 1.1.205 visual parity QA: no runtime declarations changed from the
 * parity-restored 1.1.204 shell. Starter/summary selectors are locked;
 * setup-only duplicate selectors are candidates only until browser proof.
 */

/* Shared setup shell frame. */
.bmb-guided-shell,
.bmb-guided-shell * {
    box-sizing: border-box;
}

.bmb-guided-shell {
    width: min(100%, 1180px) !important;
    max-width: 1180px !important;
    margin: 0 auto 2rem !important;
    color: #2d2d2d;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bmb-experience-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #f1e4d2;
    border-radius: 20px;
    background: linear-gradient(135deg, #fffdf8 0%, #fff6ea 100%);
    box-shadow: 0 8px 28px rgba(74, 45, 18, 0.06);
}

.bmb-experience-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 2px solid #ffd199;
    border-radius: 999px;
    background: #fff7ed;
    font-size: 1.7rem;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.75);
}

.bmb-experience-title-block h2,
.bmb-experience-title-block p,
.bmb-step-head h3,
.bmb-step-head p {
    margin: 0;
}

.bmb-experience-title-block h2 {
    color: #21160d;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.bmb-experience-title-block h2::first-letter {
    color: #21160d;
}

.bmb-experience-title-block p {
    margin-top: 0.35rem;
    color: #6f6254;
    font-size: 0.98rem;
    line-height: 1.45;
}

.bmb-source-history-panel,
.bmb-source-transparency-note.bmb-source-history-panel {
    display: grid;
    gap: 0.58rem;
    align-items: stretch;
    justify-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);
    text-align: left;
}

.bmb-source-history-panel * {
    text-align: left;
}

.bmb-source-transparency-note.bmb-source-history-panel {
    margin: -0.35rem 0 1rem;
    padding: 0.78rem 0.92rem;
}

.bmb-source-history-summary {
    max-width: 100%;
    color: #6f5d4c;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.42;
}

.bmb-source-history-summary strong,
.bmb-source-history-copy strong {
    color: #2e2116;
    font-weight: 920;
}

.bmb-source-history-details {
    width: 100%;
}

.bmb-source-history-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.36rem;
    width: fit-content;
    max-width: 100%;
    cursor: pointer;
    color: #d96300;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
}

.bmb-source-history-details summary::-webkit-details-marker {
    color: #d96300;
}

.bmb-source-history-copy {
    display: grid;
    gap: 0.78rem;
    justify-items: stretch;
    margin-top: 0.72rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(236, 217, 194, 0.9);
    color: #6f5d4c;
    font-size: 0.8rem;
    line-height: 1.45;
}

.bmb-source-history-copy section {
    display: grid;
    gap: 0.34rem;
    justify-items: stretch;
}

.bmb-source-history-copy h4,
.bmb-source-history-copy p,
.bmb-source-history-copy ul,
.bmb-source-history-copy li {
    margin: 0;
}

.bmb-source-history-copy h4 {
    color: #2d1e12;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.2;
}

.bmb-source-history-copy ul {
    display: grid;
    gap: 0.28rem;
    margin-left: 0;
    padding-left: 1.15rem;
    list-style-position: outside;
}

.bmb-source-history-copy li {
    padding-left: 0.1rem;
}

.bmb-source-history-footnote {
    padding: 0.66rem 0.74rem;
    border: 1px solid rgba(236, 217, 194, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
    color: #725b47;
}

.bmb-guided-flow-rail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid rgba(92, 45, 18, 0.12);
    border-radius: 18px;
    background: #fffaf2;
    color: #6d5037;
}

.bmb-guided-flow-rail .bmb-flow-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(92, 45, 18, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #4a2a18;
    font-size: 0.8rem;
    font-weight: 850;
}

.bmb-guided-flow-rail .bmb-flow-chip strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 999px;
    background: #5c2d12;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
}

.bmb-guided-flow-rail .bmb-flow-arrow {
    color: #b68a65;
    font-weight: 900;
}

.bmb-experience-step {
    margin: 0 0 1rem;
    padding: 1.15rem;
    border: 1px solid #f1e4d2;
    border-radius: 20px;
    background: #fffdf9;
    box-shadow: 0 8px 28px rgba(74, 45, 18, 0.055);
}

.bmb-step-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin: 0 0 1rem;
}

.bmb-step-head-inline {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bmb-step-head-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.bmb-step-number {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff8a00 0%, #e65100 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(230, 81, 0, 0.18);
}

.bmb-step-head h3 {
    color: #21160d;
    font-size: clamp(1.25rem, 2vw, 1.58rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.18;
}

.bmb-step-head p {
    margin-top: 0.25rem;
    color: #6f6254;
    font-size: 0.92rem;
    line-height: 1.45;
}

/* Step 1: meal type selection. */
.bmb-meal-type-step {
    border-color: rgba(92, 45, 18, 0.18);
}

.bmb-meal-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.bmb-meal-type-card {
    appearance: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 82px;
    padding: 13px 14px;
    border: 1px solid rgba(92, 45, 18, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ec 100%);
    color: #26170d;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(64, 32, 8, 0.06);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.bmb-meal-type-card:hover,
.bmb-meal-type-card:focus-visible {
    border-color: rgba(92, 45, 18, 0.5);
    box-shadow: 0 16px 30px rgba(64, 32, 8, 0.1);
    transform: translateY(-1px);
}

.bmb-meal-type-card.bmb-meal-type-active {
    border-color: #5c2d12;
    background: linear-gradient(180deg, #fff8ef 0%, #fff0dd 100%);
    box-shadow: 0 16px 34px rgba(92, 45, 18, 0.14);
}

.bmb-meal-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(92, 45, 18, 0.16);
    border-radius: 14px;
    background: #fff4e4;
    font-size: 20px;
}

.bmb-meal-type-copy {
    display: grid;
    gap: 5px;
}

.bmb-meal-type-copy strong {
    font-size: 0.98rem;
    line-height: 1.1;
}

.bmb-meal-type-copy small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #7a5737;
    font-size: 0.8rem;
    line-height: 1.35;
}

.bmb-meal-type-preview-card {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px dashed rgba(92, 45, 18, 0.24);
    border-radius: 16px;
    background: #f8efe4;
    color: #4a2a18;
}

.bmb-meal-type-preview-card p {
    margin: 4px 0 0;
    color: #6d5037;
}

/* Step 2: goal coach. */
.bmb-goal-coach-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    gap: 1rem;
    align-items: stretch;
}

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

.bmb-goal-chip,
.bmb-goal-chip:hover,
.bmb-goal-chip:focus,
.bmb-goal-chip:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 46px;
    padding: 0.62rem 0.8rem;
    border: 1px solid #ead8c1;
    border-radius: 12px;
    background: #fff;
    color: #3d342c;
    box-shadow: none;
    cursor: pointer !important;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

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

.bmb-goal-chip span[aria-hidden="true"] {
    flex: 0 0 auto;
}

.bmb-goal-chip-active,
.bmb-goal-chip-active:hover,
.bmb-goal-chip-active:focus,
.bmb-goal-chip-active:active {
    border-color: #ff8a00;
    background: #fff4e6;
    color: #e65100;
    box-shadow: 0 0 0 1px rgba(255, 138, 0, 0.12);
}

.bmb-goal-preview-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid #f4d7ae;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff8ed 0%, #fffdf8 100%);
}

.bmb-goal-preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(74, 45, 18, 0.09);
    font-size: 1.55rem;
}

.bmb-goal-preview-card strong {
    display: block;
    color: #21160d;
    font-size: 1.03rem;
    font-weight: 900;
    line-height: 1.2;
}

.bmb-goal-preview-card p {
    margin: 0.35rem 0 0;
    color: #725f4c;
    font-size: 0.86rem;
    line-height: 1.45;
}

.bmb-goal-match-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid #ffd8a6;
    border-radius: 999px;
    background: #fff7ed;
    color: #d65b00;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

/* Step 3: starter row list and starter cards. */
.bmb-presets-step .bmb-presets-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 0.8rem 0 0;
    align-items: stretch;
}

.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-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);
    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);
}

.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-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 {
    appearance: none;
    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;
}

.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,
.bmb-presets-container[data-bmb-starter-row-list-ui="1.1.160"] .bmb-preset-card.bmb-starter-row[data-bmb-starter-row-active="true"] {
    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 {
    max-width: 58ch;
    color: rgba(35, 24, 15, 0.7);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.35;
}

.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-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-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-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: #fff;
    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-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;
}

/* Setup completion / handoff summary. */
.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-guided-flow-rail {
    margin-bottom: 0.72rem;
}

@media (min-width: 760px) {
    .bmb-experience-header {
        grid-template-columns: auto minmax(0, 1fr) minmax(320px, 0.72fr);
    }

    .bmb-source-history-copy {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-source-history-footnote {
        grid-column: 1 / -1;
    }
}

@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: 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: 760px) {
    .bmb-guided-shell {
        width: min(100%, 680px) !important;
    }

    .bmb-experience-header,
    .bmb-experience-step {
        border-radius: 18px;
        padding: 0.95rem;
    }

    .bmb-source-transparency-note.bmb-source-history-panel {
        padding: 0.7rem 0.78rem;
        border-radius: 14px;
    }

    .bmb-source-history-summary,
    .bmb-source-history-details summary,
    .bmb-source-history-copy {
        font-size: 0.76rem;
    }

    .bmb-goal-coach-grid {
        grid-template-columns: 1fr;
    }

    .bmb-goal-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmb-step-head-inline {
        align-items: flex-start;
        flex-direction: column;
    }

    .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%;
    }
}

@media (max-width: 640px) {
    .bmb-guided-flow-rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        padding: 9px;
    }

    .bmb-guided-flow-rail .bmb-flow-chip {
        white-space: nowrap;
    }

    .bmb-guided-flow-rail .bmb-flow-arrow {
        flex: 0 0 auto;
    }

    .bmb-meal-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .bmb-meal-type-card {
        align-items: center;
        min-height: 78px;
        padding: 11px;
    }

    .bmb-meal-type-copy small {
        display: none;
    }
}

@media (max-width: 520px) {
    .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;
    }
}

@media (max-width: 420px) {
    .bmb-goal-options {
        grid-template-columns: 1fr;
    }

    .bmb-goal-chip,
    .bmb-goal-chip:hover,
    .bmb-goal-chip:focus,
    .bmb-goal-chip:active {
        min-height: 42px;
        justify-content: flex-start;
        padding-left: 0.85rem;
        text-align: left;
    }

    .bmb-step-head,
    .bmb-step-head-main {
        gap: 0.65rem;
    }

    .bmb-step-number {
        width: 30px;
        height: 30px;
        font-size: 0.92rem;
    }
}

@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.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 — Early setup-shell guard for builder chrome before fallback CSS arrives. */
.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;
}
