/* This file is duplicated from src/styles/global.css so Astro can serve it as a
   static asset from /styles/global.css. Astro normally bundles CSS imported by
   components, but the SPA pages reference it via plain <link>. */
:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --text: #2a2622;
  --muted: #8c857d;
  --border: #e8e1d5;
  --border-strong: #d4c9b6;
  --accent: #1f5f3a;
  --accent-soft: #d8e8de;
  --error: #b03030;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.04), 0 4px 12px rgba(40, 30, 20, 0.06);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", serif;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1c1a16;
    --text: #f0ebe2;
    --muted: #8a847b;
    --border: #2b2823;
    --border-strong: #3a362f;
    --accent: #7fb89a;
    --accent-soft: #1f3328;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

.hidden { display: none !important; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: #000; }
.btn.danger { color: var(--error); border-color: rgba(176, 48, 48, 0.4); }

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.center {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.card h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.card p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.card .form-row { display: flex; flex-direction: column; gap: 12px; }
.error-text { color: var(--error); font-size: 14px; margin-top: 12px; }
