:root {
  --ink: #3a271f;
  --muted: #8a6d5c;
  --paper: #f7f0e6;
  --paper2: #f3e6d4;
  --rose: #b86b5d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #241812;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow: hidden;
  touch-action: none;
}
.room {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 16px 18px;
}
.lamp {
  position: absolute;
  width: 520px;
  height: 520px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 160, 0.38), rgba(255, 180, 110, 0.08) 46%, transparent 70%);
  pointer-events: none;
}
.book {
  position: relative;
  width: min(420px, 92vw);
  height: min(680px, 78dvh);
  perspective: 1600px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.35));
}
.spine {
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 14px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(90deg, #6d4636, #a56b52 70%, #6a4032);
}
.edge {
  position: absolute;
  right: -7px;
  top: 8px;
  bottom: 8px;
  width: 10px;
  background: repeating-linear-gradient(180deg, #efe4d4 0 2px, #e4d3bc 2px 3px);
  border-radius: 0 4px 4px 0;
}
.sheets { position: absolute; inset: 0; transform-style: preserve-3d; }
.sheet {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  border-radius: 4px 16px 16px 4px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(90, 55, 35, 0.08);
  display: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.sheet.current, .sheet.under { display: block; }
.sheet.under { z-index: 1; }
.sheet.current { z-index: 3; }
.sheet.drag {
  z-index: 6;
  display: block;
  transition: none;
  box-shadow: -16px 10px 26px rgba(40, 18, 8, 0.22);
}
.sheet.settle {
  z-index: 6;
  display: block;
  transition: transform 0.42s cubic-bezier(.2, .75, .2, 1);
}
.paper {
  height: 100%;
  padding: 28px 22px 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,0.7), transparent 42%),
    linear-gradient(180deg, var(--paper), var(--paper2));
  display: flex;
  flex-direction: column;
}
.cover {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(80% 50% at 50% 18%, rgba(255, 236, 214, 0.9), transparent 60%),
    linear-gradient(180deg, #f8f1e7, #f0e0cc);
}
.eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  font-size: 13px;
  color: var(--muted);
}
h1, h2 {
  font-weight: 500;
  margin: 8px 0 0;
}
h1 { font-size: 64px; line-height: 0.95; }
h2 { font-size: 36px; }
.hint {
  margin-top: 28px;
  color: var(--muted);
  font-style: italic;
  font-size: 22px;
  line-height: 1.25;
}
.curl {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, transparent 50%, #e7d3b8 50%, #f7efe4 72%);
  box-shadow: -6px -6px 12px rgba(80, 40, 20, 0.06);
}
.photos {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.shot {
  margin: 0;
  background: #fffdf8;
  padding: 6px 6px 8px;
  box-shadow: 0 8px 16px rgba(70, 40, 20, 0.08);
  overflow: hidden;
}
.shot:nth-child(1) { transform: rotate(-1.5deg); }
.shot:nth-child(2) { transform: rotate(1.4deg); }
.shot:nth-child(4) { transform: rotate(1deg); }
.shot:nth-child(5) { transform: rotate(-1deg); }
.shot.wide { grid-column: 1 / -1; transform: none; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 72px;
  max-height: 150px;
}
.shot.wide img { max-height: 132px; }
.note {
  margin: 10px 0 0;
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 18px;
}
.voice {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  background: rgba(255, 252, 247, 0.8);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(120, 80, 50, 0.12);
}
.voice b { display: block; font-weight: 600; font-size: 20px; }
.voice small { color: var(--muted); font-size: 15px; }
.play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--rose);
  color: #fffaf6;
  flex: none;
}
.blank {
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(180, 140, 110, 0.16) 32px),
    linear-gradient(180deg, #fbf6ee, #f4e7d6);
  justify-content: flex-end;
}
.blank-text { padding: 0 8px 18vh; }
.script {
  font-family: "Marck Script", cursive;
  font-size: 48px;
  margin: 0 0 8px;
  color: #6d3b32;
}
.blank-text p { margin: 0; font-size: 28px; line-height: 1.25; }
.pager {
  margin: 14px 0 0;
  color: rgba(255, 236, 214, 0.72);
  letter-spacing: 0.14em;
  font-size: 14px;
}
@media (max-height: 700px) {
  h1 { font-size: 52px; }
  h2 { font-size: 30px; }
  .shot img, .shot.wide img { max-height: 92px; }
  .paper { padding: 18px 16px 14px; }
}
