:root {
  --ink: #111111;
  --ink-soft: #444444;
  --ink-faint: #9a9a9a;
  --line: #dedede;
  --paper: #ffffff;
  --serif: "Noto Serif SC", "Source Han Serif SC", "思源宋体",
    "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --numeral: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 28px 40px;
}

.memorial {
  width: 100%;
  max-width: 620px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mark {
  margin: 0 0 clamp(44px, 8vh, 84px);
  font-size: 12px;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  color: var(--ink-faint);
}

.portrait {
  display: block;
  width: clamp(116px, 14vw, 140px);
  height: auto;
}

.days {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: clamp(56px, 10vh, 100px);
}

.days__icon {
  width: 22px;
  height: 22px;
  color: #8c8c8c;
}

.days__text {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.days__num {
  font-family: var(--numeral);
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 0 0.12em;
}

.rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: clamp(48px, 8vh, 80px) 0;
  background: var(--line);
}

.verse {
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 2.25;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.verse p { margin: 0; }

.closing {
  margin: clamp(46px, 8vh, 78px) 0 0;
  font-size: 15px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink);
}

.site-head,
.footer {
  font-family: var(--numeral);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  animation: appear 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.site-head {
  width: 100%;
  max-width: 620px;
  display: flex;
  justify-content: center;
}

.footer {
  padding-top: 48px;
  animation-delay: 0.95s;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.memorial > * {
  animation: appear 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.memorial > :nth-child(1) { animation-delay: 0.05s; }
.memorial > :nth-child(2) { animation-delay: 0.18s; }
.memorial > :nth-child(3) { animation-delay: 0.36s; }
.memorial > :nth-child(4) { animation-delay: 0.54s; }
.memorial > :nth-child(5) { animation-delay: 0.70s; }
.memorial > :nth-child(6) { animation-delay: 0.88s; }

@media (max-width: 480px) {
  .page { padding: 56px 22px 32px; }
  .mark { letter-spacing: 0.45em; text-indent: 0.45em; }
  .days__text { letter-spacing: 0.08em; }
  .verse { letter-spacing: 0.06em; line-height: 2.1; }
}

@media (prefers-reduced-motion: reduce) {
  .memorial > *, .site-head, .footer { animation: none; opacity: 1; }
}

@media print {
  body { background: #ffffff; }
  .memorial > *, .site-head, .footer { animation: none; opacity: 1; }
}
