:root {
  color-scheme: light;
  --ink: #1d1b18;
  --muted: #777069;
  --line: #ded9d2;
  --paper: #f4f1eb;
  --card: #fffdf9;
  --accent: #b24b33;
  --accent-dark: #873523;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
.hero { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font: 700 12px/1.2 ui-monospace, monospace; letter-spacing: .15em; }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
h1 { margin: 0; font-family: SimSun, STSong, serif; font-size: clamp(42px, 7vw, 76px); font-weight: 500; letter-spacing: -.05em; }
.lede { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.count { color: var(--muted); font: 500 20px/1 ui-monospace, monospace; white-space: nowrap; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; margin-top: 28px; }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--card); padding: 0 14px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(178 75 51 / 12%); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 24px; box-shadow: 0 8px 24px rgb(40 32 24 / 4%); }
.card-top { display: flex; align-items: center; gap: 10px; }
.number { color: var(--accent); font: 700 12px/1 ui-monospace, monospace; }
.angle { border: 1px solid var(--line); border-radius: 99px; padding: 5px 9px; color: var(--muted); font-size: 12px; }
h2 { margin: 18px 0 14px; font: 600 25px/1.35 SimSun, STSong, serif; }
.body { margin: 0; color: #48433e; line-height: 1.9; white-space: pre-line; }
.tags { margin: 20px 0 0; color: var(--accent-dark); line-height: 1.8; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; padding-top: 22px; }
button { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: transparent; cursor: pointer; transition: .15s ease; }
button:hover { border-color: var(--accent); color: var(--accent); }
button.primary { border-color: var(--accent); color: white; background: var(--accent); }
button.primary:hover { background: var(--accent-dark); }
.empty { text-align: center; color: var(--muted); padding: 80px 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px); z-index: 10; border-radius: 99px; padding: 11px 18px; color: white; background: var(--ink); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 800px) {
  .shell { width: min(100% - 20px, 640px); padding-top: 32px; }
  .hero-row { align-items: start; }
  .toolbar, .grid { grid-template-columns: 1fr; }
  .actions { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 20px; }
}
