/* --------------------------------------------------------------------------
   Meal plans
   -------------------------------------------------------------------------- */

.br-meal-plan-page,
.br-meal-plan-editor-page {
    width: min(1320px, calc(100% - 32px));
    margin: 26px auto 56px;
}

.br-meal-plan-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 26px;
    border: 1px solid #e2dcc8;
    border-radius: 18px;
    background: #f8f4e8;
}

.br-meal-plan-hero h1,
.br-meal-plan-editor-heading h1 {
    margin: 5px 0 5px;
    color: #103f31;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 800;
    line-height: 1.05;
}

.br-meal-plan-hero p,
.br-meal-plan-editor-heading p {
    max-width: 760px;
    margin: 0;
    color: #5e6d65;
}

.br-meal-plan-toolbar {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
}

.br-meal-plan-week-label {
    text-align: center;
}

.br-meal-plan-week-label span {
    display: block;
    margin-bottom: 2px;
    color: #718078;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.br-meal-plan-week-label strong {
    color: #153f32;
    font-size: 1.08rem;
}

.br-meal-plan-week-button {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #d9dfd8;
    border-radius: 13px;
    background: #fff;
    color: #153f32;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.br-meal-plan-week-button:hover {
    border-color: #153f32;
    background: #f4f7f3;
    color: #153f32;
    transform: translateY(-1px);
}

.br-meal-plan-add-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #dfe4dc;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(29 56 47 / 5%);
}

.br-meal-plan-add-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.br-meal-plan-add-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #edf4e8;
    color: #1d6a4e;
}

.br-meal-plan-add-heading h2 {
    margin: 0 0 2px;
    color: #173f33;
    font-size: 1.1rem;
    font-weight: 800;
}

.br-meal-plan-add-heading p,
.br-meal-plan-no-recipes p {
    margin: 0;
    color: #6b7771;
    font-size: .91rem;
}

.br-meal-plan-add-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(150px, .65fr) minmax(135px, .55fr) minmax(230px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.br-meal-plan-add-form .br-field-group {
    min-width: 0;
}

.br-meal-plan-add-form label,
.br-meal-plan-editor-card label {
    display: block;
    margin-bottom: 6px;
    color: #2f4c42;
    font-size: .78rem;
    font-weight: 800;
}

.br-meal-plan-add-form label span,
.br-meal-plan-editor-card label span {
    color: #819087;
    font-weight: 600;
}

.br-meal-plan-add-form .form-control,
.br-meal-plan-add-form .form-select,
.br-meal-plan-editor-card .form-control,
.br-meal-plan-editor-card .form-select {
    min-height: 44px;
    border-color: #d5ddd7;
    border-radius: 11px;
}

.br-meal-plan-add-button {
    min-height: 44px;
    white-space: nowrap;
}

.br-meal-plan-no-recipes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 4px;
}

.br-meal-plan-no-recipes > div {
    display: flex;
    gap: 9px;
}

.br-meal-plan-days {
    display: grid;
    gap: 14px;
}

.br-meal-plan-day {
    overflow: hidden;
    border: 1px solid #dfe4dc;
    border-radius: 18px;
    background: #fff;
}

.br-meal-plan-day.is-today {
    border-color: #9ebba1;
    box-shadow: 0 0 0 2px rgb(119 157 112 / 10%);
}

.br-meal-plan-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #edf0ec;
    background: #fbfaf5;
}

.br-meal-plan-day-header span:first-child {
    display: block;
    margin-bottom: 1px;
    color: #718078;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .11em;
}

.br-meal-plan-day-header h2 {
    margin: 0;
    color: #153f32;
    font-size: 1.22rem;
    font-weight: 800;
}

.br-meal-plan-today {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf3df;
    color: #356326 !important;
    font-size: .72rem !important;
    font-weight: 800;
    letter-spacing: 0 !important;
}

.br-meal-plan-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.br-meal-plan-slot {
    min-width: 0;
    padding: 14px;
    border-right: 1px solid #edf0ec;
}

.br-meal-plan-slot:last-child {
    border-right: 0;
}

.br-meal-plan-slot-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #567064;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.br-meal-plan-slot-label i {
    width: 17px;
    color: #d8792c;
    text-align: center;
}

.br-meal-plan-slot-content {
    display: grid;
    gap: 9px;
}

.br-meal-plan-empty-slot {
    display: block;
    padding: 16px 8px;
    border: 1px dashed #dfe4dc;
    border-radius: 12px;
    color: #98a29c;
    font-size: .82rem;
    text-align: center;
}

.br-meal-plan-entry {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 9px;
    border: 1px solid #e4e8e3;
    border-radius: 13px;
    background: #fff;
}

.br-meal-plan-entry-photo {
    display: block;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f3ed;
}

.br-meal-plan-entry-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.br-meal-plan-entry-body {
    min-width: 0;
}

.br-meal-plan-entry-body h3 {
    margin: 1px 0 3px;
    font-size: .93rem;
    font-weight: 800;
    line-height: 1.22;
}

.br-meal-plan-entry-body h3 a {
    color: #173f33;
    text-decoration: none;
}

.br-meal-plan-entry-body h3 a:hover {
    color: #d56f27;
}

.br-meal-plan-entry-time {
    display: block;
    margin-bottom: 3px;
    color: #7b8982;
    font-size: .72rem;
}

.br-meal-plan-entry-body p {
    margin: 4px 0 0;
    color: #65736c;
    font-size: .76rem;
    line-height: 1.35;
}

.br-meal-plan-entry-actions {
    display: flex;
    gap: 4px;
}

.br-icon-button {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #f1f4f1;
    color: #52645b;
    font-size: .76rem;
    text-decoration: none;
}

.br-icon-button:hover {
    background: #e5ece7;
    color: #153f32;
}

.br-icon-button-danger {
    background: #fff4f1;
    color: #b14436;
}

.br-icon-button-danger:hover {
    background: #fbe9e6;
    color: #a43b30;
}

.br-meal-plan-editor-page {
    max-width: 840px;
}

.br-meal-plan-editor-card {
    margin-top: 14px;
    padding: 26px;
    border: 1px solid #dfe4dc;
    border-radius: 18px;
    background: #fff;
}

.br-meal-plan-editor-heading {
    margin-bottom: 22px;
}

.br-meal-plan-editor-heading h1 {
    font-size: 2rem;
}

.br-meal-plan-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 1180px) {
    .br-meal-plan-add-form {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .br-meal-plan-notes-field {
        grid-column: span 2;
    }

    .br-meal-plan-add-button {
        width: 100%;
    }

    .br-meal-plan-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-meal-plan-slot:nth-child(2) {
        border-right: 0;
    }

    .br-meal-plan-slot:nth-child(-n+2) {
        border-bottom: 1px solid #edf0ec;
    }
}

@media (max-width: 720px) {
    .br-meal-plan-page,
    .br-meal-plan-editor-page {
        width: min(100% - 20px, 1320px);
        margin-top: 14px;
    }

    .br-meal-plan-hero {
        flex-direction: column;
        padding: 20px;
    }

    .br-meal-plan-hero > .btn {
        width: 100%;
    }

    .br-meal-plan-add-form,
    .br-meal-plan-edit-row {
        grid-template-columns: 1fr;
    }

    .br-meal-plan-notes-field {
        grid-column: auto;
    }

    .br-meal-plan-no-recipes {
        align-items: stretch;
        flex-direction: column;
    }

    .br-meal-plan-no-recipes > div {
        display: grid;
    }

    .br-meal-plan-slots {
        grid-template-columns: 1fr;
    }

    .br-meal-plan-slot,
    .br-meal-plan-slot:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #edf0ec;
    }

    .br-meal-plan-slot:last-child {
        border-bottom: 0;
    }

    .br-meal-plan-entry {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .br-meal-plan-entry-photo {
        width: 48px;
        height: 48px;
    }

    .br-meal-plan-entry-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .br-meal-plan-editor-card {
        padding: 20px;
    }
}

/* Step 38 - Shopping list */
.br-shopping-page {
    width: min(1320px, calc(100% - 32px));
    margin: 26px auto 56px;
}

.br-shopping-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 26px;
    border: 1px solid #e2dcc8;
    border-radius: 18px;
    background: #fffdf8;
}

.br-shopping-hero h1 {
    margin: 5px 0 5px;
    color: #103f31;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 800;
    line-height: 1.05;
}

.br-shopping-hero p {
    max-width: 760px;
    margin: 0;
    color: #5e6d65;
}

.br-shopping-hero-actions,
.br-meal-plan-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}


.br-meal-plan-mobile-actions {
    display: none;
}

.br-meal-plan-shared-with-me {
    position: relative;
}

.br-meal-plan-share-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 3px;
    padding: 0 6px;
    color: #fff;
    background: var(--br-orange);
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 900;
    line-height: 1;
}

.br-shopping-weekbar {
    display: grid;
    grid-template-columns: 46px 1fr 46px auto;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
}

.br-shopping-week-button {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #d9dfd8;
    border-radius: 13px;
    background: #fff;
    color: #153f32;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.br-shopping-week-button:hover {
    border-color: #b8c9bf;
    background: #f7faf8;
    color: #103f31;
    transform: translateY(-1px);
}

.br-shopping-week-title {
    text-align: center;
}

.br-shopping-week-title span {
    display: block;
    margin-bottom: 2px;
    color: #718078;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.br-shopping-week-title strong {
    color: #153f32;
    font-size: 1.08rem;
}

.br-shopping-current-week {
    white-space: nowrap;
}

.br-shopping-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.br-shopping-summary > div {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 82px;
    padding: 16px 18px;
    border: 1px solid #e0e6e1;
    border-radius: 16px;
    background: #fff;
}

.br-shopping-summary-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    background: #eef5ef;
    color: #1b654f;
}

.br-shopping-summary strong,
.br-shopping-summary span:not(.br-shopping-summary-icon) {
    display: block;
}

.br-shopping-summary strong {
    color: #143f32;
    font-size: 1.28rem;
    line-height: 1;
}

.br-shopping-summary div > div > span {
    margin-top: 4px;
    color: #718078;
    font-size: .83rem;
}

.br-shopping-add-card,
.br-shopping-list-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #e0e6e1;
    border-radius: 18px;
    background: #fff;
}

.br-shopping-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.br-shopping-section-heading h2 {
    margin: 2px 0 0;
    color: #153f32;
    font-size: 1.32rem;
    font-weight: 800;
}

.br-shopping-add-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) 110px 130px minmax(200px, 1.2fr) auto;
    align-items: end;
    gap: 12px;
}

.br-shopping-add-form .br-field-group {
    margin: 0;
}

.br-shopping-add-form label {
    margin-bottom: 6px;
    color: #31483f;
    font-size: .78rem;
    font-weight: 800;
}

.br-shopping-add-form label span {
    color: #86948d;
    font-weight: 600;
}

.br-shopping-add-button {
    min-height: 42px;
    white-space: nowrap;
}

.br-shopping-list-heading {
    margin-bottom: 10px;
}

.br-shopping-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.br-shopping-unit-converter {
    margin: 0;
}


.br-shopping-items {
    overflow: hidden;
    border: 1px solid #e5eae6;
    border-radius: 15px;
}

.br-shopping-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px 14px;
    background: #fff;
}

.br-shopping-item + .br-shopping-item {
    border-top: 1px solid #edf0ed;
}

.br-shopping-item.is-checked {
    background: #f8faf8;
}

.br-shopping-item-leading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.br-shopping-toggle-form {
    margin: 0;
}

.br-shopping-check-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1b654f;
    font-size: 1.25rem;
}

.br-shopping-check-button:hover {
    background: #eef5ef;
}


.br-shopping-photo-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--br-border);
    border-radius: 10px;
    background: #fff;
    cursor: zoom-in;
}

.br-shopping-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.br-shopping-photo-thumb:hover,
.br-shopping-photo-thumb:focus-visible {
    border-color: var(--br-green-700);
    box-shadow: 0 0 0 3px rgba(15, 73, 57, 0.1);
}

.br-shopping-photo-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 1rem;
    background: var(--br-green-050);
}

.br-shopping-photo-modal-body img {
    display: block;
    max-width: 100%;
    max-height: min(72vh, 760px);
    object-fit: contain;
    border-radius: 12px;
}

.br-shopping-item-main {
    min-width: 0;
}

.br-shopping-item-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.br-shopping-item h3 {
    margin: 0;
    color: #203e34;
    font-size: 1rem;
    font-weight: 800;
}

.br-shopping-item.is-checked h3,
.br-shopping-item.is-checked .br-shopping-item-amount {
    color: #87938d;
    text-decoration: line-through;
}

.br-shopping-plan-badge,
.br-shopping-manual-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 800;
    line-height: 1;
}

.br-shopping-plan-badge {
    background: #edf5ef;
    color: #27644f;
}

.br-shopping-manual-badge {
    background: #fff2df;
    color: #9b5b15;
}

.br-shopping-item-amount {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 4px;
    color: #53645c;
    font-size: .88rem;
}

.br-shopping-item-amount strong {
    color: inherit;
    font-weight: 800;
}

.br-shopping-item p {
    margin: 4px 0 0;
    color: #74827b;
    font-size: .82rem;
}

.br-shopping-delete-button {
    justify-self: end;
}

.br-shopping-checked-section {
    margin-top: 20px;
}

.br-shopping-checked-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 4px;
    color: #75837c;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
}

.br-shopping-checked-heading strong {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #eef1ee;
    color: #5d6b64;
    font-size: .7rem;
    letter-spacing: 0;
}

.br-shopping-empty {
    padding: 48px 20px;
    text-align: center;
}

.br-shopping-empty-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    background: #eef5ef;
    color: #1b654f;
    font-size: 1.25rem;
}

.br-shopping-empty h3 {
    margin: 0 0 6px;
    color: #153f32;
    font-size: 1.12rem;
    font-weight: 800;
}

.br-shopping-empty p {
    margin: 0 auto 16px;
    color: #6d7a74;
}

@media (max-width: 1000px) {
    .br-shopping-add-form {
        grid-template-columns: minmax(0, 1.5fr) 100px 120px;
    }

    .br-shopping-notes-field {
        grid-column: 1 / 3;
    }

    .br-shopping-add-button {
        grid-column: 3;
    }
}

@media (max-width: 760px) {
    .br-shopping-page {
        width: min(100% - 20px, 1320px);
        margin-top: 14px;
    }

    .br-shopping-hero,
    .br-meal-plan-hero {
        flex-direction: column;
    }

    .br-shopping-hero-actions,
    .br-meal-plan-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .br-shopping-hero-actions .btn,
    .br-shopping-hero-actions form,
    .br-shopping-hero-actions form .btn,
    .br-meal-plan-hero-actions .btn {
        flex: 1 1 0;
    }

    .br-shopping-weekbar {
        grid-template-columns: 42px 1fr 42px;
    }

    .br-shopping-current-week {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .br-shopping-summary {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .br-shopping-summary > div {
        min-height: 70px;
    }

    .br-shopping-add-form {
        grid-template-columns: 1fr 1fr;
    }

    .br-shopping-name-field,
    .br-shopping-notes-field {
        grid-column: 1 / -1;
    }

    .br-shopping-add-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .br-shopping-list-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .br-shopping-list-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .br-shopping-hero,
    .br-shopping-add-card,
    .br-shopping-list-card {
        padding: 18px;
    }

    .br-shopping-add-form {
        grid-template-columns: 1fr;
    }

    .br-shopping-name-field,
    .br-shopping-quantity-field,
    .br-shopping-unit-field,
    .br-shopping-notes-field,
    .br-shopping-add-button {
        grid-column: 1;
    }

    .br-shopping-item {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding-inline: 10px;
    }

    .br-shopping-photo-thumb {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .br-shopping-plan-badge,
    .br-shopping-manual-badge {
        margin-top: 2px;
    }
}

/* Shopping list mobile cleanup */
@media (max-width: 620px) {
    .br-shopping-page {
        width: calc(100% - 12px);
        margin: 10px auto 32px;
    }

    .br-shopping-mode-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .br-shopping-mode-tabs .br-btn {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: .5rem .55rem;
        font-size: .78rem;
        white-space: nowrap;
    }

    .br-shopping-hero {
        gap: 12px;
        padding: 15px 16px;
        border-radius: 16px;
    }

    .br-shopping-hero h1 {
        margin-top: 3px;
        font-size: 1.65rem;
        line-height: 1.08;
    }

    .br-shopping-hero p {
        font-size: .84rem;
        line-height: 1.45;
    }

    .br-shopping-hero-actions {
        gap: 7px;
    }

    .br-shopping-hero-actions .btn,
    .br-shopping-hero-actions form .btn {
        min-height: 40px;
        padding: .5rem .65rem;
        font-size: .78rem;
    }

    .br-shopping-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin: 10px 0;
    }

    .br-shopping-summary > div {
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 5px;
        min-width: 0;
        min-height: 76px;
        padding: 8px 4px;
        text-align: center;
        border-radius: 13px;
    }

    .br-shopping-summary-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: .82rem;
    }

    .br-shopping-summary strong {
        font-size: 1.05rem;
    }

    .br-shopping-summary div > div > span {
        margin-top: 2px;
        font-size: .66rem;
        line-height: 1.1;
    }

    .br-shopping-add-card,
    .br-shopping-list-card {
        margin-bottom: 10px;
        padding: 14px;
        border-radius: 15px;
    }

    .br-shopping-section-heading {
        gap: 10px;
        margin-bottom: 10px;
    }

    .br-shopping-section-heading h2 {
        font-size: 1.14rem;
    }

    .br-shopping-add-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .br-shopping-name-field,
    .br-shopping-notes-field,
    .br-shopping-add-button {
        grid-column: 1 / -1;
    }

    .br-shopping-quantity-field {
        grid-column: 1;
    }

    .br-shopping-unit-field {
        grid-column: 2;
    }

    .br-shopping-add-form label {
        margin-bottom: 4px;
        font-size: .7rem;
    }

    .br-shopping-add-form .form-control {
        min-height: 40px;
        padding: .5rem .65rem;
        font-size: .86rem;
    }

    .br-shopping-add-button {
        min-height: 40px;
        margin-top: 1px;
        font-size: .8rem;
    }

    .br-shopping-list-heading {
        gap: 8px;
    }

    .br-shopping-list-actions {
        gap: 7px;
    }

    .br-shopping-empty {
        padding: 28px 12px;
    }
}

@media (max-width: 350px) {
    .br-shopping-add-form {
        grid-template-columns: 1fr;
    }

    .br-shopping-name-field,
    .br-shopping-quantity-field,
    .br-shopping-unit-field,
    .br-shopping-notes-field,
    .br-shopping-add-button {
        grid-column: 1;
    }

    .br-shopping-summary div > div > span {
        font-size: .62rem;
    }
}

/* Step 39 - Pantry */
.br-pantry-page {
    display: grid;
    gap: 22px;
}

.br-pantry-hero,
.br-pantry-add-card,
.br-pantry-list-card,
.br-pantry-edit-card {
    background: var(--br-surface, #fffdf7);
    border: 1px solid rgba(36, 61, 42, .12);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(35, 49, 38, .07);
    padding: 26px;
}

.br-pantry-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.br-pantry-hero h1,
.br-pantry-list-card h2,
.br-pantry-add-card h2,
.br-pantry-edit-card h1 {
    margin: 4px 0 8px;
}

.br-pantry-hero p {
    margin: 0;
    max-width: 720px;
}

.br-pantry-hero-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.br-pantry-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.br-pantry-summary a {
    display: flex;
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 16px 18px;
    border: 1px solid rgba(36, 61, 42, .12);
    border-radius: 18px;
    background: #fffdf7;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.br-pantry-summary a:hover,
.br-pantry-summary a.is-active {
    border-color: rgba(64, 111, 69, .45);
    box-shadow: 0 8px 22px rgba(35, 49, 38, .07);
    transform: translateY(-1px);
}

.br-pantry-summary strong {
    color: #24442d;
    font-size: 1.55rem;
    line-height: 1;
}

.br-pantry-summary span {
    color: #6d756d;
    font-size: .88rem;
}

.br-pantry-add-form,
.br-pantry-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(110px, .55fr) minmax(110px, .55fr);
    gap: 14px;
    align-items: end;
}

.br-pantry-wide {
    grid-column: span 2;
}

.br-pantry-add-button {
    min-height: 46px;
}

.br-pantry-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.br-pantry-search {
    display: flex;
    min-width: min(360px, 100%);
    border: 1px solid rgba(36, 61, 42, .16);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.br-pantry-search input {
    min-width: 0;
    flex: 1 1 auto;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.br-pantry-search button {
    width: 44px;
    border: 0;
    background: transparent;
    color: #31583a;
}

.br-pantry-grid {
    display: grid;
    gap: 10px;
}

.br-pantry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(36, 61, 42, .11);
    border-radius: 16px;
    background: #fff;
}

.br-pantry-item.is-low {
    border-color: rgba(205, 123, 31, .28);
}

.br-pantry-item.is-out {
    opacity: .7;
}

.br-pantry-item-main {
    min-width: 0;
    flex: 1 1 auto;
}

.br-pantry-item-title-row,
.br-pantry-badges,
.br-pantry-meta,
.br-pantry-item-actions,
.br-pantry-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.br-pantry-item-title-row h3 {
    margin: 0;
    font-size: 1.02rem;
}

.br-pantry-meta {
    margin-top: 5px;
    color: #70776f;
    font-size: .88rem;
}

.br-pantry-meta span + span::before {
    content: "•";
    margin-right: 8px;
    color: #a1a79f;
}

.br-pantry-badge,
.br-rd-pantry-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1;
}

.br-pantry-badge-low {
    background: #fff0d9;
    color: #99570d;
}

.br-pantry-badge-out,
.br-pantry-badge-expired {
    background: #f9e1dd;
    color: #9a3f35;
}

.br-pantry-badge-soon {
    background: #eef2d0;
    color: #65740d;
}

.br-rd-pantry-badge {
    background: #e8f1df;
    color: #3f692f;
}


.br-pantry-view-all {
    display: inline-flex;
    margin-top: 2px;
    color: #365f3e;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.br-pantry-view-all:hover {
    text-decoration: underline;
}

.br-pantry-status-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 4px;
}

.br-pantry-status-label {
    color: #697269;
    font-size: .78rem;
    font-weight: 700;
}

.br-pantry-status-options {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(36, 61, 42, .18);
    border-radius: 10px;
    background: #fff;
}

.br-pantry-status-options form {
    display: flex;
}

.br-pantry-status-options form + form {
    border-left: 1px solid rgba(36, 61, 42, .14);
}

.br-pantry-status-btn {
    min-height: 36px;
    border: 0;
    padding: 7px 11px;
    background: transparent;
    color: #536056;
    font-size: .79rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.br-pantry-status-btn:hover {
    background: #f3f5ef;
}

.br-pantry-status-ok.is-active {
    background: #e6f0e0;
    color: #315d35;
    box-shadow: inset 0 0 0 1px rgba(49, 93, 53, .12);
}

.br-pantry-status-low.is-active {
    background: #fff0d9;
    color: #99570d;
    box-shadow: inset 0 0 0 1px rgba(153, 87, 13, .10);
}

.br-pantry-status-out.is-active {
    background: #f9e1dd;
    color: #9a3f35;
    box-shadow: inset 0 0 0 1px rgba(154, 63, 53, .10);
}

.br-pantry-item-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.br-pantry-item-actions form {
    margin: 0;
}

.br-pantry-item-actions .btn {
    min-height: 38px;
}

.br-pantry-empty {
    padding: 42px 20px;
    text-align: center;
    color: #727a71;
}

.br-pantry-empty > i {
    margin-bottom: 12px;
    color: #58795b;
    font-size: 2rem;
}

.br-pantry-empty h3 {
    margin: 0 0 6px;
    color: #2c4431;
}

.br-pantry-empty p {
    margin: 0;
}

.br-pantry-edit-card {
    max-width: 820px;
    margin: 0 auto;
}

.br-pantry-edit-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 6px;
}

.br-shopping-pantry-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    color: #556257;
    font-size: .84rem;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.br-shopping-pantry-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.br-shopping-pantry-switch-track {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: #d8dedb;
    box-shadow: inset 0 0 0 1px rgba(15, 73, 57, .08);
    transition: background-color .16s ease, box-shadow .16s ease;
}

.br-shopping-pantry-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform .16s ease;
}

