/* 시스템 영역과 실제 겹치는지 UA로 추정하지 않는다. 전달된 inset을 기본으로 보호한다. */
html[data-mocu-webview="android"] {
    --mocu-webview-safe-top: env(safe-area-inset-top, 0px);
    --mocu-webview-safe-bottom: env(safe-area-inset-bottom, 0px);
}
html[data-mocu-webview="android"][data-mocu-insets-owner="native"] {
    --mocu-webview-safe-top: 0px;
    --mocu-webview-safe-bottom: 0px;
}

/* 장바구니 iframe은 부모의 안전영역 안에 배치되므로 다시 예약하지 않는다. */
html[data-mocu-webview="android"][data-mocu-inset-context="embedded"] {
    --mocu-webview-safe-top: 0px;
    --mocu-webview-safe-bottom: 0px;
}

/* html/body 중복 패딩을 없애고 GNB 없는 화면도 같은 좌표계를 사용한다. */
html[data-mocu-webview="android"] {
    padding-top: 0;
    padding-bottom: 0;
}
html[data-mocu-webview="android"] body {
    padding-top: var(--mocu-webview-safe-top);
    padding-bottom: var(--mocu-webview-safe-bottom);
}
/* GNB는 실측 높이를 본문에 예약하므로 body에서 하단을 다시 더하지 않는다. */
html[data-mocu-webview="android"][data-mocu-has-gnb] body { padding-bottom: 0; }

html[data-mocu-webview="android"] header[data-renewal-page-header]:not([data-header-mode="dialog"]) {
    top: var(--mocu-webview-safe-top);
}
html[data-mocu-webview="android"] header[data-renewal-page-header]:not([data-header-mode="dialog"])::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * var(--mocu-webview-safe-top));
    height: var(--mocu-webview-safe-top);
    background: #303f9f;
    pointer-events: none;
}
html[data-mocu-webview="android"] [data-renewal-gnb] {
    padding-bottom: var(--mocu-webview-safe-bottom);
}
