:root {
  --accent: #b9742a;
  --accent-dark: #93591c;
  --bg: #faf7f2;
  --card: #fff;
  --text: #2b2520;
  --muted: #8a7f74;
  --line: #ece4d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.hero { text-align: center; padding: 48px 16px 24px; }
.hero h1 { margin: 0; font-size: 40px; }
.hero p { margin: 8px 0 0; color: var(--muted); }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px 32px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 20px; }
.toolbar input { flex: 1; }
.toolbar input, .toolbar select, .version select {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card p { margin: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card h2 { margin: 0; font-size: 20px; }
.card h2 .en { font-size: 14px; font-weight: normal; color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); }
.desc { font-size: 14px; }

.badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.badge { font-size: 12px; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.badge.fresh { background: #e3f5e5; color: #23793a; }
.badge.stale { background: #f0eeeb; color: #7a7066; }
.badge.warn { background: #fde8e6; color: #b3362a; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 4px; background: #f6efe4; color: var(--accent-dark); }

.version { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.version select { flex: 1; padding: 4px 8px; }

.actions { display: flex; gap: 8px; }
.actions button {
  font: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
}
.actions button.primary { flex: 1; background: var(--accent); color: #fff; }
.actions button:hover:not(:disabled) { filter: brightness(0.95); }
.actions button:disabled { opacity: 0.4; cursor: not-allowed; }
.actions button.done { background: #2f8f4e; border-color: #2f8f4e; color: #fff; }

.hint, .credit { font-size: 12px; color: var(--muted); }
.hint code { background: #f6efe4; padding: 0 4px; border-radius: 4px; color: var(--text); }

.empty { text-align: center; color: var(--muted); }
footer { text-align: center; font-size: 12px; color: var(--muted); padding: 16px; }
footer p { margin: 4px 0; }

dialog { border: 1px solid var(--line); border-radius: 12px; width: min(560px, 90vw); }
dialog textarea { width: 100%; font: 13px/1.5 ui-monospace, monospace; }
