/* Only the iPhone Home Screen header. The game board has its own safe areas. */
html.ios-home-screen .app-header {
  --ios-header-height: var(--header-h);
  height: calc(var(--ios-header-height) + var(--safe-top)) !important;
  min-height: calc(var(--ios-header-height) + var(--safe-top)) !important;
  padding-top: var(--safe-top) !important;
  padding-bottom: 0 !important;
  padding-left: max(8px, var(--safe-left)) !important;
  padding-right: max(8px, var(--safe-right)) !important;
}
@media (max-width: 768px) {
  html.ios-home-screen .app-header { --ios-header-height: 48px; }
}

/* Long registration forms must keep their close button below the status bar. */
html.ios-home-screen #authModal {
  padding: max(12px, var(--safe-top)) max(12px, var(--safe-right))
    max(12px, var(--safe-bottom)) max(12px, var(--safe-left)) !important;
}
html.ios-home-screen #authModal > .modal-card {
  max-height: calc(100dvh - max(12px, var(--safe-top)) - max(12px, var(--safe-bottom))) !important;
}
