:root {
  --bg: #fbfaf7; --surface: #ffffff; --text: #1d1d1f; --muted: #5f6368; --line: #e3e0d8;
  --accent: #2f5d50; --accent-soft: #e4efe9; --warn: #8a4b00; --warn-soft: #fff3e0; --danger: #a12622; --demo: #6b4fa0; --demo-soft: #efe9f8;
  --radius: 10px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151716; --surface: #1f2221; --text: #ecebe7; --muted: #a5a9a6; --line: #343836;
    --accent: #8cc9b2; --accent-soft: #233630; --warn: #f0b768; --warn-soft: #3a2c17; --danger: #f08a85; --demo: #c2a8f0; --demo-soft: #2d2540; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; }
a { color: var(--accent); }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
header.top h1 { font-size: 1.1rem; margin: 0; }
header.top nav { display: flex; gap: 12px; flex-wrap: wrap; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 720px) { .filters { grid-template-columns: 1fr 1fr; } .filters input[type=search] { grid-column: 1 / -1; } }
input, select, textarea, button { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
button { background: var(--accent); color: var(--surface); border: none; cursor: pointer; width: auto; font-weight: 600; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin: 2px 4px 2px 0; overflow-wrap: anywhere; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.demo { background: var(--demo-soft); color: var(--demo); }
.badge.muted { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 8px; margin: 8px 0; font-size: .92rem; }
.item-row { display: block; text-decoration: none; color: inherit; }
.item-row h3 { margin: 0 0 4px; font-size: 1rem; }
.zh { color: var(--muted); font-size: .9rem; }
.article p, .article li { max-width: 70ch; }
details summary { cursor: pointer; color: var(--muted); }
pre.original { white-space: pre-wrap; word-break: break-word; font-size: .85rem; background: var(--bg); padding: 12px; border-radius: 8px; overflow-x: auto; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin: 12px 0; }
.day { text-align: center; padding: 6px 0; border-radius: 6px; border: 1px solid var(--line); font-size: .85rem; }
.day.done { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.day.today { outline: 2px solid var(--warn); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 12px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat { font-size: 1.6rem; font-weight: 700; }
.stat.null { color: var(--muted); font-size: 1rem; font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; }
.kanban .col { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 80px; }
.kanban .task { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; font-size: .88rem; cursor: pointer; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 160px; }
footer { text-align: center; padding: 24px 16px; color: var(--muted); font-size: .85rem; }
.hidden { display: none !important; }
.inline-check { width: auto; margin-right: 6px; }
