/* ── Custom properties ── */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #d0d0d0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --drop-zone-bg: #f0f4ff;
  --drop-zone-active: #dbeafe;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --btn-text: #ffffff;
  --success-border: #22c55e;
  --image-date-overlay: rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 -2px 8px rgba(0, 0, 0, 0.12);
  --overlay: rgba(0, 0, 0, 0.6);
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --duration: 0.15s;
  --duration-slow: 0.3s;
  --font-base: 0.9375rem;
  --font-sm: 0.875rem;
  --font-xs: 0.8125rem;
  --font-md: 1.125rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --font-2xl: 2rem;
  /* tab bar (mobile nav) and image shelf are currently intentionally the
   same height; the desktop image max-height calc (line ~507) depends on
   --shelf-height matching the effective bottom chrome height. Update both
   together. */
  --header-height: 3rem;
  --tab-bar-height: 3.5rem;
  --shelf-height: 3.5rem;
  --z-dropdown: 100;
  --z-tabbar: 200;
  --z-tabbar-select: 201;
  --z-modal: 300;
}

/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1e1e1e;
    --text: #e5e5e5;
    --text-muted: #999999;
    --border: #333333;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --success-bg: #14532d;
    --success-text: #bbf7d0;
    --error-bg: #7f1d1d;
    --error-text: #fecaca;
    --drop-zone-bg: #1e2a3a;
    --drop-zone-active: #1e3a5f;
    --success-border: #4ade80;
    --image-date-overlay: rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 -2px 8px rgba(0, 0, 0, 0.5);
  }
}

/* ── Accessibility utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
