:root {
  --bg: #16110e;
  --surface: #241b16;
  --line: #3a2d24;
  --ink: #f1e3cb;
  --muted: #c4ad8c;
  --accent: #e8b870;
  --dot: #4a3a2f;
  --bible-bg: #0e1418;
  --bible-paper: #18232a;
  --bible-gold: #cfae66;
  --bible-gold-soft: #6f5e3c;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.book {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
}

.book::-webkit-scrollbar {
  display: none;
}

.page {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.art {
  display: block;
  width: 100%;
  max-width: min(900px, calc(55dvh * 4 / 3));
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface);
}

.words {
  width: 100%;
  max-width: 36rem;
  padding: 1.25rem 16px 2rem;
}

.heading {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.8em;
  font-style: italic;
  font-weight: normal;
}

.text {
  margin: 0 0 1.25rem;
}

.do {
  margin: 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.92em;
}

.do-label,
.end h2 {
  display: block;
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Pages 2–4: the Bible story Mom tells, framed as a storybook inside the story. */
.page.bible {
  background: var(--bible-bg);
}

.bible .sheet {
  width: min(calc(100% - 24px), 40rem);
  margin: 12px 12px 20px;
  padding: 10px 10px 0;
  border: 2px solid var(--bible-gold);
  border-radius: 8px;
  background: var(--bible-paper);
  box-shadow:
    inset 0 0 0 4px var(--bible-paper),
    inset 0 0 0 5px var(--bible-gold-soft),
    0 10px 30px rgb(0 0 0 / 0.45);
}

.sheet-label {
  margin: 4px 0 0;
  color: var(--bible-gold);
  font-family: system-ui, sans-serif;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sheet-label::before,
.sheet-label::after {
  content: "✦";
  margin: 0 0.6em;
  font-size: 0.9em;
}

.sheet-ref {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.7em;
  font-style: italic;
}

.bible .art {
  max-width: min(100%, calc(48dvh * 4 / 3));
  border-radius: 4px;
}

.bible .words {
  padding: 1rem 8px 1.25rem;
}

.bible .heading,
.bible .do-label {
  color: var(--bible-gold);
}

.bible .do {
  border-left-color: var(--bible-gold);
  background: rgb(0 0 0 / 0.22);
}

.end .words {
  padding-top: 2rem;
}

.end h2:not(:first-child) {
  margin-top: 2rem;
}

.verse {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.verse p {
  margin: 0 0 0.6rem;
  font-size: 1.08em;
}

.verse footer {
  color: var(--muted);
  font-size: 0.75em;
}

.verse cite {
  font-style: normal;
  font-weight: 700;
}

.talk {
  margin: 0;
  padding-left: 1.2em;
}

.talk li + li {
  margin-top: 0.6rem;
}

.pray {
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 16px calc(0.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.turn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 1.8rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.turn:disabled {
  opacity: 0.25;
  cursor: default;
}

.dots {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dots li {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot);
  transition: background 0.2s, transform 0.2s;
}

.dots li.on {
  background: var(--accent);
  transform: scale(1.3);
}

.next {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line, rgba(255,255,255,.12));
  font-family: system-ui, sans-serif;
  font-size: 0.8em;
  text-align: center;
}
.next p { margin: 0 0 0.75rem; }
.next-btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  background: var(--accent);
  color: #1d1510;
  font-weight: 700;
  text-decoration: none;
}
