:root {
  --paper: #f3ead8;
  --paper-deep: #e6d7bb;
  --ink: #28241f;
  --muted: #746b5f;
  --red: #9f3028;
  --red-dark: #78251f;
  --line: rgba(52, 43, 32, .17);
  --card: rgba(255, 252, 244, .55);
  --shadow: 0 24px 60px rgba(63, 46, 25, .11);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(255,255,255,.64), transparent 24rem),
    linear-gradient(90deg, rgba(92,67,34,.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 5px 100%, auto;
  font-family: var(--serif);
  line-height: 1.75;
  transition: color .3s ease, background-color .3s ease;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 14px; width: max-content; }
.brand-mark {
  width: 45px; height: 45px; display: grid; place-items: center;
  border: 1px solid var(--red); color: var(--red); font-size: 25px;
  transform: rotate(-3deg); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--red);
}
.brand strong { display: block; letter-spacing: .16em; font-size: 17px; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .2em; margin-top: 1px; }
nav { display: flex; gap: 30px; font-size: 14px; letter-spacing: .08em; }
nav a { position: relative; padding: 10px 0; }
nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 4px; height: 1px; background: var(--red); transition: right .25s ease; }
nav a:hover::after, nav a:focus-visible::after { right: 0; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; transition: .25s ease;
}
.theme-toggle:hover { color: var(--paper); background: var(--ink); transform: translateY(-2px); }

main { overflow: hidden; }
.hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 680px;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: center;
  gap: 9vw;
  position: relative;
  padding: 76px 0 90px;
}
.hero::before {
  content: "詩";
  position: absolute; right: -20px; top: -100px;
  font-size: 430px; line-height: 1; color: rgba(95, 67, 35, .035); pointer-events: none;
}
.eyebrow { margin: 0 0 16px; color: var(--red); font-size: 12px; font-family: var(--sans); letter-spacing: .34em; font-weight: 600; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 28px; font-size: clamp(64px, 8vw, 112px); line-height: .98; font-weight: 500; letter-spacing: -.06em; }
h1 em { color: var(--red); font-style: normal; }
.hero-intro { max-width: 440px; color: var(--muted); font-size: 17px; line-height: 2; }
.primary-link { display: inline-flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--ink); padding: 10px 0 7px; margin-top: 22px; font-size: 14px; letter-spacing: .12em; }
.primary-link span { color: var(--red); transition: transform .2s ease; }
.primary-link:hover span { transform: translateY(4px); }

.hero-poem {
  margin: 0;
  min-height: 490px;
  padding: 58px 74px 56px;
  background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(242,230,208,.5));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.hero-poem::before, .hero-poem::after { content: ""; position: absolute; width: 42px; height: 42px; border-color: var(--red); opacity: .45; }
