:root {
  color-scheme: light dark;
  --bg: #f6f1e7;
  --bg-top: #efe5d2;
  --surface: #fffdf8;
  --surface-2: #f3ecdf;
  --line: #e2d6bf;
  --line-strong: #9c8c6c;
  --text: #10213a;
  --text-2: #2c3e5a;
  --muted: #56657c;
  --accent: #0b6e8a;
  --accent-hover: #085a71;
  --on-accent: #ffffff;
  --accent-soft: #dcf0f5;
  --glow: #ffb703;
  --on-glow: #231a00;
  --glow-soft: #fdf0cc;
  --ok: #1d6b45;
  --err: #b3261e;
  --info: #0a5a70;
  --mine: #0b6e8a;
  --on-mine: #ffffff;
  --agent-bubble: #fdf6e3;
  --input-bg: #ffffff;
  --focus: #1f5fd1;
  --scrim: rgba(16, 33, 58, .45);
  --font-display: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Noto Sans Mono CJK TC", SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}
main.tc-auth {
  --text-main: var(--text); --text-body: var(--text-2); --text-muted: var(--muted); --primary: var(--accent);
  --card-bg: var(--surface); --card-border: var(--line); --border-subtle: var(--line);
  color: var(--text-body); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  margin: 1rem max(12px, calc(50% - 480px)); padding: 1rem 1.25rem;
}
main.tc-auth h1 { color: var(--text-main); }
main.tc-auth input, main.tc-auth select, main.tc-auth textarea { background: var(--input-bg); color: var(--text); border-color: var(--line-strong); }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060911;
    --bg-top: #0b1220;
    --surface: #111a2e;
    --surface-2: #1a2742;
    --line: rgba(148, 197, 255, .16);
    --line-strong: #5f7aa3;
    --text: #f5f8fc;
    --text-2: #c9d4e3;
    --muted: #9db0c9;
    --accent: #00d2ff;
    --accent-hover: #5ee3ff;
    --on-accent: #03121a;
    --accent-soft: rgba(0, 210, 255, .13);
    --glow: #ffb703;
    --on-glow: #1d1600;
    --glow-soft: rgba(255, 183, 3, .13);
    --ok: #5ee0a0;
    --err: #ff8a80;
    --info: #7fe6ff;
    --mine: #0a4f66;
    --on-mine: #f5f8fc;
    --agent-bubble: #18233a;
    --input-bg: #0b1220;
    --focus: #ffd166;
    --scrim: rgba(2, 4, 10, .66);
  }
}
.tc-auth-header, .tc-auth-footer {
  --text-main: var(--text); --text-body: var(--text-2); --text-muted: var(--muted); --primary: var(--accent);
  --card-bg: var(--surface); --card-border: var(--line); --border-subtle: var(--line);
  color: var(--text-body); background: var(--surface); border: 0 solid var(--line);
  padding: .75rem max(12px, calc(50% - 480px)); overflow-wrap: anywhere;
}
.tc-auth-header { border-bottom-width: 1px; }
.tc-auth-footer { border-top-width: 1px; margin-top: 1rem; }
.tc-auth-brand { display: inline-flex; align-items: center; max-width: 100%; color: var(--text-main); font-weight: 700; text-decoration: none; }
.tc-auth-brand .brand-name { min-width: 0; overflow-wrap: anywhere; }
.tc-auth-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; margin: 0; padding: 0; }
.tc-auth-footer li { min-width: 0; max-width: 100%; }
.tc-auth-doc { color: var(--primary); overflow-wrap: anywhere; }
.tc-auth-art { display: none; }
