:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1d1c1a;
  --muted: #6d6a63;
  --line: #e3e0d8;
  --accent: #8c2f39;
  --accent-soft: #f5eaeb;
  --radius: 10px;
  --max: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 头部 ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0 26px;
}

.site-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.site-header .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 搜索 ---------- */

.toolbar { margin: 26px 0 18px; }

#search {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#search::placeholder { color: #a5a19a; }

/* ---------- 筛选 ---------- */

.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  flex: 0 0 auto;
  width: 32px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 6px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .12s;
}

.chip:hover { border-color: #c9c4b8; color: var(--ink); }

.chip.is-on {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- 计数 ---------- */

.count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 列表 ---------- */

.list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .12s, box-shadow .12s;
}

.card:hover {
  border-color: #d3cec2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.card-main { min-width: 0; }

.card-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  white-space: nowrap;
}

.tag-ext {
  color: #6b6a63;
  background: #eceae4;
}

.dim {
  font-size: 12px;
  color: #9a968d;
  white-space: nowrap;
}

.note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.btn,
.btn-ghost {
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 9px 15px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all .12s;
}

.btn {
  color: var(--surface);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn:hover { background: #7a2831; border-color: #7a2831; }

.btn-ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.btn-ghost:hover { color: var(--ink); border-color: #c9c4b8; }

/* ---------- 空状态 / 页脚 ---------- */

.empty {
  padding: 50px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer p { margin: 0 0 8px; }

.site-footer a { color: var(--accent); }

.muted { color: #a5a19a; font-size: 12px; }

/* ---------- 手机 ---------- */

@media (max-width: 640px) {
  .site-header { padding: 24px 0 20px; }
  .site-header h1 { font-size: 21px; }
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .actions { justify-content: flex-end; }
  .filter-label { width: 100%; }
}
