html { color-scheme: light; }
html.intro { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: #5c3044;
  background:
    radial-gradient(48% 36% at 12% 0%, rgba(255, 214, 224, 0.9), transparent 70%),
    radial-gradient(42% 40% at 100% 100%, rgba(244, 196, 176, 0.55), transparent 68%),
    #f3dfe6;
  font-family: Fraunces, Georgia, serif;
}
::selection { background: #f4c3d4; color: #5c3044; }

@media (prefers-color-scheme: dark) {
  html { color-scheme: dark; }
  body {
    background:
      radial-gradient(46% 34% at 12% 0%, rgba(120, 40, 70, 0.45), transparent 70%),
      radial-gradient(40% 36% at 100% 100%, rgba(70, 30, 48, 0.7), transparent 70%),
      #140910;
  }
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: block;
  background: #06110a;
  transform-origin: 50% 50%;
  transition: opacity 1.5s ease, transform 1.9s cubic-bezier(0.22, 0.7, 0.2, 1), filter 1.5s ease;
}
#stage.leave {
  opacity: 0;
  transform: scale(1.3);
  filter: blur(10px);
  pointer-events: none;
}

.book {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 48px 18px 72px;
  box-sizing: border-box;
}

.sheet {
  position: relative;
  width: min(920px, 100%);
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 58px 7vw 36px;
  color: #5c3044;
  background:
    radial-gradient(420px 260px at 0% 100%, rgba(244, 176, 196, 0.42), transparent 70%),
    radial-gradient(360px 220px at 100% 0%, rgba(250, 220, 196, 0.75), transparent 68%),
    #fffaf6;
  border-radius: 3px 8px 4px 6px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 50px rgba(90, 36, 56, 0.14),
    0 2px 0 rgba(120, 70, 80, 0.06);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.tape {
  position: absolute;
  top: -16px;
  left: 11%;
  width: 132px;
  height: 34px;
  transform: rotate(-2deg);
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.38) 0 10px,
      rgba(196, 83, 122, 0.18) 10px 20px),
    rgba(244, 176, 196, 0.82);
  box-shadow: 0 8px 14px rgba(90, 40, 55, 0.08);
}

