:root {
  --bg: #fcfaf5;
  --panel: #ffffff;
  --ink: #33302b;
  --ink-soft: #6f675d;
  --accent: #a4663f;
  --accent-soft: #d4c3ad;
  --rule: #ece5d8;
  --door-fill: #f5ecdb;
  --maxw: 640px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Landing ---------- */

.landing-header {
  text-align: center;
  padding: 3.5rem 1.25rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.portrait {
  display: block;
  width: 460px;
  max-width: 90%;
  height: auto;
  margin: -1rem auto 0.25rem;   /* extra cream around the figure is invisible on the page */
}

.site-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 3.6rem;
  line-height: 1.05;
  margin: 0 0 1.2rem;
  letter-spacing: 0.5px;
}

.site-intro {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 33rem;
  margin: 0 auto;
}

/* ---------- Landing: quiet index of volumes ---------- */

.vlist {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
}

.vrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.9rem 0.4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  transition: padding 0.18s ease, background 0.18s ease;
}
.vrow:last-child { border-bottom: 1px solid var(--rule); }

.vrow:hover {
  text-decoration: none;
  background: var(--panel);
  padding-left: 1rem;
  padding-right: 1rem;
}

.vrow-text { display: block; }

.vrow-eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.72rem;
  color: var(--accent-soft);
  margin-bottom: 0.45rem;
}

.vrow-title {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.05rem;
  line-height: 1.1;
}

.vrow-excerpt {
  display: block;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.5;
  margin-top: 0.55rem;
}

.vrow-aside {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
  white-space: nowrap;
}

.vrow-read { color: var(--accent); font-style: italic; font-size: 1.05rem; }
.vrow:hover .vrow-read { text-decoration: underline; }
.vrow-count { color: var(--accent-soft); font-size: 0.85rem; }

/* ---------- Volume page ---------- */

.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.topbar {
  display: flex;
  align-items: center;
  padding: 1.75rem 0 0;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 0.4rem 0.85rem 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.backlink:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent-soft);
  background: #fff;
}

.volume-header { text-align: center; padding: 3rem 0 1.5rem; }

.volume-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.6rem;
  margin: 0 0 0.4rem;
}

.volume-sub { color: var(--ink-soft); font-style: italic; font-size: 1.05rem; margin: 0 auto 0.4rem; max-width: 30rem; }

.volume-date {
  color: var(--accent-soft);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.toc { list-style: none; margin: 1rem 0 0; padding: 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc li:first-child { border-top: 1px solid var(--rule); }

.toc li a {
  display: block;
  padding: 0.95rem 0.4rem;
  color: var(--ink);
  transition: background 0.15s ease, padding 0.15s ease;
}
.toc li a:hover { background: var(--panel); text-decoration: none; padding-left: 0.9rem; }

.toc-title { font-size: 1.15rem; }
.toc-sub { display: block; color: var(--ink-soft); font-style: italic; font-size: 0.9rem; margin-top: 0.1rem; }

/* ---------- Poem ---------- */

.poem { padding: 2.5rem 0 1rem; }

.poem-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.3rem;
  line-height: 1.15;
  margin: 0 0 0.3rem;
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.poem-subtitle { color: var(--accent); font-style: italic; font-size: 1.1rem; margin: 0 0 2rem; }

.poem-body {
  white-space: pre-wrap;
  font-size: 1.18rem;
  line-height: 1.75;
  margin: 1.5rem 0;
}
.poem-body em { font-style: italic; }
.poem-body strong { font-weight: 600; }

.poem-note {
  white-space: pre-wrap;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.poem-attribution {
  white-space: pre-line;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1rem;
  margin: 2rem 0 0;
}

/* ---------- Audio ---------- */

.audio { margin: 2.8rem 0 0.5rem; text-align: center; }

.play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--accent-soft);
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.play-btn:hover { border-color: var(--accent); background: #fff; }
.play-btn:active { transform: scale(0.96); }

.ico { display: inline-block; }
.ico-play {
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--accent);
  margin-left: 3px;
}
.ico-pause { position: relative; width: 13px; height: 16px; display: none; }
.ico-pause::before, .ico-pause::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4px;
  height: 16px;
  background: var(--accent);
  border-radius: 1px;
}
.ico-pause::before { left: 1px; }
.ico-pause::after { right: 1px; }
.play-btn.playing .ico-play { display: none; }
.play-btn.playing .ico-pause { display: inline-block; }

.audio-caption { margin: 0.6rem 0 0; font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Poem nav ---------- */

.poem-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.poem-nav .pn-left { text-align: left; }
.poem-nav .pn-center { text-align: center; white-space: nowrap; }
.poem-nav .pn-right { text-align: right; }
.poem-nav .pn { color: var(--ink-soft); }
.poem-nav .pn:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  color: var(--accent-soft);
  font-style: italic;
  font-size: 0.95rem;
  padding: 2.5rem 1.25rem 3.5rem;
}
.site-footer a { color: var(--accent-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  body { font-size: 18px; }
  .site-name { font-size: 2.7rem; }
  .vrow {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  .vrow-title { font-size: 1.8rem; }
  .vrow-aside {
    flex-direction: row;
    align-items: baseline;
    gap: 0.9rem;
    text-align: left;
  }
  .volume-title { font-size: 2.1rem; }
  .poem-title { font-size: 1.9rem; }
  .poem-body { font-size: 1.08rem; }
  .poem-nav { grid-template-columns: 1fr; text-align: center; }
  .poem-nav .pn-left, .poem-nav .pn-right { text-align: center; }
}
