:root {
  --bg: #faf9f5;
  --bg-elev: #ffffff;
  --bg-sidebar: #f5f4ee;
  --border: #e6e3da;
  --border-strong: #d8d4c7;
  --text: #2b2a26;
  --text-muted: #8a8678;
  --text-faint: #b3ae9f;
  --accent: #c96442;
  --accent-soft: #f3e4dc;
  --user-bubble: #f0ede3;
  --green: #4a7c59;
  --green-soft: #e3efe6;
  --amber: #b8860b;
  --amber-soft: #f6efd9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

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

button {
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
button:hover { background: var(--bg-sidebar); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button.primary:hover { background: #b65636; }

button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--bg-sidebar); }

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
}
.badge.ai { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge.no-ai { color: var(--green); background: var(--green-soft); border-color: transparent; }
.badge.warn { color: var(--amber); background: var(--amber-soft); border-color: transparent; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { font-weight: 600; font-size: 15px; }
.topbar .spacer { flex: 1; }
.topbar .muted { color: var(--text-muted); font-size: 13px; }

.center-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.h2 { font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.lead { color: var(--text-muted); margin-bottom: 24px; }

.row { display: flex; gap: 12px; align-items: center; }
.row > * { flex: 1; }
.row > .shrink { flex: 0 0 auto; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.empty {
  text-align: center;
  color: var(--text-faint);
  padding: 48px 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2b2a26;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
