/*
 * Lives in public/ (loaded via a plain <link> in index.html) instead of
 * src/index.css on purpose: @tailwindcss/vite always runs the production
 * stylesheet through Lightning CSS with a hardcoded Safari 16.4 target,
 * which rewrites plain min-width/max-width media queries into the newer
 * range syntax (e.g. `width <= 640px`) even for hand-written rules that
 * merely happen to share a bundled CSS output with Tailwind. That syntax is
 * silently ignored by Safari before 16.4, disabling these rules entirely on
 * older iPhones. Moving the source file to src/ didn't help, since Vite
 * still concatenates it into the same bundled CSS chunk before Tailwind's
 * pass reprocesses the whole thing - public/ is served byte-for-byte with
 * no build transform at all, which is what actually keeps the legacy,
 * universally supported syntax intact.
 */

@media (prefers-color-scheme: dark) and (min-width: 640px) {
  :root {
    color-scheme: dark;
    --color-background: #14231a;
    --color-text: #f6f7f2;
    --color-border: color-mix(in srgb, var(--color-text) 10%, var(--color-background));
  }
}

/*
 * iOS Safari auto-zooms the page when focusing an input with font-size
 * below 16px, and fails to zoom back out afterwards when the input sits
 * inside an antd overlay/portal (Select, DatePicker). Keeping focusable
 * inputs at >=16px on mobile prevents the zoom from triggering at all.
 */
@media (max-width: 640px) {
  input,
  textarea,
  .ant-select-selector,
  .ant-picker input {
    font-size: 16px !important;
  }
}
