:root {
  color-scheme: dark;
  --green: #173e35;
  --cream: #f5f1e8;
  --gold: #c49a56;
  font-family: Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  color: white;
  background: radial-gradient(circle at 50% 35%, #496158 0, #233d34 38%, #102820 100%);
}

.toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(9, 31, 24, .92);
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.toolbar h1 {
  margin: 0;
  font: 400 1.05rem/1.2 Georgia, serif;
}

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

button, .control-link {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.55);
  color: white;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font: 700 .74rem/1 Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

button:hover, button:focus-visible, .control-link:hover, .control-link:focus-visible {
  color: #102820;
  background: var(--cream);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.page-count { min-width: 92px; text-align: center; font-size: .85rem; }

.stage {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
  padding: 34px 20px 42px;
}

.flip-book { display: none; }

.page {
  overflow: hidden;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.page-cover { background: #203d34; }
.page-cover img { object-fit: contain; }

.hint {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 20;
  margin: 0;
  padding: 7px 10px;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.4);
  font-size: .76rem;
}

.error {
  max-width: 620px;
  padding: 24px;
  color: #28120e;
  background: #f4ded8;
}

@media (max-width: 720px) {
  .toolbar { align-items: flex-start; flex-direction: column; }
  .controls { justify-content: flex-start; }
  .stage { min-height: calc(100vh - 118px); padding: 22px 8px 44px; }
  .control-link.secondary { display: none; }
  .hint { display: none; }
}
