:root {
  --paper: #f4f1ea;
  --card: #fbfaf7;
  --ink: #1c1c1a;
  --muted: #5e5a53;
  --green: #5e7f77;
  --green-dark: #3f5c56;
  --rule: #d9d4c8;
  --shadow: 0 10px 30px rgba(40, 36, 28, 0.06);
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap,
.site-header.compact .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.15; }
.brand-mark { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.08em; }
.brand-sub { color: var(--green); font-size: 0.75rem; letter-spacing: 0.18em; margin-top: 4px; }
.search input {
  width: min(280px, 46vw);
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.92rem;
}
.search input:focus { outline: 2px solid color-mix(in srgb, var(--green) 50%, white); border-color: var(--green); }
.back { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }

.intro { padding: 28px 0 8px; color: var(--muted); max-width: 46em; }
.intro p { margin: 0; }
.empty { padding: 48px 0; color: var(--muted); text-align: center; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding: 20px 0 64px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(40, 36, 28, 0.1); color: inherit; }
.card figure { margin: 0; background: #efece4; }
.card img { width: 100%; aspect-ratio: 3200 / 3800; object-fit: cover; object-position: top; }
.card-meta { padding: 14px 16px 16px; }
.card-kicker {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--green); font-size: 0.75rem; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.card-kicker time { color: var(--muted); letter-spacing: 0; }
.card h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
}
.card-sub { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.work { padding-bottom: 72px; }
.kicker {
  color: var(--green);
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin: 28px 0 10px;
}
.work h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 10px;
}
.subtitle { font-size: 1.15rem; color: var(--green-dark); margin: 0 0 8px; }
.when { color: var(--muted); font-size: 0.88rem; margin: 0 0 18px; }
.lead {
  font-size: 1.05rem;
  max-width: 42em;
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 3px solid var(--green);
}

.plate { margin: 0 0 36px; }
.plate a { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.plate img { width: 100%; margin: 0 auto; }
.plate figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 8px; }

.notes, .article { max-width: 42em; }
.notes { margin-bottom: 36px; color: var(--muted); }
.notes h2, .article h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 1.6em 0 0.6em;
}
.article-label {
  color: var(--green);
  letter-spacing: 0.14em;
  font-size: 0.82rem !important;
  font-family: var(--sans) !important;
  font-weight: 500 !important;
  margin-top: 0 !important;
}
.article p, .notes p { margin: 0 0 0.95em; }
.article p:last-child, .notes p:last-child { margin-bottom: 0; }

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
}
.pager-newer { justify-self: start; }
.pager-older { justify-self: end; text-align: right; }
.pager-index { justify-self: center; color: var(--muted); text-decoration: none; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }

.site-footer { padding: 8px 0 48px; color: var(--muted); font-size: 0.85rem; }
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  html { font-size: 16px; }
  .site-header .wrap { min-height: 64px; }
  .grid { gap: 16px; }
  .pager { grid-template-columns: 1fr; text-align: left; }
  .pager-older, .pager-newer, .pager-index { justify-self: stretch; text-align: left; }
}
