.fridge-native-app:not(.native-auth-ready) #authGate { visibility: hidden; }
/* Let CSS own the safe areas, instead of the native scroll view adding a
   second inset below the fixed tab bar. */
html.fridge-native-app, .fridge-native-app body { overscroll-behavior-y: none; }
@media (max-width: 760px) {
  .fridge-native-app .sidebar {
    position: fixed;
    bottom: 0;
    padding-top: 4px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    background: #fff;
  }
  /* Legal links remain in Account/settings, not in the permanent tab bar. */
  .fridge-native-app .sidebar .app-legal-links { display: none; }
  .fridge-native-app .sidebar .nav-link { min-height: 48px; padding-top: 5px; padding-bottom: 5px; }
  .fridge-native-app .content {
    padding-top: calc(28px + env(safe-area-inset-top));
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
/* Keep iOS from auto-zooming small fields; preserve intentional pinch zoom. */
.fridge-native-app input,
.fridge-native-app select,
.fridge-native-app textarea,
.fridge-native-app [contenteditable="true"] { font-size: 16px !important; }
.fridge-native-app button,
.fridge-native-app a,
.fridge-native-app label,
.fridge-native-app input,
.fridge-native-app select,
.fridge-native-app textarea { touch-action: manipulation; }
.fridge-native-app #authCaptcha { min-width: 0; max-width: 100%; padding: 0; border: 0; box-shadow: none; background: transparent; }
.fridge-native-app #authCaptcha > iframe { width: 100%; max-width: 100%; display: block; border: 0; }
.fridge-native-app:has(#authGate:not(.hidden)),
.fridge-native-app:has(#accountDialog[open]) { overflow: hidden; height: 100%; overscroll-behavior: none; }
.fridge-native-app:has(#authGate:not(.hidden)) body,
.fridge-native-app:has(#accountDialog[open]) body { position: fixed; inset: 0; width: 100%; overflow: hidden; background: #faf9f3; }
.fridge-native-app:has(#authGate:not(.hidden)) .app-shell { visibility: hidden; pointer-events: none; }
.fridge-native-app #accountDialog::backdrop { background: #faf9f3; }
.fridge-native-app #accountDialog { box-sizing: border-box; width: min(460px, calc(100vw - 24px)); max-width: calc(100vw - 24px); padding: 24px; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; }
/* Give the standard 300px verification row real room, rather than scaling
   or clipping Cloudflare's controls on narrow iPhones. */
@media (max-width: 371px) {
  .fridge-native-app #accountDialog { width: 100vw; max-width: 100vw; padding: 10px; }
}
.fridge-native-app #authGate {
  position: fixed;
  inset: 0;
  height: 100dvh;
  box-sizing: border-box;
  overscroll-behavior: none;
  display: flex;
  background: #faf9f3;
  overflow-y: auto;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}
.fridge-native-app #authGate.hidden { display: none; }
.native-welcome { width: min(100%, 390px); margin: auto; text-align: center; }
.native-welcome-logo { width: 136px; height: 136px; border-radius: 30px; margin-bottom: 24px; }
.native-welcome h1 { font-size: clamp(28px, 7vw, 38px); line-height: 1.15; color: #173f35; }
.native-welcome p { margin: 16px 0 36px; color: #62746b; }
.native-welcome button { display: block; width: 100%; min-height: 54px; margin: 12px 0; border-radius: 16px; font-size: 17px; font-weight: 700; cursor: pointer; }
.native-signin { color: #173f35; background: transparent; border: 1px solid #173f35; }
.native-welcome small { display: block; margin-top: 28px; color: #62746b; }
.native-welcome small a { color: inherit; padding: 8px; }
