/* Mobile only: the native presentation choices move before the existing offer. */
@media (max-width: 767px) {
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form {
        margin-top: 14px !important;
        padding-top: 0;
        border-top: 0;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form > .js-product-variants {
        margin-inline: 0;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group {
        padding-inline: 0;
        margin-bottom: 0 !important;
        min-width: 0;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready {
        display: grid;
        grid-template-columns: repeat(var(--ms-mobile-format-columns, 2), minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group > :not(.ms-format-choice):not(.ms-format-unavailable) {
        grid-column: 1 / -1;
        min-width: 0;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-label {
        margin: 0 0 2px;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-choice.btn-variant,
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-unavailable {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 58px;
        margin: 0;
        padding: 8px 6px;
        gap: 3px;
        justify-content: center;
        align-items: center;
        text-align: center;
        font-size: 16px;
        line-height: 1.2;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-choice::before,
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-unavailable::before {
        font-size: 10px;
        line-height: 1.2;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice .btn-variant-content {
        white-space: nowrap;
        font-size: inherit;
        line-height: inherit;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-unavailable,
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-unavailable span {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-selection {
        margin: 2px 0 0;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form > .ms-product-offer {
        margin: 18px 0 0;
    }
}

/* One reading line: volume first, estimated yield as quiet supporting text. */
@media (max-width: 767px) {
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-choice.btn-variant[data-ms-format-estimated] {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        justify-content: start;
        justify-items: start;
        align-content: center;
        align-items: baseline;
        column-gap: 5px;
        row-gap: 4px;
        padding: 9px 10px;
        text-align: left;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice[data-ms-format-estimated]::before {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: start;
        margin: 0;
        opacity: .8;
        font-size: 10px;
        font-weight: 400;
        line-height: 1.2;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice[data-ms-format-estimated] .btn-variant-content {
        grid-column: 1;
        grid-row: 2;
        align-self: baseline;
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: -.02em;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-estimate {
        display: inline-flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 2px;
        grid-column: 2;
        grid-row: 2;
        color: inherit;
        opacity: .78;
        line-height: 1.2;
        font-size: 10.5px;
        font-weight: 400;
        letter-spacing: -.01em;
        white-space: nowrap;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-estimate::before {
        content: '·';
        margin-right: 1px;
        opacity: .7;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-estimate-count,
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-estimate-unit {
        font-size: inherit;
        font-weight: inherit;
        line-height: inherit;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group.ms-format-ready .ms-format-choice.btn-variant[data-ms-format-estimate-layout="stacked"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        min-height: 66px;
        padding: 8px 6px;
        row-gap: 3px;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice[data-ms-format-estimate-layout="stacked"] .ms-format-estimate {
        grid-column: 1;
        grid-row: 3;
        margin: 0;
        font-size: 10px;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice[data-ms-format-estimate-layout="stacked"] .ms-format-estimate::before { content: none; }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-estimate-note {
        margin: 2px 0 0;
        color: #626f60;
        font-size: 11px;
        line-height: 1.4;
        text-align: left;
    }
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-group:not(.ms-format-ready) .ms-format-estimate-note { display: none; }
}
@media (max-width: 359px) {
    .mainstream-theme .ms-product-immersive.ms-pdp-mobile-controls #product_form .ms-format-choice[data-ms-format-estimated] .btn-variant-content { font-size: 16px; }
}
