/* ============================================================
   base.css — variables de tema, reset y tipografía
============================================================ */

:root,
[data-theme="light"] {
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f1ede4;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #1a1a1a;
  --text-2: #5a5650;
  --text-3: #8a8580;
  --accent: #7fb83a;
  --accent-dark: #689a2c;
  --accent-text: #ffffff;
  --danger: #ff6b6b;
  --warning: #ffd166;
  --success: #06d6a0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --sidebar-w: 250px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-browser-bottom-buffer: 0px;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1ec;
  --text-2: #9a9690;
  --text-3: #6a6560;
  --accent: #c8f064;
  --accent-dark: #a8d048;
  --accent-text: #0f0f0f;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  min-height: -webkit-fill-available;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
  min-height: -webkit-fill-available;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.4rem; line-height: 1.1; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea { font-family: inherit; }

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@media (max-width: 800px) {
  :root {
    /* Chrome/Firefox iOS pueden superponer parte de la UI inferior aun con safe-area=0. */
    --mobile-browser-bottom-buffer: 28px;
  }
}
