@font-face {
  font-family: 'GeistVariable';
  src: url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GeistMono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Safe area insets for iOS notch and home indicator */
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  /* Completely prevent scrolling */
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
}

body {
  font-family: 'GeistVariable', -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--color1) !important;
  /* Override Tamagui reset's min-height: 100vh on body — same as #root override below.
     Prevents body from being taller than the fixed viewport when the virtual keyboard
     resizes the layout (interactive-widget=resizes-content). */
  min-height: 0 !important;
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  /* Override Tamagui reset's min-height: 100vh (loaded via JS import,
     so it appears after this file). !important needed to win. */
  min-height: 0 !important;
}

/* TanStack Router's <Outlet> injects a <span> wrapper that breaks the
   flex height chain (it's not display:flex and has h=auto). Patch it
   so the layout flows through to the app content. */
#root > span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Prevent iOS Safari zoom on input focus (requires 16px minimum) */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px !important;
  }
}
