[hidden] { display: none !important; }
:root {
  --bg: #f3efe6;
  --bg-deep: #e7e0d2;
  --ink: #1c2430;
  --muted: #5c6570;
  --card: #fffdf8;
  --line: #e3d9c6;
  --green: #1e4638;
  --green-2: #2f6a52;
  --gold: #8a6230;
  --gold-soft: #f6edd8;
  --danger: #8a3d2f;
  --shadow: 0 18px 50px rgba(40, 32, 18, 0.14);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff 0%, transparent 55%),
    var(--bg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
}
button, a { font: inherit; }
button { cursor: pointer; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 20; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 22px 8px;
}
.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}
.site-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.top-actions { display: flex; gap: 8px; }
.top-actions button, .pager button, .index-head button, .bubble-top button, .jump, .ext {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
}
#goTimeline, #openIndex {
  background: var(--green);
  color: #f7f3ea;
  border-color: var(--green);
}
.where {
  margin: 0 22px 8px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 68rem;
}
main {
  width: min(1100px, calc(100% - 28px));
  margin: 8px auto 140px;
}
.slide-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.slide-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}
.prose { display: grid; gap: 14px; max-width: 46rem; }
.prose p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.55;
}
.prose p.passage {
  background: var(--card);
  border-left: 3px solid var(--green-2);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
}
button.verse {
  display: inline;
  margin: 0 2px;
  padding: 1px 7px 2px;
  border-radius: 999px;
  border: 1px solid #e4d3a4;
  background: var(--gold-soft);
  color: #6d4b16;
  font-family: var(--sans);
  font-size: 0.92em;
  line-height: 1.4;
  vertical-align: baseline;
  box-decoration-break: clone;
}
button.verse:hover, button.verse:focus-visible {
  background: #fff;
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.unmatched {
  border-bottom: 1px dashed var(--danger);
  color: var(--danger);
}
.note, .empty {
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.hero, .grid figure, .timeline-stage {
  background: #16181d;
  border-radius: 16px;
  overflow: hidden;
}
.hero img, .grid img { display: block; width: 100%; height: auto; }
.hero { margin: 0 0 18px; }
.hero img { max-height: 70vh; object-fit: contain; margin: 0 auto; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
  align-items: start;
}
.grid figure { margin: 0; background: transparent; }
.grid img { border-radius: 12px; }
.grid figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 6px 2px 0;
}
.timeline-caption {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 7.5;
  background: #1a1c21;
  border-radius: 16px;
  overflow: hidden;
}
.stage img.placed {
  position: absolute;
  object-fit: fill;
}
.timeline-wrap { display: grid; gap: 16px; }
.timeline-stage {
  position: relative;
  width: 100%;
  background: #2a2d33;
}
.timeline-stage img.map {
  display: block;
  width: 100%;
  height: auto;
}
.hot {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(255, 214, 120, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 220, 140, 0.75);
  border-radius: 6px;
  color: transparent;
  min-height: 0;
}
.hot:hover, .hot:focus-visible {
  background: rgba(255, 214, 120, 0.28);
  outline: none;
}
.hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.hot-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
}
.jump, .ext { text-decoration: none; }
.plain-label { padding: 6px 4px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(243, 239, 230, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 8px 14px 10px;
}
.audio-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1100px, 100%);
  margin: 0 auto 8px;
}
.audio-bar p { margin: 0; min-width: 8rem; color: var(--green); font-weight: 600; }
.audio-bar audio { flex: 1; width: 100%; min-height: 40px; }
.pager {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.pager button:last-child { justify-self: end; }
#counter { margin: 0; text-align: center; color: var(--muted); font-size: 0.92rem; }
.index-panel {
  position: fixed;
  inset: 0;
  background: rgba(22, 20, 16, 0.45);
  z-index: 30;
  display: flex;
  justify-content: flex-end;
}
.index-card {
  background: var(--bg);
  width: min(420px, 100%);
  height: 100%;
  overflow: auto;
  padding: 16px;
  box-shadow: var(--shadow);
}
.index-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#indexList { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
#indexList button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 44px;
  color: var(--ink);
}
#indexList button.current { background: var(--card); border-color: var(--line); }
#indexList .num { color: var(--gold); margin-right: 8px; font-variant-numeric: tabular-nums; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 20, 16, 0.46);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.bubble {
  width: min(40rem, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px 12px;
}
.bubble-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.bubble h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 4px 0 10px;
  line-height: 1.25;
}
.verse-block { margin: 0 0 12px; }
.verse-block h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
}
.verse-block p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.55;
}
.credit { color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; }
@media (max-width: 700px) {
  .top { padding: 14px 14px 4px; }
  .where { margin: 0 14px 8px; }
  .site-title { font-size: 1.35rem; }
  .pager { grid-template-columns: 1fr 1fr; }
  #counter { grid-column: 1 / -1; order: -1; }
  .audio-bar { flex-direction: column; align-items: stretch; }
  main { margin-bottom: 180px; }
}

.home-link { display: inline-block; margin-top: 16px; }
.home-thumb { width: min(280px, 100%); height: auto; display: block; border-radius: 12px; background: #2a2d33; }
