:root { --ivory: #f8f3e9; --paper: #fffdf7; --gold: #a47a3d; --sage: #75806a; --coffee: #4b382d; --deep: #293126; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0px; }
body { overflow: hidden; color: var(--coffee); font-family: Montserrat, sans-serif; background: radial-gradient(circle at 50% 30%, rgb(101, 112, 94) 0px, rgb(41, 49, 38) 65%, rgb(27, 33, 25) 100%); }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 30; background: rgb(255, 255, 255); color: rgb(0, 0, 0); padding: 0.8rem; }
.skip:focus { top: 1rem; }
.ambient { position: fixed; inset: 0px; background: linear-gradient(120deg, transparent 35%, rgba(255, 244, 211, 0.08) 50%, transparent 65%); pointer-events: none; }
.topbar { position: fixed; z-index: 20; left: max(1rem,env(safe-area-inset-left)); right: max(1rem,env(safe-area-inset-right)); top: max(1rem,env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; color: rgb(239, 224, 191); }
.brand { font: 500 1.35rem "Cormorant Garamond"; letter-spacing: 0.32em; }
.music, .controls button { border: 1px solid rgba(238, 213, 166, 0.5); background: rgba(24, 30, 23, 0.55); color: rgb(255, 255, 255); border-radius: 99px; min-height: 44px; padding: 0.7rem 1rem; font: 600 0.72rem Montserrat; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(10px); }
.stage { height: 100dvh; display: grid; place-items: center; padding: 5.5rem 2rem 7rem; perspective: 2300px; }
.book-wrap { position: relative; width: min(82vw, 1120px); height: min(72vh, 720px); }
.book-shadow { position: absolute; inset: 5% 1% -3%; border-radius: 50%; background: rgba(0, 0, 0, 0.38); filter: blur(28px); transform: translateY(2rem); }
.book { position: absolute; left: 50%; top: 0px; width: 50%; height: 100%; transform-style: preserve-3d; }
.book::after { content: ""; position: absolute; z-index: 20; left: -3px; top: 1%; bottom: 1%; width: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0.12)); border-radius: 4px; pointer-events: none; }
.sheet { position: absolute; inset: 0px; transform-origin: left center; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.65, 0.05, 0.2, 1); box-shadow: rgba(0, 0, 0, 0.22) 8px 12px 35px; border-radius: 0px 9px 9px 0px; }
.sheet.turned { transform: rotateY(-180deg); }
.face { position: absolute; inset: 0px; overflow: auto; backface-visibility: hidden; border-radius: 0px 9px 9px 0px; background: var(--paper); padding: clamp(2rem, 4vw, 4.5rem); scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.face.back { transform: rotateY(180deg); border-radius: 9px 0px 0px 9px; }
.paper, .venue-page, .finale-page { background-color: var(--paper); background-image: linear-gradient(90deg, rgba(122, 91, 50, 0.06), transparent 12%), radial-gradient(circle at 80% 8%, rgba(164, 122, 61, 0.09), transparent 35%); }
.cover { padding: 0px; background: rgb(236, 228, 212); }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
.chapter-page, .date-page, .venue-page, .details-page, .finale-page { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ornament, .monogram { color: var(--gold); font: 500 1.5rem "Cormorant Garamond"; letter-spacing: 0.3em; margin-bottom: 1rem; }
.eyebrow, .photo-copy > span, .portrait-copy > span { color: var(--gold); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.face h2 { font: 500 clamp(2.4rem, 4vw, 4.4rem) / 0.9 "Cormorant Garamond"; margin: 0.7rem 0px 1.3rem; }
.face p { font-size: clamp(0.86rem, 1.15vw, 1.05rem); line-height: 1.7; max-width: 35rem; }
.page-number { position: absolute; bottom: 1.2rem; color: var(--gold); font: 500 0.75rem "Cormorant Garamond"; letter-spacing: 0.18em; }
.page-number.light { color: rgb(255, 255, 255); }
.photo-page, .portrait-page { padding: 0px; color: rgb(255, 255, 255); }
.photo-page > img, .portrait-page > img { width: 100%; height: 100%; object-fit: cover; }
.photo-page::after, .portrait-page::after { content: ""; position: absolute; inset: 0px; background: linear-gradient(0deg, rgba(22, 26, 20, 0.86) 0px, rgba(22, 26, 20, 0.1) 68%); }
.photo-copy, .portrait-copy { position: absolute; z-index: 2; left: clamp(1.5rem, 4vw, 4rem); right: clamp(1.5rem, 4vw, 4rem); bottom: clamp(2.5rem, 5vw, 5rem); }
.photo-copy h2, .portrait-copy h2 { margin: 0.5rem 0px; }
.photo-copy p, .portrait-copy p { margin: 0.5rem auto; }
.face blockquote { font: italic 500 clamp(1.4rem, 2.2vw, 2.15rem) / 1.2 "Cormorant Garamond"; color: rgb(234, 210, 163); margin: 1.1rem 0px; }
.giant { font: 500 clamp(6rem, 12vw, 10rem) / 0.7 "Cormorant Garamond"; color: var(--gold); margin: 1.7rem 0px; }
.date-page > strong { letter-spacing: 0.2em; }
.date-page > b { font: 400 2rem "Cormorant Garamond"; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin: 1rem 0px; width: min(100%, 30rem); }
.countdown div { border-top: 1px solid rgba(164, 122, 61, 0.3); padding: 0.55rem 0.2rem; }
.countdown b { font: 500 1.3rem "Cormorant Garamond"; }
.countdown small { display: block; font-size: 0.53rem; text-transform: uppercase; letter-spacing: 0.1em; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 0.72rem 1rem; border: 1px solid var(--gold); border-radius: 99px; color: var(--coffee); background: transparent; text-decoration: none; text-transform: uppercase; font: 600 0.66rem Montserrat; letter-spacing: 0.09em; cursor: pointer; }
.button.primary { color: rgb(255, 255, 255); background: var(--sage); border-color: var(--sage); }
.cross { font: 400 3rem "Cormorant Garamond"; color: var(--gold); }
.venue-page h3 { font: 400 2.4rem "Great Vibes"; color: var(--gold); margin: 0.7rem 0px; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; width: 100%; margin-top: 1rem; }
.details > div { border: 1px solid rgba(164, 122, 61, 0.24); padding: 0.85rem; background: rgba(255, 255, 255, 0.42); }
.details b { color: var(--gold); font-size: 1.2rem; }
.details h3 { font: 600 1.15rem "Cormorant Garamond"; margin: 0.3rem; }
.details p { font-size: 0.75rem; line-height: 1.45; margin: 0.2rem; }
.portrait-copy em { display: block; color: rgb(234, 210, 163); font: italic 1.35rem "Cormorant Garamond"; margin-top: 1rem; }
.actions { display: flex; flex-direction: column; gap: 0.55rem; width: min(100%, 22rem); margin: 1rem 0px; }
.finale-page blockquote { color: var(--gold); font-size: 1.3rem; margin: 1rem 0px; }
.finale-page blockquote small, .signature small { display: block; font: 500 0.6rem Montserrat; text-transform: uppercase; letter-spacing: 0.14em; margin-top: 0.45rem; }
.signature { font: 400 2.5rem "Great Vibes"; color: var(--gold); }
.controls { position: fixed; z-index: 22; left: 50%; transform: translateX(-50%); bottom: max(1.6rem,env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto minmax(8rem, 14rem) auto; align-items: center; gap: 1.2rem; color: rgb(255, 255, 255); text-align: center; }
.controls button:disabled { opacity: 0.35; cursor: default; }
.controls > div > span { font: 500 0.72rem Montserrat; text-transform: uppercase; letter-spacing: 0.12em; }
.meter { height: 2px; background: rgba(255, 255, 255, 0.25); margin-top: 0.5rem; }
.meter i { display: block; height: 100%; width: 0px; background: rgb(232, 200, 134); transition: width 0.5s; }
.gesture { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(.3rem,calc(env(safe-area-inset-bottom) - .4rem)); margin: 0px; color: rgba(255, 255, 255, 0.6); font-size: 0.62rem; white-space: nowrap; }
@media (max-width: 760px) {
  .stage { padding: 4.7rem 0.75rem 7.5rem; }
  .book-wrap { width: min(94vw, 500px); height: min(73dvh, 760px); }
  .book { left: 0px; width: 100%; }
  .book::after { display: none; }
  .sheet, .face, .face.back { border-radius: 8px; }
  .face { padding: clamp(1.35rem, 6vw, 2.3rem); }
  .cover { padding: 0px; }
  .photo-copy, .portrait-copy { left: 1.2rem; right: 1.2rem; bottom: 2.8rem; }
  .controls { width: calc(100% - 1.5rem); grid-template-columns: auto 1fr auto; gap: 0.55rem; }
  .controls button { padding: 0.65rem 0.72rem; font-size: 0.62rem; }
  .gesture { display: none; }
  .details { gap: 0.45rem; }
  .details > div { padding: 0.6rem; }
  .face h2 { font-size: clamp(2.2rem, 11vw, 3.6rem); }
  .page-number { bottom: 0.65rem; }
}
@media (max-width: 390px) {
  .topbar { top: max(.55rem,env(safe-area-inset-top)); }
  .music { font-size: 0.6rem; padding: 0.6rem 0.75rem; }
  .stage { padding-top: 4rem; }
  .face p { font-size: 0.82rem; }
  .giant { font-size: 6rem; margin: 1.2rem; }
  .details p { font-size: 0.68rem; }
  .venue-page h3 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
}