.hero-poem::before { left: 18px; top: 18px; border-left: 1px solid; border-top: 1px solid; }
.hero-poem::after { right: 18px; bottom: 18px; border-right: 1px solid; border-bottom: 1px solid; }
.hero-poem figcaption { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.hero-poem figcaption span { grid-column: 1 / -1; color: var(--red); font-family: var(--sans); font-size: 11px; letter-spacing: .28em; }
.hero-poem figcaption strong { font-size: 30px; font-weight: 500; letter-spacing: .12em; }
.hero-poem figcaption small { color: var(--muted); font-size: 13px; }
.hero-poem blockquote { margin: 34px 0 0; font-size: clamp(17px, 1.65vw, 23px); letter-spacing: .12em; line-height: 1.8; }
.hero-poem blockquote p { margin-bottom: 7px; }
.seal { position: absolute; right: 36px; top: 42%; color: var(--red); border: 1px solid var(--red); padding: 6px 8px; font-size: 13px; line-height: 1.1; opacity: .65; }
.hero-stamp { position: absolute; right: 45%; bottom: 40px; color: var(--red); border: 1px solid var(--red); padding: 7px; font-size: 11px; letter-spacing: .18em; transform: rotate(5deg); }

.featured-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.featured-strip p { margin: 0; padding: 26px 5vw; text-align: center; color: var(--muted); font-size: 13px; border-right: 1px solid var(--line); }
.featured-strip p:last-child { border-right: 0; }
.featured-strip span { color: var(--ink); font-size: 18px; margin-right: 12px; }

.collection { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 120px 0 130px; }
.section-heading { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10vw; align-items: end; margin-bottom: 48px; }
.section-heading h2, .about h2 { margin-bottom: 0; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; }
.section-heading > p { margin-bottom: 4px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.collection-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { border: 0; background: transparent; padding: 8px 14px; color: var(--muted); cursor: pointer; font-size: 13px; }
.filter.is-active { background: var(--red); color: #fff8eb; }
.search-box { display: flex; align-items: center; border-bottom: 1px solid var(--line); min-width: 250px; }
.search-box input { width: 100%; border: 0; outline: 0; padding: 8px 4px; color: var(--ink); background: transparent; font-size: 13px; }
.search-box span:last-child { color: var(--red); }

.poem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.poem-card { min-height: 315px; padding: 28px 28px 30px; border: 1px solid var(--line); background: var(--card); position: relative; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.poem-card:hover { transform: translateY(-5px); border-color: rgba(159,48,40,.4); box-shadow: 0 16px 36px rgba(70,51,26,.08); }
.poem-card[hidden] { display: none; }
.card-number { position: absolute; top: 23px; right: 24px; color: rgba(56,45,33,.2); font-size: 14px; }
.tag { display: inline-block; color: var(--red); border-bottom: 1px solid rgba(159,48,40,.35); margin-bottom: 24px; font-family: var(--sans); font-size: 10px; letter-spacing: .2em; }
.poem-card h3 { max-width: 85%; margin-bottom: 4px; font-size: 24px; font-weight: 500; line-height: 1.35; letter-spacing: .06em; }
.author { color: var(--muted); font-size: 12px; letter-spacing: .15em; }
.verse { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; font-size: 14px; line-height: 1.9; }
.verse p { margin-bottom: 4px; }
.empty-state { text-align: center; color: var(--muted); padding: 80px 0 20px; }

.about { background: #28241f; color: #f2e8d5; padding: 110px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .8fr 1.2fr; gap: 11vw; }
.about .eyebrow { color: #d58172; }
.about-copy { color: #c8bcaa; columns: 2; column-gap: 50px; }
.about-copy p { break-inside: avoid; font-size: 15px; line-height: 2; }
footer { background: #1f1c19; color: #aa9f90; display: flex; justify-content: space-between; padding: 28px max(24px, calc((100vw - 1180px) / 2)); font-size: 12px; letter-spacing: .08em; }
footer p { margin: 0; }
footer a { color: #dfd3c0; }

body.night {
  --paper: #1f1d1a; --paper-deep: #29251f; --ink: #e9dfce; --muted: #a79d8f;
  --red: #c86657; --red-dark: #ad4e42; --line: rgba(238,221,194,.15);
  --card: rgba(51,46,39,.62); --shadow: 0 24px 60px rgba(0,0,0,.24);
  background-color: var(--paper);
}
body.night .brand-mark { box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--red); }
body.night .hero-poem { background: linear-gradient(135deg, rgba(61,56,48,.75), rgba(33,30,26,.55)); }
body.night .hero::before { color: rgba(255,255,255,.025); }
body.night .card-number { color: rgba(255,255,255,.17); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy { max-width: 620px; }
  .hero-poem { width: min(100%, 650px); justify-self: end; }
  .hero-stamp { display: none; }
  .poem-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 640px) {
  .site-header, .hero, .collection { width: min(100% - 32px, 1180px); }
  .site-header { min-height: 76px; }
  .brand-mark { width: 39px; height: 39px; font-size: 22px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .hero { min-height: auto; padding: 62px 0 72px; }
  h1 { font-size: 60px; }
  .hero-intro { font-size: 15px; }
  .hero-poem { min-height: 0; padding: 42px 28px 38px; }
  .hero-poem figcaption { grid-template-columns: 1fr; }
  .hero-poem figcaption small { margin-top: 6px; }
  .hero-poem blockquote { font-size: 16px; letter-spacing: .06em; }
  .seal { display: none; }
  .featured-strip { grid-template-columns: 1fr; }
  .featured-strip p { border-right: 0; border-bottom: 1px solid var(--line); padding: 17px; }
  .featured-strip p:last-child { border-bottom: 0; }
  .collection { padding: 88px 0 96px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .collection-tools { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
  .poem-grid { grid-template-columns: 1fr; }
  .poem-card { min-height: 280px; }
  .about { padding-top: 82px; padding-bottom: 82px; }
  .about-copy { columns: 1; }
  footer { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
