/* Native vertical momentum and edge bounce, consistent with the prize dialog.
   Keep programmatic navigation instant and let the browser handle touch physics. */
html,
body {
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
}

/* clip does not introduce a second scrolling container, unlike hidden. */
@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip !important;
    }
}

/* A sheet consumes its own edge gestures instead of scrolling the page below. */
.scr-modal,
.concept-modal,
.combo-ui-modal {
    overflow: hidden;
    overscroll-behavior: contain;
}

.scr-modal .sheet {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
}

.scr-modal .sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bp-cream, #F2EAD8);
    box-shadow: 0 -24px 0 var(--bp-cream, #F2EAD8);
}

.scr-modal .sheet-head .back {
    min-width: 44px;
    min-height: 44px;
}

.scr-modal .sheet,
.concept-modal .ov-body,
.combo-ui-sheet {
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.concept-modal .ov-body {
    min-height: 0;
}

/* The sheet already starts below Telegram chrome; do not add that inset twice. */
body.is-tma .scr-modal .sheet,
body.is-tma #bp-plans-modal .sheet,
body.is-tma #bp-checkout-modal .sheet {
    max-height: calc(100dvh - var(--bp-safe-top, 88px) - 12px);
}

body.is-tma .scr-modal .sheet-head,
body.is-tma #bp-plans-modal .sheet-head,
body.is-tma #bp-checkout-modal .sheet-head {
    padding-top: 12px !important;
}

/* Horizontal carousels still swipe independently of vertical page scrolling. */
.tabs-l1,
.hscroll,
.size-row,
.milk-row {
    overscroll-behavior-x: contain;
}