header { position: relative; max-width: 14ch; }
.kicker {
  margin: 0 0 6px;
  font-family: Caveat, cursive;
  font-size: 1.7rem;
  font-weight: 600;
  color: #c4537a;
}
h1 {
  margin: 0;
  font-weight: 560;
  font-style: italic;
  font-size: clamp(4rem, 11vw, 6.6rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  color: #6e2944;
}
.underline {
  display: block;
  width: min(220px, 70%);
  height: 16px;
  margin: 8px 0 0 4px;
  color: #e39aaf;
}
.lede {
  margin: 10px 0 0;
  max-width: 22ch;
  font-family: Caveat, cursive;
  font-size: 1.65rem;
  line-height: 1.15;
  color: #8a5368;
}

.cluster {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 28px;
  margin-top: 18px;
}

.player { position: relative; width: min(340px, 100%); }
.doily {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 124%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, transparent 0 54%, rgba(255, 250, 246, 0.2) 55% 57%, transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(244, 214, 220, 0.15) 0 7deg, rgba(226, 164, 180, 0.72) 7deg 8.2deg);
}
.plinth {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 36px;
  background:
    radial-gradient(closest-side circle at 50% 50%, #f8ecee 0 80%, #e7b4c6 80% 84%, transparent 85%),
    linear-gradient(180deg, #f6d5e0, #e7b4c6);
  box-shadow:
    0 14px 0 #e4a8bb,
    0 26px 34px rgba(120, 48, 70, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.plinth::before,
.plinth::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #d9a3b4 55%, #b87086);
}
.plinth::before { left: 18px; }
.plinth::after { right: 18px; }

.disc {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 76%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  isolation: isolate;
}
.disc:focus-visible { outline: 2px solid #c4537a; outline-offset: 6px; }
.vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-origin: center;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      #12080c 0 1px,
      #2a161c 1.5px 2.5px,
      #1a0d12 3px 4px);
  box-shadow:
    inset 0 0 0 8px #0d0709,
    inset 0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 18px rgba(60, 16, 32, 0.18);
}
.shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 20deg,
    transparent 0 58%,
    rgba(255, 255, 255, 0.34) 72%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 90%
  );
  -webkit-mask: radial-gradient(circle, transparent 0 31%, #000 34%);
  mask: radial-gradient(circle, transparent 0 31%, #000 34%);
}
.label {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #f4b7c8;
  background: transparent;
  box-shadow: none;
}
.label::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 50%;
  width: 3px;
  height: 18%;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #9a3d5c;
}
.label svg { width: 28%; height: auto; display: block; }
.label span {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  line-height: 1;
}
.spindle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #e7b3c4, #a85b74 46%, #6e3144);
  box-shadow: 0 1px 1px rgba(80, 20, 40, 0.25);
}

.arm {
  position: absolute;
  z-index: 4;
  width: 22px;
  height: 30%;
  left: 90%;
  top: 41%;
  transform-origin: 11px 11px;
  transform: rotate(8deg);
  transition: transform 0.85s cubic-bezier(0.22, 0.7, 0.2, 1);
  pointer-events: none;
}
.pivot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff6ee, #e7d3c4 42%, #b8927e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 3px rgba(90, 50, 40, 0.2);
}
.pivot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #8d6b58;
}
.tube {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 6px;
  height: calc(100% - 20px);
  margin-left: -3px;
  border-radius: 6px;
  background: linear-gradient(90deg, #b89a86, #f3e4d6 46%, #a88876);
}
.head {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 11px;
  margin-left: -9px;
  border-radius: 2px;
  background: linear-gradient(#f0e0d4, #d7bba8);
  box-shadow: inset 0 -2px 0 #b08978;
}
.needle {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 1px;
  background: #3d2a24;
  box-shadow: 0 2px 0 rgba(40, 16, 20, 0.35);
}
.player.is-playing .arm { transform: rotate(62deg); }
.player.is-playing .plinth {
  box-shadow:
    0 14px 0 #e4a8bb,
    0 26px 40px rgba(196, 83, 122, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.player.is-playing .vinyl {
  animation: spin 1.8s linear infinite;
  will-change: transform;
}

.song-note {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  text-align: center;
  font-family: Caveat, cursive;
  font-size: 1.55rem;
  color: #8a5368;
}

.keepsakes {
  position: relative;
  width: min(250px, 100%);
  min-height: 280px;
}
.polaroid {
  position: relative;
  width: min(220px, 78%);
  margin: 0;
  padding: 10px 10px 34px;
  background: #fffdfb;
  box-shadow: 0 14px 26px rgba(80, 30, 50, 0.12);
  transform: rotate(3.5deg);
}
.polaroid svg { display: block; width: 100%; height: auto; }
.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-family: Caveat, cursive;
  font-size: 1.35rem;
  color: #8a5368;
}
.polaroid::before {
  content: "";
  position: absolute;
  top: -16px;
  right: 28px;
  width: 12px;
  height: 36px;
  border: 3px solid #c5ced6;
  border-bottom-color: transparent;
  border-radius: 8px;
  transform: rotate(10deg);
}
.scrap {
  position: relative;
  width: min(230px, 92%);
  margin: -18px 0 0 28px;
  padding: 14px 16px 12px;
  background: #fff4ea;
  box-shadow: 0 10px 18px rgba(90, 40, 55, 0.08);
  transform: rotate(-2.4deg);
}
.scrap::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 22px;
  width: 74px;
  height: 18px;
  transform: rotate(-3deg);
  background: rgba(248, 196, 176, 0.78);
}
.scrap p {
  margin: 0;
  font-family: Caveat, cursive;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #7a445c;
}

.spread {
  --paper: #fbfaf6;
  --ink: #b01e3c;
  --folio: #2b2b2b;
  --gutter-shadow: rgba(40, 36, 30, 0.16);
  --page-edge: rgba(40, 36, 30, 0.10);
  --font-hand: "Waiting for the Sunrise", "Segoe Script", "Bradley Hand", cursive;
  --font-ui: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  container-type: inline-size;
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background:
    linear-gradient(90deg, transparent 0 calc(50% - 7px), rgba(40, 36, 30, 0.08) calc(50% - 7px), rgba(255, 255, 255, 0.55) 50%, rgba(40, 36, 30, 0.1) calc(50% + 7px), transparent calc(50% + 7px)),
    var(--paper);
  box-shadow:
    0 0 0 10px #f3efe8,
    0 0 0 11px var(--page-edge),
    0 22px 44px -18px rgba(30, 26, 20, 0.38);
}
.spread::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.spread .page { position: relative; min-width: 0; }
.spread .page--left::after,
.spread .page--right::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9%;
  pointer-events: none;
  z-index: 1;
}
.spread .page--left::after {
  right: 0;
  background: linear-gradient(to left, var(--gutter-shadow), transparent);
}
.spread .page--right::before {
  left: 0;
  background: linear-gradient(to right, var(--gutter-shadow), transparent);
}
.spread .page--left {
  display: grid;
  place-items: center;
  padding: 12% 10% 14%;
}
.spread .note {
  margin: 0;
  max-width: 18em;
  text-align: center;
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 2.4cqi, 1.7rem);
  line-height: 1.85;
  color: var(--ink);
  text-wrap: balance;
}
.spread .page--right {
  display: flex;
  align-items: center;
  padding: 6% 6% 12%;
}
.spread .album {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spread .photo {
  margin: 0;
  padding: 7px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(40, 36, 30, 0.08);
}
.spread .photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  background: #1b1b1b;
}
.spread .photo--wide img { aspect-ratio: 3 / 2; }
.spread .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}
.spread .folio {
  position: absolute;
  bottom: 4%;
  font-family: var(--font-ui);
  font-size: clamp(0.8rem, 1.6cqi, 1.05rem);
  font-variant-numeric: tabular-nums;
  color: var(--folio);
  z-index: 1;
}
.spread .page--left .folio { right: 6%; }
.spread .page--right .folio { right: 6%; }

