:root {
  color-scheme: light;
  --bg: #fff8ef;
  --paper: #ffffff;
  --ink: #24302f;
  --muted: #687574;
  --line: #ecdcc8;
  --mint: #c7eadb;
  --peach: #ffd4bd;
  --sun: #ffe39f;
  --shadow: 0 18px 50px rgba(68, 55, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 227, 159, 0.45), transparent 28rem),
    linear-gradient(180deg, #fff8ef 0%, #f7fbf6 100%);
  color: var(--ink);
  font-family: ui-rounded, "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

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

.site-header,
.hero,
.archive,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--sun));
  box-shadow: 0 8px 22px rgba(41, 83, 69, 0.14);
}

.header-note {
  color: var(--muted);
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
  padding: 20px 0 44px;
}

.comic-frame {
  margin: 0;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.comic-frame img {
  display: block;
  width: 100%;
  border-radius: 6px;
}

.today-panel {
  padding: 6px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: #7d5840;
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.date {
  margin: 16px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.summary {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.7;
}

.background {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(199, 234, 219, 0.75);
  color: #315c4c;
  font-size: 13px;
  font-weight: 800;
}

.archive {
  padding: 18px 0 56px;
}

.archive h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

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

.story-card {
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(68, 55, 39, 0.11);
}

.story-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #fff4e7;
}

.story-card-body {
  padding: 13px 14px 16px;
}

.story-card time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.story-card h3 {
  margin: 7px 0 8px;
  font-size: 18px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.story-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.story-page .comic-frame {
  margin: 24px 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: #315c4c;
  font-weight: 800;
}

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

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }
}
