:root {
  --ink: #182d5c;
  --deep: #182d5c;
  --green: #354d6f;
  --gold: #c6a97d;
  --fuchsia: #c6a97d;
  --french-blue: #306193;
  --steel-blue: #5a6f94;
  --powder-blue: #d8dee4;
  --cream: #faf8f5;
  --paper: #fffefa;
  --line: rgba(24, 45, 92, .16);
  --muted: #637087;
  --serif: Didot, 'Bodoni 72', 'Bodoni MT', Baskerville, 'Times New Roman', serif;
  --script: 'Snell Roundhand', 'Segoe Script', 'Apple Chancery', cursive;
  --sans: Avenir, 'Avenir Next', Montserrat, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid var(--line); background: rgba(250, 248, 245, .94); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.wordmark { text-decoration: none; font: 700 1.35rem/1 var(--serif); letter-spacing: .18em; }
.wordmark span, .footer span { color: var(--gold); font-style: italic; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.site-header nav a { text-decoration: none; font-size: .88rem; letter-spacing: .08em; text-transform: uppercase; }

.home-hero { min-height: 75vh; display: grid; place-content: center; text-align: center; padding: 8rem 1.5rem; background: radial-gradient(circle at 50% 38%, #fffefa 0, #f7f4ed 58%, #e8ebef 100%); }
.home-logo { display: block; width: clamp(4.75rem, 8vw, 6.25rem); aspect-ratio: 1; margin: 0 auto 2rem; background: var(--gold); -webkit-mask: url('/assets/invitation/logo.png') center/contain no-repeat; mask: url('/assets/invitation/logo.png') center/contain no-repeat; }
.eyebrow, .tiny-caps { margin: 0 0 1rem; text-transform: uppercase; letter-spacing: .22em; font-size: .76rem; font-weight: 700; }
.home-hero h1 { margin: 0; font: 400 clamp(3.7rem, 10vw, 8.7rem)/.95 var(--serif); letter-spacing: -.045em; }
.home-hero h1 i { color: var(--fuchsia); font: 400 1.05em/1 var(--script); }
.hero-date { margin: 2.4rem 0 .15rem; font: 1.25rem var(--serif); }
.hero-place { margin: 0; color: var(--muted); }
.section { max-width: 1140px; margin: 0 auto; padding: 7rem 5vw; }
.section-number { color: var(--gold); font: 700 .78rem var(--sans); letter-spacing: .18em; }
.section h2 { margin: .25rem 0 1.2rem; font: 400 clamp(2.5rem, 6vw, 5rem)/1 var(--serif); letter-spacing: -.04em; }
.detail-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; align-items: start; }
.details-card { border-left: 1px solid var(--gold); padding-left: clamp(2rem, 5vw, 5rem); }
.detail-label { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 700; }
.detail-value { margin: .25rem 0 2rem; font: 1.5rem/1.45 var(--serif); }
.placeholder-note { color: var(--muted); max-width: 42rem; }
.soft-section { max-width: none; padding-left: max(5vw, calc((100vw - 1140px)/2 + 5vw)); padding-right: max(5vw, calc((100vw - 1140px)/2 + 5vw)); background: var(--deep); color: #f8f9fb; }
.soft-section p:last-child { max-width: 42rem; color: rgba(255,255,255,.75); }
.wishes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 3rem; }
blockquote { margin: 0; padding: 2rem; background: var(--paper); border-top: 2px solid var(--gold); }
blockquote p { font: 1.25rem/1.55 var(--serif); }
blockquote footer { color: var(--muted); font-size: .9rem; }
.footer { padding: 3rem; text-align: center; font: 1.2rem var(--serif); border-top: 1px solid var(--line); }
.footer p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem 1.35rem; margin-top: 1rem; font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.legal-links a { color: var(--muted); text-underline-offset: 3px; }
.legal-main { width: min(100% - 2rem, 820px); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 0; }
.legal-main h1 { margin: 0 0 .6rem; font: 400 clamp(2.7rem, 7vw, 5rem)/1 var(--serif); letter-spacing: -.035em; }
.legal-main h2 { margin: 2.5rem 0 .65rem; font: 400 1.65rem/1.2 var(--serif); }
.legal-main p, .legal-main li { max-width: 72ch; }
.legal-main .effective-date { margin-bottom: 2.5rem; color: var(--muted); font-size: .9rem; }
.legal-main li + li { margin-top: .45rem; }
.legal-main a { color: var(--french-blue); text-underline-offset: 3px; }
.toast { position: fixed; top: 94px; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--deep); color: white; padding: .8rem 1.2rem; border-radius: 4px; box-shadow: 0 10px 35px rgba(0,0,0,.15); }

.invitation-page { background: linear-gradient(145deg, #fbfaf7, #fff 55%, #f3f0e9); }
.reveal-section { min-height: 100vh; display: grid; place-content: center; justify-items: center; overflow: hidden; padding: 2rem 1rem 1.5rem; perspective: 1800px; }
.envelope-stage { width: min(96vw, 1080px); height: min(78vw, 760px); min-height: 600px; position: relative; perspective: 1800px; }
.envelope { appearance: none; position: absolute; width: 56%; height: 43%; left: 22%; bottom: 8%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; transform-style: preserve-3d; z-index: 4; }
.envelope:disabled { cursor: default; }
.envelope:not(:disabled):focus-visible { outline: 4px solid rgba(198,169,125,.45); outline-offset: 8px; }
.envelope-shadow { position: absolute; left: 22%; right: 22%; bottom: 4%; height: 4%; border-radius: 50%; background: rgba(54, 45, 35, .2); filter: blur(18px); transition: transform .9s ease; }
.envelope-back { position: absolute; inset: 0; background: #d8c4a4; border: 1px solid #bda27a; }
.envelope-flap { position: absolute; left: 0; right: 0; top: 0; height: 82%; background: #eee4d3; border-top: 1px solid #bda27a; clip-path: polygon(0 0, 50% 79%, 100% 0); transform-origin: top center; z-index: 7; }
.envelope-front { position: absolute; inset: 0; background: linear-gradient(145deg, transparent 50%, #e6d8c0 51%) left/50% 100% no-repeat, linear-gradient(215deg, transparent 50%, #d9c5a5 51%) right/50% 100% no-repeat, linear-gradient(to top, #eadfcf 0 48%, transparent 49%); z-index: 6; pointer-events: none; }
.envelope-logo { position: absolute; z-index: 8; left: 50%; top: 60%; width: 25%; aspect-ratio: 1; transform: translate(-50%,-50%); display: grid; place-items: center; color: #fff9eb; background: var(--deep); border-radius: 50%; box-shadow: 0 3px 12px rgba(48,43,35,.22); font: 1.55rem var(--serif); }
.envelope-logo img { display: block; width: 78%; height: 78%; object-fit: contain; }
.envelope-logo i { color: #fff; font: 400 1.05em var(--script); }

.invitation-book { --panel-width: min(36vw, 390px); position: absolute; width: var(--panel-width); aspect-ratio: .7092; left: 50%; bottom: 8%; transform: translate(-50%,21%) scale(.55); transform-style: preserve-3d; z-index: 3; }
.book-right-panel, .book-cover { position: absolute; inset: 0; border: 1px solid #c6a97d; background: var(--paper); box-shadow: 0 18px 50px rgba(48,43,35,.2); }
.book-right-panel { appearance: none; overflow: hidden; padding: 0; color: inherit; cursor: pointer; z-index: 1; }
.book-right-panel:disabled { cursor: default; }
.book-cover { appearance: none; padding: 0; color: var(--ink); cursor: pointer; transform-origin: left center; transform-style: preserve-3d; z-index: 2; transition: transform 1.25s cubic-bezier(.22,.74,.18,1), box-shadow .5s ease; }
.book-cover:disabled { cursor: default; }
.book-cover-front, .book-cover-back { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--paper); }
.book-cover-front { padding: 11% 10%; }
.book-cover-back { transform: rotateY(180deg); }
.book-cover img, .book-right-panel img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--paper); }
.cover-logo { display: grid; place-items: center; width: 42%; max-height: 31%; margin-bottom: 9%; }
.cover-logo img { object-fit: contain; }
.cover-monogram { color: var(--deep); font: 2.4rem var(--serif); }
.cover-monogram i { color: var(--fuchsia); font: 400 1.05em var(--script); }
.cover-copy { max-width: 15rem; font: clamp(.9rem,1.7vw,1.18rem)/1.45 var(--serif); }
.cover-name { max-width: 82%; margin: 0; color: var(--deep); font: 400 clamp(.82rem,1.7vw,1.2rem)/1.4 var(--serif); text-align: center; }
.cover-action { margin-top: 13%; color: var(--gold); font: 700 clamp(.7rem,1.2vw,.85rem) var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.cover-action::before { content: '['; }
.cover-action::after { content: ']'; }
.panel-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2rem; color: var(--muted); text-align: center; font: 1.45rem var(--serif); }
.panel-placeholder small { color: var(--gold); font: .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.play .envelope-flap { animation: open-flap .9s .55s ease-in-out forwards; }
.play .envelope-logo { animation: hide-envelope-logo .25s .55s ease forwards; }
.play .invitation-book { animation: extract-book 2.45s 1.3s cubic-bezier(.2,.72,.2,1) forwards; }
.play .envelope { animation: move-envelope .85s 3.35s cubic-bezier(.3,.7,.2,1) forwards; }
.play .envelope-shadow { animation: move-envelope-shadow .85s 3.35s cubic-bezier(.3,.7,.2,1) forwards; }
.ready .book-cover:not(:disabled):hover { box-shadow: 0 22px 60px rgba(48,43,35,.28); }
.ready .book-cover:not(:disabled):focus-visible { outline: 4px solid rgba(198,169,125,.45); outline-offset: 5px; }
.invitation-open .book-cover { transform: rotateY(-180deg); box-shadow: 0 18px 50px rgba(48,43,35,.14); }
.invitation-open .book-cover,
.invitation-open .book-right-panel { cursor: zoom-in; }
.invitation-open .book-cover:hover,
.invitation-open .book-right-panel:hover { box-shadow: 0 24px 65px rgba(24,45,92,.28); }
.invitation-open .book-cover:focus-visible,
.invitation-open .book-right-panel:focus-visible { outline: 4px solid rgba(48,97,147,.48); outline-offset: 5px; }

.invitation-modal { position: absolute; left: 50%; z-index: 40; box-sizing: content-box; max-width: none; max-height: none; margin: 0; padding: 0; overflow: visible; transform: translateX(-50%); border: 1px solid #c6a97d; background: transparent; box-shadow: 0 28px 90px rgba(10,20,42,.42); }
.invitation-modal img { display: block; width: 100%; height: 100%; object-fit: contain; }
.invitation-modal-close { appearance: none; position: absolute; top: .65rem; right: .65rem; z-index: 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0 0 .18rem; border: 1px solid rgba(24,45,92,.22); border-radius: 50%; background: rgba(255,254,250,.94); color: var(--deep); box-shadow: 0 4px 18px rgba(10,20,42,.18); cursor: pointer; font: 300 2rem/1 var(--sans); }
.invitation-modal-close:hover { background: #fff; }
.invitation-modal-close:focus-visible { outline: 4px solid rgba(48,97,147,.48); outline-offset: 3px; }

@keyframes open-flap { 0% { transform: rotateX(0); z-index: 7; } 99% { z-index: 7; } 100% { transform: rotateX(180deg); z-index: 1; } }
@keyframes hide-envelope-logo { to { opacity: 0; transform: translate(-50%,-45%) scale(.92); } }
@keyframes extract-book { 0% { transform: translate(-50%,21%) scale(.55); z-index: 3; } 83% { transform: translate(-50%,-31%) scale(.88); z-index: 3; } 84% { z-index: 9; } 100% { transform: translate(-5%,-16%) scale(1); z-index: 9; } }
@keyframes move-envelope { to { transform: translateX(53%) scale(.78); opacity: .82; } }
@keyframes move-envelope-shadow { to { transform: translateX(31%) scaleX(.78); opacity: .72; } }
.text-button { appearance: none; border: 0; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: .7rem; }
.rsvp-section { max-width: 840px; margin: 0 auto 8rem; padding: clamp(2rem, 6vw, 5rem); background: var(--paper); box-shadow: 0 24px 70px rgba(57, 49, 38, .13); }
.rsvp-section h2 { margin: 0 0 2.5rem; font: 400 clamp(2.2rem, 6vw, 4rem) var(--serif); }
.rsvp-form fieldset { border: 0; padding: 0; margin: 0 0 2.5rem; }
.rsvp-form legend { width: 100%; margin-bottom: 1rem; font: 1.35rem var(--serif); }
.guest-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1.2rem; align-items: center; border-top: 1px solid var(--line); padding: 1.15rem 0; }
.guest-row label { white-space: nowrap; font-size: .92rem; }
input[type='radio'] { accent-color: var(--green); }
.choice-card { display: flex; align-items: flex-start; gap: .85rem; margin: 0 0 2.5rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.choice-card input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: .22rem; accent-color: var(--green); }
.choice-card span { line-height: 1.5; }
.field-label { display: block; margin: 1.5rem 0 .5rem; font-weight: 700; }
.field-label span { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }
textarea, input[type='text'], input[type='password'], input[type='number'], .admin-actions input, select, .copy-row input, .match-row input { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); padding: .8rem .9rem; }
textarea:focus, input:focus { outline: 3px solid rgba(198,169,125,.26); border-color: var(--gold); }
.primary-button, .secondary-button { display: inline-block; appearance: none; border: 1px solid var(--deep); border-radius: 3px; padding: .85rem 1.25rem; text-decoration: none; cursor: pointer; font-weight: 700; }
.primary-button { background: var(--deep); color: #fff; }
.secondary-button { background: transparent; color: var(--deep); }
.rsvp-form > .primary-button { margin-top: 2rem; width: 100%; }

.centered-page { min-height: 100vh; display: grid; place-content: center; padding: 1.25rem; background: radial-gradient(circle at top, #fffefa, #eee8dc); }
.verify-card, .admin-login, .error-card { width: min(100%, 600px); padding: clamp(2rem, 6vw, 4rem); background: var(--paper); border-top: 3px solid var(--gold); box-shadow: 0 24px 70px rgba(57,49,38,.14); }
.verify-card h1, .admin-login h1, .error-card h1 { font: 400 clamp(2.2rem, 6vw, 3.8rem)/1.05 var(--serif); }
.verify-card .primary-button { margin-top: 1rem; }
.admin-login form { margin-top: 2rem; }
.admin-login .primary-button { width: 100%; margin-top: 1rem; }
.form-error, .flash.error { color: #8f2f27; background: #fae7e4; padding: .8rem; }

.admin-page { background: #f5f3ee; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 4vw; background: var(--deep); color: white; }
.admin-header h1 { margin: 0; font: 2rem var(--serif); }
.admin-header .eyebrow { margin-bottom: .2rem; color: #dbc59f; }
.admin-header nav { display: flex; gap: 1.5rem; }
.admin-main { max-width: 1440px; margin: auto; padding: 2.5rem 4vw 6rem; }
.flash { margin-bottom: 1.5rem; padding: 1rem; border-radius: 3px; }
.flash.success { background: #e5ecf4; color: #183d66; border-left: 3px solid var(--french-blue); }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.stat-grid div { background: white; border: 1px solid #dce4ee; border-top: 3px solid var(--fuchsia); padding: 1.4rem; }
.stat-grid strong { display: block; font: 2.5rem var(--serif); }
.stat-grid span { color: var(--muted); }
.admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.admin-actions.three-up { grid-template-columns: repeat(3, 1fr); }
.admin-actions > div, .guest-table-section { background: white; border: 1px solid #e2e4df; padding: 1.6rem; }
.admin-actions h2, .section-heading h2 { margin: 0; font: 1.7rem var(--serif); }
.admin-actions form { display: grid; gap: .55rem; margin-top: 1.4rem; }
.admin-actions label { font-size: .85rem; font-weight: 700; }
.admin-actions button { margin-top: .65rem; }
.guest-table-section { padding: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; padding: 1.4rem 1.6rem; border-bottom: 1px solid #e2e4df; }
.section-heading .eyebrow { margin-bottom: .2rem; color: var(--gold); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid #eceeea; }
th { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
td:nth-child(1) { min-width: 170px; } td:nth-child(2) { min-width: 200px; } td:nth-child(3) { min-width: 190px; }
.muted, .empty-row { color: var(--muted); }
.status { display: inline-block; border-radius: 20px; padding: .12rem .55rem; background: #eceeea; font-size: .78rem; }
.status-attending, .status-partial { background: #deeee6; color: #1f6148; }
.status-declined { background: #f2e7e3; color: #7f3b30; }
.approved { color: #1f6148; font-size: .78rem; }
.bus-interest { color: var(--muted); font-size: .78rem; }
details p { max-width: 300px; }
.optin-card { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; align-items: center; margin: 1rem 0; padding: 1.6rem; color: white; background: var(--deep); }
.optin-card h2 { margin: 0; font: 1.7rem var(--serif); }
.optin-card p { margin-bottom: 0; color: rgba(255,255,255,.74); }
.optin-card .eyebrow { color: #d2bb91; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.copy-row .secondary-button { color: white; border-color: rgba(255,255,255,.5); }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li + li { border-top: 1px solid #eceeea; margin-top: .6rem; padding-top: .6rem; }
.contact-list small, .match-row small { color: var(--muted); }
.unmatched-section { margin: 1rem 0; }
.match-row { display: grid; grid-template-columns: 1.25fr .8fr 1fr auto; gap: 1rem; align-items: end; padding: 1.2rem 1.6rem; border-bottom: 1px solid #eceeea; }
.match-row p { margin: .25rem 0 0; }
.match-row small { display: block; }
.match-row label { font-size: .78rem; font-weight: 700; }
.match-actions { display: flex; align-items: center; gap: .55rem; }
.danger-button { appearance: none; border: 1px solid #9e2f51; border-radius: 3px; background: transparent; color: #8d2244; padding: .85rem 1rem; cursor: pointer; font-weight: 700; }
.danger-button:hover, .danger-button:focus-visible { background: #fbeaf1; }
.edit-rsvp-link { display: inline-block; margin-top: .65rem; font-weight: 700; text-underline-offset: 3px; }
.admin-edit-main { width: min(100% - 2rem, 860px); margin: 0 auto; padding: 2.5rem 0 6rem; }
.edit-page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.edit-page-heading .eyebrow { margin-bottom: .3rem; color: var(--gold); }
.edit-page-heading h2 { margin: 0; font: 400 clamp(2rem,5vw,3.3rem)/1.05 var(--serif); }
.admin-rsvp-form { display: grid; gap: 1rem; }
.admin-edit-card { padding: 1.6rem; background: white; border: 1px solid #e2e4df; }
.admin-edit-card h3 { margin: 0 0 1rem; font: 1.55rem var(--serif); }
.edit-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-edit-card fieldset { margin: 0; padding: 0; border: 0; }
.admin-guest-row { display: grid; grid-template-columns: minmax(180px,1fr) auto auto; gap: 1.25rem; align-items: center; min-height: 58px; border-top: 1px solid #eceeea; }
.admin-guest-row label { white-space: nowrap; }
.admin-choice-card { margin: 0; }
.approval-choice { display: flex; gap: .75rem; align-items: center; margin-top: 1.25rem; font-weight: 700; }
.approval-choice input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
.admin-edit-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; }
.admin-edit-actions p { margin: 0; color: var(--muted); font-size: .88rem; }
.admin-edit-actions > div { display: flex; align-items: center; gap: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sync-feature-list { margin: .75rem 0 .25rem; padding-left: 1.2rem; color: var(--muted); font-size: .88rem; }
.sync-review-main { width: min(100% - 2rem, 980px); margin: 0 auto; padding: 2.5rem 0 6rem; }
.sync-intro { max-width: 720px; margin: -.3rem 0 1.5rem; color: var(--muted); }
.sync-new-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1rem; }
.sync-new-summary div { padding: 1.25rem; background: var(--deep); color: white; }
.sync-new-summary strong { display: block; font: 2rem var(--serif); }
.sync-new-summary span { color: rgba(255,255,255,.72); font-size: .85rem; }
.sync-review-form { display: grid; gap: 1rem; }
.sync-conflict-card { padding: 1.5rem; background: white; border: 1px solid #e2e4df; }
.sync-conflict-card h3 { margin: 0 0 1rem; font: 1.35rem var(--serif); }
.sync-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sync-comparison div { padding: 1rem; background: #f6f7f4; border-left: 3px solid var(--line); }
.sync-comparison div:first-child { border-left-color: var(--gold); }
.sync-comparison span { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sync-comparison strong { overflow-wrap: anywhere; }
.sync-choices { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1rem; }
.sync-choices label { font-weight: 700; }
.sync-choices input { accent-color: var(--green); }

@media (max-width: 760px) {
  .site-header { padding: 0 1rem; }
  .site-header nav { gap: .8rem; }
  .site-header nav a { font-size: .72rem; }
  .detail-grid, .wishes-grid, .admin-actions, .admin-actions.three-up, .optin-card, .match-row { grid-template-columns: 1fr; }
  .match-actions { justify-content: flex-end; }
  .details-card { border-left: 0; border-top: 1px solid var(--gold); padding: 2rem 0 0; }
  .reveal-section { min-height: 760px; padding-top: 1rem; }
  .envelope-stage { height: 690px; min-height: 690px; width: min(96vw, 540px); }
  .envelope { width: 78%; height: 32%; left: 11%; bottom: 9%; }
  .invitation-book { --panel-width: min(45vw,245px); bottom: 13%; }
  .cover-copy { font-size: clamp(.78rem,3.2vw,1rem); }
  .cover-name { font-size: clamp(.78rem,3vw,.95rem); }
  .cover-action { font-size: .62rem; }
  .envelope-logo { width: 22%; font-size: 1.05rem; }
  @keyframes extract-book { 0% { transform: translate(-50%,21%) scale(.55); z-index: 3; } 83% { transform: translate(-50%,-48%) scale(.88); z-index: 3; } 84% { z-index: 9; } 100% { transform: translate(-3%,-24%) scale(1); z-index: 9; } }
  @keyframes move-envelope { to { transform: translateX(36%) translateY(12%) scale(.72); opacity: .65; } }
  .guest-row { grid-template-columns: 1fr; gap: .45rem; }
  .guest-row span { font-weight: 700; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .admin-header { align-items: flex-start; }
  .admin-header nav { flex-direction: column; gap: .4rem; }
  .edit-page-heading, .admin-edit-actions { align-items: stretch; flex-direction: column; }
  .admin-guest-row { grid-template-columns: 1fr; gap: .45rem; padding: 1rem 0; }
  .admin-edit-actions > div { justify-content: flex-end; }
  .sync-new-summary, .sync-comparison { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .play .envelope-flap { animation: none; transform: rotateX(180deg); z-index: 1; }
  .play .envelope-logo { animation: none; opacity: 0; }
  .play .invitation-book { animation: none; transform: translate(-5%,-16%); z-index: 9; }
  .play .envelope { animation: none; transform: translateX(53%) scale(.78); opacity: .82; }
  .play .envelope-shadow { animation: none; transform: translateX(31%) scaleX(.78); }
  .book-cover { transition-duration: .01ms; }
}
