/* Font is embedded as base64 in font-embed.css (loaded first in header) */

:root {
  --primary: #1E40AF;
  --primary-light: #3B82F6;
  --primary-lighter: #60A5FA;
  --primary-dark: #1E3A8A;
  --primary-gradient: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
  --primary-gradient-soft: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%);
  --accent: #06B6D4;

  --white: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;

  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --muted-2: #94A3B8;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  --shadow-sm: 0 2px 8px rgba(30, 64, 175, 0.06);
  --shadow: 0 8px 24px rgba(30, 64, 175, 0.10);
  --shadow-lg: 0 20px 50px rgba(30, 64, 175, 0.15);
  --shadow-xl: 0 30px 80px rgba(30, 64, 175, 0.22);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: 'Hama', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /* Disable browser zoom & double-tap zoom (native-app feel) */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
}

/* Allow text selection only on inputs/textareas */
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

/* Force 16px font on inputs to prevent iOS Safari auto-zoom on focus */
input, select, textarea {
  font-size: 16px;
}

body {
  background: radial-gradient(1200px 600px at 0% 0%, rgba(59,130,246,0.08), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(96,165,250,0.06), transparent 60%),
              var(--surface);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--primary-lighter); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 32px; }
}

/* App Layout (mobile-first wrapper) */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  padding-bottom: 100px;
  box-shadow: 0 0 60px rgba(30, 64, 175, 0.08);
}

@media (min-width: 1024px) {
  .app-shell {
    max-width: 100%;
    background: transparent;
    box-shadow: none;
    padding-bottom: 40px;
  }
}

/* Typography */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
.text-muted { color: var(--muted); }
.text-small { font-size: 13px; }
.text-tiny { font-size: 11px; }
.text-center { text-align: center; }

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
