:root {
  --ws-safe-top: env(safe-area-inset-top, 0px);
  --ws-safe-right: env(safe-area-inset-right, 0px);
  --ws-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ws-safe-left: env(safe-area-inset-left, 0px);
}

html[data-ios-standalone] {
  overflow: hidden;
}

/* Scroll views have their own boundaries. The viewport rule alone does not stop their bounce. */
html[data-ios-standalone],
html[data-ios-standalone] body,
html[data-ios-standalone] body * {
  overscroll-behavior-y: none;
}

html[data-safe-area-preview="iphone"] {
  --ws-safe-top: 59px;
  --ws-safe-right: 0px;
  --ws-safe-bottom: 34px;
  --ws-safe-left: 0px;
}

@media (orientation: landscape) {
  html[data-safe-area-preview="iphone"] {
    --ws-safe-top: 0px;
    --ws-safe-right: 59px;
    --ws-safe-bottom: 21px;
    --ws-safe-left: 59px;
  }
}
