:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --text: #2a2438;
  --muted: #7b738c;
  --line: #ece5d8;
  --accent: #ff6b4a;
  --shadow: 0 6px 24px rgba(60, 40, 90, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121f;
    --surface: #211d30;
    --text: #f2eefc;
    --muted: #9d95b3;
    --line: #322c47;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: 1px;
}
.hero h1 span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.hero p { margin: 0; color: var(--muted); font-size: 17px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  margin: 12px 0 24px;
}
.search {
  flex: 1 1 220px; max-width: 320px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 15px;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding-bottom: 56px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-4px) rotate(-0.4deg); }
.thumb {
  height: 140px; display: grid; place-items: center;
  font-size: 56px; background-size: cover; background-position: center;
}
.body { padding: 14px 16px 16px; }
.body h2 { margin: 0 0 4px; font-size: 18px; }
.body p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.date { margin-left: auto; font-size: 12px; color: var(--muted); }

.card.soon {
  border-style: dashed; box-shadow: none; background: transparent;
  align-items: center; justify-content: center; min-height: 250px;
  color: var(--muted); text-align: center; padding: 20px;
}
.card.soon:hover { transform: none; }
.card.soon .big { font-size: 40px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0 40px; border-top: 1px solid var(--line); }
.thumb.has-cover { height: auto; aspect-ratio: 2 / 1; }
