.rsvp-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px clamp(20px, 6vw, 64px); }
.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; }
.rsvp-header > a:last-child { font-size: .875rem; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.rsvp-main { max-width: 640px; margin: 0 auto; padding: 12px 20px 24px; }
.rsvp-heading { text-align: center; margin-bottom: 30px; }
.rsvp-heading h1 { font-size: clamp(3.5rem, 12vw, 5rem); margin: 0; }
.rsvp-heading > p:last-child { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.2rem; margin: 4px 0 0; }
.rsvp-card { padding: clamp(22px, 5vw, 40px); border: 1px solid var(--line); background: #fffdf8; border-radius: 8px; box-shadow: 0 10px 40px #573c3506; min-height: 310px; }
.rsvp-card h2 { font-size: clamp(1.8rem, 6vw, 2.25rem); line-height: 1.15; margin-bottom: 12px; }
.rsvp-card p { line-height: 1.6; }
.help { color: var(--muted); font-size: .875rem; margin: 0 0 22px; }
label, legend { font-size: .9375rem; display: block; margin-bottom: 8px; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 50px; padding: 12px; border: 1px solid #b8a697; border-radius: 4px; color: var(--ink); background: #fff; font: 1rem "DM Sans", sans-serif; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { resize: vertical; min-height: 110px; }
.phone-row { display: grid; grid-template-columns: 132px 1fr; gap: 10px; margin-bottom: 22px; }
.phone-row label { font-size: .875rem; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.actions .button { flex: 1; }
.text-button { color: var(--accent); background: transparent; border: 0; padding: 12px 4px; min-height: 44px; font: 1rem "DM Sans", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
button:disabled { cursor: wait; opacity: .6; }
.error { color: #942a27; background: #fbedeb; padding: 12px; border-radius: 4px; font-size: .9375rem; margin: 16px 0; }
.error:empty { display: none; }
.notice { padding: 12px; background: #f6f0e4; font-size: .9375rem; }
.step-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .8125rem; margin-bottom: 12px; }
.step-meta button { font-size: .8125rem; }
progress { width: 100%; height: 4px; appearance: none; border: 0; margin-bottom: 26px; }
progress::-webkit-progress-bar { background: #eee4d6; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
fieldset { border: 0; padding: 0; margin: 20px 0; }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 0; min-height: 56px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--accent); background: #f9efe8; }
.choice input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.field { margin: 20px 0; }
.paper { position: relative; background: #fffcf3; padding: clamp(20px, 5vw, 36px); border: 1px solid #dbcbb4; box-shadow: 0 5px 18px #573c3510; transform-origin: center; }
.paper::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 8px; right: 8px; border: 1px solid #eadfcd; pointer-events: none; }
.paper-title { text-align: center; font-family: "Italianno", cursive; font-size: 3rem; color: var(--accent); margin: 0; }
.paper-subtitle { text-align: center; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.2rem; margin: 0 0 22px; }
.paper dl { margin: 0; }
.paper dl div { border-top: 1px solid #e6d9c6; padding: 15px 0; }
.paper dt { font-size: .8125rem; color: var(--muted); margin-bottom: 6px; }
.paper dd { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.paper .button { width: 100%; margin-top: 20px; }
.review-edit { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }
.success { text-align: center; padding: 25px 0; }
.checkmark { width: 72px; height: 72px; border: 1px solid #9ba58d; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 24px; color: #526747; font-size: 2rem; background: #f2f5ec; }
/* Client invitation: readable typography and large controls for older relatives. */
.rsvp-page {font-size:18px;}
.rsvp-page p,.rsvp-page label,.rsvp-page button,.rsvp-page input,.rsvp-page textarea,.rsvp-page select,.rsvp-page dt,.rsvp-page dd {font-size:1rem;line-height:1.7;}
.rsvp-page {font-size:1.125rem;}
.rsvp-page p,.rsvp-page label,.rsvp-page button,.rsvp-page input,.rsvp-page textarea,.rsvp-page select {font-size:1.125rem;}
.rsvp-page .rsvp-main {max-width:760px;}
.rsvp-header {align-items:flex-start;padding:20px clamp(16px,5vw,50px);}
.rsvp-header .monogram {font-family:'Italianno',cursive;font-size:2rem;letter-spacing:0;}
.language-toggle {display:flex;align-items:center;gap:3px;flex-wrap:wrap;justify-content:flex-end;}
.language {min-height:48px;padding:8px;background:transparent;border:0;color:var(--muted);font-family:inherit;cursor:pointer;}
.language[aria-pressed='true'] {color:var(--accent);text-decoration:underline;text-underline-offset:6px;}
html[lang='gu'] .rsvp-page {font-family:'Noto Sans Gujarati',sans-serif;}
html[lang='gu'] .rsvp-page h1,html[lang='gu'] .rsvp-page h2,html[lang='gu'] .rsvp-page h3,html[lang='gu'] .rsvp-page .monogram,html[lang='gu'] .rsvp-page .paper-title,html[lang='gu'] .rsvp-page button,html[lang='gu'] .rsvp-page input,html[lang='gu'] .rsvp-page textarea,html[lang='gu'] .rsvp-page select {font-family:'Noto Sans Gujarati',sans-serif;}
html[lang='gu'] .rsvp-page h1 {font-size:2rem;line-height:1.8;}
html[lang='gu'] .rsvp-page h2 {font-size:1.5rem;line-height:1.8;}
html[lang='gu'] .rsvp-page .monogram {font-size:1.25rem;line-height:1.8;}
.greeting {font-family:'Cormorant Garamond',Georgia,serif;font-size:1.6rem!important;text-align:center;margin-top:0;}
.seats-line {text-align:center;color:var(--muted);}
.invitation-text {text-align:center;margin-top:35px;}
.invitation-text h2 {margin:18px 0 0;}
.invitation-text p {margin:12px 0;}
.invitation-text .invited-couple {font-size:clamp(3.8rem,11vw,6rem);margin:8px 0 16px;}
.invitation-divider {color:var(--line);font-size:2rem;text-align:center;margin:24px 0;}
.host-names,.footer-language {text-align:center;}
.live-form {margin:30px 0;padding-top:24px;border-top:1px solid var(--line);}
.live-form h3 {font-family:'Cormorant Garamond',Georgia,serif;font-size:1.7rem;font-weight:500;line-height:1.4;}
.count-value {display:block;text-align:center;font-family:'Cormorant Garamond',serif;font-size:2.2rem;line-height:1.5;margin-bottom:12px;}
.slider-row {display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:15px;align-items:center;margin-bottom:26px;}
.counter-button {width:48px;min-height:48px;background:#fff9ee;border:1px solid var(--line);border-radius:50%;color:var(--accent);font-size:1.5rem!important;cursor:pointer;padding:0;}
.slider-row input[type='range'] {padding:0;border:0;background:transparent;accent-color:var(--accent);height:48px;min-width:0;}
.attendance-buttons {display:grid;gap:12px;margin-bottom:24px;}
.attendance-buttons .choice {min-height:56px;justify-content:center;}
.attendance-buttons .selected {background:#f9efe8;border-color:var(--accent);}
.vegan-row {display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:12px;margin:14px 0 28px;}
.vegan-row output {text-align:center;line-height:1.6;}
.jain-notice {border-left:3px solid var(--accent);padding:18px;background:#f5ebd9;margin:24px 0;}
#food textarea {margin-bottom:26px;}
#review-button {width:100%;margin-top:24px;}
.response-summary p {margin:10px 0;}
.response-summary dl {margin:22px 0;}
.response-summary dt {color:var(--muted);margin:16px 0 4px;}
.response-summary dd {margin:0;overflow-wrap:anywhere;white-space:pre-line;}
.venue-links {display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:center;}
.venue-links a {color:var(--accent);min-height:48px;display:flex;align-items:center;}
.rsvp-page .text-button {min-height:48px;}
.rsvp-page .paper-title {font-size:3rem!important;}
.rsvp-page .paper-subtitle {font-size:1.125rem;}
.rsvp-page .phone-row {grid-template-columns:132px minmax(0,1fr);}
.rsvp-page .phone-row>div {min-width:0;}
.rsvp-page .phone-row label {font-size:1.125rem;}
[hidden] {display:none!important;}
@media(max-width:420px){.rsvp-header {gap:8px;padding-inline:16px;}.rsvp-header .monogram {font-size:1.8rem;}.language-toggle {max-width:160px;}.language {padding-inline:5px;}.rsvp-page .phone-row {grid-template-columns:110px minmax(0,1fr);}.rsvp-card {padding:24px 18px;}.slider-row,.vegan-row {gap:8px;}}
/* Ten digits stay in one row; the entire group can accept a pasted number. */
#phone-form > select {max-width:220px;}
.phone-digits {margin:24px 0 4px;min-width:0;}
.digit-boxes {display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:clamp(3px,1vw,9px);}
.digit-boxes-nine {grid-template-columns:repeat(9,minmax(0,1fr));}
.rsvp-page .phone-digit,.rsvp-page .code-digit {min-width:0;width:100%;padding:8px 0;text-align:center;min-height:56px;border-radius:7px;font-size:clamp(1.1rem,3.8vw,1.4rem);background:#fffcf7;}
.phone-help {color:var(--muted);}
.dietary-section {min-width:0;margin:26px 0;}
.dietary-person {padding:20px;margin:14px 0;border:1px solid var(--line);border-radius:8px;background:#fbf7ef;}
.dietary-person input {margin-bottom:20px;}
.dietary-person textarea {min-height:90px;margin-bottom:0!important;}
.dietary-summary {list-style:none;padding:0;margin:0;}
.dietary-summary li {padding:8px 0;}
.dietary-summary li strong,.dietary-summary li span {display:block;}
.invitation-entrance {--reveal:0;position:fixed;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:24px 16px max(24px,env(safe-area-inset-bottom));background:var(--rsvp-background);overflow:hidden;touch-action:pan-x;}
.entrance-photo {position:relative;width:min(86vw,480px);height:min(59svh,620px);flex-shrink:0;overflow:hidden;border-radius:180px 180px 10px 10px;box-shadow:0 16px 65px #66513c23;border:6px solid #fffaf1;outline:1px solid #ceb992;transform:translateY(calc(var(--reveal)* -88svh)) scale(calc(1 + var(--reveal)* .32));transform-origin:50% 25%;transition:transform 1.05s cubic-bezier(.3,.05,.1,1),opacity 1s ease;opacity:calc(1 - var(--reveal)*.65);}
.entrance-photo img {height:100%;width:100%;object-fit:cover;object-position:54% 44%;display:block;}
.entrance-photo::after {content:'';position:absolute;inset:60% 0 0;background:linear-gradient(transparent,#30291b99);pointer-events:none;}
.rsvp-page .photo-caption {position:absolute;z-index:1;bottom:8px;left:0;right:0;margin:0;text-align:center;color:#fffaf1;font-family:'Italianno',cursive;font-size:3.2rem;text-shadow:0 1px 10px #1c211b;}
.entrance-open {width:240px;min-height:185px;flex-shrink:0;position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;padding:0;background:none;border:0;cursor:pointer;transform:translateY(calc(var(--reveal)* -27svh)) scale(calc(1 + var(--reveal)*2.7));transition:transform 1.1s cubic-bezier(.3,.05,.1,1);color:var(--accent);}
.entrance-open:focus-visible {outline:2px solid var(--accent);outline-offset:8px;border-radius:8px;}
.entrance-envelope {position:relative;width:184px;height:116px;display:block;perspective:800px;filter:drop-shadow(0 10px 12px #795b3820);animation:envelope-float 3.8s ease-in-out infinite;}
.envelope-back {position:absolute;inset:0;background:#eadbc0;border:1px solid #cdb38d;border-radius:3px;z-index:1;}
.envelope-front {position:absolute;inset:0;z-index:4;clip-path:polygon(0 0,50% 56%,100% 0,100% 100%,0 100%);background:linear-gradient(30deg,#f0e2c9 49.7%,#fff5e3 50%);border:1px solid #cdb38d;border-radius:3px;}
.envelope-front::after {content:'';position:absolute;inset:0;clip-path:polygon(0 100%,50% 48%,100% 100%);background:#f8eedc;border-bottom:1px solid #ccb18a;}
.envelope-flap {position:absolute;inset:0;z-index:5;clip-path:polygon(0 0,100% 0,50% 58%);background:#f7ecd8;transform-origin:50% 0;transform:rotateX(calc(var(--reveal)*180deg));transition:transform .8s .15s ease,z-index 0s .5s;}
.envelope-seal {position:absolute;z-index:6;left:calc(50% - 19px);top:44%;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#a56a48;color:#fff7e8;font:13px 'Cormorant Garamond',serif;box-shadow:inset 0 0 0 3px #ffffff20,0 2px 5px #735b4b30;opacity:calc(1 - var(--reveal));}
.envelope-letter {position:absolute;left:8%;top:10%;width:84%;height:100%;z-index:2;display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px;background:#fffcf3;border:1px solid #dcccad;border-radius:2px;transform:translateY(calc(var(--reveal)* -86px));transition:transform .9s .2s ease;box-shadow:0 0 6px #7d674210;}
.envelope-letter span {font-size:7px;line-height:1.5;}
.envelope-letter strong {font:22px 'Italianno',cursive;line-height:1.3;color:var(--accent);}
.swipe-cue {display:flex;flex-direction:column;align-items:center;gap:0;height:54px;}
.swipe-cue svg {width:20px;height:30px;fill:none;stroke:currentColor;stroke-width:1.3;animation:cue-rise 1.7s ease-in-out infinite;}
.rsvp-page .swipe-cue span {font-size:.9rem;opacity:0;transition:opacity .5s ease;}
.show-cue .swipe-cue span {opacity:1;}
.opening .swipe-cue {opacity:0;}
.opening .entrance-envelope {animation:none;}
.opening .envelope-flap {z-index:0;}
.opening {animation:entrance-finish 1.25s ease forwards;}
.dragging .entrance-photo,.dragging .entrance-open {transition:none;}
@keyframes envelope-float {50%{transform:translateY(-7px) rotate(-2deg);}}
@keyframes cue-rise {0%,100%{transform:translateY(3px);opacity:.5;}50%{transform:translateY(-4px);opacity:1;}}
@keyframes entrance-finish {0%,80%{opacity:1;}100%{opacity:0;}}
.origami-overlay {position:fixed;inset:0;z-index:40;background:#f8f5eefa;display:grid;place-items:center;overflow:hidden;}
.origami-sheet {position:absolute;top:46%;left:50%;margin-top:-180px;margin-left:-160px;transform-origin:50% 48%;will-change:transform;filter:drop-shadow(0 14px 15px #74654a28);}
.origami-paper {width:100%;height:100%;overflow:visible;}
.origami-names {font:38px 'Italianno',cursive;}
.origami-event {font:13px 'Cormorant Garamond',Georgia,serif;}
.origami-caption {position:absolute;left:24px;right:24px;bottom:max(10svh,40px);text-align:center;color:var(--muted);font:1.25rem 'Cormorant Garamond',Georgia,serif;}
html[lang='gu'] .photo-caption {font-family:'Noto Sans Gujarati',sans-serif;font-size:1.8rem;}
html[lang='gu'] .envelope-letter strong {font-family:'Noto Sans Gujarati',sans-serif;font-size:12px;}
html[lang='gu'] .origami-names {font-family:'Noto Sans Gujarati',sans-serif;font-size:23px;}
@media(max-width:380px){.rsvp-card {padding:22px 14px;}.rsvp-main {padding-inline:12px;}.rsvp-page .phone-digit,.rsvp-page .code-digit {min-height:52px;}.dietary-person {padding:14px;}}
@media(max-height:640px){.invitation-entrance {gap:12px;padding-block:12px;}.entrance-photo {height:52svh;}.entrance-open {min-height:150px;}.entrance-envelope {width:152px;height:96px;}}
@media(prefers-reduced-motion:reduce){.entrance-photo,.entrance-open,.envelope-letter,.envelope-flap {transition:none;}.entrance-envelope,.swipe-cue svg,.opening {animation:none;}}

.entrance-language {position:absolute;z-index:10;top:max(8px,env(safe-area-inset-top));right:14px;}
.entrance-language .language {font-size:.9rem;background:#f8f3eac9;border-radius:5px;}

/* The actual RSVP card is the paper lifted out of the envelope. */
.invitation-entrance .emerging-rsvp {position:absolute;left:50%;top:0;z-index:3;margin:0;transform-origin:50% 0;pointer-events:none;box-shadow:0 18px 45px #66513c20;will-change:transform,clip-path;}
.invitation-entrance .entrance-photo {z-index:5;}
.invitation-entrance .entrance-open {z-index:4;}
.invitation-entrance.opening {animation:none;}
.origami-real-content {margin:0!important;border:0!important;box-shadow:none!important;background:#fffcf3;height:auto;font-family:inherit;color:var(--ink);}


.invited-couple a,.photo-caption {color:inherit;text-decoration:none;}
.live-form .seats-line {text-align:left;margin:8px 0 16px;}

.invitation-entrance .scene-flap {position:absolute;inset:auto;left:50%;top:0;transform-origin:50% 0;pointer-events:none;}

.opening .entrance-open:focus-visible {outline:none;}

/* Full-size DOM origami: each clipped paper face keeps the review typography. */
.origami-overlay {perspective:1800px;background:transparent;}
.origami-backdrop {position:absolute;inset:0;background:var(--paper);opacity:0;}
.origami-sheet {transform-style:preserve-3d;filter:drop-shadow(0 14px 18px #74654a28);}
.origami-fold-layer,.origami-wing,.origami-panel {position:absolute;inset:0;transform-style:preserve-3d;}
.origami-front,.origami-back,.origami-top-cap {position:absolute;inset:0;}
.origami-front,.origami-back {backface-visibility:hidden;}
.origami-front {transform:translateZ(.4px);background:#fffcf3;overflow:hidden;}
.origami-back {transform:rotateY(180deg) translateZ(.4px);background:linear-gradient(125deg,#fffaf0,#e7d4b4);}
.origami-top-cap {background:linear-gradient(135deg,#fff9ec,#eadbc2);}
.origami-sheet .origami-real-content {border:1px solid #dbcbb4!important;box-shadow:none!important;}

.has-invitation-entrance .rsvp-header {position:relative;z-index:30;}
.has-invitation-entrance .rsvp-header #couple-title {visibility:hidden;pointer-events:none;}
.entrance-open:focus-visible {outline:none;}
.entrance-open:focus-visible .swipe-cue svg {stroke-width:2;}

.origami-sheet {filter:none!important;}
.origami-caption {bottom:max(2svh,16px);}

.code-boxes {grid-template-columns:repeat(4,minmax(0,1fr));max-width:260px;gap:9px;margin-inline:auto;}
.code-boxes-six {grid-template-columns:repeat(6,minmax(0,1fr));max-width:390px;}

/* The intro and page use the same viewport-aligned paper background. */
.rsvp-page {--rsvp-background:radial-gradient(ellipse at 50% 38%,#fffdf8 0%,transparent 65%) var(--paper);background:var(--rsvp-background);background-attachment:fixed;}
.rsvp-page::before {content:none;}
.dress-code {margin-top:8px;}

#code-form .actions {flex-direction:column;gap:8px;}
#code-form .actions .button {flex:none;width:100%;}

.dietary-checklist {padding:0;min-width:0;margin:0 0 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.dietary-checklist legend {margin-bottom:12px;}
.rsvp-page .dietary-option {display:flex;align-items:center;gap:10px;min-height:48px;padding:10px;background:#fffdf8;border:1px solid var(--line);border-radius:6px;font-size:1rem;cursor:pointer;margin:0;}
.rsvp-page .dietary-option:has(input:checked) {background:#f4e8da;border-color:var(--accent);}
.rsvp-page .dietary-option input {width:20px;height:20px;min-height:20px;margin:0;padding:0;flex-shrink:0;accent-color:var(--accent);}
.venue-map {color:var(--accent);display:inline-block;min-height:44px;padding-top:8px;}
.rsvp-scroll-cue {position:fixed;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:15;max-width:calc(100vw - 32px);display:flex;align-items:center;gap:12px;padding:10px 18px;border:1px solid var(--line);border-radius:30px;background:#fffdf8;color:var(--accent);box-shadow:0 4px 20px #573c3520;cursor:pointer;}
.rsvp-scroll-cue svg {width:20px;height:28px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;}
@media(prefers-reduced-motion:no-preference){.rsvp-scroll-cue svg {animation:scroll-nudge 1.6s ease-in-out infinite;}@keyframes scroll-nudge {50%{transform:translateY(5px);}}}
@media(max-width:420px){.dietary-checklist {grid-template-columns:1fr;}}
