@font-face { font-family: Garamond; src: url('assets/garamond.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: Garamond; src: url('assets/garamond-italic.woff2') format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }
:root { --ink: #2b496f; --paper: #f7f5f0; --line: #9ba7b5; --ease: cubic-bezier(.16,1,.3,1); }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--paper); color: var(--ink); }
body { font-family: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif; -webkit-text-size-adjust: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { border-radius: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .35; }
[hidden] { display: none !important; }
img { display: block; width: 100%; height: auto; }
h1,h2,h3,p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.book { position: relative; width: 100%; max-width: 520px; height: 100vh; height: 100dvh; margin: auto; overflow: hidden; perspective: 1600px; touch-action: pan-y; }
.page { position: absolute; inset: 0; overflow: hidden; background: var(--paper); visibility: hidden; z-index: 0; backface-visibility: hidden; }
.page.active { visibility: visible; z-index: 2; }
.page.drag-neighbor { visibility: visible; z-index: 1; }
.page::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px #1b2c4510; opacity: 0; transition: opacity .4s; }
.dragging .page::after { opacity: 1; }
.page-scroll { height: 100%; padding: max(10px, env(safe-area-inset-top)) 10px max(5px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.page-scroll::-webkit-scrollbar { display: none; }
.page-scroll > * { flex-shrink: 0; }
.running-head { border-top: 3px double var(--ink); border-bottom: 1px solid var(--line); padding: 6px 30px 7px; text-align: center; font: italic 600 13px/1 Garamond, Georgia, serif; letter-spacing: .35px; }
.folio { display: flex; justify-content: space-between; align-items: center; min-height: 30px; margin-top: auto; border-top: 3px double var(--ink); font: 600 10px Garamond, Georgia, serif; letter-spacing: .8px; }
.folio button { border: 0; background: transparent; height: 32px; min-width: 44px; font: 22px/1 Garamond, serif; }
.folio span { padding: 0 3px; }
.contents-button { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, calc((100vw - 520px)/2 + 12px)); z-index: 5; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #f7f5f0ed; color: var(--ink); font: 16px sans-serif; box-shadow: 0 2px 8px #0000000b; }
.cover .page-scroll { gap: 0; }
.masthead { border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 9px 0; }
.masthead img { width: 100%; }
.cover .contents-button { top: 10px; }
.issue { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 9px; font: 600 11px/1.1 Garamond, Georgia, serif; letter-spacing: .65px; }
.photo { position: relative; display: block; padding: 0; border: 0; background: transparent; overflow: hidden; text-align: left; touch-action: pan-y; }
.photo img { height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo:active img { transform: scale(1.025); }
.hero { flex: 1 0 450px; width: 100%; margin-bottom: 10px; }
.hero .hero-photo { position: absolute; inset: 0; object-position: 50% 53%; }
.hero .hero-names { position: absolute; top: 14px; left: 0; width: 100%; height: auto; object-fit: contain; pointer-events: none; }
.cover-line { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 3px 13px; color: var(--paper); text-align: center; font: 600 clamp(12px,3.65vw,19px)/1.2 Garamond, Georgia, serif; letter-spacing: .65px; background: linear-gradient(transparent,#0008); }
.lead-photo { position: relative; width: 100%; height: clamp(290px,43dvh,420px); overflow: hidden; }
.photo-fill { width: 100%; height: 100%; }
.photo-heading { position: absolute; top: 17px; left: 15px; right: 12px; color: var(--paper); pointer-events: none; z-index: 2; text-shadow: 0 1px 15px #0009; }
.photo-heading h2 { font: 600 clamp(28px,7.7vw,40px)/1.1 Garamond, Georgia, serif; letter-spacing: 2px; }
.photo-heading p { font-size: 15px; margin-top: 5px; letter-spacing: 2px; }
.lead-photo::after { content: ''; position: absolute; inset: 0 0 55%; pointer-events: none; background: linear-gradient(#0008,transparent); }
.story .lead-photo { height: clamp(300px,44dvh,440px); }
.story .photo-fill img { object-position: 52% 75%; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease), transform 6s ease-out !important; transform: scale(1.045); }
.carousel-slide.active { opacity: 1; transform: scale(1); }
.story-columns { display: grid; grid-template-columns: 1fr 1.12fr; gap: 12px; padding-top: 2px; }
.story-clippings { display: flex; flex-direction: column; gap: 9px; }
.shirt { height: 146px; }
.shirt img { object-position: 50% 38%; }
.cycling { height: 130px; }
.story-copy h3 { font-size: 15px; line-height: 1.45; letter-spacing: .3px; }
.story-copy p { font-size: 13px; line-height: 1.8; margin-top: 10px; }
.voice-tabs { display: flex; gap: 4px; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 7px; }
.voice-tabs button { background: transparent; border: 1px solid var(--line); padding: 6px 8px; font-size: 12px; min-height: 34px; }
.voice-tabs button[aria-pressed='true'] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.plus { position: absolute; right: 5px; top: 5px; border: 1px solid var(--ink); border-radius: 50%; width: 25px; height: 25px; text-align: center; background: var(--paper); font: 22px/24px sans-serif; }
.cart { height: clamp(195px,26dvh,265px); }
.cart img { object-position: center 52%; }
.invitation-columns { display: grid; grid-template-columns: .88fr 1.12fr; gap: 13px; }
.cabin { min-height: 212px; height: 100%; }
.invitation h2 { font-size: 16px; line-height: 1.45; letter-spacing: .4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.invitation-columns p { font-size: 13px; line-height: 1.85; padding: 11px 0; }
.address { display: block; background: none; border: 0; border-top: 3px double var(--ink); border-bottom: 1px solid var(--line); padding: 5px 18px 5px 0; position: relative; text-align: left; width: 100%; }
.address strong { display: block; font-size: 14px; }
.address span { display: block; font-size: 11px; line-height: 1.5; margin-top: 4px; }
.address b { position: absolute; right: 0; top: 7px; font: 18px sans-serif; }
.location-map { flex: 1 0 200px; }
.location-map img { object-position: center; }
.venue-lead img { object-position: center 42%; }
.venue-columns { display: grid; grid-template-columns: 1.25fr 1fr; gap: 15px; }
.venue-copy p { font-size: 13px; line-height: 1.85; margin-bottom: 13px; }
.venue-thumbnails { display: flex; flex-direction: column; gap: 7px; }
.venue-thumbnails button { padding: 0; border: 1px solid transparent; background: none; flex: 1; min-height: 92px; overflow: hidden; }
.venue-thumbnails img { height: 100%; max-height: 112px; object-fit: cover; }
.venue-thumbnails button[aria-pressed='true'] { border: 3px solid var(--ink); }
.place-name { position: absolute; bottom: 8px; right: 8px; z-index: 2; background: var(--paper); padding: 4px 8px; font-size: 13px; }
.place-name:empty { display: none; }
.timeline-lead { height: clamp(340px,51dvh,510px); }
.timeline-lead img { object-position: center 47%; }
.timeline { padding: 0; margin: 0; list-style: none; }
.timeline li { border-bottom: 1px solid var(--line); }
.timeline button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 46px; background: none; border: 0; padding: 6px 9px; text-align: left; transition: color .25s, background .25s; }
.timeline time { font: 600 28px/1 Garamond, Georgia, serif; }
.timeline time small { font-size: 11px; }
.timeline button > span { font-size: 13px; }
.timeline button[aria-pressed='true'] { color: var(--paper); background: var(--ink); }
.schedule-note { font-size: 12px; line-height: 1.85; padding: 16px 7px 8px; }
.balcony { height: clamp(170px,26dvh,270px); }
.kiss { height: clamp(170px,25dvh,255px); }
.friends-columns { display: grid; grid-template-columns: .85fr 1.15fr; gap: 13px; }
.cheers { height: 100%; min-height: 218px; }
.friends h2 { font-size: 18px; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
.friends p { font-size: 13px; line-height: 1.85; margin-top: 10px; }
.rsvp-link { float: right; border: 1px solid var(--ink); border-radius: 50%; background: transparent; width: 34px; height: 34px; font: 22px Garamond, serif; margin-top: 10px; }
.cheers-ring { position: absolute; left: 38%; top: 30%; width: 45px; height: 45px; border: 2px solid var(--paper); border-radius: 50%; opacity: 0; pointer-events: none; }
#cheers-status.visible { position: absolute; bottom: 50px; left: 50%; z-index: 4; transform: translateX(-50%); width: auto; height: auto; clip-path: none; padding: 10px 17px; white-space: nowrap; background: var(--ink); color: var(--paper); font-size: 15px; box-shadow: 0 5px 22px #0002; animation: toast-in .5s var(--ease) both; }
.rsvp-lead { height: clamp(150px,23dvh,235px); }
.rsvp-lead img { object-position: center 52%; }
.rsvp-form { border-top: 1px solid var(--line); padding: 4px 4px 0; }
.rsvp-form label { display: block; font-size: 15px; line-height: 1.5; }
.guest-fields { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.guest-fields label { position: relative; }
.guest-fields small { position: absolute; top: 23px; left: 0; width: 100%; font-size: 9px; line-height: 1.2; white-space: nowrap; color: #6b7a8d; }
.rsvp-form input[type='text'], .rsvp-form input[type='number'], .rsvp-form textarea { appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 9px 10px; font-size: 18px; line-height: 1.5; margin-top: 15px; }
.rsvp-form input[type='text'], .rsvp-form input[type='number'] { height: 47px; }
.rsvp-form textarea { height: 95px; resize: vertical; margin-top: 8px; }
.rsvp-form fieldset { border: 0; padding: 0; margin: 19px 0; min-width: 0; }
.rsvp-form legend { font-size: 15px; margin-bottom: 8px; }
.choice-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.choice-options label { cursor: pointer; position: relative; }
.choice-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-options span { display: flex; align-items: center; justify-content: center; min-height: 45px; border: 1px solid var(--line); background: #fff; font-size: 14px; transition: background .25s, color .25s, transform .45s var(--ease); }
.choice-options input:checked + span { color: var(--paper); background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.choice-options input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.honeypot { position: absolute; left: -10000px; }
.form-status { min-height: 15px; font-size: 12px; line-height: 1.7; }
.form-status.error { color: #8e342c; margin: 6px 0; }
.submit { width: 100%; min-height: 45px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 16px; padding: 9px; margin: 8px 0 3px; }
.receipt { text-align: center; padding: 45px 15px; }
.received-stamp { margin: 0 auto 35px; padding: 15px; width: 175px; border: 4px double var(--ink); transform: rotate(-7deg); font-size: 36px; animation: stamp .65s var(--ease) both; }
.received-stamp small { display: block; font-size: 9px; }
.receipt p { font: 600 23px/1.5 Garamond, 'Songti SC', serif; margin: 20px 0; }
.receipt #receipt-summary { font-size: 18px; white-space: pre-line; }
dialog { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 25px; max-height: 90dvh; max-width: 440px; width: calc(100% - 28px); }
dialog::backdrop { background: #142133c9; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 5px; right: 5px; width: 40px; height: 40px; border: 0; background: transparent; font: 26px sans-serif; }
.contents-dialog { padding-top: 42px; }
.contents-kicker { font: italic 600 13px Garamond, serif; letter-spacing: 1px; }
.contents-dialog h2 { font: 600 43px Garamond, serif; margin: 9px 0 22px; }
.contents-dialog nav { display: flex; flex-direction: column; }
.contents-dialog nav button { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 3px; font-size: 17px; }
.contents-dialog nav button span { font: 600 19px Garamond, serif; padding-right: 15px; }
.contents-dialog nav button b { float: right; font: 20px Garamond, serif; }
.contents-dialog nav button[aria-current='page'] { background: var(--ink); color: var(--paper); padding-left: 8px; }
.story-dialog { overflow: auto; }
.story-dialog > img { width: 46%; margin: 5px auto 20px; }
.story-dialog h2 { font-size: 23px; line-height: 1.5; }
.story-dialog p { margin: 20px 0; font-size: 16px; line-height: 1.9; }
.photo-viewer { inset: 0; margin: auto; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: #142133; }
.viewer-tools { position: absolute; z-index: 2; top: max(10px,env(safe-area-inset-top)); right: 10px; display: flex; gap: 8px; }
.viewer-tools button { position: static; width: 44px; height: 44px; border: 1px solid #f7f5f077; color: var(--paper); background: #142133cc; font: 25px sans-serif; }
.viewer-image { width: 100%; height: 100%; overflow: auto; display: grid; align-items: center; }
.viewer-image img { width: 100%; max-height: 100%; object-fit: contain; }
.viewer-image img.zoomed { width: 200%; max-height: none; }
.page.active .photo-heading { animation: heading-in .9s .12s var(--ease) both; }
.page.active .lead-photo, .page.active .cart, .page.active .balcony { animation: photo-in 1.1s var(--ease) both; }
.page.active .story-columns, .page.active .invitation-columns, .page.active .venue-columns, .page.active .timeline, .page.active .friends-columns, .page.active .rsvp-form { animation: content-in .85s .2s var(--ease) both; }
.cover.active .masthead { animation: content-in .85s var(--ease) both; }
.cover.active .hero-photo { animation: cover-photo 1.4s var(--ease) both; }
.cover.active .hero-names { animation: names-in 1.3s .25s var(--ease) both; }
@keyframes heading-in { from { opacity: 0; transform: translate3d(0,20px,0); } to { opacity: 1; transform: none; } }
@keyframes photo-in { from { clip-path: inset(0 0 13% 0); transform: scale(1.025); opacity: .6; } to { clip-path: inset(0); transform: scale(1); opacity: 1; } }
@keyframes content-in { from { opacity: 0; transform: translate3d(0,24px,0); } to { opacity: 1; transform: none; } }
@keyframes cover-photo { from { transform: scale(1.06); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@keyframes names-in { from { opacity: 0; transform: translate3d(0,20px,0); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.6); } 65% { opacity: 1; transform: rotate(-7deg) scale(.94); } to { transform: rotate(-7deg) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%,10px); } to { opacity: 1; transform: translate(-50%,0); } }
@media (min-width: 600px) { body { background: #e6e2da; } .book { box-shadow: 0 0 60px #29344118; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
