:root {
  color-scheme: light;
  --bg: #fafafa;
  --shelf: #f4f4f5;
  --card: #ffffff;
  --active: #e8e8ea;
  --line: #dedee2;
  --text: #171717;
  --sub: #55555d;
  --accent: #22664e;
  --accent-ink: #fff;
  --error: #a12f34;
  --radius: 10px;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.55 system-ui, 'Microsoft YaHei UI', 'PingFang SC', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141415;
    --shelf: #101011;
    --card: #19191b;
    --active: #272729;
    --line: #303035;
    --text: #f0f0f0;
    --sub: #aaaab2;
    --accent: #9ce8ca;
    --accent-ink: #12271f;
    --error: #ff9a9e;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100vh; }
aside { display: flex; flex-direction: column; gap: 24px; padding: 24px 16px; position: sticky; top: 0; height: 100vh; background: var(--shelf); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--accent); background: var(--card); }
nav { display: grid; gap: 4px; }
nav a { display: block; padding: 8px 12px; border: 1px solid transparent; border-radius: var(--radius); color: var(--sub); }
nav a:hover, nav a[aria-current='page'] { background: var(--active); border-color: var(--line); color: var(--text); }
.account { margin-top: auto; display: grid; gap: 8px; color: var(--sub); }
main { width: 100%; max-width: 1110px; margin: 0 auto; padding: 32px; }
header { display: grid; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 20px; }
h1 { font-size: 32px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
header p, .muted, small { color: var(--sub); }
small, .meta { font-size: 12px; }
.stack, .cards { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit,minmax(min(250px,100%),1fr)); }
.card { min-width: 0; padding: 16px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.row, .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row { justify-content: space-between; }
.pill { color: var(--sub); font-size: 12px; }
.pill[data-state='published'], .pill[data-state='approved'] { color: var(--accent); }
.pill[data-state='rejected'] { color: var(--error); }
form, label { display: grid; gap: 8px; }
form { gap: 12px; }
.inline-check { display: flex; align-items: center; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input:not([type='checkbox']), select, textarea { min-height: 36px; border-radius: var(--radius); border: 1px solid var(--line); padding: 6px 12px; background: var(--bg); }
input, textarea, select { min-width: 0; width: 100%; }
input[type='checkbox'] { width: auto; accent-color: var(--accent); }
button { cursor: pointer; }
button:hover { background: var(--active); }
button.primary { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.58; cursor: default; }
.danger, .feedback[data-error='true'] { color: var(--error); }
.feedback { margin-bottom: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 28px; }
.code { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 'Cascadia Mono', Consolas, monospace; }
.auth { max-width: 420px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .layout { grid-template-columns: 1fr; }
  aside { position: static; height: auto; padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  nav { display: flex; flex-wrap: wrap; }
  .account { display: flex; align-items: center; }
  main { padding: 20px 16px; }
}
