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

body.nouri-v2 > .topbar {
  --nouri-header-extra: 10px;
  height: auto;
  min-height: calc(68px + var(--nouri-safe-top));
  padding-top: calc(var(--nouri-safe-top) + var(--nouri-header-extra));
  padding-bottom: 10px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
}

[data-nouri-christmas] body.nouri-v2 > .topbar.nouri-christmas-header-ready {
  --nouri-header-extra: 20px;
  padding-top: calc(var(--nouri-safe-top) + var(--nouri-header-extra));
}

body.nouri-v2 > .topbar .nouri-christmas-lights { top: calc(var(--nouri-safe-top) + 1px); }

@media (max-width: 999px) {
  html.keyboard-open:not(.member-keyboard-open) body.nouri-v2.member-view {
    inset: 0;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  html.nouri-ios-standalone.keyboard-open:not(.member-keyboard-open) body.nouri-v2.member-view {
    position: relative;
    inset: auto;
  }

  html.keyboard-open:not(.member-keyboard-open) body.nouri-v2.member-view #bottomNav { display: flex; }

  body.nouri-v2.member-view #bottomNav { padding-bottom: calc(7px + var(--nouri-safe-bottom)); }
}
