:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #292824;
  --muted: #8b887f;
  --line: #d9d5ca;
  --accent: #a35e4e;
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.page-shell {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5.6vw, 84px);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: clamp(28px, 4.2vw, 54px);
}

.brand {
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .16em;
  text-decoration: none;
}

.brand-mark { color: var(--accent); }

.collection-years,
.eyebrow,
.poem-date,
.page-indicator,
.keyboard-hint {
  color: var(--muted);
  font-family: Georgia, "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 12px;
  letter-spacing: .12em;
}

.reader {
  width: min(100%, 590px);
  margin: clamp(72px, 11vh, 130px) auto 72px;
}

.reader-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.eyebrow-divider { margin: 0 8px; color: var(--line); }

.heading-rule { height: 1px; flex: 1; background: var(--line); }

.poem { padding-top: clamp(30px, 5vw, 52px); }

.poem h1 {
  margin: 0 0 34px;
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 500;
  letter-spacing: .15em;
  line-height: 1.45;
}

.poem-body {
  font-size: clamp(16px, 1.45vw, 18px);
  font-weight: 400;
  letter-spacing: .055em;
  line-height: 2.05;
  overflow-wrap: anywhere;
}

.poem-body p { margin: 0 0 1.15em; }
.poem-body p:last-child { margin-bottom: 0; }
.poem-body .loading { color: var(--muted); }

.poem-date {
  margin: 38px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.poem-date:empty { display: none; }

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
}

.pagination {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.5vw, 52px);
}

.page-button {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: .08em;
  transition: color .18s ease;
}

.page-button span[aria-hidden] { font-family: Georgia, serif; font-size: 22px; line-height: 1; }
.page-button:hover:not(:disabled) { color: var(--accent); }
.page-button:disabled { color: #bcb8af; cursor: default; }
.page-indicator { min-width: 46px; text-align: center; }

@media (max-width: 640px) {
  .page-shell { padding: 0 26px; }
  .site-header { padding-top: 26px; }
  .collection-years { font-size: 11px; }
  .reader { margin-top: 76px; margin-bottom: 68px; }
  .poem h1 { margin-bottom: 28px; }
  .poem-body { line-height: 2; }
  .page-footer { padding: 16px 0 22px; }
  .pagination { width: 100%; justify-content: space-between; gap: 10px; }
  .keyboard-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page-button { transition: none; }
}
