:root {
  color-scheme: light;
  --paper: #f5f8fa;
  --ink: #17282f;
  --muted: #536a74;
  --line: #d8e3e7;
  --accent: #12645f;
  --accent-light: #dcefea;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
[hidden] { display: none !important; }
.topbar { padding: 14px max(24px, calc((100vw - 1160px) / 2)); background: #122f38; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; }
.brand { color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand span { color: #96dcd0; font-size: 15px; margin-left: 6px; }
#identity { display: flex; align-items: center; gap: 12px; color: #d0e4e8; font-size: 13px; flex-wrap: wrap; }
.workspace { display: flex; align-items: center; gap: 7px; }
#identity .quiet { color: #fff; border-color: #5b7681; }
main { max-width: 1208px; margin: 0 auto; padding: 33px 24px 60px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
h1, h2, p { margin: 0 0 12px; }
h1 { font-size: clamp(25px, 4vw, 36px); line-height: 1.25; letter-spacing: -.02em; }
h2 { font-size: 19px; line-height: 1.35; margin-bottom: 17px; }
.muted { color: var(--muted); font-size: 14px; }
.version { background: var(--accent-light); color: #19534d; padding: 5px 11px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
nav { display: flex; gap: 5px; margin: 10px 0 22px; border-bottom: 1px solid var(--line); overflow: auto; }
nav button { background: transparent; color: var(--muted); border: none; border-radius: 0; padding: 12px 15px 10px; border-bottom: 3px solid transparent; white-space: nowrap; }
nav button[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
.layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.card { background: white; border: 1px solid var(--line); padding: 22px; border-radius: 14px; min-width: 0; }
.auth { width: min(100%, 445px); margin: 38px auto 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0; }
input, textarea, select { border: 1px solid #bdcfd6; color: var(--ink); background: #fff; border-radius: 8px; width: 100%; min-width: 0; font: inherit; font-weight: 400; padding: 8px 10px; margin-top: 5px; }
.workspace select { width: auto; margin: 0; padding: 4px 7px; }
textarea { display: block; resize: vertical; }
#section-json { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
button { color: white; background: var(--accent); border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: default; }
.quiet { color: var(--accent); background: transparent; border-color: #b9d4d1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 5px; }
.notice { padding: 10px 14px; border: 1px solid #add4cc; background: #e7f5f1; color: #174e45; border-radius: 8px; margin-bottom: 15px; }
.notice.error { color: #8b3125; background: #fff1ed; border-color: #e7b9ad; }
#auth-notice { max-width: 445px; margin: 14px auto; }
details { margin: 15px 0; }
summary { padding: 3px 0; cursor: pointer; color: var(--accent); }
.history { margin-top: 20px; display: grid; gap: 10px; }
.turn { background: #eef4f5; border-radius: 10px; padding: 11px 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.user { background: #e5f3ef; }
.turn small { display: block; color: var(--muted); margin-top: 8px; }
.counts { margin: 0; }
.counts div, .list li { border-top: 1px solid var(--line); padding: 9px 0; }
.counts div { display: flex; justify-content: space-between; gap: 8px; }
.counts dd { margin: 0; font-weight: 700; }
.list { padding: 0; margin: 14px 0; list-style: none; }
.list li small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
td, th { padding: 10px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { color: var(--muted); }
@media (max-width: 720px) {
  main { padding: 23px 15px 40px; }
  .topbar { padding: 13px 15px; flex-wrap: wrap; }
  .layout { grid-template-columns: 1fr; }
  .card { padding: 17px; }
}