.photobook {
  position: relative;
  width: min(760px, 100%);
  flex-shrink: 0;
}
.spread[hidden],
.turns button[hidden] {
  display: none !important;
}
.spread .spark {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: #e39aaf;
}
.spread--booth .page--right {
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.spread .photo--strip {
  box-sizing: border-box;
  height: 100%;
  width: auto;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spread .photo--strip img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}
.turns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.turns button {
  font-family: "Waiting for the Sunrise", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.45rem;
  color: #b01e3c;
  background: #fbfaf6;
  border: 0;
  padding: 4px 16px 6px;
  box-shadow: 0 8px 16px rgba(40, 36, 30, 0.1);
  cursor: pointer;
}
.turns button:hover { color: #8d1630; }
.turns button:focus-visible {
  outline: 2px solid #e39aaf;
  outline-offset: 3px;
}

.closer {
  margin: 28px 0 0;
  font-family: Caveat, cursive;
  font-size: 1.45rem;
  color: #a06a80;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 800px) {
  .sheet { padding: 64px 64px 40px; }
  .keepsakes { margin-left: -12px; }
  .polaroid { margin-top: 18px; }
}

@media (max-width: 720px) {
  .spread {
    grid-template-columns: 1fr;
    background: var(--paper);
  }
  .spread .page--left { padding: 16% 9% 18%; }
  .spread .page--left::after,
  .spread .page--right::before { display: none; }
  .spread .page--right { padding: 0 6% 14%; }
  .spread .folio { font-size: 0.85rem; bottom: 5%; }
}

@media (max-width: 640px) {
  .sheet { padding: 52px 22px 28px; }
  .keepsakes { min-height: 0; width: 100%; }
  .polaroid, .scrap { margin-left: 0; }
  .stamp { position: relative; right: auto; bottom: auto; margin: 16px 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  #stage.leave { transform: none; filter: none; }
  .arm { transition: none; }
}
