:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5f6670;
  --border: #e3dfd6;
  --accent: #2f6f62;
  --accent-soft: #e2efeb;
  --accent-text: #ffffff;
  --danger: #b4443a;
  --warn-soft: #fbeedd;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b;
    --surface: #1e2226;
    --text: #e8e6e1;
    --muted: #9aa1a9;
    --border: #2f353b;
    --accent: #6cbfaa;
    --accent-soft: #23352f;
    --accent-text: #0f1a17;
    --danger: #e0786d;
    --warn-soft: #3a2f20;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
main { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
main.wide { max-width: 1100px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

label.field { display: block; font-weight: 600; margin-bottom: 14px; }
label.field span { display: block; font-weight: 400; font-size: 0.875rem; color: var(--muted); }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea { min-height: 96px; resize: vertical; }

button {
  font: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--accent); }
button.link { background: none; border: none; padding: 0; color: var(--danger); font-weight: 500; }
button:disabled { opacity: 0.55; cursor: default; }

.error { color: var(--danger); font-weight: 600; }
.hidden { display: none !important; }
