*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: Georgia, serif;
  background: #fdf6ee;
  color: #3b2a1a;
}

/* ── Cover page ─────────────────────────────── */

.cover-page body,
body.cover-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.25rem;
}

.cover-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 480px;
}

.cover-img {
  width: 100%;
  max-height: 68dvh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.15);
}

/* ── Content pages ──────────────────────────── */

body.book-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.page-image-wrap {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.6rem 0;
}

.page-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 3px 14px rgba(0,0,0,.12);
}

/* ── Nav bar ────────────────────────────────── */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #fff8f0;
  border-top: 1px solid #e8d8c4;
  flex-shrink: 0;
}

.page-indicator {
  font-size: 0.85rem;
  color: #9a7a58;
  letter-spacing: .03em;
}

/* ── Buttons ────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  background: #d4601a;
  color: #fff;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn:hover {
  background: #b8511a;
}

.btn-start {
  padding: 0.75rem 2.2rem;
  font-size: 1.05rem;
}

.btn-ghost {
  background: transparent;
  color: #d4601a;
  border: 2px solid #d4601a;
}

.btn-ghost:hover {
  background: #fdeee4;
}

.btn-muted {
  background: #ddd;
  color: #aaa;
  pointer-events: none;
  cursor: default;
}

/* ── Landscape: tighten spacing ─────────────── */

@media (orientation: landscape) and (max-height: 520px) {
  .cover-img      { max-height: 54dvh; }
  .nav-bar        { padding: 0.45rem 1rem; }
  .page-image-wrap { padding: 0.3rem 0.5rem 0; }
}
