/* One inset source for normal pages, fixed controls and fullscreen timers. */
:root {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
}

/* Retain the header guard for Android hosts with overlapping status bars.
   Bottom clearance must come from the host: a fixed 56px floor doubled the
   already-excluded system navigation area and left a gap under the menu. */
:root.android-app-insets {
  --app-safe-top: max(env(safe-area-inset-top, 0px), 32px);
}
@media (orientation: landscape) {
  :root.android-app-insets {
    --app-safe-left: max(env(safe-area-inset-left, 0px), 32px);
    --app-safe-right: max(env(safe-area-inset-right, 0px), 56px);
  }
}
/* 시스템 바가 화면을 덮는데 폰이 아래 여백을 0으로 알려주는 경우의 예비 여백
   (js/screen-insets.js가 그 경우에만 붙임 — 버튼식 내비게이션 바 높이) */
:root.android-overlay-nav {
  --app-safe-bottom: 48px;
}
