:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --fg: #1b1814;
  --muted: #6f6759;
  --card: #ffffff;
  --border: #e6dfd2;
  --accent: #d9480f;
  --accent-soft: #fdece1;
  --shadow: 0 10px 30px rgba(30, 24, 16, 0.08);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #12100e;
  --fg: #f2ede4;
  --muted: #a79e8f;
  --card: #1b1816;
  --border: #2c2723;
  --accent: #ff8a4c;
  --accent-soft: #2a1a12;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
}

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.site-nav {
  display: flex;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-glyph {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--fg);
  background: linear-gradient(90deg, var(--fg) 50%, transparent 50%);
  vertical-align: -2px;
}

.site-main {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.hero {
  padding: 48px 0 32px;
}

.hero-title {
  font-family: ui-serif, Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  max-width: 580px;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 28px 0 14px;
  font-weight: 600;
}

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

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-soft);
}

.card-cover--blank {
  background-image: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%),
    linear-gradient(135deg, var(--accent-soft), var(--card));
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.card-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-open {
  margin-top: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.empty {
  padding: 8px 0 40px;
}

.empty-card {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  background: var(--card);
}

.empty-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.empty-card p {
  margin: 0;
  color: var(--muted);
}

.prose {
  max-width: 680px;
  padding-top: 24px;
}

.prose h1 {
  font-family: ui-serif, Georgia, 'Songti SC', serif;
  font-size: 30px;
  margin: 0 0 16px;
}

.prose ul {
  padding-left: 20px;
}

.prose li {
  margin-bottom: 10px;
}

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

.site-foot {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.site-foot a {
  text-decoration: none;
  color: var(--muted);
}

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

@media (max-width: 520px) {
  .site-head {
    padding: 16px 18px 8px;
  }

  .site-main {
    padding: 12px 18px 48px;
  }

  .hero {
    padding: 28px 0 20px;
  }
}
