:root {
  color-scheme: light dark;
  --bg: #f3efe7;
  --surface: rgba(255, 252, 246, 0.92);
  --surface-strong: #fffdf8;
  --text: #1d1c1a;
  --muted: #6a6258;
  --line: rgba(62, 50, 34, 0.14);
  --accent: #9c4f1a;
  --accent-soft: rgba(156, 79, 26, 0.12);
  --shadow: 0 18px 40px rgba(37, 24, 10, 0.08);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171412;
  --surface: rgba(30, 26, 23, 0.92);
  --surface-strong: #221d19;
  --text: #f4ede4;
  --muted: #c0b3a2;
  --line: rgba(244, 237, 228, 0.12);
  --accent: #f3a15f;
  --accent-soft: rgba(243, 161, 95, 0.18);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(156, 79, 26, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.3), transparent 28%),
    var(--bg);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 246, 0.76);
}

html[data-theme="dark"] .site-nav {
  background: rgba(23, 20, 18, 0.8);
}

.site-nav-inner,
.portal {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand,
.theme-toggle,
.latest-link,
.history-link {
  text-decoration: none;
  color: var(--text);
}

.site-brand {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 700;
}

.theme-toggle,
.search-input,
.latest-link,
.history-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.theme-toggle {
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  cursor: pointer;
}

.portal {
  padding-top: 28px;
  padding-bottom: 56px;
}

.hero,
.toolbar,
.latest-card,
.history-card {
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  padding: 32px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface);
}

.hero-kicker,
.section-date,
.history-date {
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

.hero-copy,
.latest-summary,
.history-summary,
.empty-state {
  color: var(--muted);
}

.toolbar {
  padding: 18px 20px;
  margin-bottom: 24px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.search-input {
  width: 100%;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.latest-section {
  margin-bottom: 28px;
}

.latest-card {
  padding: 26px;
}

.latest-title,
.history-title {
  margin: 0 0 10px;
}

.latest-link,
.history-link {
  color: var(--text);
}

.latest-link:hover,
.history-link:hover {
  color: var(--accent);
}

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

.history-card {
  padding: 20px;
}

.history-title {
  font-size: 1.12rem;
}

.empty-state {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .site-nav-inner,
  .portal {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .toolbar,
  .latest-card,
  .history-card {
    border-radius: 20px;
  }

  .hero {
    padding: 24px 20px;
  }

  .latest-card {
    padding: 22px 20px;
  }
}
