/* House Nightingale design tokens — palette, radii, spacing, shadows.
   The Finance Hub is the canonical source; keep these in sync with that app. */
:root {
  /* Wine */
  --wine: #5c1a26;
  --wine-deep: #3d0e18;
  --wine-darker: #2a0911;
  --wine-light: #8b3a48;

  /* Gold */
  --gold: #c9a961;
  --gold-bright: #e6c378;
  --gold-dim: #8a7340;
  --gold-soft: #d6c08a;

  /* Dark neutrals */
  --black: #0a0608;
  --ink: #14090d;
  --surface: #1a0e13;
  --surface-2: #241319;
  --line: #3a1e26;
  --line-soft: #2a151c;

  /* Cream + muted text */
  --cream: #f0e4d0;
  --cream-dim: #b8a890;
  --muted: #7a6b5e;

  /* Status — used as small accents only, never full panels */
  --green: #7a9b6e;
  --amber: #d4a437;
  --rose: #b85d6a;

  /* Effects */
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7),
            0 8px 20px -10px rgba(92, 26, 38, 0.3);
  --shadow-lift: 0 12px 32px -16px rgba(0, 0, 0, 0.8),
                 0 2px 8px -2px rgba(201, 169, 97, 0.18);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  /* Spacing scale (px) */
  --pad-xs: 6px;
  --pad-sm: 10px;
  --pad-md: 14px;
  --pad-lg: 18px;
  --pad-xl: 22px;
  --pad-2xl: 28px;

  /* Layout */
  --shell-max: 480px;
  --nav-height: 68px;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 420ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow-x: clip;
  overscroll-behavior-x: none;
  /* manipulation = panning + pinch-zoom OK, double-tap-zoom OFF.
     The double-tap zoom was being mistaken for horizontal scroll on
     mobile — single tap registers normally, accessibility pinch still works. */
  touch-action: manipulation;
  width: 100%;
  max-width: 100vw;
}

/* Belt-and-suspenders: explicitly mark interactive controls so iOS
   Safari skips the 300ms double-tap-zoom delay on them too. */
button, a, input, textarea, select, label, .chip, .subtab,
.fab, .bottom-nav__btn, .meal-slot, .recipe-card, .persona-card {
  touch-action: manipulation;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(92, 26, 38, 0.35), transparent 70%),
    radial-gradient(80% 60% at 100% 110%, rgba(201, 169, 97, 0.06), transparent 60%),
    var(--black);
  background-attachment: fixed;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; background: none; border: 0; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(201, 169, 97, 0.3); color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
