:root {
  --bg: #f4efe6;
  --bg-elev: #fffaf3;
  --ink: #17211b;
  --muted: #6b736e;
  --line: rgba(23, 33, 27, 0.12);
  --accent: #0f766e;
  --accent-2: #c9782a;
  --danger: #b42318;
  --ok: #157a4b;
  --shadow: 0 12px 40px rgba(23, 33, 27, 0.08);
  --radius: 22px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elev: #141c2e;
  --ink: #eef3ec;
  --muted: #93a099;
  --line: rgba(238, 243, 236, 0.1);
  --accent: #2dd4bf;
  --accent-2: #f5b461;
  --danger: #f87171;
  --ok: #4ade80;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 118, 110, 0.16), transparent 50%),
    var(--bg);
  color: var(--ink);
}
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; padding: 18px 18px 96px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.eyebrow { margin: 0; letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px; color: var(--accent); font-family: ui-sans-serif, system-ui, sans-serif; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 0; }
h1 { font-size: 32px; }
p { color: var(--muted); line-height: 1.45; }
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 0 0 12px;
}
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button, .button {
  appearance: none; border: 0; border-radius: 999px; padding: 14px 18px;
  font: 700 15px ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.primary { background: var(--accent); color: #06231f; width: 100%; font-size: 18px; padding: 18px; }
.accept { background: #111; color: #f8f3ea; width: 100%; font-size: 22px; padding: 22px; letter-spacing: 0.04em; }
:root[data-theme="dark"] .accept { background: #f5b461; color: #111; }
.ghost, .secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
input, textarea, select {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: 16px ui-sans-serif, system-ui, sans-serif;
}
label { display: block; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 12px 0 6px; }
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(720px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 24px; padding: 8px;
}
.tabbar button { padding: 10px 4px; font-size: 11px; background: transparent; color: var(--muted); }
.tabbar button.active { color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font: 600 12px ui-sans-serif, system-ui; border: 1px solid var(--line); }
.ok { color: var(--ok); }
.warn { color: var(--accent-2); }
.err { color: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; white-space: pre-wrap; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 8%, var(--bg-elev)); }
.stat b { display: block; font-size: 28px; }
.hidden { display: none !important; }
a { color: var(--accent); }
@media (max-width: 480px) { h1 { font-size: 28px; } .grid { grid-template-columns: 1fr; } }