.br-shopping-pantry-switch input:checked + .br-shopping-pantry-switch-track {
    background: #126247;
    box-shadow: inset 0 0 0 1px rgba(5, 60, 43, .08);
}

.br-shopping-pantry-switch input:checked + .br-shopping-pantry-switch-track .br-shopping-pantry-switch-thumb {
    transform: translateX(18px);
}

.br-shopping-pantry-switch input:focus-visible + .br-shopping-pantry-switch-track {
    outline: 3px solid rgba(18, 98, 71, .2);
    outline-offset: 2px;
}

.br-shopping-pantry-switch-text {
    line-height: 1.15;
}

@media (max-width: 900px) {
    .br-pantry-summary {
        grid-template-columns: 1fr 1fr;
    }

    .br-pantry-add-form,
    .br-pantry-edit-form {
        grid-template-columns: 1fr 1fr;
    }

    .br-pantry-wide {
        grid-column: 1 / -1;
    }

    .br-pantry-add-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .br-pantry-hero,
    .br-pantry-toolbar,
    .br-pantry-item {
        align-items: stretch;
        flex-direction: column;
    }

    .br-pantry-hero-actions,
    .br-pantry-hero-actions .btn,
    .br-pantry-search {
        width: 100%;
    }

    .br-pantry-item-actions {
        justify-content: flex-start;
    }

    .br-pantry-status-control {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .br-pantry-status-options {
        width: 100%;
    }

    .br-pantry-status-options form {
        flex: 1 1 0;
    }

    .br-pantry-status-btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .br-pantry-hero,
    .br-pantry-add-card,
    .br-pantry-list-card,
    .br-pantry-edit-card {
        padding: 18px;
    }

    .br-pantry-summary,
    .br-pantry-add-form,
    .br-pantry-edit-form {
        grid-template-columns: 1fr;
    }

    .br-pantry-wide,
    .br-pantry-add-button {
        grid-column: 1;
    }
}

/* Step 39B - shared meal plans and shopping lists */
.br-sharing-page{max-width:1180px;margin:0 auto;padding:2rem 1rem 4rem}.br-sharing-hero,.br-sharing-card{background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:18px;box-shadow:0 10px 28px rgba(30,46,39,.06)}.br-sharing-hero{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.5rem 1.75rem;margin-bottom:1rem}.br-sharing-hero h1{margin:.2rem 0 .35rem}.br-sharing-hero p{margin:0;color:#6b746f}.br-sharing-card{padding:1.4rem 1.5rem;margin-top:1rem}.br-sharing-card h2{font-size:1.1rem;margin:0 0 1rem}.br-sharing-search{display:flex;gap:.65rem}.br-sharing-search .form-control{min-width:0}.br-sharing-results,.br-sharing-current-list{margin-top:1rem;border-top:1px solid rgba(15,73,57,.09)}.br-sharing-member-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 0;border-bottom:1px solid rgba(15,73,57,.09)}.br-sharing-member{display:flex;align-items:center;gap:.7rem;font-weight:700}.br-sharing-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#edf4ea;color:#0f4939;font-weight:800}.br-sharing-add-form{display:flex;align-items:center;gap:.75rem}.br-sharing-edit-check{display:flex;align-items:center;gap:.4rem;font-size:.88rem;color:#59645e}.br-sharing-shared-badge,.br-sharing-permission{font-size:.78rem;font-weight:700;border-radius:999px;padding:.25rem .55rem;background:#edf4ea;color:#0f4939}.br-sharing-permission{margin-left:.5rem}.br-shared-grid{display:grid;gap:.75rem}.br-shared-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem;text-decoration:none;color:inherit;padding:1rem;border:1px solid rgba(15,73,57,.1);border-radius:14px}.br-shared-card:hover{border-color:#0f4939;background:#fbfcf7}.br-shared-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#edf4ea;color:#0f4939}.br-shared-card div{display:flex;flex-direction:column}.br-shared-card div span,.br-shared-card small{color:#6b746f}.br-shared-card strong{font-size:1rem}.br-sharing-empty{text-align:center;padding:2.5rem 1rem;color:#66716b}.br-sharing-empty>i{font-size:1.6rem;color:#0f4939;margin-bottom:.6rem}.br-shopping-check-button.is-readonly{cursor:default}
@media(max-width:720px){.br-sharing-hero{align-items:flex-start;flex-direction:column}.br-sharing-search{width:100%;flex-direction:row;align-items:stretch}.br-sharing-search .form-control{flex:1 1 auto;width:auto}.br-sharing-search .br-btn{flex:0 0 auto;width:auto;white-space:nowrap}.br-sharing-add-form{width:100%;flex-direction:column;align-items:stretch}.br-sharing-member-row{align-items:flex-start;flex-direction:column}.br-sharing-member-row form{width:100%}.br-sharing-member-row .br-btn{width:100%}}

/* Step 40 - What Can I Make */
.br-discover-page{max-width:1180px;margin:0 auto}.br-discover-hero{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.6rem 1.75rem;margin-bottom:1rem;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:18px}.br-discover-hero h1{margin:.2rem 0 .35rem}.br-discover-hero p{margin:0;color:#68736b}.br-discover-hero-actions{display:flex;gap:.65rem;flex-wrap:wrap}.br-discover-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-bottom:1rem}.br-discover-summary a{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.2rem;text-decoration:none;color:#314437;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:14px}.br-discover-summary a.is-active{border-color:#35643d;box-shadow:0 0 0 2px rgba(53,100,61,.08)}.br-discover-summary strong{font-size:1.35rem}.br-discover-summary span{font-weight:700;color:#667269}.br-discover-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1rem 0 1.15rem}.br-discover-filters{display:flex;gap:.45rem;flex-wrap:wrap}.br-discover-filters a{padding:.48rem .75rem;border:1px solid rgba(15,73,57,.13);border-radius:999px;text-decoration:none;color:#526057;background:#fff;font-size:.84rem;font-weight:700}.br-discover-filters a.is-active{background:#315f39;color:#fff;border-color:#315f39}.br-discover-search{display:flex;min-width:260px}.br-discover-search input{width:100%;border:1px solid rgba(15,73,57,.15);border-right:0;border-radius:10px 0 0 10px;padding:.62rem .75rem;background:#fff}.br-discover-search button{border:1px solid rgba(15,73,57,.15);border-left:0;border-radius:0 10px 10px 0;background:#fff;color:#315f39;padding:0 .8rem}.br-discover-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.br-discover-card{display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:16px;box-shadow:0 8px 24px rgba(31,49,39,.05)}.br-discover-photo{display:block;aspect-ratio:16/9;background:#eef3e8;overflow:hidden}.br-discover-photo img{width:100%;height:100%;object-fit:cover}.br-discover-photo span{width:100%;height:100%;display:grid;place-items:center;color:#58755b;font-size:2rem}.br-discover-card-body{padding:1rem 1rem .8rem;flex:1}.br-discover-card-topline{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.55rem}.br-discover-source{font-size:.75rem;font-weight:750;color:#657168}.br-discover-match{font-size:.78rem;font-weight:800;color:#315f39}.br-discover-card h2{margin:0 0 .45rem;font-size:1.12rem}.br-discover-card h2 a{color:#263d2b;text-decoration:none}.br-discover-description{margin:0 0 .8rem;color:#68736b;font-size:.88rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.br-discover-progress{height:7px;background:#edf0e8;border-radius:99px;overflow:hidden;margin:.65rem 0 .45rem}.br-discover-progress span{display:block;height:100%;background:#6d964f;border-radius:inherit}.br-discover-count{font-size:.82rem;color:#637067;margin-bottom:.55rem}.br-discover-state{display:inline-flex;padding:.3rem .55rem;border-radius:999px;background:#f2efe6;color:#785e27;font-size:.76rem;font-weight:800}.br-discover-state.is-ready{background:#e5f1df;color:#315f39}.br-discover-state.is-close{background:#fff0d8;color:#995d14}.br-discover-missing{margin-top:.65rem;color:#69736c;font-size:.82rem;line-height:1.45}.br-discover-actions{display:flex;gap:.55rem;padding:.85rem 1rem 1rem;border-top:1px solid rgba(15,73,57,.08);flex-wrap:wrap}.br-discover-actions form{margin:0;flex:1}.br-discover-actions .btn{width:100%;white-space:nowrap}.br-discover-empty{text-align:center;padding:3rem 1rem;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:16px;color:#68736b}.br-discover-empty>i{font-size:2rem;color:#4f7354;margin-bottom:.7rem}.br-discover-empty h2{color:#304635}.br-discover-pager{display:flex;align-items:center;justify-content:center;gap:1rem;margin-top:1.25rem}.br-discover-pager a{color:#315f39;font-weight:750;text-decoration:none}.br-discover-pager span{color:#6b756e;font-size:.88rem}
@media(max-width:900px){.br-discover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.br-discover-toolbar{align-items:stretch;flex-direction:column}.br-discover-search{min-width:0;width:100%}}
@media(max-width:640px){.br-discover-hero{align-items:stretch;flex-direction:column;padding:1.2rem}.br-discover-hero-actions,.br-discover-hero-actions .btn{width:100%}.br-discover-summary,.br-discover-grid{grid-template-columns:1fr}.br-discover-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:.25rem}.br-discover-filters a{white-space:nowrap}.br-discover-actions{flex-direction:column}.br-discover-actions form{width:100%}}

/* Step 41 - Discover feed */
.br-discover-feed-page{max-width:1240px;margin:0 auto}.br-discover-feed-hero{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.6rem 1.75rem;margin-bottom:1rem;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:18px}.br-discover-feed-hero h1{margin:.2rem 0 .35rem}.br-discover-feed-hero p{margin:0;max-width:720px;color:#68736b}.br-discover-feed-hero-actions{display:flex;gap:.65rem;flex-wrap:wrap}.br-discover-feed-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) minmax(180px,240px) auto auto;gap:.65rem;align-items:center;margin:1rem 0 .75rem}.br-discover-feed-search{position:relative}.br-discover-feed-search>i{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:#7a847d}.br-discover-feed-search input,.br-discover-feed-toolbar select{width:100%;min-height:42px;border:1px solid rgba(15,73,57,.16);border-radius:11px;background:#fff;color:#2b3f31}.br-discover-feed-search input{padding:.66rem .8rem .66rem 2.35rem}.br-discover-feed-toolbar select{padding:.62rem .75rem}.br-discover-feed-quick{display:flex;gap:.5rem;overflow-x:auto;padding:.15rem 0 .75rem;margin-bottom:.85rem}.br-discover-feed-quick a{flex:0 0 auto;padding:.48rem .78rem;border:1px solid rgba(15,73,57,.14);border-radius:999px;background:#fff;color:#526057;font-size:.84rem;font-weight:750;text-decoration:none}.br-discover-feed-quick a.is-active{background:#315f39;border-color:#315f39;color:#fff}.br-discover-feed-section{margin-top:1.5rem}.br-discover-feed-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.8rem}.br-discover-feed-heading h2{margin:.15rem 0 0;font-size:1.35rem;color:#293f2e}.br-discover-feed-heading>a{color:#315f39;font-weight:750;text-decoration:none;white-space:nowrap}.br-discover-feed-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.br-discover-feed-card{display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:16px;box-shadow:0 8px 24px rgba(31,49,39,.05)}.br-discover-feed-photo{position:relative;display:block;aspect-ratio:16/9;background:#edf2e8;overflow:hidden}.br-discover-feed-photo>img{width:100%;height:100%;object-fit:cover;transition:transform .18s ease}.br-discover-feed-card:hover .br-discover-feed-photo>img{transform:scale(1.025)}.br-discover-feed-placeholder{display:grid;width:100%;height:100%;place-items:center}.br-discover-feed-placeholder img{width:54px;height:54px;object-fit:contain;opacity:.58}.br-discover-feed-rating{position:absolute;right:.7rem;bottom:.7rem;display:inline-flex;gap:.28rem;align-items:center;padding:.3rem .52rem;border-radius:999px;background:rgba(255,252,241,.94);color:#5f4a18;font-size:.78rem;font-weight:800}.br-discover-feed-body{padding:1rem;flex:1}.br-discover-feed-reason{display:flex;align-items:center;gap:.35rem;margin-bottom:.48rem;color:#62804e;font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em}.br-discover-feed-card h3{margin:0 0 .25rem;font-size:1.12rem}.br-discover-feed-card h3 a{color:#263d2b;text-decoration:none}.br-discover-feed-owner{font-size:.8rem;color:#737c75}.br-discover-feed-owner a{color:#45664c;text-decoration:none;font-weight:700}.br-discover-feed-description{margin:.7rem 0;color:#68736b;font-size:.88rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.br-discover-feed-meta{display:flex;gap:.75rem;flex-wrap:wrap;margin:.7rem 0;color:#647068;font-size:.78rem}.br-discover-feed-meta span{display:inline-flex;align-items:center;gap:.3rem}.br-discover-feed-chips{display:flex;gap:.35rem;flex-wrap:wrap;margin:.6rem 0}.br-discover-feed-chips span{padding:.25rem .48rem;border-radius:999px;background:#f0f3e9;color:#60705f;font-size:.72rem;font-weight:700}.br-discover-feed-missing,.br-discover-feed-ready{margin-top:.7rem;padding:.62rem .7rem;border-radius:10px;font-size:.8rem}.br-discover-feed-missing{background:#fff7e8;color:#765c2b}.br-discover-feed-ready{display:flex;align-items:center;gap:.4rem;background:#eaf4e5;color:#315f39;font-weight:750}.br-discover-feed-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;padding:.8rem 1rem 1rem;border-top:1px solid rgba(15,73,57,.08)}.br-discover-feed-actions form{margin:0}.br-discover-feed-actions .btn{min-height:36px;padding:.42rem .62rem;font-size:.8rem}.br-discover-hide{margin-left:auto}.br-discover-feed-empty{text-align:center;padding:3rem 1rem;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:16px;color:#68736b}.br-discover-feed-empty>i{font-size:2rem;color:#527457;margin-bottom:.7rem}.br-discover-feed-empty h2,.br-discover-feed-empty h3{color:#304635}
@media(max-width:1000px){.br-discover-feed-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.br-discover-feed-toolbar{grid-template-columns:1fr 1fr}.br-discover-feed-toolbar .btn{width:100%}}
@media(max-width:680px){.br-discover-feed-hero{align-items:stretch;flex-direction:column;padding:1.2rem}.br-discover-feed-hero-actions,.br-discover-feed-hero-actions .btn{width:100%}.br-discover-feed-toolbar{grid-template-columns:1fr}.br-discover-feed-grid{grid-template-columns:1fr}.br-discover-feed-heading{align-items:flex-start;flex-direction:column}.br-discover-feed-actions form{flex:1}.br-discover-feed-actions form .btn{width:100%}}

/* Step 42: Nutrition goals + planned meal nutrition */
.br-nutrition-page { display: grid; gap: 1.25rem; }
.br-nutrition-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; padding:1.4rem 0 .25rem; }
.br-nutrition-hero h1 { margin:.15rem 0 .35rem; }
.br-nutrition-hero p { margin:0; color:var(--br-muted, #6f746b); }
.br-nutrition-hero-actions { display:flex; gap:.65rem; flex-wrap:wrap; }
.br-nutrition-week-nav { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:.75rem; }
.br-nutrition-this-week { white-space:nowrap; }
.br-nutrition-goals-card { background:var(--br-surface, #fffdf6); border:1px solid rgba(32,65,45,.12); border-radius:22px; padding:1.2rem; box-shadow:0 8px 28px rgba(34,55,39,.06); }
.br-nutrition-section-heading h2 { margin:.1rem 0 .25rem; font-size:1.35rem; }
.br-nutrition-section-heading p { margin:0 0 1rem; color:var(--br-muted, #6f746b); }
.br-nutrition-goals-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; gap:.8rem; align-items:end; }
.br-nutrition-input-unit { position:relative; }
.br-nutrition-input-unit .form-control { padding-right:3rem; }
.br-nutrition-input-unit > span { position:absolute; right:.85rem; top:50%; transform:translateY(-50%); font-size:.8rem; font-weight:700; color:var(--br-muted,#6f746b); pointer-events:none; }
.br-nutrition-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.8rem; }
.br-nutrition-summary-card { background:#fff; border:1px solid rgba(32,65,45,.11); border-radius:18px; padding:1rem; display:grid; gap:.12rem; }
.br-nutrition-summary-card span,.br-nutrition-summary-card small { color:var(--br-muted,#6f746b); font-size:.78rem; }
.br-nutrition-summary-card strong { color:var(--br-forest,#163d2b); font-size:1.45rem; }
.br-nutrition-days { display:grid; gap:1rem; }
.br-nutrition-day { background:#fff; border:1px solid rgba(32,65,45,.11); border-radius:22px; overflow:hidden; }
.br-nutrition-day.is-today { border-color:rgba(104,143,55,.5); box-shadow:0 0 0 2px rgba(104,143,55,.08); }
.br-nutrition-day-header { display:flex; justify-content:space-between; align-items:center; padding:1rem 1.1rem; border-bottom:1px solid rgba(32,65,45,.09); background:rgba(247,244,232,.65); }
.br-nutrition-day-header span:first-child { font-size:.72rem; letter-spacing:.09em; font-weight:800; color:var(--br-muted,#6f746b); }
.br-nutrition-day-header h2 { font-size:1.15rem; margin:.08rem 0 0; }
.br-nutrition-progress-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; padding:1rem 1.1rem; }
.br-nutrition-progress-row > div:first-child { display:flex; justify-content:space-between; gap:.5rem; margin-bottom:.4rem; font-size:.82rem; }
.br-nutrition-progress-row strong { font-size:.78rem; color:var(--br-muted,#6f746b); }
.br-nutrition-progress { height:8px; overflow:hidden; border-radius:999px; background:#ecece6; }
.br-nutrition-progress span { display:block; height:100%; border-radius:inherit; background:#668f39; }
.br-nutrition-progress-row.is-over .br-nutrition-progress span { background:#c96d36; }
.br-nutrition-progress-row.is-under .br-nutrition-progress span { background:#d5a13d; }
.br-nutrition-meals { border-top:1px solid rgba(32,65,45,.08); }
.br-nutrition-meal { display:grid; grid-template-columns:90px 1fr auto; align-items:center; gap:.8rem; padding:.75rem 1.1rem; color:inherit; text-decoration:none; border-bottom:1px solid rgba(32,65,45,.07); }
.br-nutrition-meal:last-child { border-bottom:0; }
.br-nutrition-meal:hover { background:rgba(247,244,232,.65); }
.br-nutrition-meal-type { font-size:.72rem; font-weight:800; text-transform:uppercase; color:var(--br-orange,#c96d36); }
.br-nutrition-meal div { display:grid; }
.br-nutrition-meal small { color:var(--br-muted,#6f746b); }
.br-nutrition-meal-calories { font-weight:800; color:var(--br-forest,#163d2b); }
.br-nutrition-no-meals { margin:0; padding:.9rem 1.1rem; border-top:1px solid rgba(32,65,45,.08); color:var(--br-muted,#6f746b); }
.br-nutrition-disclaimer { font-size:.82rem; color:var(--br-muted,#6f746b); margin:.25rem 0 1rem; }
.br-meal-plan-entry-servings { display:inline-flex; gap:.35rem; align-items:center; font-size:.8rem; color:var(--br-muted,#6f746b); margin-top:.25rem; }

@media (max-width: 1100px) {
    .br-nutrition-goals-form { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .br-nutrition-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .br-nutrition-progress-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
    .br-nutrition-hero { align-items:flex-start; flex-direction:column; }
    .br-nutrition-week-nav { grid-template-columns:auto 1fr auto; }
    .br-nutrition-this-week { grid-column:1 / -1; justify-self:stretch; }
    .br-nutrition-goals-form,.br-nutrition-summary-grid,.br-nutrition-progress-list { grid-template-columns:1fr 1fr; }
    .br-nutrition-goals-form .br-btn { grid-column:1 / -1; }
    .br-nutrition-meal { grid-template-columns:1fr auto; }
    .br-nutrition-meal-type { grid-column:1 / -1; }
}

@media (max-width: 450px) {
    .br-nutrition-goals-form,.br-nutrition-summary-grid,.br-nutrition-progress-list { grid-template-columns:1fr; }
}
.br-nutrition-day-badges { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; justify-content:flex-end; }
.br-nutrition-day-status { border-radius:999px; padding:.3rem .55rem; font-size:.72rem; font-weight:800; background:#edf3e8; color:#4c6a35; }
.br-nutrition-day-status.is-under { background:#fff4dd; color:#9b6717; }
.br-nutrition-day-status.is-over { background:#fff0e8; color:#a64e21; }

/* Step 42F: deterministic macro calculator */
.br-macro-calculator-card { background:var(--br-surface,#fffdf6); border:1px solid rgba(32,65,45,.12); border-radius:22px; padding:1.2rem; box-shadow:0 8px 28px rgba(34,55,39,.06); }
.br-macro-calculator-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.br-macro-unit-toggle { display:inline-flex; padding:.2rem; border:1px solid rgba(22,61,43,.16); border-radius:12px; background:#f3f1e8; flex:0 0 auto; }
.br-macro-unit-button { border:0; background:transparent; color:var(--br-muted,#6f746b); border-radius:9px; padding:.45rem .75rem; font-weight:800; font-size:.82rem; }
.br-macro-unit-button.is-active { background:var(--br-forest,#163d2b); color:#fff; box-shadow:0 3px 10px rgba(22,61,43,.15); }
.br-macro-calculator-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.8rem; align-items:end; }
.br-macro-activity-field { grid-column:span 2; }
.br-macro-height-row { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; }
.br-macro-calculate-button { min-height:42px; }
.br-macro-formula-note { margin:.8rem 0 0; color:var(--br-muted,#6f746b); font-size:.8rem; }
.br-macro-results { margin-top:1rem; padding-top:1rem; border-top:1px solid rgba(32,65,45,.10); display:grid; gap:.85rem; }
.br-macro-result-summary { display:flex; gap:1.5rem; flex-wrap:wrap; }
.br-macro-result-summary > div { display:grid; }
.br-macro-result-summary span { color:var(--br-muted,#6f746b); font-size:.76rem; }
.br-macro-result-summary strong { color:var(--br-forest,#163d2b); font-size:1.35rem; line-height:1.15; }
.br-macro-result-summary small { color:var(--br-muted,#6f746b); font-size:.72rem; }
.br-macro-result-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.7rem; }
.br-macro-result-grid article { background:#fff; border:1px solid rgba(32,65,45,.11); border-radius:16px; padding:.85rem 1rem; display:grid; gap:.08rem; }
.br-macro-result-grid span,.br-macro-result-grid small { color:var(--br-muted,#6f746b); font-size:.76rem; }
.br-macro-result-grid strong { color:var(--br-forest,#163d2b); font-size:1.35rem; }
.br-macro-result-actions { display:flex; gap:.8rem; align-items:center; flex-wrap:wrap; }
.br-macro-result-actions > span { color:var(--br-muted,#6f746b); font-size:.82rem; }
.br-macro-error { margin-top:.8rem; padding:.75rem .9rem; border-radius:12px; background:#fff0e8; color:#9b421e; font-weight:700; font-size:.86rem; }
.br-macro-imperial-field[hidden],.br-macro-metric-field[hidden],.br-macro-results[hidden],.br-macro-error[hidden] { display:none !important; }

@media (max-width: 1100px) {
    .br-macro-calculator-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .br-macro-activity-field { grid-column:span 2; }
}

@media (max-width: 760px) {
    .br-macro-calculator-heading { flex-direction:column; }
    .br-macro-unit-toggle { width:100%; }
    .br-macro-unit-button { flex:1; }
    .br-macro-calculator-grid { grid-template-columns:1fr 1fr; }
    .br-macro-activity-field,.br-macro-calculate-button { grid-column:1 / -1; }
    .br-macro-result-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 480px) {
    .br-macro-calculator-grid,.br-macro-result-grid { grid-template-columns:1fr; }
    .br-macro-activity-field,.br-macro-calculate-button { grid-column:auto; }
}

/* ========================================================================== 
   Step 46 - Better Collections
   ========================================================================== */
.br-collection-title-row,
.br-collection-detail-actions,
.br-collection-recipe-actions,
.br-public-collection-owner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.br-collection-title-row {
    flex-wrap: wrap;
}

.br-collection-title-row h2 {
    margin: 0;
}

.br-collection-visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f3ef;
    color: #5b675f;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}

.br-collection-visibility-badge.is-public {
    background: #eef7e4;
    color: #315b2b;
}

.br-collection-preview-cover {
    display: block;
}

.br-collection-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.br-collection-visibility-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid #dfe4dc;
    border-radius: 12px;
    background: #fafbf8;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.br-collection-visibility-option:hover {
    border-color: #c7d7ce;
    background: #f7faf7;
}

.br-collection-visibility-option:focus-within {
    border-color: #497e69;
    box-shadow: 0 0 0 3px rgba(28, 92, 69, .10);
}

.br-collection-visibility-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.br-collection-visibility-copy strong {
    color: #153f32;
}

.br-collection-visibility-copy small,
.br-field-help {
    color: #68756e;
    font-size: .78rem;
    line-height: 1.4;
}

.br-collection-switch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
}

.br-collection-switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.br-collection-switch-track {
    position: relative;
    display: block;
    width: 44px;
    height: 24px;
    background: #cdd6d0;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(21, 63, 50, .08);
    transition: background-color .16s ease, box-shadow .16s ease;
}

.br-collection-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(19, 48, 38, .28);
    transition: transform .16s ease;
}

.br-collection-switch-input:checked + .br-collection-switch-track {
    background: #14513e;
}

.br-collection-switch-input:checked + .br-collection-switch-track .br-collection-switch-thumb {
    transform: translateX(20px);
}

.br-collection-switch-input:focus-visible + .br-collection-switch-track {
    box-shadow: 0 0 0 3px rgba(28, 92, 69, .18);
}

.br-collection-recipe-actions {
    align-items: center;
    gap: 5px;
}

.br-collection-recipe-actions form {
    margin: 0;
}

.br-collection-order-button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #d8e0da;
    border-radius: 8px;
    background: #fff;
    color: #345044;
}

.br-collection-order-button:hover:not(:disabled) {
    background: #eef5ef;
    color: #153f32;
}

.br-collection-order-button:disabled {
    opacity: .35;
    cursor: default;
}

.br-public-collection-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #dfe4dc;
    border-radius: 18px;
    background: #fff;
}

.br-public-collection-cover {
    min-height: 300px;
}

.br-public-collection-cover img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.br-public-collection-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
}

.br-public-collection-copy h1 {
    margin: 4px 0 12px;
    color: #153f32;
}

.br-public-collection-copy p {
    color: #5c6c63;
}

.br-public-collection-owner {
    flex-wrap: wrap;
    color: #65736c;
    font-size: .83rem;
}

.br-public-collection-owner a {
    color: #153f32;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .br-collection-detail-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .br-collection-detail-actions .btn {
        width: 100%;
    }

    .br-public-collection-hero {
        grid-template-columns: 1fr;
    }

    .br-public-collection-cover,
    .br-public-collection-cover img {
        min-height: 210px;
        max-height: 260px;
    }

    .br-public-collection-copy {
        padding: 24px 20px;
    }
}



/* ==========================================================================
   Step 46A - My Recipes Add to Collection
   ========================================================================== */
.br-library-collection-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--br-green-700);
    font: inherit;
    font-size: .73rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.br-library-collection-link:hover {
    color: var(--br-orange-600);
}

.br-collection-picker-dialog {
    max-width: 620px;
}

.br-collection-picker-modal {
    border: 1px solid var(--br-border);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.br-collection-picker-modal .modal-header {
    align-items: flex-start;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--br-border);
    background: var(--br-cream);
}

.br-collection-picker-modal .modal-title {
    margin: 2px 0 0;
    color: var(--br-green-900);
    font-size: 1.35rem;
    font-weight: 900;
}

.br-collection-picker-recipe {
    margin: 4px 0 0;
    color: var(--br-muted);
    font-size: .86rem;
}

.br-collection-picker-modal .modal-body {
    padding: 18px 22px 20px;
}

.br-collection-picker-search {
    position: relative;
    margin-bottom: 14px;
}

.br-collection-picker-search > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: var(--br-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.br-collection-picker-search .form-control {
    min-height: 42px;
    padding-left: 38px;
    border-color: var(--br-border);
    border-radius: 11px;
    background: #fbfcfa;
}

.br-collection-picker-list {
    display: grid;
    gap: 9px;
    max-height: min(440px, 55vh);
    overflow-y: auto;
    padding-right: 3px;
}

.br-collection-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid var(--br-border);
    border-radius: 12px;
    background: #fff;
}

.br-collection-picker-row[hidden] {
    display: none !important;
}

.br-collection-picker-copy {
    min-width: 0;
}

.br-collection-picker-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.br-collection-picker-title-row strong {
    color: var(--br-green-900);
    font-size: .94rem;
}

.br-collection-picker-copy p {
    margin: 4px 0 0;
    color: var(--br-muted);
    font-size: .8rem;
    line-height: 1.4;
}

.br-collection-picker-copy small {
    display: block;
    margin-top: 5px;
    color: #7a857f;
    font-size: .72rem;
}

.br-collection-visibility {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
}

.br-collection-visibility.is-private {
    background: #edf2ef;
    color: var(--br-green-700);
}

.br-collection-visibility.is-public {
    background: #edf7df;
    color: #587a22;
}

.br-collection-picker-form {
    flex: 0 0 auto;
}

.br-collection-picker-add {
    min-width: 82px;
    justify-content: center;
}

.br-collection-picker-add.is-added,
.br-collection-picker-add:disabled {
    border-color: #d8e2da;
    background: #edf2ef;
    color: var(--br-green-700);
    opacity: 1;
    cursor: default;
    box-shadow: none;
}

.br-collection-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--br-border);
}

.br-collection-picker-manage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--br-green-700);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.br-collection-picker-manage:hover {
    color: var(--br-orange-600);
}

.br-collection-picker-empty {
    padding: 26px 12px 20px;
    text-align: center;
}

.br-collection-picker-empty-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--br-green-050);
    color: var(--br-green-700);
    font-size: 1.15rem;
}

.br-collection-picker-empty h3 {
    margin: 0;
    color: var(--br-green-900);
    font-size: 1rem;
}

.br-collection-picker-empty p {
    max-width: 380px;
    margin: 6px auto 14px;
    color: var(--br-muted);
    font-size: .84rem;
}

@media (max-width: 575.98px) {
    .br-library-footer {
        align-items: flex-start;
        gap: 10px;
    }

    .br-library-footer > div {
        justify-content: flex-end;
    }

    /* Collection picker: keep actions on a single line, not in tall stacked cards. */
    .br-collection-picker-dialog {
        margin: 10px;
    }

    .br-collection-picker-modal {
        max-height: calc(100dvh - 20px);
        border-radius: 14px;
    }

    .br-collection-picker-modal .modal-header {
        gap: 8px;
        padding: 12px 14px 10px;
    }

    .br-collection-picker-modal .modal-title {
        margin-top: 1px;
        font-size: 1.08rem;
        line-height: 1.2;
    }

    .br-collection-picker-modal .br-section-kicker {
        font-size: .6rem;
        line-height: 1.2;
    }

    .br-collection-picker-modal .br-modal-close {
        flex-shrink: 0;
        margin: -1px -2px 0 0;
    }

    .br-popup-modal .br-collection-picker-modal .modal-body {
        min-height: 0;
        padding: 10px 14px 12px;
        overscroll-behavior: contain;
    }

    .br-collection-picker-recipe {
        margin: 0 0 7px;
        font-size: .78rem;
        line-height: 1.3;
    }

    .br-collection-picker-search {
        margin-bottom: 9px;
    }

    .br-collection-picker-search .form-control {
        min-height: 40px;
        padding-top: 7px;
        padding-bottom: 7px;
        font-size: .87rem;
    }

    .br-collection-picker-list {
        gap: 7px;
        max-height: min(290px, 40dvh);
        padding-right: 2px;
        overscroll-behavior: contain;
    }

    .br-collection-picker-row {
        align-items: center;
        flex-direction: row;
        gap: 9px;
        padding: 9px 10px;
        border-radius: 10px;
    }

    .br-collection-picker-copy {
        flex: 1 1 auto;
        overflow-wrap: anywhere;
    }

    .br-collection-picker-title-row {
        gap: 5px;
    }

    .br-collection-picker-title-row strong {
        font-size: .84rem;
        line-height: 1.25;
    }

    .br-collection-visibility {
        padding: 2px 6px;
        font-size: .59rem;
    }

    .br-collection-picker-copy p {
        margin-top: 3px;
        font-size: .73rem;
        line-height: 1.25;
    }

    .br-collection-picker-copy small {
        margin-top: 2px;
        font-size: .68rem;
    }

    .br-collection-picker-form {
        flex: 0 0 auto;
        width: auto;
    }

    .br-collection-picker-modal .br-collection-picker-add {
        width: auto;
        min-width: 76px;
        min-height: 44px;
        padding: 7px 10px;
        font-size: .83rem;
    }

    .br-collection-picker-footer {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
    }

    .br-collection-picker-footer .br-btn {
        flex-shrink: 0;
        width: auto;
        min-height: 44px;
        padding: 7px 10px;
        font-size: .8rem;
        justify-content: center;
    }

    .br-collection-picker-manage {
        min-width: 0;
        font-size: .73rem;
        line-height: 1.2;
        text-align: right;
        justify-content: flex-end;
    }

    /* Empty feedback should not reserve another line below the actions. */
    .br-collection-picker-modal [data-collection-picker-feedback]:empty {
        display: none;
    }

    .br-collection-inline-create {
        margin-top: 10px !important;
    }

    .br-collection-inline-create .form-label {
        margin-bottom: 4px;
        font-size: .82rem;
    }

    .br-collection-inline-create .form-control {
        min-height: 40px;
    }
}

@media (max-width: 359.98px) {
    /* Older narrow phones: keep the Manage link visible without overflow. */
    .br-collection-picker-footer {
        flex-wrap: wrap;
    }

    .br-collection-picker-manage {
        flex: 1 1 auto;
    }
}

/* ==========================================================================
   Step 47 - Meal Plan Templates
   ========================================================================== */
.br-template-modal .modal-header {
    align-items: flex-start;
}

.br-template-modal .modal-title {
    margin-top: 0.2rem;
    color: var(--br-green-950);
    font-size: 1.25rem;
    font-weight: 850;
}

.br-template-modal-copy {
    margin: 0 0 1rem;
    color: var(--br-muted);
}

.br-meal-template-page {
    display: grid;
    gap: 1rem;
}

.br-meal-template-target {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    background: #fff;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    box-shadow: var(--br-shadow-soft);
}

.br-meal-template-target h2 {
    margin: 0.15rem 0 0.25rem;
    color: var(--br-green-950);
    font-size: 1.15rem;
    font-weight: 850;
}

.br-meal-template-target p {
    margin: 0;
    color: var(--br-muted);
}

.br-meal-template-week-form {
    display: grid;
    grid-template-columns: minmax(170px, 220px) auto;
    gap: 0.55rem;
    align-items: end;
}

.br-meal-template-week-form label {
    grid-column: 1 / -1;
    color: var(--br-green-950);
    font-size: 0.76rem;
    font-weight: 800;
}

.br-meal-template-grid {
    display: grid;
    gap: 1rem;
}

.br-meal-template-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    box-shadow: var(--br-shadow-soft);
}

.br-meal-template-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--br-border);
}

.br-meal-template-card-header h2 {
    margin: 0.15rem 0 0.25rem;
    color: var(--br-green-950);
    font-size: 1.3rem;
    font-weight: 900;
}

.br-meal-template-card-header p {
    max-width: 760px;
    margin: 0;
    color: var(--br-muted);
}

.br-meal-template-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
}

.br-meal-template-day {
    min-width: 0;
    padding: 0.9rem;
    border-right: 1px solid var(--br-border);
}

.br-meal-template-day:last-child {
    border-right: 0;
}

.br-meal-template-day > strong {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--br-green-900);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.br-meal-template-day > div {
    display: grid;
    gap: 0.45rem;
}

.br-meal-template-meal {
    display: grid;
    gap: 0.1rem;
    padding: 0.55rem 0.6rem;
    background: var(--br-green-050);
    border-radius: 9px;
    color: var(--br-text);
    font-size: 0.72rem;
}

.br-meal-template-meal b {
    color: var(--br-orange-700, #c7520a);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.br-meal-template-meal small {
    color: var(--br-muted);
    font-size: 0.62rem;
}

.br-meal-template-meal.is-missing {
    opacity: 0.6;
    text-decoration: line-through;
}

.br-meal-template-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--br-border);
    color: var(--br-muted);
    font-size: 0.72rem;
}

.br-meal-template-apply {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.br-meal-template-apply .form-select {
    min-width: 190px;
}

@media (max-width: 991.98px) {
    .br-meal-template-days {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-meal-template-day {
        border-bottom: 1px solid var(--br-border);
    }
}

@media (max-width: 767.98px) {
    .br-meal-template-target,
    .br-meal-template-card-footer,
    .br-meal-template-apply {
        align-items: stretch;
        flex-direction: column;
    }

    .br-meal-template-week-form {
        width: 100%;
        grid-template-columns: 1fr auto;
    }

    .br-meal-template-days {
        grid-template-columns: 1fr;
    }

    .br-meal-template-day {
        border-right: 0;
    }

    .br-meal-template-apply,
    .br-meal-template-apply .form-select,
    .br-meal-template-apply .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Step 47A - Restore My Recipes card action-menu visuals
   Step 47 was based on an older site.css and dropped the Step 46H rules.
   ========================================================================== */
.br-library-card {
    position: relative;
}

.br-library-card-photo {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--br-green-050);
}

.br-library-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.br-library-card-menu {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 6;
    margin: 0;
}

.br-library-card-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--br-green-950);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(11, 37, 27, 0.10);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(10, 19, 16, 0.12);
    backdrop-filter: blur(4px);
}

.br-library-card-menu-button:hover,
.br-library-card-menu-button:focus-visible,
.br-library-card-menu-button[aria-expanded="true"] {
    color: var(--br-green-950);
    background: #fff;
}

.br-library-card-menu .dropdown-menu {
    min-width: 220px;
    margin-top: 5px;
}

.br-dropdown-item-danger {
    color: var(--br-danger-700, #b42318);
}

.br-dropdown-item-danger:hover,
.br-dropdown-item-danger:focus {
    color: #fff;
    background: #d92d20;
}

.br-library-footer {
    justify-content: flex-start;
}


/* ========================================================================== 
   Step 54 - Responsive header/mobile navigation drawer
   ========================================================================== */
.br-mobile-account-slot,
.br-mobile-guest-actions,
.br-mobile-header-search {
    display: none;
}

.br-desktop-account-slot {
    display: flex;
    align-items: center;
}

.br-account-menu-compact {
    display: flex;
    align-items: center;
}

.br-account-button-compact {
    width: 42px;
    min-width: 42px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--br-border);
    border-radius: 10px;
}

.br-account-button-compact:hover,
.br-account-button-compact:focus {
    background: var(--br-green-050);
}

.br-account-button-compact::after {
    display: none;
}

.br-account-button-compact .br-account-avatar {
    width: 30px;
    height: 30px;
}

.br-account-avatar {
    position: relative;
    overflow: hidden;
}

.br-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.br-account-avatar img:not([hidden]) + .br-account-avatar-fallback,
.br-account-avatar img[src] ~ .br-account-avatar-fallback {
    display: none;
}

/* Desktop: the responsive offcanvas becomes the normal navbar again. */
@media (min-width: 1200px) {
    .br-mobile-nav-drawer {
        flex: 1 1 auto;
        min-width: 0;
    }

    .br-mobile-nav-drawer-body {
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0;
        overflow: visible;
    }
}

@media (max-width: 1199.98px) {
    /*
       The mobile offcanvas lives inside the sticky site header. The header's
       backdrop-filter created a containing/stacking context below Bootstrap's
       offcanvas backdrop, which could leave the drawer underneath the gray
       overlay and constrained to the header. Keep the mobile header opaque and
       above the offcanvas backdrop so the drawer is fixed to the viewport.
    */
    .br-site-header {
        z-index: 1045;
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .br-navbar {
        padding-top: max(6px, env(safe-area-inset-top));
    }

    .br-navbar-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 5px;
        padding-bottom: 9px;
    }

    .br-brand {
        order: 1 !important;
        min-width: 0;
        max-width: calc(100% - 151px);
        margin-right: auto;
    }

    .br-mobile-account-slot {
        display: flex;
        order: 2 !important;
        margin-left: auto;
        position: relative;
    }

    .br-mobile-guest-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        order: 2 !important;
        margin-left: auto;
        white-space: nowrap;
    }

    .br-mobile-sign-in {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 5px 7px;
        color: var(--br-green-950);
        border-radius: 8px;
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1;
    }

    .br-mobile-sign-in:hover,
    .br-mobile-sign-in:focus-visible {
        color: var(--br-green-950);
        background: var(--br-green-050);
    }

    .br-mobile-sign-up {
        min-height: 34px;
        padding: 5px 10px;
        border-radius: 8px;
        font-size: 0.72rem;
        line-height: 1;
    }

    .br-nav-toggle {
        order: 3 !important;
        flex: 0 0 42px;
    }

    .br-mobile-header-search {
        display: flex;
        order: 4 !important;
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
        min-width: 0;
        height: 40px;
        margin: 9px 0 0;
    }

    #beastRecipesNavigation .br-desktop-header-search,
    .br-desktop-account-slot {
        display: none !important;
    }

    .br-mobile-nav-drawer {
        --bs-offcanvas-width: min(88vw, 370px);
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: var(--bs-offcanvas-width) !important;
        max-width: calc(100vw - 36px) !important;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        margin: 0 !important;
        flex: 0 0 auto !important;
        color: var(--br-text);
        background: var(--br-paper-2);
        border-left: 1px solid var(--br-border);
        box-shadow: -20px 0 50px rgba(13, 47, 37, 0.16);
    }

    .br-mobile-nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: max(16px, env(safe-area-inset-top)) 16px 14px;
        background: #fff;
        border-bottom: 1px solid var(--br-border);
    }

    .br-mobile-nav-drawer-title-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .br-mobile-nav-drawer-mark {
        width: 38px;
        height: 42px;
        object-fit: contain;
    }

    .br-mobile-nav-drawer-kicker {
        display: block;
        margin-bottom: 2px;
        color: var(--br-green-700);
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .13em;
    }

    .br-mobile-nav-drawer-header h2 {
        margin: 0;
        color: var(--br-green-950);
        font-size: 1.25rem;
        font-weight: 900;
    }

    .br-mobile-nav-drawer-close {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 0;
        background-size: 14px;
        border: 1px solid var(--br-border);
        border-radius: 10px;
        opacity: .8;
    }

    .br-mobile-nav-drawer-body {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 14px max(14px, env(safe-area-inset-bottom));
        overflow-y: auto;
    }

    #beastRecipesNavigation .br-primary-nav {
        width: 100%;
        margin: 0;
        align-items: stretch;
        gap: 6px;
    }

    #beastRecipesNavigation .br-primary-nav > .nav-item > .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 46px;
        padding: 10px 12px !important;
        color: var(--br-ink);
        background: #fff;
        border: 1px solid var(--br-border);
        border-radius: 12px;
        font-size: .88rem;
        font-weight: 800;
    }

    #beastRecipesNavigation .br-primary-nav > .nav-item > .nav-link:hover,
    #beastRecipesNavigation .br-primary-nav > .nav-item > .nav-link:focus-visible,
    #beastRecipesNavigation .br-primary-nav > .nav-item > .nav-link[aria-expanded="true"] {
        color: var(--br-green-950);
        background: var(--br-green-050);
        border-color: rgba(30, 90, 70, .2);
    }

    #beastRecipesNavigation .dropdown-menu.br-dropdown-menu {
        position: static !important;
        width: 100%;
        min-width: 0;
        margin: 6px 0 2px !important;
        padding: 6px;
        transform: none !important;
        background: #fff;
        border: 1px solid var(--br-border);
        border-radius: 12px;
        box-shadow: none;
    }

    #beastRecipesNavigation .br-dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 9px;
        font-size: .82rem;
    }

    #beastRecipesNavigation .br-dropdown-menu .dropdown-divider {
        margin: 5px 4px;
    }

    #beastRecipesNavigation .br-nav-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        margin: auto 0 0;
        padding-top: 14px;
    }

    #beastRecipesNavigation .br-nav-create {
        width: 100%;
        min-height: 46px;
    }

    .br-mobile-account-slot .br-account-dropdown {
        position: fixed !important;
        top: 68px !important;
        right: 10px !important;
        left: auto !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 82px);
        margin: 0 !important;
        overflow-y: auto;
        transform: none !important;
        z-index: 1060;
    }
}

@media (max-width: 575.98px) {
    .br-navbar {
        padding-top: max(7px, env(safe-area-inset-top));
    }

    .br-navbar-inner {
        padding-top: 5px;
        padding-bottom: 8px;
    }

    .br-brand {
        max-width: calc(100% - 145px);
    }

    .br-mobile-guest-actions {
        gap: 4px;
    }

    .br-mobile-sign-in {
        padding-inline: 5px;
        font-size: 0.69rem;
    }

    .br-mobile-sign-up {
        padding-inline: 8px;
        font-size: 0.69rem;
    }

    .br-mobile-account-slot .br-account-dropdown {
        right: 8px !important;
        width: min(280px, calc(100vw - 16px)) !important;
        min-width: 0 !important;
    }
}

@media (max-width: 359.98px) {
    .br-navbar-inner {
        gap: 6px;
    }

    .br-brand {
        gap: 5px;
    }

    .br-brand-mark {
        width: 34px;
        height: 39px;
    }

    .br-brand-name {
        font-size: 0.92rem;
    }

    .br-brand-tagline {
        font-size: 0.52rem;
    }

    .br-mobile-sign-in {
        padding-inline: 4px;
        font-size: 0.64rem;
    }

    .br-mobile-sign-up {
        min-height: 32px;
        padding-inline: 7px;
        font-size: 0.64rem;
    }

    .br-nav-toggle {
        width: 38px;
        flex-basis: 38px;
    }
}

/* ========================================================================== 
   Notification center header button
   ========================================================================== */
.br-notification-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 40px;
    color: var(--br-green-900);
    background: #fff;
    border: 1px solid var(--br-border);
    border-radius: 10px;
    font-size: 1rem;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.br-notification-button:hover,
.br-notification-button:focus-visible {
    color: var(--br-green-950);
    background: var(--br-green-050);
    border-color: var(--br-border-strong);
}

.br-notification-button.has-unread {
    color: var(--br-green-950);
}

.br-notification-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    color: #fff;
    background: var(--br-orange);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
}

.br-desktop-account-slot,
.br-mobile-account-slot {
    gap: 7px;
}


/* ==========================================================================
   Accessibility hardening
   ========================================================================== */

.br-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    padding: 10px 14px;
    color: #fff;
    background: #0f4a3a;
    border: 2px solid #fff;
    border-radius: 9px;
    box-shadow: 0 6px 18px rgba(15, 42, 33, 0.24);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(calc(-100% - 20px));
    transition: transform 120ms ease;
}

.br-skip-link:focus,
.br-skip-link:focus-visible {
    color: #fff;
    transform: translateY(0);
}

/*
 * Keyboard focus must remain visible even on components that intentionally
 * remove the browser's default outline for mouse/touch presentation.
 */
:where(
    a[href],
    button,
    input:not([type="hidden"]),
    select,
    textarea,
    summary,
    [role="button"],
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 3px solid #0f4a3a !important;
    outline-offset: 3px !important;
}

/*
 * Header search inputs live inside an overflow-hidden shell, so an outline
 * on the input itself can be clipped. Give the entire control a focus ring.
 */
.br-header-search:focus-within {
    border-color: #0f4a3a;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 5px rgba(15, 74, 58, 0.42);
}

.br-rd-rating-star:focus-visible {
    border-radius: 6px;
    background: #fff7e8;
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .br-skip-link {
        transition: none;
    }
}

/* Sharing dashboard */
.br-sharing-dashboard-hero{margin-bottom:1rem}.br-sharing-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.br-sharing-overview-card{display:flex;align-items:center;gap:1rem;padding:1.15rem 1.2rem;background:#fff;border:1px solid rgba(15,73,57,.12);border-radius:16px;box-shadow:0 8px 22px rgba(30,46,39,.05);color:inherit;text-decoration:none;transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}.br-sharing-overview-card:hover{color:inherit;border-color:rgba(15,73,57,.34);transform:translateY(-1px);box-shadow:0 12px 28px rgba(30,46,39,.08)}.br-sharing-overview-icon{flex:0 0 auto;width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:#edf4ea;color:#0f4939;font-size:1.05rem}.br-sharing-overview-copy{display:flex;min-width:0;flex-direction:column}.br-sharing-overview-copy>strong{font-size:1.45rem;line-height:1;color:#0b3f32}.br-sharing-overview-copy>span{font-weight:800;margin-top:.22rem}.br-sharing-overview-copy>small{margin-top:.12rem;color:#6b746f}.br-sharing-dashboard-summary{display:flex;align-items:center;justify-content:center;gap:.45rem;padding:.3rem 0 .1rem;color:#68736d;font-size:.9rem}.br-sharing-dashboard-summary strong{color:#0f4939}.br-sharing-dashboard-dot{width:4px;height:4px;border-radius:50%;background:#a8b1ac;margin:0 .25rem}.br-sharing-section-card{scroll-margin-top:6rem}.br-sharing-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:1rem;border-bottom:1px solid rgba(15,73,57,.09)}.br-sharing-section-title{display:flex;align-items:center;gap:.8rem}.br-sharing-section-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#edf4ea;color:#0f4939}.br-sharing-section-title h2{margin:0;font-size:1.15rem}.br-sharing-section-title p{margin:.12rem 0 0;color:#6b746f}.br-sharing-section-empty{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem .1rem .1rem;color:#6b746f}.br-sharing-section-empty a{font-weight:800;color:#0f4939;text-decoration:none}.br-sharing-resource-stack{display:grid;gap:.9rem;padding-top:1rem}.br-sharing-resource-card{border:1px solid rgba(15,73,57,.11);border-radius:14px;overflow:hidden;background:#fbfcf9}.br-sharing-resource-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.05rem;background:#fff}.br-sharing-resource-head h3{margin:.18rem 0 .15rem;font-size:1rem}.br-sharing-resource-eyebrow{display:block;color:#0f4939;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.br-sharing-resource-meta{color:#6b746f;font-size:.84rem}.br-sharing-week-badge{display:inline-flex;align-items:center;border-radius:999px;padding:.18rem .48rem;background:#f0f2ed;color:#637069;font-size:.7rem;font-weight:800}.br-sharing-recipient-list{border-top:1px solid rgba(15,73,57,.09)}.br-sharing-recipient-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1.05rem;border-bottom:1px solid rgba(15,73,57,.08)}.br-sharing-recipient-row:last-child{border-bottom:0}.br-sharing-recipient-person{display:flex;align-items:center;min-width:0;gap:.7rem}.br-sharing-recipient-person>div{display:flex;min-width:0;flex-direction:column}.br-sharing-recipient-person>div>strong{line-height:1.15}.br-sharing-recipient-person>div>span{margin-top:.15rem;color:#6b746f;font-size:.8rem}.br-sharing-recipient-avatar{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#edf4ea;color:#0f4939;font-size:.82rem;font-weight:900}.br-sharing-recipient-actions{display:flex;align-items:center;justify-content:flex-end;gap:.55rem}.br-sharing-permission-form{display:flex;align-items:center;gap:.55rem}.br-sharing-permission-form .form-select{width:132px;min-width:132px}.br-btn-compact{padding:.52rem .78rem;white-space:nowrap}.br-sharing-dashboard-empty h2{margin:.15rem 0 .35rem}.br-sharing-dashboard-empty p{max-width:620px;margin-inline:auto}
@media(max-width:900px){.br-sharing-overview-grid{grid-template-columns:1fr}.br-sharing-resource-head{align-items:flex-start}.br-sharing-recipient-row-editable{align-items:flex-start;flex-direction:column}.br-sharing-recipient-actions{width:100%;justify-content:space-between}.br-sharing-permission-form{flex:1}.br-sharing-permission-form .form-select{flex:1;width:auto}.br-sharing-section-empty{align-items:flex-start;flex-direction:column}}
@media(max-width:620px){.br-sharing-resource-head{flex-direction:column}.br-sharing-resource-head>.br-btn{width:100%}.br-sharing-recipient-row{align-items:flex-start;flex-direction:column}.br-sharing-recipient-row>form,.br-sharing-recipient-actions,.br-sharing-recipient-actions>form,.br-sharing-permission-form{width:100%}.br-sharing-recipient-row .br-btn{width:100%}.br-sharing-permission-form{flex-direction:column;align-items:stretch}.br-sharing-permission-form .form-select{width:100%}.br-sharing-dashboard-summary{flex-wrap:wrap}}

/* Shared with Me action buttons */
.br-shared-card .br-shared-card-actions{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:.55rem;
    flex-wrap:nowrap;
}
.br-shared-card .br-shared-card-actions>form{
    display:flex;
    margin:0;
}
.br-shared-card .br-shared-card-actions .br-btn{
    white-space:nowrap;
}
@media(max-width:620px){
    .br-shared-card .br-shared-card-actions{
        grid-column:1 / -1;
        width:100%;
        justify-content:stretch;
    }
    .br-shared-card .br-shared-card-actions>a,
    .br-shared-card .br-shared-card-actions>form{
        flex:1 1 0;
    }
    .br-shared-card .br-shared-card-actions>form .br-btn,
    .br-shared-card .br-shared-card-actions>a{
        width:100%;
    }
}


/* Discover recipe cards - compact mobile action bar */
@media (max-width: 680px) {
    .br-discover-feed-actions {
        align-items: stretch;
        gap: .4rem;
        flex-wrap: nowrap;
        padding: .75rem .8rem .85rem;
    }

    .br-discover-feed-actions form {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
    }

    .br-discover-feed-actions form .br-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .3rem;
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: .42rem .28rem;
        font-size: .72rem;
        line-height: 1;
        white-space: nowrap;
    }

    .br-discover-feed-actions form .br-btn i {
        flex: 0 0 auto;
        margin: 0;
    }

    .br-discover-feed-actions .br-discover-hide {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        height: 40px;
        margin-left: 0;
    }
}

@media (max-width: 360px) {
    .br-discover-feed-actions {
        gap: .3rem;
        padding-inline: .65rem;
    }

    .br-discover-feed-actions form .br-btn {
        gap: .22rem;
        padding-inline: .2rem;
        font-size: .68rem;
    }

    .br-discover-feed-actions .br-discover-hide {
        flex-basis: 36px;
        width: 36px;
        min-width: 36px;
        height: 40px;
    }
}

/* Pantry - compact mobile layout */
@media (max-width: 640px) {
    .br-pantry-page {
        gap: 12px;
    }

    .br-pantry-hero,
    .br-pantry-add-card,
    .br-pantry-list-card {
        padding: 14px;
        border-radius: 16px;
    }

    .br-pantry-hero {
        gap: 14px;
    }

    .br-pantry-hero-actions {
        gap: 8px;
    }

    .br-pantry-hero-actions .btn {
        min-height: 42px;
        padding: .55rem .65rem;
        font-size: .78rem;
    }

    .br-pantry-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .br-pantry-summary a {
        min-height: 70px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .br-pantry-summary strong {
        font-size: 1.3rem;
    }

    .br-pantry-summary span {
        font-size: .76rem;
    }

    .br-pantry-add-card .br-shopping-section-heading {
        margin-bottom: 10px;
    }

    .br-pantry-add-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .br-pantry-add-form > .br-pantry-wide,
    .br-pantry-add-form > .br-field-group:nth-of-type(5),
    .br-pantry-add-form > .br-pantry-add-button {
        grid-column: 1 / -1;
    }

    .br-pantry-add-form .br-field-group {
        min-width: 0;
    }

    .br-pantry-add-form .br-field-group label {
        margin-bottom: 4px;
        font-size: .76rem;
    }

    .br-pantry-add-form .form-control,
    .br-pantry-add-form .form-select {
        min-height: 42px;
        padding-block: .5rem;
        font-size: .84rem;
    }

    .br-pantry-add-button {
        min-height: 42px;
        margin-top: 2px;
    }

    .br-pantry-toolbar {
        gap: 10px;
        margin-bottom: 12px;
    }

    .br-pantry-toolbar h2 {
        margin-bottom: 2px;
    }

    .br-pantry-search {
        min-height: 42px;
    }

    .br-pantry-item {
        gap: 10px;
        padding: 13px 14px;
        border-radius: 14px;
    }

    .br-pantry-item-title-row {
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .br-pantry-item-title-row h3 {
        font-size: .96rem;
    }

    .br-pantry-meta {
        gap: 3px 7px;
        margin-top: 4px;
        font-size: .78rem;
        line-height: 1.35;
    }

    .br-pantry-item-actions {
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        flex-wrap: wrap;
    }

    .br-pantry-status-control {
        flex: 1 0 100%;
        width: 100%;
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin: 0;
    }

    .br-pantry-status-label {
        flex: 0 0 auto;
        font-size: .68rem;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .br-pantry-status-options {
        flex: 1 1 auto;
        width: auto;
    }

    .br-pantry-status-btn {
        min-height: 34px;
        padding: 6px 8px;
        font-size: .72rem;
    }

    .br-pantry-item-actions > form:not(.d-none),
    .br-pantry-item-actions > a,
    .br-pantry-item-actions > button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        height: 38px;
        min-height: 38px;
        padding: 0;
    }

    .br-pantry-item-actions > form:not(.d-none) {
        margin-left: auto;
    }

    .br-pantry-item-actions > form:not(.d-none) .btn {
        width: 40px;
        min-width: 40px;
        height: 38px;
        min-height: 38px;
        padding: 0;
    }
}

@media (max-width: 360px) {
    .br-pantry-hero,
    .br-pantry-add-card,
    .br-pantry-list-card {
        padding: 12px;
    }

    .br-pantry-summary a {
        min-height: 66px;
        padding: 9px 10px;
    }

    .br-pantry-hero-actions .btn {
        font-size: .73rem;
    }
}

/* What Can I Make - compact mobile controls */
@media (max-width: 640px) {
    .br-discover-page {
        width: 100%;
        min-width: 0;
    }

    .br-discover-hero {
        gap: .9rem;
        padding: 1rem;
        margin-bottom: .75rem;
    }

    .br-discover-hero h1 {
        margin-bottom: .2rem;
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }

    .br-discover-hero p {
        font-size: .92rem;
        line-height: 1.45;
    }

    .br-discover-hero-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
        width: 100%;
    }

    .br-discover-hero-actions .br-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .3rem;
        min-width: 0;
        min-height: 58px;
        padding: .55rem .35rem;
        font-size: .72rem;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .br-discover-hero-actions .br-btn i {
        font-size: .95rem;
    }

    .br-discover-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
        margin-bottom: .75rem;
    }

    .br-discover-summary a {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: .1rem;
        min-height: 68px;
        padding: .7rem .8rem;
    }

    .br-discover-summary strong {
        font-size: 1.25rem;
        line-height: 1;
    }

    .br-discover-summary span {
        font-size: .74rem;
        line-height: 1.2;
    }

    .br-discover-toolbar {
        gap: .65rem;
        margin: .75rem 0 .9rem;
    }

    .br-discover-filters {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: .4rem;
        padding: 0 0 .2rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .br-discover-filters::-webkit-scrollbar {
        display: none;
    }

    .br-discover-filters a {
        flex: 0 0 auto;
        padding: .42rem .68rem;
        font-size: .76rem;
        scroll-snap-align: start;
    }

    .br-discover-search {
        min-width: 0;
        width: 100%;
    }

    .br-discover-search input {
        min-width: 0;
        min-height: 42px;
    }

    .br-discover-search button {
        width: 46px;
        flex: 0 0 46px;
    }

    .br-discover-grid {
        gap: .75rem;
    }

    .br-discover-card-body {
        padding: .85rem .9rem .7rem;
    }

    .br-discover-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
        padding: .7rem .9rem .85rem;
    }

    .br-discover-actions form {
        width: auto;
        min-width: 0;
    }

    .br-discover-actions .btn {
        min-height: 38px;
        padding: .48rem .55rem;
        font-size: .75rem;
        white-space: normal;
        line-height: 1.15;
    }

    .br-discover-actions form:only-child {
        grid-column: 1 / -1;
    }
}

/* Sharing dashboard - compact mobile layout */
@media (max-width: 620px) {
    .br-sharing-page {
        padding: .9rem .65rem 2.25rem;
    }

    .br-sharing-dashboard-hero {
        gap: .85rem;
        padding: 1rem;
        border-radius: 15px;
    }

    .br-sharing-dashboard-hero h1 {
        font-size: 1.65rem;
    }

    .br-sharing-dashboard-hero p {
        font-size: .84rem;
        line-height: 1.45;
    }

    .br-sharing-dashboard-hero > .br-btn {
        width: 100%;
        min-height: 40px;
        padding: .5rem .75rem;
    }

    .br-sharing-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .45rem;
        margin-bottom: .65rem;
    }

    .br-sharing-overview-card {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: center;
        gap: .4rem;
        min-width: 0;
        padding: .62rem .48rem;
        border-radius: 12px;
        box-shadow: 0 5px 14px rgba(30, 46, 39, .04);
    }

    .br-sharing-overview-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: .78rem;
    }

    .br-sharing-overview-copy {
        min-width: 0;
    }

    .br-sharing-overview-copy > strong {
        font-size: 1.05rem;
    }

    .br-sharing-overview-copy > span {
        margin-top: .08rem;
        font-size: .64rem;
        line-height: 1.15;
    }

    .br-sharing-overview-copy > small {
        display: none;
    }

    .br-sharing-dashboard-summary {
        gap: .3rem;
        padding: .15rem 0 0;
        font-size: .72rem;
    }

    .br-sharing-card {
        margin-top: .7rem;
        padding: .85rem;
        border-radius: 15px;
    }

    .br-sharing-section-heading {
        gap: .55rem;
        padding-bottom: .7rem;
    }

    .br-sharing-section-title {
        gap: .55rem;
        min-width: 0;
    }

    .br-sharing-section-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: .82rem;
    }

    .br-sharing-section-title h2 {
        font-size: 1rem;
    }

    .br-sharing-section-title p {
        margin-top: .08rem;
        font-size: .72rem;
        line-height: 1.3;
    }

    .br-sharing-shared-badge {
        flex: 0 0 auto;
        padding: .2rem .46rem;
        font-size: .68rem;
    }

    .br-sharing-resource-stack {
        gap: .65rem;
        padding-top: .7rem;
    }

    .br-sharing-resource-card {
        border-radius: 12px;
    }

    .br-sharing-resource-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .55rem;
        padding: .72rem .78rem;
    }

    .br-sharing-resource-head > div {
        min-width: 0;
    }

    .br-sharing-resource-head h3 {
        margin: .12rem 0 .08rem;
        font-size: .92rem;
        line-height: 1.2;
    }

    .br-sharing-resource-eyebrow,
    .br-sharing-week-badge {
        font-size: .61rem;
    }

    .br-sharing-resource-meta {
        display: block;
        font-size: .72rem;
        line-height: 1.25;
    }

    .br-sharing-resource-head > .br-btn {
        width: auto;
        min-height: 36px;
        padding: .42rem .55rem;
        font-size: .68rem;
        white-space: nowrap;
    }

    .br-sharing-recipient-row {
        align-items: center;
        flex-direction: row;
        gap: .55rem;
        padding: .65rem .78rem;
    }

    .br-sharing-recipient-avatar {
        width: 32px;
        height: 32px;
        font-size: .75rem;
    }

    .br-sharing-recipient-person {
        flex: 1 1 auto;
        min-width: 0;
        gap: .55rem;
    }

    .br-sharing-recipient-person > div > strong {
        font-size: .82rem;
    }

    .br-sharing-recipient-person > div > span {
        margin-top: .08rem;
        font-size: .69rem;
    }

    .br-sharing-recipient-row > form {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
    }

    .br-sharing-recipient-row .br-btn,
    .br-sharing-recipient-row > form .br-btn {
        width: auto;
        min-height: 36px;
        padding: .42rem .58rem;
        font-size: .69rem;
        white-space: nowrap;
    }

    .br-sharing-recipient-row-editable {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: .55rem;
    }

    .br-sharing-recipient-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .4rem;
        width: 100%;
    }

    .br-sharing-recipient-actions > form {
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .br-sharing-permission-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .4rem;
        width: 100%;
    }

    .br-sharing-permission-form .form-select {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        padding-top: .35rem;
        padding-bottom: .35rem;
        font-size: .75rem;
    }

    .br-sharing-recipient-actions .br-btn,
    .br-sharing-permission-form .br-btn {
        width: auto;
        min-height: 36px;
        padding: .42rem .58rem;
        font-size: .69rem;
        white-space: nowrap;
    }

    .br-sharing-section-empty {
        gap: .35rem;
        padding: .75rem .05rem .05rem;
        font-size: .78rem;
    }
}

@media (max-width: 360px) {
    .br-sharing-overview-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .br-sharing-overview-icon {
        display: none;
    }

    .br-sharing-resource-head {
        grid-template-columns: 1fr;
    }

    .br-sharing-resource-head > .br-btn {
        justify-self: start;
    }
}

/* Shared with Me - imported state and recipient controls */
.br-shared-imported-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .3rem;
    margin-top: .35rem;
    padding: .22rem .5rem;
    color: #0f4939 !important;
    background: #e8f3e6;
    border: 1px solid rgba(15, 73, 57, .14);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 850;
    line-height: 1;
}

.br-shared-card .br-shared-card-actions .br-btn-danger-outline {
    color: #a63a32;
    border-color: rgba(166, 58, 50, .38);
}

.br-shared-card .br-shared-card-actions .br-btn-danger-outline:hover,
.br-shared-card .br-shared-card-actions .br-btn-danger-outline:focus-visible {
    color: #fff;
    background: #a63a32;
    border-color: #a63a32;
}

@media (max-width: 620px) {
    .br-shared-card .br-shared-card-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .45rem;
    }

    .br-shared-card .br-shared-card-actions > a,
    .br-shared-card .br-shared-card-actions > form {
        width: 100%;
        min-width: 0;
    }

    .br-shared-card .br-shared-card-actions > form:last-child {
        grid-column: 1 / -1;
    }

    .br-shared-card .br-shared-card-actions .br-btn {
        width: 100%;
        min-height: 38px;
        padding: .45rem .55rem;
        font-size: .72rem;
    }

    .br-shared-imported-badge {
        margin-top: .25rem;
        font-size: .64rem;
    }
}


/* Shared with Me - compact mobile layout */
@media (max-width: 620px) {
    .br-shared-with-me-page {
        padding: .7rem .6rem 2rem;
    }

    .br-shared-with-me-page .br-sharing-hero {
        gap: .65rem;
        margin-bottom: .6rem;
        padding: .9rem;
        border-radius: 14px;
    }

    .br-shared-with-me-page .br-sharing-hero h1 {
        margin: .12rem 0 .22rem;
        font-size: 1.55rem;
        line-height: 1.08;
    }

    .br-shared-with-me-page .br-sharing-hero p {
        font-size: .8rem;
        line-height: 1.4;
    }

    .br-shared-with-me-page .br-sharing-hero > .br-btn {
        width: auto;
        min-height: 36px;
        align-self: flex-start;
        padding: .42rem .65rem;
        font-size: .72rem;
    }

    .br-shared-with-me-page > .br-sharing-card {
        margin-top: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .br-shared-with-me-page .br-shared-grid {
        gap: .5rem;
        margin-bottom: .5rem !important;
    }

    .br-shared-with-me-page .br-shared-card {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: .5rem .65rem;
        padding: .72rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 5px 14px rgba(30, 46, 39, .04);
    }

    .br-shared-with-me-page .br-shared-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: .82rem;
    }

    .br-shared-with-me-page .br-shared-card-copy {
        min-width: 0;
    }

    .br-shared-with-me-page .br-shared-card-copy > span:first-child {
        font-size: .68rem;
        line-height: 1.1;
    }

    .br-shared-with-me-page .br-shared-card-copy > strong {
        margin-top: .05rem;
        font-size: .9rem;
        line-height: 1.18;
    }

    .br-shared-with-me-page .br-shared-card-copy > small {
        margin-top: .1rem;
        font-size: .68rem;
        line-height: 1.3;
    }

    .br-shared-with-me-page .br-shared-imported-badge {
        margin-top: .22rem;
        padding: .18rem .4rem;
        font-size: .6rem;
    }

    .br-shared-with-me-page .br-shared-card .br-shared-card-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .38rem;
        width: 100%;
        margin-top: .08rem;
    }

    .br-shared-with-me-page .br-shared-card .br-shared-card-actions > a,
    .br-shared-with-me-page .br-shared-card .br-shared-card-actions > form,
    .br-shared-with-me-page .br-shared-card .br-shared-card-actions > form:last-child {
        grid-column: auto;
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    .br-shared-with-me-page .br-shared-card .br-shared-card-actions .br-btn {
        width: 100%;
        min-height: 34px;
        padding: .36rem .35rem;
        font-size: .65rem;
        line-height: 1.1;
        white-space: normal;
    }

    .br-shared-with-me-page .br-shared-card .br-shared-card-actions .br-btn i {
        margin-right: .18rem;
    }

    .br-shared-with-me-page .br-sharing-import-note {
        margin: .55rem 0 0;
        padding: .65rem .7rem;
        color: #65716b;
        background: rgba(255, 255, 255, .62);
        border: 1px solid rgba(15, 73, 57, .09);
        border-radius: 11px;
        font-size: .67rem;
        line-height: 1.4;
    }
}

@media (max-width: 360px) {
    .br-shared-with-me-page .br-shared-card .br-shared-card-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-shared-with-me-page .br-shared-card .br-shared-card-actions > form:last-child {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Meal plans - compact mobile layout
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
    .br-meal-plan-page {
        width: min(100% - 16px, 1320px);
        margin-top: 10px;
    }

    .br-meal-plan-hero {
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
    }

    .br-meal-plan-hero h1 {
        margin-top: 3px;
        font-size: 1.78rem;
    }

    .br-meal-plan-hero p {
        font-size: .86rem;
        line-height: 1.42;
    }

    .br-meal-plan-hero-actions {
        display: none;
    }

    .br-meal-plan-mobile-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .br-meal-plan-mobile-actions > .btn,
    .br-meal-plan-mobile-more > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        min-height: 42px;
        padding: 8px 12px;
        font-size: .78rem;
        font-weight: 800;
    }

    .br-meal-plan-mobile-more {
        min-width: 0;
    }

    .br-meal-plan-mobile-more .dropdown-menu {
        width: min(290px, calc(100vw - 32px));
        padding: 7px;
        border: 1px solid #dfe4dc;
        border-radius: 14px;
        box-shadow: 0 12px 30px rgb(22 56 45 / 14%);
    }

    .br-meal-plan-mobile-more .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 40px;
        padding: 9px 10px;
        border-radius: 9px;
        color: #153f32;
        font-size: .82rem;
        font-weight: 700;
    }

    .br-meal-plan-mobile-more .dropdown-item i {
        width: 18px;
        color: #2b6955;
        text-align: center;
    }

    .br-meal-plan-mobile-more .dropdown-item:hover,
    .br-meal-plan-mobile-more .dropdown-item:focus {
        background: #f1f6f1;
        color: #103f31;
    }

    .br-meal-plan-mobile-more .dropdown-item:disabled {
        color: #9aa49f;
        background: transparent;
    }

    .br-meal-plan-mobile-shared {
        position: relative;
    }

    .br-meal-plan-mobile-share-badge {
        position: static;
        min-width: 19px;
        height: 19px;
        margin-left: auto;
        padding: 0 5px;
        font-size: .61rem;
    }

    .br-meal-plan-toolbar {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
        margin: 12px 0;
    }

    .br-meal-plan-week-button {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .br-meal-plan-week-label span {
        font-size: .62rem;
    }

    .br-meal-plan-week-label strong {
        display: block;
        font-size: .9rem;
        line-height: 1.25;
    }

    .br-meal-plan-add-card {
        margin-bottom: 12px;
        padding: 14px;
        border-radius: 16px;
    }

    .br-meal-plan-add-heading {
        gap: 9px;
        margin-bottom: 11px;
    }

    .br-meal-plan-add-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .br-meal-plan-add-heading h2 {
        font-size: 1rem;
    }

    .br-meal-plan-add-heading p {
        font-size: .78rem;
        line-height: 1.35;
    }

    .br-meal-plan-add-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .br-meal-plan-recipe-field {
        grid-column: 1 / -1;
    }

    .br-meal-plan-notes-field {
        grid-column: auto;
    }

    .br-meal-plan-add-form label {
        margin-bottom: 4px;
        font-size: .7rem;
    }

    .br-meal-plan-add-form .form-control,
    .br-meal-plan-add-form .form-select,
    .br-meal-plan-add-form .br-date-picker-trigger {
        min-height: 41px;
        height: 41px;
        font-size: .84rem;
    }

    .br-meal-plan-add-button {
        grid-column: 1 / -1;
        min-height: 41px;
        width: 100%;
    }

    .br-meal-plan-days {
        gap: 10px;
    }

    .br-meal-plan-day {
        border-radius: 15px;
    }

    .br-meal-plan-day-header {
        padding: 10px 13px;
    }

    .br-meal-plan-day-header span:first-child {
        font-size: .6rem;
    }

    .br-meal-plan-day-header h2 {
        font-size: 1.04rem;
    }

    .br-meal-plan-today {
        padding: 4px 8px;
        font-size: .64rem !important;
    }

    .br-meal-plan-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .br-meal-plan-slot,
    .br-meal-plan-slot:nth-child(2) {
        min-width: 0;
        padding: 10px 11px;
        border-right: 0;
        border-bottom: 1px solid #edf0ec;
    }

    .br-meal-plan-slot:nth-child(odd) {
        border-right: 1px solid #edf0ec;
    }

    .br-meal-plan-slot:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .br-meal-plan-slot:has(.br-meal-plan-entry) {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 1px solid #edf0ec;
    }

    .br-meal-plan-slot:last-child,
    .br-meal-plan-slot:has(.br-meal-plan-entry):last-child {
        border-bottom: 0;
    }

    .br-meal-plan-slot:has(.br-meal-plan-empty-slot) {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 52px;
    }

    .br-meal-plan-slot:has(.br-meal-plan-empty-slot) .br-meal-plan-slot-label {
        flex: 0 0 auto;
        margin: 0;
        font-size: .66rem;
        letter-spacing: .025em;
    }

    .br-meal-plan-slot:has(.br-meal-plan-empty-slot) .br-meal-plan-slot-content {
        min-width: 0;
    }

    .br-meal-plan-empty-slot {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: .68rem;
        line-height: 1.15;
        text-align: right;
    }

    .br-meal-plan-slot:has(.br-meal-plan-entry) .br-meal-plan-slot-label {
        margin-bottom: 7px;
    }

    .br-meal-plan-entry {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 8px;
    }

    .br-meal-plan-entry-photo {
        width: 46px;
        height: 46px;
    }

    .br-meal-plan-entry-body h3 {
        font-size: .86rem;
    }

    .br-meal-plan-entry-actions {
        grid-column: auto;
        align-self: end;
        justify-content: flex-end;
    }

    .br-icon-button {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 380px) {
    .br-meal-plan-hero-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-meal-plan-hero-actions .btn:last-child {
        grid-column: 1 / -1;
    }

    .br-meal-plan-add-form {
        grid-template-columns: 1fr;
    }

    .br-meal-plan-recipe-field,
    .br-meal-plan-notes-field,
    .br-meal-plan-add-button {
        grid-column: 1;
    }

    .br-meal-plan-slots {
        grid-template-columns: 1fr;
    }

    .br-meal-plan-slot,
    .br-meal-plan-slot:nth-child(odd),
    .br-meal-plan-slot:nth-child(2),
    .br-meal-plan-slot:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #edf0ec;
    }

    .br-meal-plan-slot:last-child {
        border-bottom: 0;
    }
}

/* --------------------------------------------------------------------------
   Meal plans - macros at week, day, and meal levels
   -------------------------------------------------------------------------- */
.br-meal-plan-week-macros {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -4px 0 18px;
    padding: 12px 14px;
    border: 1px solid #dfe4dc;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgb(29 56 47 / 4%);
}

.br-meal-plan-week-macros-heading {
    display: grid;
    flex: 0 0 auto;
    gap: 1px;
}

.br-meal-plan-week-macros-heading > span {
    color: #4f695d;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.br-meal-plan-week-macros-heading > small {
    color: #7b8982;
    font-size: .72rem;
}

.br-meal-plan-macro-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
}

.br-meal-plan-macro-strip > span {
    display: grid;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid #e2e8e2;
    border-radius: 10px;
    background: #f7faf7;
    text-align: center;
}

.br-meal-plan-macro-strip strong {
    overflow: hidden;
    color: #143f32;
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.br-meal-plan-macro-strip small {
    margin-top: 2px;
    color: #78867f;
    font-size: .58rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.br-meal-plan-macro-strip-week {
    width: min(520px, 100%);
}

.br-meal-plan-macro-strip-week > span {
    padding: 7px 12px;
}

.br-meal-plan-macro-strip-week strong {
    font-size: 1rem;
}

.br-meal-plan-day-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.br-meal-plan-macro-strip-day {
    width: 250px;
}

.br-meal-plan-macro-strip-day > span {
    padding: 4px 7px;
    border-radius: 9px;
    background: #fff;
}

.br-meal-plan-macro-strip-day strong {
    font-size: .76rem;
}

.br-meal-plan-macro-strip-day small {
    font-size: .53rem;
}

.br-meal-plan-macro-strip-entry {
    width: min(230px, 100%);
    margin-top: 6px;
    gap: 4px;
}

.br-meal-plan-macro-strip-entry > span {
    padding: 4px 3px;
    border-radius: 8px;
}

.br-meal-plan-macro-strip-entry strong {
    font-size: .69rem;
}

.br-meal-plan-macro-strip-entry small {
    font-size: .48rem;
}

@media (max-width: 720px) {
    .br-meal-plan-week-macros {
        display: grid;
        gap: 8px;
        margin: -2px 0 12px;
        padding: 10px;
        border-radius: 14px;
    }

    .br-meal-plan-week-macros-heading {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
    }

    .br-meal-plan-macro-strip-week {
        width: 100%;
        gap: 5px;
    }

    .br-meal-plan-macro-strip-week > span {
        padding: 6px 4px;
    }

    .br-meal-plan-macro-strip-week strong {
        font-size: .84rem;
    }

    .br-meal-plan-macro-strip-week small {
        font-size: .5rem;
    }

    .br-meal-plan-day-header {
        align-items: flex-start;
        gap: 8px;
    }

    .br-meal-plan-day-header-tools {
        gap: 5px;
    }

    .br-meal-plan-macro-strip-day {
        width: 168px;
        gap: 3px;
    }

    .br-meal-plan-macro-strip-day > span {
        padding: 4px 2px;
        border-radius: 7px;
    }

    .br-meal-plan-macro-strip-day strong {
        font-size: .66rem;
    }

    .br-meal-plan-macro-strip-day small {
        font-size: .46rem;
    }

    .br-meal-plan-macro-strip-entry {
        width: 100%;
        max-width: 220px;
        margin-top: 5px;
    }
}

@media (max-width: 380px) {
    .br-meal-plan-day-header {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .br-meal-plan-day-header-tools {
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
    }

    .br-meal-plan-macro-strip-day {
        width: min(210px, 100%);
    }
}

/* --------------------------------------------------------------------------
   Meal plans - daily macro goals and per-day goal distance
   -------------------------------------------------------------------------- */
.br-meal-plan-daily-goals {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -8px 0 18px;
    padding: 12px 14px;
    border: 1px solid #d7e3d8;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbf7 0%, #fff 100%);
    box-shadow: 0 6px 18px rgb(29 56 47 / 4%);
}

.br-meal-plan-daily-goals-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.br-meal-plan-daily-goals-heading > div {
    display: grid;
    gap: 1px;
}

.br-meal-plan-daily-goals-heading span {
    color: #315f4d;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.br-meal-plan-daily-goals-heading small {
    color: #718078;
    font-size: .72rem;
}

.br-meal-plan-goals-link {
    color: #0f533f;
    font-size: .72rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.br-meal-plan-goals-link:hover {
    text-decoration: underline;
}

.br-meal-plan-macro-strip-goals {
    width: min(440px, 100%);
}

.br-meal-plan-macro-strip-goals > span {
    background: #fff;
}

.br-meal-plan-macro-strip-day {
    width: 360px;
}

.br-meal-plan-macro-strip-day > span em {
    display: block;
    min-height: 1em;
    margin-top: 4px;
    overflow: hidden;
    color: #6f7d76;
    font-size: .48rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.br-meal-plan-macro-strip-day > span.is-under-goal {
    border-color: #cfe3d3;
    background: #f5fbf5;
}

.br-meal-plan-macro-strip-day > span.is-under-goal em {
    color: #36704f;
}

.br-meal-plan-macro-strip-day > span.is-over-goal {
    border-color: #efc9bb;
    background: #fff7f3;
}

.br-meal-plan-macro-strip-day > span.is-over-goal em {
    color: #ad4f2c;
}

@media (max-width: 720px) {
    .br-meal-plan-daily-goals {
        display: grid;
        gap: 8px;
        margin: -4px 0 12px;
        padding: 10px;
        border-radius: 14px;
    }

    .br-meal-plan-daily-goals-heading {
        justify-content: space-between;
        gap: 10px;
    }

    .br-meal-plan-daily-goals-heading small {
        font-size: .64rem;
    }

    .br-meal-plan-macro-strip-goals {
        width: 100%;
        gap: 5px;
    }

    .br-meal-plan-macro-strip-goals > span {
        padding: 6px 4px;
    }

    .br-meal-plan-day-header {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .br-meal-plan-day-header-tools {
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
    }

    .br-meal-plan-macro-strip-day {
        width: min(100%, 320px);
        flex: 1 1 auto;
        gap: 3px;
    }

    .br-meal-plan-macro-strip-day > span {
        padding: 5px 2px;
    }

    .br-meal-plan-macro-strip-day > span em {
        margin-top: 3px;
        font-size: .42rem;
    }
}

@media (max-width: 380px) {
    .br-meal-plan-daily-goals-heading {
        align-items: flex-start;
    }

    .br-meal-plan-daily-goals-heading small {
        max-width: 190px;
    }

    .br-meal-plan-macro-strip-day {
        width: 100%;
    }
}


/* --------------------------------------------------------------------------
   Meal plans - desktop macro readability pass
   Keep mobile compact, but use the available desktop width instead of
   squeezing nutrition into tiny badges.
   -------------------------------------------------------------------------- */
@media (min-width: 721px) {
    .br-meal-plan-week-macros,
    .br-meal-plan-daily-goals {
        padding: 15px 18px;
        gap: 24px;
    }

    .br-meal-plan-week-macros-heading > span,
    .br-meal-plan-daily-goals-heading span {
        font-size: .74rem;
    }

    .br-meal-plan-week-macros-heading > small,
    .br-meal-plan-daily-goals-heading small {
        font-size: .82rem;
        line-height: 1.3;
    }

    .br-meal-plan-goals-link {
        font-size: .8rem;
    }

    .br-meal-plan-macro-strip-week,
    .br-meal-plan-macro-strip-goals {
        width: min(640px, 52vw);
        gap: 10px;
    }

    .br-meal-plan-macro-strip-week > span,
    .br-meal-plan-macro-strip-goals > span {
        min-height: 62px;
        align-content: center;
        padding: 10px 14px;
        border-radius: 12px;
    }

    .br-meal-plan-macro-strip-week strong,
    .br-meal-plan-macro-strip-goals strong {
        font-size: 1.18rem;
        line-height: 1.1;
    }

    .br-meal-plan-macro-strip-week small,
    .br-meal-plan-macro-strip-goals small {
        margin-top: 4px;
        font-size: .68rem;
        letter-spacing: .055em;
    }

    .br-meal-plan-day-header {
        min-height: 76px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .br-meal-plan-day-header-tools {
        gap: 14px;
    }

    .br-meal-plan-macro-strip-day {
        width: 560px;
        gap: 8px;
    }

    .br-meal-plan-macro-strip-day > span {
        min-height: 58px;
        align-content: center;
        padding: 7px 10px;
        border-radius: 10px;
    }

    .br-meal-plan-macro-strip-day strong {
        font-size: .98rem;
        line-height: 1.05;
    }

    .br-meal-plan-macro-strip-day small {
        margin-top: 3px;
        font-size: .6rem;
        letter-spacing: .04em;
    }

    .br-meal-plan-macro-strip-day > span em {
        min-height: auto;
        margin-top: 5px;
        overflow: visible;
        font-size: .64rem;
        line-height: 1.15;
        text-overflow: clip;
        white-space: nowrap;
    }

    .br-meal-plan-macro-strip-entry {
        width: min(330px, 100%);
        gap: 6px;
    }

    .br-meal-plan-macro-strip-entry > span {
        min-height: 43px;
        align-content: center;
        padding: 6px 5px;
    }

    .br-meal-plan-macro-strip-entry strong {
        font-size: .8rem;
    }

    .br-meal-plan-macro-strip-entry small {
        margin-top: 3px;
        font-size: .53rem;
    }
}

/* --------------------------------------------------------------------------
   Meal plans - desktop planned recipe card readability
   Give the recipe identity room, then let the macro strip use the full card.
   Mobile keeps the compact card layout from the mobile meal-plan pass.
   -------------------------------------------------------------------------- */
@media (min-width: 721px) {
    .br-meal-plan-entry {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 6px;
        align-items: start;
        padding: 11px;
        border-radius: 14px;
    }

    .br-meal-plan-entry-photo {
        grid-column: 1;
        grid-row: 1 / 4;
        width: 64px;
        height: 64px;
        border-radius: 11px;
    }

    .br-meal-plan-entry-body {
        display: contents;
    }

    .br-meal-plan-entry-body h3 {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        margin: 1px 0 0;
        padding-right: 4px;
        font-size: 1rem;
        line-height: 1.22;
    }

    .br-meal-plan-entry-time {
        grid-column: 2;
        grid-row: 2;
        align-self: center;
        margin: 0;
        font-size: .72rem;
        line-height: 1.2;
    }

    .br-meal-plan-entry-servings {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        margin: 0;
        font-size: .74rem;
        line-height: 1.2;
    }

    .br-meal-plan-entry-body:not(:has(.br-meal-plan-entry-time)) .br-meal-plan-entry-servings {
        grid-row: 2;
    }

    .br-meal-plan-entry-actions {
        grid-column: 3;
        grid-row: 1 / 4;
        align-self: start;
        display: grid;
        grid-template-columns: 32px;
        gap: 6px;
    }

    .br-meal-plan-entry-actions .br-icon-button {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .br-meal-plan-macro-strip-entry {
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100%;
        margin-top: 4px;
        gap: 6px;
    }

    .br-meal-plan-macro-strip-entry > span {
        min-height: 44px;
        padding: 6px 4px;
        border-radius: 9px;
    }

    .br-meal-plan-macro-strip-entry strong {
        font-size: .78rem;
    }

    .br-meal-plan-macro-strip-entry small {
        margin-top: 3px;
        font-size: .5rem;
        letter-spacing: .025em;
    }

    .br-meal-plan-entry-body p {
        grid-column: 1 / -1;
        grid-row: 5;
        margin: 2px 2px 0;
        padding-top: 7px;
        border-top: 1px solid #edf0ec;
        font-size: .76rem;
        line-height: 1.35;
    }
}

/* --------------------------------------------------------------------------
   Meal plans - planned meal action menu
   Use one compact menu trigger on desktop and mobile so recipe identity and
   macro values get the card width instead of permanent edit/delete buttons.
   -------------------------------------------------------------------------- */
.br-meal-plan-entry-actions {
    position: relative;
    align-self: start;
    justify-self: end;
    display: block;
}

.br-meal-plan-entry-menu-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid #dce5df;
    background: #f7faf7;
    color: #174b3b;
    box-shadow: none;
}

.br-meal-plan-entry-menu-toggle:hover,
.br-meal-plan-entry-menu-toggle:focus-visible,
.br-meal-plan-entry-actions.show .br-meal-plan-entry-menu-toggle {
    border-color: #9fc0b1;
    background: #edf5f0;
    color: #0f4938;
}

.br-meal-plan-entry-menu {
    min-width: 142px;
    padding: 6px;
    border: 1px solid #dfe7e1;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(24, 54, 44, .16);
    z-index: 1080;
}

.br-meal-plan-entry-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: #173f33;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}

.br-meal-plan-entry-menu-item i {
    width: 16px;
    text-align: center;
}

.br-meal-plan-entry-menu-item:hover,
.br-meal-plan-entry-menu-item:focus {
    background: #eef5f1;
    color: #0f4938;
}

.br-meal-plan-entry-menu-danger {
    color: #b14436;
}

.br-meal-plan-entry-menu-danger:hover,
.br-meal-plan-entry-menu-danger:focus {
    background: #fff1ee;
    color: #9f352b;
}

@media (max-width: 720px) {
    .br-meal-plan-entry-actions {
        align-self: start;
        justify-self: end;
    }

    .br-meal-plan-entry-menu-toggle {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .br-meal-plan-entry-menu {
        min-width: 136px;
    }
}

/* -------------------------------------------------------------------------- */
/* AI meal planner                                                            */
/* -------------------------------------------------------------------------- */

.br-ai-meal-plan-launch {
    position: relative;
}

.br-ai-meal-plan-modal .br-popup-modal-header {
    border-bottom-color: var(--br-border);
}

.br-ai-meal-plan-modal-body {
    padding: 0;
}

.br-ai-meal-plan-modal-body > form[data-ai-meal-plan-generate] {
    display: contents;
}

.br-ai-meal-plan-intro {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 18px 20px 0;
    padding: 14px 16px;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    background: var(--br-green-050);
}

.br-ai-meal-plan-intro-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    color: var(--br-forest);
    background: rgba(255, 255, 255, 0.78);
}

.br-ai-meal-plan-intro strong {
    display: block;
    margin-bottom: 3px;
    color: var(--br-ink);
    font-weight: 900;
}

.br-ai-meal-plan-intro p {
    margin: 0;
    color: var(--br-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.br-ai-meal-plan-options {
    display: grid;
    gap: 18px;
    padding: 18px 20px 0;
}

.br-ai-meal-plan-meals {
    margin: 0;
    padding: 0;
    border: 0;
}

.br-ai-meal-plan-meals legend,
.br-ai-meal-plan-options .br-field-group > label {
    margin-bottom: 7px;
    color: var(--br-ink);
    font-size: 0.78rem;
    font-weight: 900;
}

.br-ai-meal-plan-meal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.br-ai-meal-plan-meal-grid label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.br-ai-meal-plan-meal-grid input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.br-ai-meal-plan-meal-grid span {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid var(--br-border-strong);
    border-radius: 12px;
    background: var(--br-paper);
    color: var(--br-ink);
    font-size: 0.86rem;
    font-weight: 850;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.br-ai-meal-plan-meal-grid input:checked + input + span,
.br-ai-meal-plan-meal-grid input:checked + span {
    border-color: var(--br-green-600);
    background: var(--br-green-050);
    color: var(--br-green-900);
}

.br-ai-meal-plan-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.br-ai-meal-plan-minutes-field {
    position: relative;
}

.br-ai-meal-plan-minutes-field .form-control {
    padding-right: 52px;
}

.br-ai-meal-plan-minutes-field > span {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--br-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.br-ai-meal-plan-toggles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.br-ai-meal-plan-toggles label {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--br-border);
    border-radius: 12px;
    background: var(--br-paper);
    cursor: pointer;
}

.br-ai-meal-plan-toggle-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.br-ai-meal-plan-toggles strong,
.br-ai-meal-plan-toggles small {
    display: block;
}

.br-ai-meal-plan-toggles strong {
    color: var(--br-ink);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
}

.br-ai-meal-plan-toggles small {
    margin-top: 3px;
    color: var(--br-muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.br-ai-meal-plan-preferences textarea {
    resize: vertical;
    min-height: 82px;
}

.br-ai-meal-plan-notice {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 16px 20px 0;
    padding: 11px 13px;
    border-radius: 12px;
    color: var(--br-muted);
    background: var(--br-surface-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.br-ai-meal-plan-notice i {
    margin-top: 2px;
    color: var(--br-forest);
}

.br-ai-meal-plan-progress {
    margin: 18px 20px 0;
    padding: 15px;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    background: var(--br-paper);
}

.br-ai-meal-plan-progress-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.br-ai-meal-plan-progress-heading strong {
    display: block;
    margin-top: 3px;
    color: var(--br-ink);
    font-size: 0.95rem;
    font-weight: 900;
}

.br-ai-meal-plan-progress-heading > span {
    color: var(--br-muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.br-ai-meal-plan-progress-track {
    position: relative;
    overflow: hidden;
    height: 7px;
    margin: 13px 0 10px;
    border-radius: 999px;
    background: var(--br-green-100);
}

.br-ai-meal-plan-progress-track span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36%;
    border-radius: inherit;
    background: var(--br-forest);
    animation: br-ai-meal-plan-progress 1.25s ease-in-out infinite;
}

.br-ai-meal-plan-progress p {
    margin: 0;
    color: var(--br-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

@keyframes br-ai-meal-plan-progress {
    0% { left: -36%; }
    100% { left: 100%; }
}

.br-ai-meal-plan-error {
    margin: 16px 20px 0;
    padding: 11px 13px;
    border: 1px solid rgba(194, 55, 48, 0.28);
    border-radius: 12px;
    color: var(--br-danger-700);
    background: rgba(194, 55, 48, 0.06);
    font-size: 0.82rem;
    font-weight: 750;
}

.br-ai-meal-plan-preview {
    padding: 18px 20px 0;
}

.br-ai-meal-plan-preview-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.br-ai-meal-plan-preview-header h3 {
    margin: 2px 0 3px;
    color: var(--br-ink);
    font-size: 1.15rem;
    font-weight: 900;
}

.br-ai-meal-plan-preview-header p {
    margin: 0;
    color: var(--br-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.br-ai-meal-plan-select-all {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.76rem;
}

.br-ai-meal-plan-preview-list {
    display: grid;
    gap: 12px;
}

.br-ai-meal-plan-preview-day {
    overflow: hidden;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    background: var(--br-paper);
}

.br-ai-meal-plan-preview-day h4 {
    margin: 0;
    padding: 9px 12px;
    border-bottom: 1px solid var(--br-border);
    background: var(--br-surface-muted);
    color: var(--br-ink);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.br-ai-meal-plan-preview-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 12px;
    cursor: pointer;
}

.br-ai-meal-plan-preview-item + .br-ai-meal-plan-preview-item {
    border-top: 1px solid var(--br-border);
}

.br-ai-meal-plan-preview-item > input {
    margin-top: 3px;
    accent-color: var(--br-forest);
}

.br-ai-meal-plan-preview-item-body,
.br-ai-meal-plan-preview-item-top,
.br-ai-meal-plan-preview-item-top > span {
    display: block;
    min-width: 0;
}

.br-ai-meal-plan-preview-item-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.br-ai-meal-plan-preview-item-top small,
.br-ai-meal-plan-preview-item-top strong {
    display: block;
}

.br-ai-meal-plan-preview-item-top small {
    color: var(--br-orange-700);
    font-size: 0.68rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.br-ai-meal-plan-preview-item-top strong {
    margin-top: 1px;
    color: var(--br-ink);
    font-size: 0.9rem;
    font-weight: 900;
}

.br-ai-meal-plan-source {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.63rem;
    font-weight: 900;
    line-height: 1;
}

.br-ai-meal-plan-source.is-personal {
    color: var(--br-green-800);
    background: var(--br-green-100);
}

.br-ai-meal-plan-source.is-public {
    color: var(--br-orange-700);
    background: var(--br-orange-soft);
}

.br-ai-meal-plan-reason {
    display: block;
    margin-top: 5px;
    color: var(--br-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.br-ai-meal-plan-preview-macros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-top: 9px;
}

.br-ai-meal-plan-preview-macros > span {
    display: grid;
    justify-items: center;
    min-width: 0;
    padding: 6px 4px;
    border: 1px solid var(--br-border);
    border-radius: 9px;
    background: var(--br-surface-muted);
}

.br-ai-meal-plan-preview-macros strong {
    color: var(--br-ink);
    font-size: 0.75rem;
    font-weight: 900;
}

.br-ai-meal-plan-preview-macros small {
    color: var(--br-muted);
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.035em;
}

.br-ai-meal-plan-preview-servings {
    display: block;
    margin-top: 6px;
    color: var(--br-muted);
    font-size: 0.7rem;
    font-weight: 750;
}

.br-ai-meal-plan-usage {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--br-green-900);
    background: var(--br-green-050);
    font-size: 0.74rem;
    font-weight: 800;
}

.br-ai-meal-plan-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px 20px;
}

.br-ai-meal-plan-footer .br-btn {
    flex: 1 1 0;
}

@media (max-width: 767.98px) {
    .br-ai-meal-plan-intro,
    .br-ai-meal-plan-options,
    .br-ai-meal-plan-notice,
    .br-ai-meal-plan-progress,
    .br-ai-meal-plan-error,
    .br-ai-meal-plan-preview {
        margin-left: 14px;
        margin-right: 14px;
    }

    .br-ai-meal-plan-options,
    .br-ai-meal-plan-preview {
        padding-left: 0;
        padding-right: 0;
    }

    .br-ai-meal-plan-meal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-ai-meal-plan-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .br-ai-meal-plan-toggles {
        grid-template-columns: 1fr;
    }

    .br-ai-meal-plan-preview-header {
        align-items: center;
    }

    .br-ai-meal-plan-footer {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .br-ai-meal-plan-fields {
        grid-template-columns: 1fr;
    }

    .br-ai-meal-plan-preview-item-top {
        gap: 6px;
    }

    .br-ai-meal-plan-source {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .br-ai-meal-plan-footer {
        flex-wrap: wrap;
    }

    .br-ai-meal-plan-footer .br-btn {
        flex: 1 1 calc(50% - 4px);
    }
}

/* AI meal planner enhancements: targeted replanning, alternatives, leftovers and budget mode. */
.br-meal-plan-ai-day-button {
    min-height: 38px;
    padding: .45rem .7rem;
    font-size: .78rem;
    white-space: nowrap;
}

.br-meal-plan-leftover-badge,
.br-meal-plan-leftover-prep {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    width: fit-content;
    max-width: 100%;
    padding: .28rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
}

.br-meal-plan-leftover-badge {
    background: #fff4df;
    color: #8b5711;
}

.br-meal-plan-leftover-prep {
    background: var(--br-green-050);
    color: var(--br-green-800);
}

.br-ai-meal-plan-profile-rules {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: .8rem .9rem;
    border: 1px solid var(--br-border);
    border-radius: 14px;
    background: var(--br-green-050);
}

.br-ai-meal-plan-profile-rules > i {
    color: var(--br-green-800);
}

.br-ai-meal-plan-profile-rules div {
    display: grid;
    gap: .12rem;
}

.br-ai-meal-plan-profile-rules strong {
    font-size: .86rem;
}

.br-ai-meal-plan-profile-rules span,
.br-ai-meal-plan-profile-link {
    font-size: .78rem;
}

.br-ai-meal-plan-profile-link {
    font-weight: 850;
    white-space: nowrap;
}

.br-ai-meal-plan-meal-grid label.is-locked {
    opacity: .42;
    pointer-events: none;
}

.br-ai-meal-plan-preview-slot {
    display: grid;
    gap: .55rem;
    margin-top: .8rem;
}

.br-ai-meal-plan-preview-slot + .br-ai-meal-plan-preview-slot {
    padding-top: .85rem;
    border-top: 1px solid var(--br-border);
}

.br-ai-meal-plan-preview-slot-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}

.br-ai-meal-plan-preview-slot-heading strong {
    color: var(--br-green-900);
    font-size: .9rem;
}

.br-ai-meal-plan-preview-slot-heading small {
    color: var(--br-muted);
    font-size: .72rem;
}

.br-ai-meal-plan-preview-item.is-alternative {
    background: #fbfcfa;
}

.br-ai-meal-plan-preview-item.is-leftover {
    border-color: #e5c98f;
    background: #fffaf0;
}

.br-ai-meal-plan-choice-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .3rem;
}

.br-ai-meal-plan-source.is-leftover {
    background: #fff0ce;
    color: #8b5711;
}

.br-ai-meal-plan-rules-summary {
    margin-top: .75rem;
    padding: .65rem .75rem;
    border-radius: 12px;
    background: var(--br-green-050);
    color: var(--br-green-900);
    font-size: .78rem;
}

@media (max-width: 767.98px) {
    .br-meal-plan-ai-day-button {
        width: 38px;
        min-width: 38px;
        padding: 0;
        justify-content: center;
    }

    .br-meal-plan-ai-day-button span {
        display: none;
    }

    .br-ai-meal-plan-profile-rules {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .br-ai-meal-plan-profile-link {
        grid-column: 2;
        justify-self: start;
    }

    .br-ai-meal-plan-choice-badges {
        justify-content: flex-start;
    }

    .br-ai-meal-plan-preview-slot-heading {
        align-items: center;
    }
}

/* Nutrition: AI meal-planning dietary rules */
.br-dietary-rules-card {
    background: var(--br-surface, #fffdf6);
    border: 1px solid rgba(32, 65, 45, .12);
    border-radius: 22px;
    padding: 1.2rem;
    box-shadow: 0 8px 28px rgba(34, 55, 39, .06);
}

.br-dietary-rules-form {
    display: grid;
    gap: 1rem;
}

.br-dietary-rules-grid,
.br-dietary-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.br-dietary-toggle {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
    min-height: 92px;
    padding: 1rem;
    border: 1px solid rgba(32, 65, 45, .14);
    border-radius: 16px;
    background: rgba(242, 248, 242, .58);
    cursor: pointer;
}

.br-dietary-toggle > input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    margin: .15rem 0 0;
    border: 1px solid rgba(32, 65, 45, .24);
    border-radius: 999px;
    background: #dfe6df;
    position: relative;
    flex: 0 0 auto;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.br-dietary-toggle > input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 48, 34, .28);
    transition: transform .16s ease;
}

.br-dietary-toggle > input[type="checkbox"]:checked {
    background: var(--br-green, #0c513c);
    border-color: var(--br-green, #0c513c);
}

.br-dietary-toggle > input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

.br-dietary-toggle > input[type="checkbox"]:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(20, 103, 76, .18);
}

.br-dietary-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(20, 103, 76, .08);
    color: var(--br-green, #0c513c);
}

.br-dietary-toggle strong,
.br-dietary-toggle small {
    display: block;
}

.br-dietary-toggle strong {
    color: var(--br-ink, #143728);
    margin-bottom: .2rem;
}

.br-dietary-toggle small {
    color: var(--br-muted, #6b756f);
    line-height: 1.4;
}

.br-dietary-warning {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: rgba(244, 236, 204, .45);
    color: var(--br-muted, #66716b);
    font-size: .86rem;
    line-height: 1.45;
}

.br-dietary-warning > i {
    color: var(--br-green, #0c513c);
    margin-top: .15rem;
}

.br-dietary-rules-actions {
    display: flex;
    justify-content: flex-end;
}

.br-dietary-rules-actions .br-btn {
    min-width: 210px;
}

@media (max-width: 720px) {
    .br-dietary-rules-grid,
    .br-dietary-toggle-grid {
        grid-template-columns: 1fr;
    }

    .br-dietary-rules-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .br-dietary-toggle {
        min-height: 0;
        padding: .85rem;
    }

    .br-dietary-rules-actions .br-btn {
        width: 100%;
        min-width: 0;
    }
}

/* Nutrition - mobile density cleanup
   Keep the dashboard readable without turning a phone into a twelve-foot receipt. */
@media (max-width: 600px) {
    .br-nutrition-page {
        gap: .8rem;
    }

    .br-nutrition-hero {
        padding-top: .75rem;
        gap: .65rem;
    }

    .br-nutrition-hero h1 {
        font-size: 1.75rem;
        margin-bottom: .2rem;
    }

    .br-nutrition-hero p {
        font-size: .86rem;
        line-height: 1.4;
    }

    .br-nutrition-week-nav {
        gap: .45rem;
    }

    .br-macro-calculator-card,
    .br-nutrition-goals-card,
    .br-dietary-rules-card {
        padding: .9rem;
        border-radius: 16px;
    }

    .br-nutrition-section-heading h2 {
        font-size: 1.18rem;
        margin-bottom: .2rem;
    }

    .br-nutrition-section-heading p {
        margin-bottom: .75rem;
        font-size: .82rem;
        line-height: 1.42;
    }

    .br-macro-calculator-heading {
        gap: .7rem;
    }

    .br-macro-unit-toggle {
        width: 100%;
        padding: .15rem;
    }

    .br-macro-unit-button {
        min-height: 34px;
        padding: .35rem .55rem;
        font-size: .78rem;
    }

    /* Keep the calculator compact on phones:
       Goal + Sex, Age + Weight, then full-width Height/Activity. */
    .br-macro-calculator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .6rem;
    }

    /* Goal + Sex, then Age + Weight, then Height. Keep both unit systems aligned. */
    .br-macro-calculator-grid > .br-field-group:nth-child(3),
    .br-macro-calculator-grid > .br-field-group:nth-child(6),
    .br-macro-calculator-grid > .br-field-group:nth-child(7) {
        order: 1;
    }

    .br-macro-calculator-grid > .br-field-group:nth-child(4),
    .br-macro-calculator-grid > .br-field-group:nth-child(5) {
        order: 2;
        grid-column: 1 / -1;
    }

    .br-macro-activity-field {
        order: 3;
        grid-column: 1 / -1;
    }

    .br-macro-calculate-button {
        order: 4;
        grid-column: 1 / -1;
    }

    .br-macro-calculator-grid .form-control,
    .br-macro-calculator-grid .form-select,
    .br-nutrition-goals-form .form-control,
    .br-dietary-rules-form .form-control,
    .br-dietary-rules-form .form-select {
        min-height: 40px;
    }

    .br-macro-height-row {
        gap: .4rem;
    }

    .br-macro-formula-note {
        margin-top: .65rem;
        font-size: .72rem;
        line-height: 1.4;
    }

    .br-macro-result-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
    }

    .br-macro-result-summary > div,
    .br-macro-result-grid article {
        padding: .7rem;
        border: 1px solid rgba(32, 65, 45, .10);
        border-radius: 12px;
        background: #fff;
    }

    .br-macro-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    /* Four daily goals become a tidy 2x2 block rather than four full-width rows. */
    .br-nutrition-goals-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: .6rem;
    }

    .br-nutrition-goals-form .br-btn {
        grid-column: 1 / -1;
        min-height: 42px;
    }

    /* Dietary controls: fields stay readable, binary rules sit side-by-side. */
    .br-dietary-rules-form {
        gap: .7rem;
    }

    .br-dietary-rules-grid {
        grid-template-columns: 1fr;
        gap: .6rem;
    }

    .br-dietary-toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .br-dietary-toggle {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "check icon"
            "title title";
        align-items: center;
        gap: .4rem .5rem;
        padding: .65rem;
        border-radius: 13px;
        min-width: 0;
    }

    .br-dietary-toggle > input[type="checkbox"] {
        grid-area: check;
        margin: 0;
        align-self: center;
    }

    .br-dietary-toggle-icon {
        grid-area: icon;
        width: 32px;
        height: 32px;
        border-radius: 10px;
        justify-self: end;
    }

    .br-dietary-toggle > span:last-child {
        grid-area: title;
        min-width: 0;
    }

    .br-dietary-toggle strong {
        margin: 0;
        font-size: .84rem;
        text-align: center;
    }

    .br-dietary-toggle small {
        display: none;
    }

    .br-dietary-warning {
        gap: .5rem;
        padding: .65rem .7rem;
        border-radius: 12px;
        font-size: .74rem;
        line-height: 1.4;
    }

    .br-dietary-rules-actions .br-btn {
        min-height: 42px;
    }

    /* Daily averages should be glanceable metrics, not four separate billboards. */
    .br-nutrition-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: .55rem;
    }

    .br-nutrition-summary-card {
        min-height: 92px;
        padding: .7rem .75rem;
        border-radius: 14px;
        align-content: center;
    }

    .br-nutrition-summary-card span,
    .br-nutrition-summary-card small {
        font-size: .7rem;
    }

    .br-nutrition-summary-card strong {
        font-size: 1.25rem;
        line-height: 1.1;
    }

    .br-nutrition-empty {
        padding: 1.4rem .9rem;
    }

    .br-nutrition-empty h2 {
        font-size: 1.2rem;
    }

    .br-nutrition-empty p {
        font-size: .82rem;
        line-height: 1.4;
    }

    .br-nutrition-disclaimer {
        font-size: .72rem;
        line-height: 1.4;
    }
}

@media (max-width: 360px) {
    .br-macro-calculator-grid,
    .br-nutrition-goals-form,
    .br-dietary-toggle-grid,
    .br-nutrition-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .br-macro-calculator-grid > .br-field-group,
    .br-macro-calculate-button {
        grid-column: 1 !important;
    }

    .br-dietary-toggle small {
        display: block;
        margin-top: .2rem;
        font-size: .7rem;
    }
}

/* Nutrition desktop polish: make the macro calculator use the full card width. */
@media (min-width: 1101px) {
    .br-macro-calculator-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        width: 100%;
    }

    .br-macro-calculator-grid > .br-field-group:nth-child(1),
    .br-macro-calculator-grid > .br-field-group:nth-child(2),
    .br-macro-calculator-grid > .br-field-group:nth-child(3) {
        grid-column: span 2;
    }

    .br-macro-calculator-grid > .br-field-group:nth-child(4),
    .br-macro-calculator-grid > .br-field-group:nth-child(5),
    .br-macro-calculator-grid > .br-field-group:nth-child(6),
    .br-macro-calculator-grid > .br-field-group:nth-child(7) {
        grid-column: span 3;
    }

    .br-macro-activity-field {
        grid-column: span 8;
    }

    .br-macro-calculate-button {
        grid-column: span 4;
        width: 100%;
    }
}

/* Unified Discover + Browse recipes */
.br-discover-feed-toolbar{
    grid-template-columns:minmax(0,1fr) auto;
    gap:.65rem;
    padding:.75rem;
    margin:1rem 0 .75rem;
    background:#fff;
    border:1px solid rgba(15,73,57,.12);
    border-radius:16px;
    box-shadow:0 6px 20px rgba(31,49,39,.035);
}
.br-discover-search-submit{
    min-width:112px;
}
.br-discover-mobile-filter-row{
    display:none;
}
.br-discover-advanced-filters{
    grid-column:1 / -1;
    display:grid !important;
    grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(150px,.8fr) auto auto;
    gap:.65rem;
    align-items:center;
}
.br-discover-advanced-filters select{
    width:100%;
    min-width:0;
    min-height:42px;
    padding:.62rem .75rem;
    border:1px solid rgba(15,73,57,.16);
    border-radius:11px;
    background:#fff;
    color:#2b3f31;
}
.br-discover-filter-apply,
.br-discover-desktop-reset{
    min-height:42px;
    white-space:nowrap;
}
.br-discover-result-count{
    margin:.3rem 0 0;
    color:#6a756d;
    font-size:.88rem;
}
.br-discover-result-count strong{
    color:#244833;
}
.br-discover-feed-quick{
    scrollbar-width:none;
}
.br-discover-feed-quick::-webkit-scrollbar{
    display:none;
}

@media(max-width:680px){
    .br-discover-feed-toolbar{
        grid-template-columns:minmax(0,1fr) auto;
        gap:.5rem;
        padding:.65rem;
    }
    .br-discover-feed-search input{
        min-height:40px;
        padding-block:.58rem;
    }
    .br-discover-search-submit{
        min-width:44px;
        width:44px;
        padding-inline:0;
    }
    .br-discover-search-submit span{
        display:none;
    }
    .br-discover-mobile-filter-row{
        grid-column:1 / -1;
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        gap:.5rem;
    }
    .br-discover-filter-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        gap:.42rem;
        min-width:0;
    }
    .br-discover-filter-count{
        display:inline-grid;
        min-width:20px;
        height:20px;
        padding:0 .35rem;
        place-items:center;
        border-radius:999px;
        background:#315f39;
        color:#fff;
        font-size:.68rem;
        font-weight:850;
    }
    .br-discover-filter-chevron{
        margin-left:auto;
        transition:transform .18s ease;
    }
    .br-discover-filter-toggle[aria-expanded="true"] .br-discover-filter-chevron{
        transform:rotate(180deg);
    }
    .br-discover-advanced-filters.collapse{
        grid-column:1 / -1;
        display:none !important;
        grid-template-columns:1fr;
        gap:.5rem;
        padding-top:.15rem;
    }
    .br-discover-advanced-filters.collapse.show,
    .br-discover-advanced-filters.collapsing{
        display:grid !important;
    }
    .br-discover-advanced-filters select,
    .br-discover-filter-apply,
    .br-discover-desktop-reset{
        width:100%;
    }
    .br-discover-desktop-reset{
        display:none;
    }
    .br-discover-feed-quick{
        margin-inline:-.15rem;
        padding-inline:.15rem;
    }
}
@media(max-width:680px){
    .br-discover-feed-toolbar .br-discover-search-submit{
        width:44px;
        min-width:44px;
    }
    .br-discover-feed-toolbar .br-discover-mobile-filter-row .br-btn{
        width:auto;
    }
    .br-discover-feed-toolbar .br-discover-mobile-filter-row .br-discover-filter-toggle{
        width:100%;
    }
}
.br-discover-guest-view,
.br-discover-guest-signin{
    flex:1 1 0;
    justify-content:center;
}
@media(max-width:680px){
    .br-discover-feed-actions > .br-discover-guest-view,
    .br-discover-feed-actions > .br-discover-guest-signin{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:0;
        min-height:40px;
        padding:.42rem .45rem;
        font-size:.72rem;
        white-space:nowrap;
    }
}
@media(min-width:681px) and (max-width:900px){
    .br-discover-advanced-filters{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .br-discover-advanced-filters .br-discover-filter-apply,
    .br-discover-advanced-filters .br-discover-desktop-reset{
        width:100%;
    }
}
@media(min-width:681px) and (max-width:1000px){
    .br-discover-feed-toolbar .br-discover-search-submit{
        width:auto;
    }
}

/* Discover recipe cards - compact per-serving macros */
.br-discover-feed-macros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: .65rem 0;
    min-width: 0;
}

.br-discover-feed-macros > span {
    display: grid;
    min-width: 0;
    padding: 5px 4px;
    border: 1px solid #e2e8e2;
    border-radius: 9px;
    background: #f7faf7;
    text-align: center;
}

.br-discover-feed-macros strong {
    overflow: hidden;
    color: #143f32;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.br-discover-feed-macros small {
    margin-top: 2px;
    color: #78867f;
    font-size: .5rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
}

@media (max-width: 680px) {
    .br-discover-feed-macros {
        gap: 4px;
        margin: .6rem 0;
    }

    .br-discover-feed-macros > span {
        padding: 6px 3px;
    }

    .br-discover-feed-macros strong {
        font-size: .8rem;
    }

    .br-discover-feed-macros small {
        font-size: .5rem;
    }
}

/* ==========================================================================
   Navigation cleanup - keep everyday tools in one Kitchen menu and keep the
   account menu focused on account/admin actions.
   ========================================================================== */
.br-kitchen-dropdown {
    width: 540px;
    max-width: min(540px, calc(100vw - 32px));
    padding: 10px;
}

.br-nav-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.br-nav-menu-column {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.br-nav-menu-group {
    min-width: 0;
    padding: 5px;
    background: rgba(247, 244, 232, .52);
    border: 1px solid rgba(32, 65, 45, .08);
    border-radius: 10px;
}

.br-dropdown-section-label {
    display: block;
    padding: 5px 10px 4px;
    color: var(--br-green-700);
    font-size: .61rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.br-kitchen-dropdown .dropdown-item,
.br-account-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 2px;
}

.br-kitchen-dropdown .dropdown-item i,
.br-account-dropdown .dropdown-item i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
    color: var(--br-green-800);
}

.br-account-dropdown {
    min-width: 270px;
    padding: 8px;
}

.br-account-dropdown > li > .br-dropdown-section-label {
    padding-top: 7px;
}

.br-account-admin-tools {
    margin: 0;
}

.br-account-admin-summary {
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.br-account-admin-summary::-webkit-details-marker {
    display: none;
}

.br-account-admin-summary::marker {
    content: "";
}

.br-account-admin-summary > span {
    display: flex;
    align-items: center;
    min-width: 0;
}

.br-account-admin-summary .br-account-admin-chevron {
    width: auto;
    flex: 0 0 auto;
    margin-left: 8px;
    color: var(--br-muted);
    font-size: .66rem;
    transition: transform .16s ease;
}

.br-account-admin-tools[open] .br-account-admin-chevron {
    transform: rotate(180deg);
}

.br-account-admin-list {
    margin: 4px 2px 0 20px;
    padding: 5px;
    background: rgba(247, 244, 232, .62);
    border-left: 2px solid rgba(30, 90, 70, .15);
    border-radius: 0 9px 9px 0;
}

.br-account-admin-list .dropdown-item {
    min-height: 34px;
    padding: 7px 8px;
    font-size: .78rem;
}

@media (max-width: 1199.98px) {
    #beastRecipesNavigation .br-kitchen-dropdown {
        width: 100%;
        max-width: none;
        padding: 7px;
    }

    #beastRecipesNavigation .br-nav-menu-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    #beastRecipesNavigation .br-nav-menu-column {
        gap: 7px;
    }

    #beastRecipesNavigation .br-nav-menu-group {
        padding: 4px;
        background: rgba(247, 244, 232, .55);
    }

    #beastRecipesNavigation .br-dropdown-section-label {
        padding: 6px 9px 4px;
    }

    #beastRecipesNavigation .br-kitchen-dropdown .dropdown-item {
        min-height: 38px;
        padding: 7px 9px;
    }

    .br-mobile-account-slot .br-account-dropdown {
        padding: 7px;
    }

    .br-mobile-account-slot .br-account-admin-list {
        margin-left: 16px;
    }
}

/* Shopping list mobile pass 2 - weekly controls and item rows */
@media (max-width: 620px) {
    .br-shopping-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
        gap: 7px;
    }

    .br-shopping-hero-actions > .btn,
    .br-shopping-hero-actions > form:not(.br-shopping-sync-form),
    .br-shopping-hero-actions > form:not(.br-shopping-sync-form) .btn {
        width: 100%;
        min-width: 0;
    }

    .br-shopping-sync-form {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin: 0;
        padding: 7px 8px;
        border: 1px solid rgba(15, 73, 57, .12);
        border-radius: 11px;
        background: rgba(255, 255, 255, .55);
    }

    .br-shopping-sync-form .br-shopping-pantry-switch {
        min-width: 0;
        margin: 0;
        gap: 7px;
        font-size: .72rem;
        line-height: 1.15;
        white-space: normal;
    }

    .br-shopping-sync-form .br-shopping-pantry-switch-track {
        width: 38px;
        height: 22px;
        flex-basis: 38px;
    }

    .br-shopping-sync-form .br-shopping-pantry-switch-thumb {
        width: 16px;
        height: 16px;
    }

    .br-shopping-sync-form .br-shopping-pantry-switch input:checked + .br-shopping-pantry-switch-track .br-shopping-pantry-switch-thumb {
        transform: translateX(16px);
    }

    .br-shopping-sync-form .btn {
        width: auto !important;
        min-width: 126px;
        min-height: 36px !important;
        padding: .42rem .55rem !important;
        font-size: .72rem !important;
        white-space: nowrap;
    }

    .br-shopping-weekbar {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
        margin: 10px 0;
    }

    .br-shopping-week-button {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .br-shopping-week-title strong {
        font-size: .94rem;
    }

    .br-shopping-week-title span {
        font-size: .61rem;
    }

    .br-shopping-list-card {
        padding: 10px;
    }

    .br-shopping-list-heading {
        margin-bottom: 8px;
    }

    .br-shopping-list-actions {
        width: auto;
    }

    .br-shopping-unit-converter .br-rd-convert-units-button {
        min-height: 34px;
        padding: .38rem .58rem;
        font-size: .7rem;
    }

    .br-shopping-item {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "leading main actions";
        align-items: start;
        gap: 7px 8px;
        min-height: 0;
        padding: 9px;
    }

    .br-shopping-item-leading {
        grid-area: leading;
        align-self: start;
        gap: 5px;
    }

    .br-shopping-item-main {
        grid-area: main;
        padding-top: 1px;
    }

    .br-shopping-item-actions {
        grid-area: actions;
        align-self: start;
        justify-self: end;
        width: auto;
        gap: 5px !important;
        margin: 0;
        padding: 0;
    }

    .br-shopping-item-actions .br-icon-button {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        border-radius: 9px;
        font-size: .72rem;
    }

    .br-shopping-check-button {
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
    }

    .br-shopping-photo-thumb {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 9px;
    }

    .br-shopping-item-title-row {
        align-items: flex-start;
        gap: 4px 6px;
    }

    .br-shopping-item h3 {
        flex: 1 1 100%;
        width: 100%;
        font-size: .89rem;
        line-height: 1.18;
    }

    .br-shopping-plan-badge,
    .br-shopping-manual-badge {
        min-height: 19px;
        margin-top: 0;
        padding: 3px 7px;
        font-size: .58rem;
    }

    .br-shopping-item-amount {
        margin-top: 4px;
        font-size: .78rem;
    }

    .br-shopping-item p {
        margin-top: 4px;
        font-size: .72rem;
        line-height: 1.35;
    }

    .br-shopping-item + .br-shopping-item {
        border-top-color: #e7ece8;
    }
}

@media (max-width: 370px) {
    .br-shopping-hero-actions {
        grid-template-columns: 1fr;
    }

    .br-shopping-sync-form {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .br-shopping-sync-form .btn {
        width: 100% !important;
    }
}



/* Shopping list: the item card itself is the purchased toggle. */
.br-shopping-item.is-clickable {
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.br-shopping-item.is-clickable:hover {
    background: #fbfdfb;
}

.br-shopping-item.is-clickable:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(27, 101, 79, .22);
    outline-offset: -3px;
}

.br-shopping-item.is-clickable.is-checked {
    background: #f1f6f2;
}

.br-shopping-item.is-clickable.is-checked:hover,
.br-shopping-item.is-clickable.is-checked:focus-visible {
    background: #edf4ef;
}

.br-shopping-item.is-updating {
    pointer-events: none;
    opacity: .68;
}

.br-shopping-item-leading:empty {
    display: none;
}

@media (max-width: 620px) {
    .br-shopping-item.is-clickable:active {
        transform: scale(.995);
        background: #f4f8f5;
    }

    .br-shopping-item-leading:empty + .br-shopping-item-main {
        grid-column: 1 / 3;
    }
}

/* Discover / What Can I Make - no-reload card actions */
.br-discover-feed-card,
.br-discover-card {
    transition: opacity .18s ease, transform .18s ease, height .22s ease, margin .22s ease, border-width .22s ease;
}

.br-discover-feed-card.is-hiding,
.br-discover-card.is-hiding {
    height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    opacity: 0;
    transform: scale(.98);
}

[data-discover-save-button].is-saved,
[data-discover-add-missing-button].is-complete {
    border-color: rgba(49, 95, 57, .26);
    background: #eef6ea;
    color: #315f39;
}

[data-discover-save-button][aria-busy="true"],
[data-discover-add-missing-button][aria-busy="true"] {
    cursor: wait;
}

/* Recipe sharing mobile: keep member identity and Share action on one row. */
@media (max-width: 720px) {
    .br-sharing-results .br-sharing-member-row {
        flex-direction: row;
        align-items: center;
        gap: .75rem;
    }

    .br-sharing-results .br-sharing-member {
        min-width: 0;
        flex: 1 1 auto;
    }

    .br-sharing-results .br-sharing-member-row form {
        flex: 0 0 auto;
        width: auto;
        margin-left: auto;
    }

    .br-sharing-results .br-sharing-member-row .br-btn {
        width: auto;
        white-space: nowrap;
    }

    .br-sharing-results .br-sharing-shared-badge {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* ========================================================================== 
   Kitchen header launcher - matches the native app header treatment.
   ========================================================================== */
.br-kitchen-header-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.br-kitchen-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 40px;
    padding: 0;
    color: var(--br-green-900);
    background: #fff;
    border: 1px solid var(--br-border);
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.br-kitchen-header-button:hover,
.br-kitchen-header-button:focus-visible,
.br-kitchen-header-button[aria-expanded="true"] {
    color: var(--br-green-950);
    background: var(--br-green-050);
    border-color: var(--br-border-strong);
}

.br-kitchen-header-dropdown {
    margin-top: 8px !important;
}

@media (max-width: 1199.98px) {
    .br-brand {
        max-width: calc(100% - 200px);
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown {
        position: fixed !important;
        top: 68px !important;
        right: 10px !important;
        left: auto !important;
        width: min(360px, calc(100vw - 20px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 82px);
        max-height: calc(100dvh - 82px);
        margin: 0 !important;
        padding: 8px;
        overflow-y: auto;
        transform: none !important;
        z-index: 1060;
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown .br-nav-menu-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown .br-nav-menu-column {
        gap: 8px;
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown .br-nav-menu-group {
        padding: 4px;
        background: rgba(247, 244, 232, .55);
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown .dropdown-item {
        min-height: 38px;
        padding: 7px 9px;
        border-radius: 9px;
        font-size: .82rem;
    }
}

@media (max-width: 575.98px) {
    .br-brand {
        max-width: calc(100% - 194px);
    }

    .br-mobile-account-slot {
        gap: 5px;
    }

    .br-mobile-account-slot .br-kitchen-header-dropdown {
        right: 8px !important;
        width: min(360px, calc(100vw - 16px)) !important;
        max-width: calc(100vw - 16px) !important;
    }
}

/* Unified action-button authority. Screen-specific rules must not redefine action shapes. */
:root { --br-action-height: 44px; --br-action-radius: 12px; --br-action-space: 8px; }
.br-mockup-actions .btn, .br-promo-copy a.btn,
.br-discover-feed-actions .btn:not(.btn-icon), .br-discover-actions .btn:not(.btn-icon),
.br-rd-primary-action, .br-rd-outline-action, .br-rd-edit-section {
  min-height: var(--br-action-height);
  border-radius: var(--br-action-radius);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--br-action-space); padding: 9px 16px;
  font-weight: 600; font-size: .875rem; line-height: 1.35;
  text-decoration: none;
}
.br-discover-feed-actions .btn:not(.btn-icon), .br-discover-actions .btn:not(.btn-icon) { padding-inline: 11px; }
.br-promo-copy a.br-btn-accent { color: #fff; background: var(--br-orange); border: 1px solid var(--br-orange); }
.br-promo-copy a.br-btn-outline { color: var(--br-green-900); background: #fff; border: 1px solid var(--br-green-700); }
.br-rd-primary-action { color: #fff; background: var(--br-green-900); border: 1px solid var(--br-green-900); }
.br-rd-outline-action, .br-rd-edit-section { color: var(--br-green-900); background: #fff; border: 1px solid var(--br-green-700); }
.br-rd-primary-action:hover, .br-rd-primary-action:focus-visible { color: #fff; background: #08271e; }
.br-rd-outline-action:hover, .br-rd-edit-section:hover { color: var(--br-green-900); background: var(--br-green-050); }
.br-mockup-actions .btn:focus-visible, .br-promo-copy a.btn:focus-visible,
.br-discover-feed-actions .btn:focus-visible, .br-rd-primary-action:focus-visible,
.br-rd-edit-section:focus-visible { outline: 3px solid rgba(30,112,81,.35); outline-offset: 2px; }

/* Shopping list picker: a single, scalable navigation control on every screen size. */
.br-shopping-list-switcher { display:flex; align-items:stretch; gap:9px; max-width:650px; }
.br-shopping-list-select { flex:1 1 auto; min-width:0; }
.br-shopping-list-trigger { display:flex; align-items:center; gap:12px; width:100%; min-height:51px; padding:7px 12px; background:#fff; border:1px solid #cddcd3; border-radius:12px; color:#103f31; text-align:left; }
.br-shopping-list-trigger:hover, .br-shopping-list-trigger:focus-visible { border-color:#12553e; box-shadow:0 0 0 2px rgba(18,85,62,.11); }
.br-shopping-list-trigger-icon { display:grid; place-items:center; width:32px; height:32px; flex-shrink:0; border-radius:9px; background:#edf5ef; color:#12553e; }
.br-shopping-list-trigger-text { display:flex; flex-direction:column; gap:1px; min-width:0; flex:1; }
.br-shopping-list-caption { font-size:.63rem; font-weight:800; letter-spacing:.1em; color:#5e7469; }
.br-shopping-list-current { font-size:.91rem; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.br-shopping-list-chevron { font-size:.78rem; color:#12553e; flex-shrink:0; }
.br-shopping-list-menu { width:100%; min-width:min(300px, 86vw); max-height:min(65vh, 420px); overflow-y:auto; padding:7px; border:1px solid #dfe7df; border-radius:12px; box-shadow:0 12px 35px #002e1c20; }
.br-shopping-list-menu .dropdown-header { color:#61776c; font-size:.64rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; padding:8px 10px 5px; }
.br-shopping-list-menu .dropdown-item { display:flex; align-items:center; gap:10px; border-radius:8px; padding:10px; color:#103f31; font-size:.85rem; font-weight:650; }
.br-shopping-list-menu .dropdown-item > .fa-solid:first-child { width:16px; text-align:center; flex-shrink:0; }
.br-shopping-list-menu .dropdown-item.active { background:#edf5ef; color:#0b4d36; }
.br-shopping-list-menu .dropdown-item:hover { background:#f2f6f0; color:#103f31; }
.br-shopping-list-add { display:flex; align-items:center; justify-content:center; gap:8px; min-height:51px; padding:0 16px; white-space:nowrap; border-radius:12px; }
@media (max-width:620px) { .br-shopping-list-switcher { max-width:none; gap:7px; } .br-shopping-list-add { padding:0 12px; } .br-shopping-list-add span { display:none; } .br-shopping-list-trigger { min-height:48px; } }

/* Custom shopping list actions: the same three equal buttons as iOS. */
.br-shopping-custom-hero {
    flex-direction: column;
    gap: 12px;
}
.br-shopping-custom-hero > div:first-child { width: 100%; min-width: 0; }
.br-shopping-custom-hero .br-shopping-custom-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    justify-content: stretch;
}
.br-shopping-custom-hero .br-shopping-custom-actions > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 5px;
    margin: 0;
    font-size: .77rem;
    font-weight: 700;
    white-space: nowrap;
}
@media (max-width: 400px) {
    .br-shopping-custom-hero .br-shopping-custom-actions > .btn {
        gap: 4px;
        padding-inline: 3px;
        font-size: .7rem;
    }
}

/* Desktop custom-list actions align with the Master List sharing action.
   Keep the existing three-column button row on narrower screens. */
@media (min-width: 900px) {
    .br-shopping-custom-hero {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
    }

    .br-shopping-custom-hero > div:first-child {
        flex: 1 1 auto;
        width: auto;
    }

    .br-shopping-custom-hero .br-shopping-custom-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: flex-start;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        width: auto;
    }

    .br-shopping-custom-hero .br-shopping-custom-actions > .btn {
        flex: 0 0 auto;
        width: auto;
        min-height: 42px;
        padding: 9px 14px;
        font-size: .875rem;
    }
}


/* Discover feed: compact action menu on each card (web, Android and iOS parity). */
.br-discover-feed-card { position:relative; overflow:visible; }
.br-discover-feed-card:has(.br-discover-feed-action-menu[open]) { z-index:30; }
.br-discover-feed-photo { border-radius:15px 15px 0 0; }
.br-discover-feed-body { position:relative; }
.br-discover-feed-reason { min-height:24px; }
.br-discover-feed-card > .br-discover-feed-action-menu { position:absolute; top:9px; right:10px; z-index:15; }
.br-discover-feed-action-menu > summary {
    display:flex; align-items:center; justify-content:center;
    width:32px; height:32px; border:1px solid #dde4de;
    border-radius:8px; background:#fff; color:#0c392c;
    font-size:14px; cursor:pointer; list-style:none;
}
.br-discover-feed-action-menu > summary::-webkit-details-marker { display:none; }
.br-discover-feed-action-menu > summary::marker { content:""; }
.br-discover-feed-action-menu > summary:focus-visible { outline:2px solid #315f39; outline-offset:2px; }
.br-discover-feed-action-menu[open] > summary { background:#f1f6ef; }
.br-discover-feed-action-menu .br-discover-feed-actions {
    position:absolute; top:calc(100% + 6px); right:0;
    z-index:20; width:225px; max-width:calc(100vw - 35px);
    display:flex; flex-direction:column; align-items:stretch; gap:4px;
    padding:7px; border:1px solid #dde4de; border-radius:12px;
    background:#fff; box-shadow:0 10px 28px rgba(12,57,44,.18);
}
.br-discover-feed-action-menu .br-discover-feed-actions form {
    flex:0 0 auto; display:block; width:100%; margin:0;
}
.br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) {
    display:flex; align-items:center; justify-content:flex-start;
    gap:9px; width:100%; min-height:38px;
    padding:8px 10px; border-radius:8px;
    font-size:12px; line-height:1.2; text-align:left;
}
.br-discover-feed-action-menu .br-discover-feed-actions .br-discover-hide {
    width:100%; height:auto; margin:0; color:#875238;
}
.br-discover-feed-action-menu .br-discover-feed-actions :is(button,a):hover { background:#f1f6ef; }

/* The actions belong to the photo, not the text body. Closed details must
   explicitly hide their contents despite older mobile action-bar CSS. */
.br-discover-feed-card > .br-discover-feed-action-menu:not([open]) > .br-discover-feed-actions { display:none !important; }
.br-discover-feed-card > .br-discover-feed-action-menu[open] > .br-discover-feed-actions {
    position:absolute; top:calc(100% + 6px); right:0; width:235px;
    max-width:calc(100vw - 24px); z-index:80;
    display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap;
    gap:3px; padding:6px; background:#fff; border:1px solid #dde4de; border-radius:12px;
    box-shadow:0 12px 30px rgba(12,57,44,.2);
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions form {
    display:block; width:100%; min-width:0; flex:none;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) {
    display:flex; justify-content:flex-start; align-items:center;
    width:100%; height:auto; min-height:38px; gap:9px; padding:9px 10px;
    font-size:12px; font-weight:600; border-radius:8px; text-align:left;
    white-space:normal; color:#123b30; background:#fff; border:0;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a):hover { background:#f1f6ef; }
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions .br-discover-hide { color:#875238; }
.br-discover-feed-card > .br-discover-feed-action-menu > summary {
    background:rgba(255,255,255,.97); box-shadow:0 2px 7px rgba(12,57,44,.12);
}

@media(max-width:900px) {
  .br-discover-feed-card > .br-discover-feed-action-menu[open] > .br-discover-feed-actions { width:170px; }
}


/* Discover photo-menu: menu labels and icons stay visible on mobile.
   Override the former horizontal actions bar and global button variants. */
.br-discover-feed-card > .br-discover-feed-action-menu[open] > .br-discover-feed-actions {
    width: 258px;
    max-width: min(258px, calc(100vw - 22px));
    align-items: stretch;
    box-sizing: border-box;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions > form,
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions > form > button {
    min-width: 0;
    width: 100%;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) {
    justify-content: flex-start !important;
    text-align: left !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 10px;
    color: #123b30 !important;
    font-size: 12px !important;
    line-height: 1.35;
    text-indent: 0 !important;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) > i {
    flex: 0 0 19px;
    display: inline-block !important;
    width: 19px;
    font-size: 14px;
    text-align: center;
    color: #123b30;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) > span {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    position: static !important;
    overflow: visible !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #123b30 !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
}
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions .br-discover-hide,
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions .br-discover-hide > span,
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions .br-discover-hide > i {
    color: #875238 !important;
}

/* Discover photo-menu icons: shared vector outlines on web, Android and iOS. */
.br-discover-feed-card > .br-discover-feed-action-menu .br-discover-feed-actions :is(button,a) > img.br-discover-menu-symbol {
    display:block !important; flex:0 0 19px; width:19px !important; height:19px !important;
    max-width:19px !important; max-height:19px !important; object-fit:contain;
    opacity:1 !important; visibility:visible !important; clip-path:none !important;
    position:static !important; margin:0 !important; padding:0 !important;
}

.br-discover-feed-action-menu > summary > img.br-discover-menu-symbol {
    width:18px; height:18px; display:block; flex:0 0 auto; object-fit:contain;
}
