:root {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --accent: #ffb11b;
  --accent-soft: #fff4d6;
  --primary: #26324f;
  --primary-soft: #3f5481;
  --border: #e5e7eb;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .06);
  --shadow-hover: 0 2px 6px rgba(15, 23, 42, .06), 0 12px 28px rgba(15, 23, 42, .12);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.hero {
  background: linear-gradient(180deg, #fffaee 0%, #f6f7fb 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 28px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: 0.5px;
  color: var(--primary);
  border-bottom: none;
}
.hero .subtitle {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.85;
  max-width: 920px;
}
.hero .note {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-row input[type="search"] {
  flex: 1;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.search-row input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--primary-soft); }
.chip[data-active="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  min-height: 18px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #d1d5db;
}
.card a.link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef0f5, #dde2eb);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.card:hover .thumb img { transform: scale(1.03); }
.thumb .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(38, 50, 79, .92);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b2;
  font-size: 14px;
  letter-spacing: 1px;
}

.body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.intro {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.byline {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.byline span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.byline .label {
  color: #9aa3b2;
  margin-right: 4px;
}
mark {
  background: var(--accent-soft);
  color: var(--primary);
  padding: 0 2px;
  border-radius: 3px;
}

.empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 20px 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  .hero { padding: 28px 16px 20px; }
  .hero h1 { font-size: 26px; }
  main { padding: 20px 16px 40px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
}
