:root{color-scheme:dark;--bg:#21080e;--dark:#15060a;--panel:#340e18;--line:#a5755257;--gold:#e5b980;--cream:#fff0dd;--rose:#eb9ba0;--soft:#e3bdba;--button:#a9273e;--heading:"Cormorant Garamond",Georgia,serif}*{box-sizing:border-box}[hidden]{display:none!important}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--cream);font:500 15px/1.65 Manrope,system-ui,sans-serif;overflow-wrap:anywhere}body[data-theme="wedding"]{--bg:#11231d;--dark:#0a1712;--panel:#1c352b;--rose:#d4d3a1;--soft:#e0d7bc;--button:#34644f}body[data-theme="birthday"]{--bg:#241128;--dark:#160a1a;--panel:#3c1a42;--rose:#edaed5;--soft:#e8c7de;--button:#8a367f}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:4px}header,footer{display:flex;align-items:center;justify-content:space-between;padding:18px max(5vw,20px);border-bottom:1px solid var(--line);background:var(--dark)}footer{justify-content:center;border-top:1px solid var(--line);border-bottom:0}.brand{color:var(--gold);font:italic 600 32px/1 var(--heading);white-space:nowrap}.brand span{color:var(--cream);margin-left:5px}nav,.actions,.tabs{display:flex;align-items:center;flex-wrap:wrap;gap:18px}nav{font-size:13px}.hero{min-height:min(710px,85vh);padding:clamp(52px,8vw,115px) max(5vw,20px);display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:clamp(32px,6vw,105px);align-items:center;max-width:1600px;margin:auto}.tabs{gap:5px;margin-bottom:38px}.tabs button{background:transparent;border:1px solid transparent;color:var(--soft);border-radius:24px;padding:7px 12px;font-size:12px}.tabs button[aria-pressed=true]{color:var(--gold);border-color:var(--line);background:var(--panel)}.eyebrow{color:var(--gold);font-size:11px;font-weight:700;letter-spacing:.18em}.eyebrow span:first-child{margin-right:4px}h1,h2,h3{font-family:var(--heading);font-weight:600;line-height:.99;margin:0}h1{font-size:clamp(57px,7.1vw,114px);letter-spacing:-.055em;margin:16px 0 21px}h1 em{color:var(--rose);font-weight:500}h2{font-size:clamp(44px,6vw,80px);letter-spacing:-.045em;margin:12px 0 28px}h3{font-size:32px}p{margin:0 0 16px}.intro>p{max-width:460px;color:var(--soft);font-size:16px;margin-bottom:26px;white-space:pre-wrap}.button,.outline{display:inline-flex;align-items:center;justify-content:center;gap:12px;padding:12px 19px;font-size:13px;font-weight:700;line-height:1.5;border-radius:5px;color:var(--cream);border:1px solid var(--line);background:transparent;text-align:center}.button{border-color:transparent;background:var(--button)}.button:hover,.outline:hover{filter:brightness(1.2);border-color:var(--gold)}.secondary,#map{color:var(--gold);font-size:13px}.secondary:hover,#map:hover{text-decoration:underline}.art{position:relative;isolation:isolate;aspect-ratio:1.31;border:1px solid var(--line);padding:9px;box-shadow:0 30px 90px #0006}.art img{display:block;width:100%;height:100%;object-fit:cover}.frame{position:absolute;inset:10px;border:1px solid var(--line);pointer-events:none}.frame b{color:var(--gold);position:absolute;line-height:1;font-size:22px}.frame b:nth-child(1){top:4px;left:4px}.frame b:nth-child(2){top:4px;right:4px}.frame b:nth-child(3){bottom:4px;left:4px}.frame b:nth-child(4){bottom:4px;right:4px}.details,.letter,.editor,.response{padding:clamp(58px,8vw,108px) max(5vw,20px);text-align:center;border-top:1px solid var(--line);scroll-margin-top:15px}.details,.editor{background:var(--dark)}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:14px;max-width:1050px;margin:auto}.cards article{border:1px solid var(--line);background:var(--panel);padding:26px 18px}.cards article>span{display:block;color:var(--gold);font-size:27px;margin-bottom:10px}.cards p{color:var(--soft);margin:10px 0 0}.small{font-size:13px}.paper{color:#3b1820;background:#f9e9d2;max-width:720px;padding:27px clamp(18px,7vw,76px) 43px;margin:auto;outline:1px solid #9d7159;outline-offset:-10px;box-shadow:0 20px 65px #0004}.paper p,.cards p{white-space:pre-wrap}.paper p{font-size:17px}.seal{background:#94364a;color:#fff1df;border:3px double #ecacaa;border-radius:50%;width:49px;height:49px;font:32px/41px Georgia;margin:0 auto 23px}.signature{font:italic 600 29px var(--heading)!important;margin-bottom:0}.editor form,#result{max-width:760px;margin:auto;text-align:left}.fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}.full{grid-column:1/-1}label{display:block;color:var(--soft);font-size:13px}input,textarea,select{display:block;width:100%;margin-top:6px;padding:10px 12px;color:var(--cream);background:var(--panel);border:1px solid var(--line);border-radius:4px}textarea{resize:vertical}small{display:block;margin-top:5px}.eventType{margin-bottom:17px}#custom{margin-top:18px}.custom{border:1px solid var(--line);padding:15px;margin-bottom:14px}.custom label+label{margin:10px 0}.editor .actions,.response .actions{margin-top:20px}.response .actions{justify-content:center}#result{margin-top:28px;border:1px solid var(--line);padding:22px}#result h3{margin-bottom:18px}#feedback{margin:8px 0 0;color:var(--gold)}@media(max-width:760px){.hero{grid-template-columns:1fr}.art{max-width:580px}.tabs{margin-bottom:27px}nav>a:first-child{display:none}header{padding-block:12px}.hero{padding-top:39px}}@media(max-width:460px){.fields{grid-template-columns:1fr}nav .outline{font-size:11px;padding:9px}.actions{gap:13px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* Neon theme and event buttons */
:root, body[data-theme="date"], body[data-theme="wedding"], body[data-theme="birthday"] {
  --bg: #10090c; --dark: #10090c; --panel: #201017; --line: #633043;
  --gold: #ff627b; --cream: #fff6f8; --rose: #ff3559; --soft: #e7bac5;
  --button: #ff3155; --heading: Manrope, system-ui, sans-serif;
}
body { background: radial-gradient(ellipse at 84% 9%, #720d2990, transparent 620px), var(--bg); }
header { background: #10090cf0; }
.brand { color: var(--rose); font-size: 27px; font-style: normal; font-weight: 800; letter-spacing: -.06em; }
.hero { gap: clamp(25px, 5vw, 78px); }
.picker-label { margin: 0 0 8px; color: var(--cream); font-size: 14px; font-weight: 800; }
.tabs { display: grid; grid-template-columns: .88fr 1.25fr .9fr; gap: 8px; max-width: 650px; margin-bottom: 26px; }
.tabs button {
  min-width: 0; min-height: 64px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 2px; padding: 7px 5px; border: 1px solid #8f3b52; border-radius: 12px;
  background: #26121b; color: var(--cream); font-size: clamp(11px, 1.3vw, 14px); font-weight: 800;
  line-height: 1.2; letter-spacing: -.025em;
}
.tabs button span { font-size: 20px; line-height: 1.2; }
.tabs button[aria-pressed="true"] { background: var(--button); color: #20040c; border-color: #ff8096; box-shadow: 0 0 22px #ff315561; }
.tabs button:hover { border-color: #ff8ca0; }
.eyebrow { font-size: 12px; letter-spacing: .12em; }
h1, h2, h3 { font-weight: 800; line-height: 1.06; }
h1 { font-size: clamp(48px, 6.5vw, 104px); letter-spacing: -.085em; }
h1 em { font-style: normal; font-weight: inherit; color: var(--rose); text-shadow: 0 0 25px #ff315555; }
h2 { font-size: clamp(34px, 5vw, 70px); }
h3 { font-size: clamp(20px, 3vw, 25px); }
.button, .outline { border-radius: 11px; min-height: 44px; }
.button { color: #21040d; box-shadow: 0 0 20px #ff315541; }
.outline { border-color: #97485d; background: #22121a; }
.secondary { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 13px; border: 1px solid #97485d; border-radius: 11px; }
.art { background: #ff3458; border: 1px solid #ff758b; padding: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 0 38px #ff245572; }
.art img { filter: grayscale(1) contrast(1.22); mix-blend-mode: multiply; }
.art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse, transparent 28%, #10050c91 100%); }
.frame { border: 1px solid #ff9eac68; border-radius: 16px; z-index: 1; }
.frame b { display: none; }
.cards article, .paper, .custom, #result { border-radius: 17px; }
.letter { background: radial-gradient(ellipse at center, #5b1128, #11090d 75%); }
.paper { background: #28131d; color: var(--cream); border: 1px solid #b43c58; outline: none; }
.seal { background: var(--rose); color: #2b0310; border: 0; line-height: 47px; box-shadow: 0 0 20px #ff315580; }
.signature { font: 800 21px var(--heading) !important; color: var(--gold); }
.editor form { background: #190e14; border: 1px solid var(--line); border-radius: 20px; padding: clamp(15px, 4vw, 36px); }
.editor h3 { margin-bottom: 10px; }
.field-help { color: var(--soft); font-size: 14px; }
.send-step { margin-top: 28px; }
input:not([type="hidden"]), textarea { border-color: #7c4153; border-radius: 9px; min-height: 45px; font-size: 16px; }
label { color: var(--cream); font-weight: 700; }
input::placeholder, textarea::placeholder { color: #c39ca8; opacity: 1; }
@media(max-width: 760px) { .hero { padding-top: 28px; } .tabs { max-width: 100%; } .art { max-width: 100%; } }
@media(max-width: 380px) { .tabs { gap: 5px; } .tabs button { font-size: 11px; } }
/* One invitation screen at a time */
.editor-stage h3 { margin-bottom: 14px; }
.editor-stage .tabs { margin-bottom: 0; }
.wizard-progress { color: var(--gold); font-size: 13px; font-weight: 800; margin-bottom: 13px; }
.wizard-actions { padding-top: 17px; border-top: 1px solid var(--line); }
.card-options { display: grid; gap: 12px; margin-top: 19px; }
.card-options .toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.card-options input[type="checkbox"] { width: 21px; height: 21px; min-height: 0; margin: 0; accent-color: #ff3155; }
#photoPreview { width: min(100%, 220px); max-height: 150px; border-radius: 12px; object-fit: cover; }
#removePhoto { justify-self: start; }
#createError, #replyStatus { color: var(--gold); }
#createError:empty, #replyStatus:empty { display: none; }
.guest .hero { min-height: 0; padding-block: clamp(24px, 5vw, 70px); }
.guest .hero .intro > p { margin-bottom: 0; }
.guest .art { aspect-ratio: 1.31; }
.guest .art img { position: absolute; inset: 0; height: calc(100% - 41px); }
.guest .art img.personal-photo { filter: none; mix-blend-mode: normal; object-fit: cover; }
.guest .art:has(.personal-photo)::after { display: none; }
.guest .frame { bottom: 45px; }
.card-brand { position: absolute; inset: auto 0 0; z-index: 2; min-height: 41px; display: grid; place-items: center; background: #230915; color: #ff9db0; font-size: 12px; font-weight: 800; letter-spacing: .24em; border-top: 1px solid #ff627b; }
.scratch { position: absolute; inset: 0; z-index: 3; }
.scratch canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.scratch-label { position: absolute; inset: 0; display: grid; align-content: center; text-align: center; color: white; font-size: clamp(24px, 5vw, 50px); font-weight: 800; text-shadow: 0 2px 8px #40051d; pointer-events: none; line-height: 1.2; }
.scratch-label small { font-size: 14px; margin-top: 10px; }
.scratching .scratch-label { visibility: hidden; }
.guest-nav { text-align: center; padding: 14px 20px 24px; }
.guest-nav .actions { justify-content: center; }
.guest .details, .guest .letter, .guest .response { padding-block: clamp(30px, 6vw, 85px); }
#replyStatus { margin-top: 16px; }
.joke-bounced { animation: bounce-away .34s ease-out; }
@keyframes bounce-away { 45% { transform: translateX(22px) rotate(5deg); } }
@media(prefers-reduced-motion:reduce) { .joke-bounced { animation: none; } }
/* Opening games and event-specific details */
.event-extras { margin-top: 20px; }
.event-extras .actions { margin-top: 5px; }
#openingOptions { min-width: 0; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
#openingOptions legend { padding: 0 6px; font-weight: 800; }
.opening-choices { display: grid; grid-template-columns: repeat(auto-fit,minmax(132px,1fr)); gap: 8px; }
.opening-choices label { position: relative; cursor: pointer; }
.opening-choices input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.opening-choices span { display: flex; align-items: center; min-height: 48px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.opening-choices input:checked + span { background: var(--button); border-color: #ff8096; color: #21040d; }
.opening-choices input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.opening-settings, #puzzleHelp { margin-top: 14px; }
.opening-settings label + label { margin-top: 10px; }
#openingError, #challengeStatus { color: var(--gold); margin: 12px 0 0; }
#openingError:empty, #challengeStatus:empty { display: none; }
.challenge { min-height: 65vh; }
.challenge h2 { margin-bottom: 13px; }
#challengeHint { color: var(--soft); }
.answer-form { max-width: 400px; margin: auto; text-align: left; display: grid; gap: 12px; }
.puzzle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; width: min(100%,380px); margin: auto; }
.puzzle-grid button { aspect-ratio: 1; background-size: 300% 300%; background-repeat: no-repeat; border: 2px solid #822947; border-radius: 5px; padding: 0; }
.puzzle-grid button[aria-pressed="true"] { border-color: #fff2f7; box-shadow: 0 0 12px var(--button); }
.heart-game { display: block; width: min(100%,320px); height: auto; margin: auto; touch-action: none; cursor: crosshair; }
.balloon { appearance: none; background: transparent; border: 0; padding: 0 14px; border-radius: 20px; font-size: clamp(95px,20vw,170px); transition: transform .15s; }
.balloon:hover { transform: scale(1.08); }
.balloon-pop { color: #ff7297; font-size: 56px; animation: balloon-pop .5s ease-out both; }
@keyframes balloon-pop { from { transform: scale(.3); opacity: .5; } to { transform: scale(1.3); opacity: 0; } }
:is(#eventInfoList,#weddingGiftList) { max-width: 650px; padding: 0; margin: auto; list-style: none; display: grid; gap: 10px; text-align: left; }
:is(#eventInfoList,#weddingGiftList) li { padding: 14px 17px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--button); border-radius: 10px; }
@media(prefers-reduced-motion:reduce) { .balloon,.balloon-pop { transition: none; animation: none; } }

/* The constructor is an independent view. */
.launcher { padding: 28px max(5vw,20px) 44px; text-align: center; }
.launcher .button { min-height: 66px; width: min(100%, 760px); font-size: clamp(17px, 3vw, 23px); }
.editor-open .launcher, .editor-open footer,
.editor-open main > section:not(#editor), .guest .launcher,
main[aria-busy="true"] .launcher { display: none; }
.editor-open .editor { min-height: 100dvh; border: 0; padding-top: clamp(20px, 5vw, 52px); }
.back-home { display: block; margin: 0 auto 18px; max-width: 760px; text-align: left; color: var(--gold); font-size: 14px; }
/* Invitation sharing and Amour icon set */
.event-icon, .opening-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.event-icon { width: 27px; height: 27px; color: #ff849b; }
.tabs button[aria-pressed="true"] .event-icon { color: #250610; }
.opening-icon { width: 21px; height: 21px; margin-right: 7px; color: #ff849b; }
.opening-choices input:checked + span .opening-icon { color: #250610; }
#guestChoices { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 18px; padding: 12px; }
#guestChoices legend { font-weight: 800; padding: 0 5px; }
.guest-choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 8px; }
#result { text-align: center; }
#result .actions { justify-content: center; }
#qr { display: block; width: min(220px,100%); height: auto; margin: 0 auto; border-radius: 10px;  }
.clipboard-buffer { position: fixed; left: 0; top: 0; opacity: 0; pointer-events: none; }
#choosePhoto { justify-self: start; }
#photoError { margin: 0; color: var(--gold); }
#photoError:empty { display: none; }
body .art > img { filter: none; mix-blend-mode: normal; }

.date-ideas { min-width: 0; margin: 0 0 15px; padding: 0; border: 0; }
.date-ideas legend { font-size: 14px; font-weight: 800; margin-bottom: 9px; }
.idea-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.idea-buttons button { padding: 8px 11px; text-align: left; }
.idea-buttons button[aria-pressed="true"] { background: var(--button); color: #250610; border-color: #ff8096; }
#ideaStatus { margin: 8px 0 0; color: var(--gold); font-size: 13px; }
#ideaStatus:empty { display: none; }

.guest-choice-grid label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #97485d;
  border-radius: 11px;
  background: #22121a;
  color: var(--cream);
  text-align: center;
  cursor: pointer;
}
.guest-choice-grid input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
}
.guest-choice-grid label:hover { border-color: var(--gold); }
.guest-choice-grid label:has(input:checked) {
  background: var(--button);
  color: #21040d;
  border-color: #ff8096;
  box-shadow: 0 0 20px #ff315541;
}
.guest-choice-grid label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
/* Amour date and time controls */
.date-time-field { min-width: 0; }
.date-time-caption { display: block; color: var(--cream); font-weight: 700; font-size: 13px; }
.date-time-trigger { width: 100%; min-height: 45px; justify-content: flex-start; margin-top: 6px; font-size: 15px; }
.date-time-trigger svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.date-time-trigger[aria-invalid="true"] { border-color: var(--rose); }
.date-time-error { color: var(--gold); font-size: 13px; }
.date-time-error:empty { display: none; }
.amour-picker { width: min(420px,calc(100% - 24px)); max-height: calc(100dvh - 28px); padding: clamp(12px,4vw,22px); color: var(--cream); background: #190c14; border: 1px solid #d64b70; border-radius: 20px; box-shadow: 0 0 38px #ff31554a; }
.amour-picker[open] { animation: picker-in .23s ease-out both; }
.amour-picker::backdrop { background: #0e040bd4; backdrop-filter: blur(5px); }
@keyframes picker-in { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.picker-bar, .picker-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.picker-bar { margin-bottom: 12px; }
.picker-bar h2 { font-size: clamp(21px,6vw,29px); margin: 0; }
.picker-close, .picker-month .outline { min-width: 42px; min-height: 38px; padding: 0 8px; font-size: 24px; line-height: 1; }
.picker-month strong { text-align: center; text-transform: capitalize; }
.picker-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; margin: 11px 0 13px; }
.picker-weekday { text-align: center; font-size: 11px; color: var(--soft); }
.picker-cell { color: var(--cream); background: #26121d; border: 1px solid transparent; border-radius: 8px; min-height: 34px; padding: 0; font-size: 13px; font-weight: 800; }
.picker-cell:hover:not(:disabled), .picker-cell.is-today { border-color: var(--rose); }
.picker-cell[aria-pressed="true"] { background: var(--button); border-color: #ff8196; color: #21040d; box-shadow: 0 0 12px #ff315557; }
.amour-picker button:disabled { opacity: .35; cursor: default; }
.picker-today, .picker-apply { width: 100%; }
.picker-clock { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.picker-clock strong { display: block; margin-bottom: 6px; }
.guest-choice-grid label, .picker-cell { transition: background-color .18s, border-color .18s, box-shadow .18s; }
@media(prefers-reduced-motion:reduce) {
  .amour-picker[open] { animation: none; }
  .guest-choice-grid label, .picker-cell { transition: none; }
}
.card-options .toggle.joke-toggle { position: relative; width: fit-content; min-height: 44px; padding: 8px 13px; border: 1px solid #97485d; border-radius: 11px; background: #22121a; transition: background-color .18s, box-shadow .18s; }
.joke-toggle input[type="checkbox"] { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.joke-toggle svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-options .joke-toggle:has(input:checked) { background: var(--button); border-color: #ff8096; color: #21040d; box-shadow: 0 0 18px #ff315556; }
.joke-toggle:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
#qr { width: min(310px,100%); }
#result:not([hidden]) { animation: picker-in .25s ease-out both; }
@media(prefers-reduced-motion:reduce) {
  .card-options .toggle.joke-toggle { transition: none; }
  #result:not([hidden]) { animation: none; }
}
/* Center the invitation and keep the time easy to scan. */
.guest { min-height: 100dvh; display: flex; flex-direction: column; }
.guest > main { display: flex; flex: 1; flex-direction: column; justify-content: center; }
.guest > main > section { width: 100%; }
.guest #details { padding-block: clamp(22px, 4vw, 47px); }
#details .cards { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 710px; align-items: center; }
#details .when-card { grid-column: 1/-1; width: min(100%,440px); justify-self: center; padding: 17px 18px 20px; border-color: #a24761; background: radial-gradient(ellipse at top,#4e1025,var(--panel) 76%); }
#details .when-card > span { margin-bottom: 3px; }
#details .when-card h3 { font-size: 15px; }
#details .when-card #when { color: var(--cream); font-size: clamp(16px,3vw,22px); }
#details .when-card #hour { margin: 3px 0 0; font-size: clamp(34px,7vw,61px); color: var(--gold); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
#details .when-card #hour.pending-time { font-size: clamp(19px,4vw,26px); }
#details .cards article:nth-child(2):last-of-type, #details .cards:has(#planCard[hidden]) article:nth-child(2) { grid-column: 1/-1; width: min(100%,440px); justify-self: center; }
#guestProgress { display: flex; justify-content: center; align-items: center; gap: 7px; }
.guest-dot { width: 6px; height: 6px; border-radius: 12px; background: #703146; }
.guest-dot.active { width: 22px; background: var(--button); box-shadow: 0 0 9px #ff315570; }
.guest .finale { padding-block: clamp(26px,5vw,66px); }
.finale h2 { font-size: clamp(32px,6vw,66px); }
.countdown { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(4px,1.7vw,11px); width: min(100%,550px); margin: 0 auto; }
.countdown > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: clamp(64px,14vw,110px); padding: 6px 2px; background: #2d121e; border: 1px solid #91445d; border-radius: clamp(8px,1.7vw,15px); }
.countdown strong { color: var(--gold); font-size: clamp(21px,6vw,51px); line-height: 1.08; font-variant-numeric: tabular-nums; }
.countdown span { color: var(--soft); font-size: clamp(10px,2.5vw,14px); }
.finale-location { max-width: 490px; margin: 24px auto 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.finale-location p { margin: 8px 0 0; color: var(--soft); }
.finale-location p:empty { display: none; }
#finaleMap { margin-top: 12px; }
@media(max-width: 560px) { #details .cards { grid-template-columns: 1fr; } #details .cards article { width: min(100%,440px); justify-self: center; } }
/* Suggested choices for a date */
.choice-options, .guest-option-group { min-width: 0; margin: 13px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.choice-options legend, .guest-option-group legend { padding: 0 5px; font-size: 13px; font-weight: 800; }
.choice-option-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: end; margin-bottom: 8px; }
.choice-option-row .outline { min-height: 45px; }
.guest-option-group { margin: 0; }
.guest-choice-grid input[type="radio"] { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; opacity: 0; }
#dateLabels { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
#dateLabels summary { cursor: pointer; font-weight: 800; }
#dateLabels .fields { margin-top: 11px; }
/* Screen-by-screen invitation studio */
#editorProgress { color: var(--soft); font-size: 12px; margin-bottom: 19px; }
#editorProgress::after { content: ''; display: block; height: 4px; margin-top: 8px; border-radius: 8px; background: linear-gradient(90deg,var(--button) var(--completion,0%),#462131 0); }
.studio-panel { min-width: 0; margin: 13px 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #24121b; }
.studio-panel legend { padding: 0 6px; font-size: 14px; font-weight: 800; }
.cover-presets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 10px 0; }
.cover-presets button { min-width: 0; display: grid; gap: 6px; padding: 5px; font-size: 11px; }
.cover-presets img { width: 100%; aspect-ratio: 1.65; object-fit: cover; border-radius: 6px; }
.cover-presets button[aria-pressed="true"] { border-color: var(--button); background: #5a152a; }
.studio-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 8px 0; }
.studio-upload img, .studio-upload video { max-width: 145px; max-height: 110px; border-radius: 9px; }
.studio-upload audio { width: min(260px,100%); }
.studio-upload small { color: var(--gold); }
.scene-image { display: block; width: min(100%,440px); max-height: 220px; object-fit: cover; border: 1px solid #a34c65; border-radius: 16px; margin: 0 auto 20px; }
#confirmScene p { color: var(--soft); white-space: pre-wrap; max-width: 540px; margin: auto; }
.cover-media { grid-column: 1/-1; grid-row: 2; justify-self: center; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cover-media audio { width: min(300px,75vw); }
.cover-media video { object-fit: cover; width: min(175px,66vw); height: min(175px,66vw); border-radius: 50%; border: 1px solid var(--gold); }
.studio-preview { max-width: min(470px,calc(100% - 18px)); width: 100%; padding: 12px; border-radius: 19px; border: 1px solid #a34c65; background: var(--dark); color: var(--cream); }
.studio-preview iframe { display: block; width: 100%; height: min(75dvh,720px); border: 1px solid var(--line); border-radius: 12px; }
.studio-preview::backdrop { background: #0e040bd5; }
.envelope { width: min(300px,95%); aspect-ratio: 1.55; border: 1px solid #f17895; border-radius: 14px; background: linear-gradient(145deg,transparent 50%,#74203d 51%,transparent 52%),linear-gradient(215deg,transparent 50%,#74203d 51%,transparent 52%),#341322; box-shadow: 0 0 35px #ff315550; color: #ff81a0; perspective: 400px; transition: transform .3s,opacity .3s; }
.envelope span { display: inline-grid; place-items: center; width: 56px; height: 56px; background: #73243f; border-radius: 50%; font-size: 31px; }
.envelope.unsealed { transform: translateY(-15px) rotateX(10deg) scale(.97); opacity: .35; }
.reply-spark { color: #ff8ca8; font-size: 21px; animation: picker-in .25s both; }
@media(max-width:760px) { .cover-media { grid-row: auto; } .wizard-actions { position: sticky; bottom: 0; background: #190e14; padding-bottom: max(10px,env(safe-area-inset-bottom)); z-index: 2; } }
@media(prefers-reduced-motion:reduce) { .envelope { transition: none; } .reply-spark { animation: none; } }
/* Recipient stories */
body.guest {
  color-scheme: light;
  --bg:#fff1f5; --dark:#fff7f9; --panel:#fffafb; --line:#e9bbcb;
  --gold:#a33861; --cream:#41192b; --rose:#ae4169; --soft:#714456; --button:#8c264c;
  --guest-shadow:#88324b16; --guest-aura:#f6cadb;
  background: radial-gradient(ellipse at 50% 12%,var(--guest-aura),transparent 58%),var(--bg);
  color: var(--cream);
}
body.guest[data-theme="wedding"] {
  --bg:#fbf8ef; --dark:#fdfbf5; --panel:#fffdf8; --line:#e3d8bd;
  --gold:#755828; --cream:#372d20; --rose:#806532; --soft:#635745; --button:#71562c;
  --guest-shadow:#6c512315; --guest-aura:#f1e4c8;
}
body.guest[data-theme="birthday"] {
  --bg:#fff3cf; --dark:#fff8e5; --panel:#fffcf0; --line:#e6ce88;
  --gold:#6446a0; --cream:#37244f; --rose:#6944a5; --soft:#584667; --button:#5d3894;
  --guest-shadow:#57327819; --guest-aura:#fde3ae;
}
.guest header, .guest footer { background: transparent; border: 0; justify-content: center; padding-block: 15px; }
.guest header .brand, .guest footer .brand { font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.guest footer { display:none; }
.guest main { min-height: 0; padding: 0 14px 17px; }
.guest main > section:not(.launcher) { border: 0; padding: clamp(17px,4.8vw,38px) clamp(12px,5vw,42px); width: min(100%,720px); margin-inline: auto; background: transparent; }
.guest .hero { text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 13px; }
.guest .hero .intro { order: 1; }
.guest .hero .intro p { margin-inline:auto; }
.guest .hero .intro .eyebrow { font-size: 10px; }
.guest .hero h1 { font-size: clamp(39px,8vw,68px); margin-block: 7px 10px; letter-spacing:-.055em; }
.guest .hero h1 em { text-shadow:none; }
.guest .hero .art { order:0; width:min(100%,280px); aspect-ratio:1; border:1px solid var(--line); border-radius:27px; background:var(--panel); box-shadow:0 12px 35px var(--guest-shadow); }
.guest .art img { height:100%; }
.guest .art::after, .guest .art .frame, .guest .card-brand { display:none; }
.guest .cover-media { order:2; }
.guest h2, .guest .finale h2 { font-size:clamp(30px,6vw,51px); line-height:1.04; margin-block:0 18px; text-wrap:balance; }
.guest h3 { font-size:clamp(17px,3.5vw,23px); }
.guest .paper, .guest .cards article, .guest-scene > article, .guest .finale-location, .guest :is(#eventInfoList,#weddingGiftList) li {
  color:var(--cream); background:var(--panel); border:1px solid var(--line); border-radius:18px; box-shadow:0 10px 28px var(--guest-shadow);
}
.guest .paper p, .guest .cards p, .guest .finale-location p, .guest #confirmScene p { color:var(--soft); }
.guest .paper { padding:23px clamp(16px,4vw,34px); }
.guest .seal { background:var(--guest-aura); color:var(--rose); box-shadow:none; }
.guest .paper .signature { color:var(--gold); }
.guest #details .when-card { background:var(--panel); border-color:var(--line); }
.guest #details .cards:has(> :only-child) { grid-template-columns:1fr; }
.guest #details .cards:not(:has(article:not([hidden]))) { display:none; }
.guest #details.choosing-time .when-card > span, .guest #details.choosing-time .when-card > h3 { display:none; }
.guest .scene-choices { max-width:500px; margin:16px auto 0; text-align:left; }
.guest-scene > article { width:min(100%,460px); margin:0 auto; padding:18px; }
.guest-scene > article > span { color:var(--rose); }
.guest-scene > article p { margin:7px 0 0; white-space:pre-wrap; }
.guest .button { background:var(--button); color:white; box-shadow:none; }
.guest .outline, .guest .guest-choice-grid label, .guest input, .guest textarea, .guest select { background:var(--panel); color:var(--cream); border-color:var(--line); }
.guest .guest-choice-grid label:has(input:checked) { background:var(--button); color:white; box-shadow:none; }
.guest .guest-choice-grid input:focus-visible { outline-color:var(--gold); }
.guest .guest-option-group legend { color:var(--gold); }
.guest .countdown > div { background:var(--panel); border-color:var(--line); }
.guest .guest-dot { background:var(--line); }
.guest .guest-dot.active { background:var(--button); box-shadow:none; }
.guest .guest-nav { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
.guest .amour-picker { background:var(--dark); border-color:var(--line); box-shadow:0 8px 38px var(--guest-shadow); }
.guest .amour-picker::backdrop { background:#2e192a50; }
.guest .picker-cell { color:var(--cream); background:var(--panel); }
.guest .picker-cell[aria-pressed="true"] { color:white; background:var(--button); }
.guest .wedding-timeline li { border-left:3px solid #ad925d!important; }
.guest[data-theme="birthday"] :is(#eventInfoList,#weddingGiftList) li::before { content:'✦'; color:var(--gold); margin-right:8px; }
.scene-enter { animation:story-in .38s cubic-bezier(.22,.61,.36,1) both; }
.scene-enter.scene-back { --slide-offset:-13px; }
.scene-enter img { animation:story-image .50s ease-out both; }
@keyframes story-in { from { opacity:0; transform:translateX(var(--slide-offset,13px)) translateY(7px); } to { opacity:1; transform:none; } }
@keyframes story-image { from { opacity:0; scale:.985; } to { opacity:1; scale:1; } }
@media(prefers-reduced-motion:reduce) { .scene-enter,.scene-enter img { animation:none; } }
.guest .wedding-note { width:min(100%,430px); margin:0 auto 10px; text-align:left; }
.guest .wedding-note textarea::placeholder { color:var(--soft); }
.guest #placeScene::before, .guest #plansScene::before, .guest #eventInfo::before {
  display:inline-grid; place-items:center; width:38px; height:38px; margin-bottom:10px; border-radius:50%;
  background:var(--guest-aura); color:var(--gold); font-size:23px; line-height:1;
}
.guest #placeScene::before { content:'⌖' / ''; }
.guest #plansScene::before { content:'♡' / ''; }
.guest #eventInfo::before { content:'✦' / ''; }
/* Compact, theme-matched creator */
body.editor-open, body.landing {
  color-scheme:light;
  --bg:#fff1f5;--dark:#fff7f9;--panel:#fffafb;--line:#e9bbcb;
  --gold:#a33861;--cream:#41192b;--rose:#ae4169;--soft:#714456;--button:#8c264c;
}
body.editor-open[data-theme="birthday"], body.landing[data-theme="birthday"] { --bg:#fff3cf;--dark:#fff8e5;--panel:#fffcf0;--line:#e6ce88;--gold:#6446a0;--cream:#37244f;--soft:#584667;--button:#5d3894; }
body.editor-open[data-theme="wedding"], body.landing[data-theme="wedding"] { --bg:#fbf8ef;--dark:#fdfbf5;--panel:#fffdf8;--line:#e3d8bd;--gold:#755828;--cream:#372d20;--soft:#635745;--button:#71562c; }
.editor-open .editor { background:radial-gradient(ellipse at top,var(--panel),transparent 70%),var(--bg); }
.editor-open .editor > h2 { font-size:clamp(24px,5vw,39px); margin:0 0 14px; }
.editor-open .editor form { padding:clamp(13px,3vw,25px); background:var(--panel); max-width:630px; border-radius:22px; }
.editor-open .back-home { max-width:630px; margin-bottom:10px; }
.editor-open .wizard-actions { background:var(--panel); margin-top:13px; position:sticky; bottom:0; padding-block:10px; }
.editor-open .wizard-actions .button { flex:1; }
.editor-open .studio-panel,.editor-open .outline,.editor-open .guest-choice-grid label,
.editor-open .tabs button,.editor-open .opening-choices span,.editor-open input,.editor-open textarea,.editor-open select {
  background:var(--dark); color:var(--cream); border-color:var(--line);
}
.editor-open .event-icon,.editor-open .opening-icon { color:var(--gold); }
.editor-open .tabs button[aria-pressed="true"],.editor-open .opening-choices input:checked + span,.editor-open .guest-choice-grid label:has(input:checked),
.editor-open .idea-buttons button[aria-pressed="true"],.editor-open .cover-presets button[aria-pressed="true"],.editor-open .button {
  background:var(--button);color:white;border-color:var(--button);box-shadow:none;
}
.editor-open :is(.tabs button[aria-pressed="true"] .event-icon,.opening-choices input:checked + span .opening-icon) { color:white; }
.editor-open .amour-picker,.editor-open .studio-preview { background:var(--dark);border-color:var(--line); }
.editor-open .picker-cell { background:var(--panel);color:var(--cream); }
.editor-open .picker-cell[aria-pressed="true"] { background:var(--button);color:white; }
.editor-open input::placeholder,.editor-open textarea::placeholder { color:var(--soft);opacity:.8; }
.editor-fold { margin:10px 0; padding:9px 12px; border:1px solid var(--line); border-radius:10px; }
.editor-fold summary { cursor:pointer; font-weight:700; }
.editor-fold[open] summary { margin-bottom:9px; }
.editor-open .card-options:has(> .joke-toggle[hidden]) { margin:0; }
.guest { -webkit-tap-highlight-color:transparent; }
.guest ::selection { background:var(--guest-aura);color:var(--cream); }
:is(.guest,.landing,.editor-open) :is(h1,h2,h3)[tabindex="-1"]:focus { outline:none; }
.guest :is(button,a,input,textarea):focus-visible { outline:2px solid var(--gold);outline-offset:3px; }
.hold-balloon { display:grid;place-items:center;margin:auto;width:min(230px,85vw);height:245px;background:transparent;border:0;touch-action:none;user-select:none;-webkit-touch-callout:none;cursor:grab; }
.hold-balloon:active { cursor:grabbing; }
.balloon-shape { width:94px;height:119px;position:relative;border-radius:51% 51% 49% 49% / 45% 45% 55% 55%;background:radial-gradient(ellipse at 31% 24%,#ffcbdf 0,#f66fa9 18%,#bb286c 72%,#8b2355 100%);box-shadow:inset -6px -8px 13px #80204d44,0 9px 23px #b1397540;transform:scale(var(--inflate,1)); }
.balloon-shape::after { content:'';position:absolute;width:12px;height:9px;bottom:-5px;left:calc(50% - 6px);background:#a82d68;clip-path:polygon(50% 0,0 100%,100% 100%); }
.balloon-shape::before { content:'';position:absolute;left:50%;top:100%;width:19px;height:40px;border-left:1px solid var(--gold);border-radius:50%;transform:rotate(12deg); }
.balloon-meter { display:block;margin:0 auto 9px;width:min(170px,70%);accent-color:var(--button); }
#celebrationMoment { position:relative; }
.guest-illustration { display:block;width:min(210px,75%);aspect-ratio:1;border-radius:25px;margin:0 auto 15px; }
.celebration-sparks { position:absolute; inset:45% 50% auto auto; pointer-events:none; }
.celebration-sparks span { color:var(--gold); position:absolute; opacity:0; font-size:27px; }
.celebrated .celebration-sparks span { animation:celebrate .65s ease-out both; }
.celebrated .guest-illustration { animation:little-pop .45s ease-out both; }
@keyframes celebrate { 0%{opacity:0;transform:rotate(var(--angle)) translateX(5px)} 26%{opacity:1} 100%{opacity:0;transform:rotate(var(--angle)) translateX(115px)} }
@keyframes little-pop { 50% { transform:scale(1.06) rotate(-2deg); } }
@media(prefers-reduced-motion:reduce) { .celebrated .celebration-sparks span,.celebrated .guest-illustration { animation:none; } }
/* Single-screen landing and gentle focus */
body.landing { height:100dvh; min-height:0; overflow:hidden; display:flex; flex-direction:column; -webkit-tap-highlight-color:transparent; }
.landing header { flex:none; background:transparent; border:0; justify-content:center; padding-block:9px; }
.landing footer,.landing #details,.landing #letter,.landing .launcher { display:none; }
.landing main { flex:1; min-height:0; display:grid; place-items:center; }
.landing .hero { width:min(100%,920px); min-height:0; padding:6px 17px 12px; display:flex; flex-direction:column; gap:10px; align-items:center; text-align:center; }
.landing .art { order:-1; width:min(62vw,30dvh,252px); aspect-ratio:1; padding:0; border-color:var(--line); border-radius:21px; box-shadow:none; }
.landing .art .frame,.landing .art::after,.landing .intro .eyebrow,.landing .picker-label { display:none; }
.landing .intro > p { margin:0 auto 12px; font-size:clamp(12px,2.9vw,15px); line-height:1.35; }
.landing h1 { margin:8px 0; font-size:clamp(29px,7vw,48px); }
.landing h1 em { text-shadow:none; }
.landing .tabs { margin-bottom:8px; }
.landing .tabs button { min-height:44px; }
.landing .actions { justify-content:center; gap:7px; }
.landing .actions a { min-height:37px; padding:7px 12px; }
.landing .tabs button, .landing .secondary { background:var(--panel); color:var(--cream); border-color:var(--line); }
.landing .button,.landing .tabs button[aria-pressed="true"] { background:var(--button);color:#fff;box-shadow:none; }
.landing .tabs button[aria-pressed="true"] svg { color:currentColor; }
@media(max-height:480px) { .landing .art { width:min(16dvh,100px); } .landing header { padding-block:5px; } .landing .intro > p { display:none; } .landing .hero { gap:3px; } }
html, body { -webkit-tap-highlight-color:transparent; }
::selection { background:#eab5c8;color:#401b2b; }
:is(.guest,.editor-open,.landing) :is(button,a,label,input,textarea,select) { -webkit-tap-highlight-color:transparent; }
:is(.guest,.editor-open,.landing) :is(button,a,input,textarea,select):focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
:is(.guest,.landing,.editor-open) :is(h1,h2,h3)[tabindex="-1"]:focus { outline:none; box-shadow:none; }
#meetingCountdown,#finaleWhen { color:var(--soft); margin:0 auto 14px; }
#meetingDigits { color:var(--gold); font-variant-numeric:tabular-nums; }
.plan-validation { margin:4px 0 0; color:var(--gold); font-size:13px; }
.puzzle-help { margin:12px auto 0; }
.puzzle-placed { animation:puzzle-highlight .6s ease-out; }
@keyframes puzzle-highlight { 50% { box-shadow:inset 0 0 0 4px var(--gold); } }
@media(prefers-reduced-motion:reduce) { .puzzle-placed { animation:none; } }
/* Same rose palette throughout the creator. */
body.editor-open[data-theme] {
  --bg:#fff1f5;--dark:#fff7f9;--panel:#fffafb;--line:#e9bbcb;
  --gold:#a33861;--cream:#41192b;--rose:#ae4169;--soft:#714456;--button:#8c264c;
}
body.landing, body.editor-open {
  background:radial-gradient(ellipse at 50% 12%,#f6cadb,transparent 66%),#fff1f5;
}
body.landing[data-theme] {
  --bg:#fff1f5;--dark:#fff7f9;--panel:#fffafb;--line:#e9bbcb;
  --gold:#a33861;--cream:#41192b;--rose:#ae4169;--soft:#714456;--button:#8c264c;
}
.editor-open .editor { background:transparent; }
.editor-open .editor form, .editor-open #result { background:#fff8fae8; border-color:var(--line); box-shadow:0 12px 38px #8c264c14; }
.editor-open .card-options .toggle.joke-toggle { background:#fff2f6; color:var(--cream); border-color:var(--line); }
.editor-open .card-options .toggle.joke-toggle:has(input:checked) { background:var(--button); color:#fff; border-color:var(--button); }
.effect-menu { min-width:0; margin:0; border:1px solid var(--line); border-radius:12px; padding:9px; }
.effect-menu legend { font-size:13px; font-weight:800; padding:0 4px; }
.effect-menu .guest-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.heart-burst { position:fixed; inset:0; z-index:9000; overflow:hidden; pointer-events:none; }
.heart-burst span {
  position:absolute; top:50%; left:50%; color:#c33665; font-size:var(--size);
  line-height:1; opacity:0; text-shadow:0 5px 15px #69203e30;
  animation:amour-heart-flight .87s cubic-bezier(.12,.58,.3,1) var(--lag) both;
}
.heart-burst span:nth-child(3n) { color:#ee7399; }
.heart-burst span:nth-child(4n) { color:#902449; }
@keyframes amour-heart-flight {
  0% {opacity:0;transform:translate(-50%,-50%) scale(.25)}
  18% {opacity:1}
  72% {opacity:.92}
  100% {opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--turn)) scale(1.08)}
}
@media(prefers-reduced-motion:reduce) { .heart-burst { display:none; } }
/* Rose glass across landing, editor and invitation scenes. */
body:is(.landing,.editor-open,.guest) {
  background:
    radial-gradient(ellipse at 10% 4%,#dd81a763,transparent 46%),
    radial-gradient(ellipse at 90% 72%,#bc447754,transparent 54%),
    linear-gradient(143deg,#f3c4d8 0%,#ffebf4 50%,#efd2e6 100%);
  background-attachment:fixed;
  isolation:isolate;
}
.guest[data-theme="wedding"] { background-color:#fbf8ef; background-blend-mode:soft-light,soft-light,luminosity; }
.guest[data-theme="birthday"] { background-color:#fff3cf; background-blend-mode:soft-light,soft-light,luminosity; }
.editor-open .editor form,.editor-open #result,
.guest :is(.paper,.cards article,.finale-location,:is(#eventInfoList,#weddingGiftList) li),
.guest .guest-scene > article,.guest #details .when-card {
  background:linear-gradient(150deg,#fffffff0,#fff4f78c);
  border-color:transparent;
  box-shadow:inset 0 1px 0 #fff,0 12px 36px #8d2c5922;
  backdrop-filter:blur(13px);
}
body:is(.landing,.editor-open,.guest) :is(.outline,.secondary,.tabs button,.opening-choices span,.guest-choice-grid label,input:not([type=checkbox],[type=radio]),textarea,select,.studio-panel,.effect-menu,.editor-fold,:where(#guestChoices,#openingOptions,#dateLabels),.choice-options,.guest-option-group) {
  border-color:transparent;
  background:linear-gradient(145deg,#ffffffc9,#ffffff4d);
  box-shadow:inset 0 1px 0 #fff9,0 4px 12px #8d2c5912;
}
body:is(.landing,.editor-open,.guest) :is(.button,.tabs button[aria-pressed="true"],.guest-choice-grid label:has(input:checked),.opening-choices input:checked + span) {
  color:#fff; border-color:transparent;
  background:linear-gradient(118deg,#832851 0%,#a63665 25%,#b84977 49%,#8d2a55 74%,#712044 100%);
  background-size:200% 100%;
  box-shadow:inset 0 1px 0 #ffffff66,0 6px 15px #7c20494c;
}
body:is(.landing,.editor-open,.guest) .button { animation:amour-gloss 6s ease-in-out infinite; }
@keyframes amour-gloss { 0%,100% {background-position:100% 50%} 50% {background-position:0 50%} }
.editor-open .wizard-actions { border-top:0; background:#fff2f7cf; backdrop-filter:blur(14px); }
body:is(.editor-open,.guest) .amour-picker { background:#fff1f6f5; border-color:transparent; box-shadow:0 18px 48px #45132855; }
@media(prefers-reduced-motion:reduce) { body:is(.landing,.editor-open,.guest) .button { animation:none; } }
/* Choices keep their contrast when selected or tapped. */
.guest .guest-option-group .guest-choice-grid .guest-pick {
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px;
  color:#4b2437; background:#fff7fb; border:1px solid #e6b3c9;
  text-align:left; min-height:48px;
}
.guest .guest-option-group .guest-choice-grid .guest-pick:has(input:checked) {
  color:#fff; background:#84264f; border-color:#84264f;
  box-shadow:0 3px 12px #84264f37;
}
.guest .guest-option-group .guest-choice-grid .guest-pick:has(input:focus-visible) { outline:2px solid #a33861; outline-offset:3px; }
.guest-pick-check { visibility:hidden; font-size:17px; line-height:1; }
.guest-pick:has(input:checked) .guest-pick-check { visibility:visible; }
.bot-guide { padding:16px; margin:15px auto; max-width:490px; text-align:left; background:#fff7fbcc; border-radius:15px; }
.bot-guide h4 { margin:0 0 8px; font-size:17px; }
.bot-guide ol { margin:0; padding-left:23px; }
.bot-guide li + li { margin-top:5px; }
#botStatus { color:var(--gold); margin:10px 0; font-weight:800; }
#botStatus[data-linked="true"] { color:#266943; }
.bot-alternatives { display:grid; gap:8px; justify-items:center; margin:10px auto 0; max-width:430px; }
#manualBotPanel { width:100%; text-align:left; padding:10px 14px; border-radius:12px; background:#fff7fbcc; }
#manualBotPanel summary { cursor:pointer; font-weight:800; }
#manualBotPanel p { margin:7px 0; }
.editor #manualBotLink { padding:0; border:0; background:transparent; box-shadow:none; }
#manualBotLink button { margin-top:8px; }
#manualBotStatus:empty { display:none; }

.site-header {
  position: relative;
  z-index: 10;
  width: min(100%, 860px);
  margin-inline: auto;
  isolation: isolate;
}
body:is(.landing,.guest,.editor-open) .site-header {
  display: flex;
  flex: none;
  justify-content: space-between;
  min-height: calc(60px + env(safe-area-inset-top, 0px));
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(20px, 5%) 8px;
  background: transparent;
  border: 0;
}
.site-header .brand { font: 800 22px/1 Manrope,system-ui,sans-serif; letter-spacing: -.04em; }
.amour-language { position: relative; flex: none; margin-inline-end: 10px; top: 5px; }
.amour-language summary { min-height: 44px; }
.editor-open .site-header + main .editor { min-height: calc(100dvh - 60px - env(safe-area-inset-top, 0px)); }
.amour-language summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px; color:#51253a; background:#fff3f9d9; border:0; border-radius:13px; font-size:13px; font-weight:800; padding:8px 12px; box-shadow:0 3px 12px #a3326419; }
.amour-language summary::-webkit-details-marker { display:none; }
.amour-language[open] summary span:last-child { transform:rotate(180deg); }
.language-options { position:absolute; top:100%; inset-inline:0; padding:2px 4px 4px; border:0; border-radius:0 0 13px 13px; background:var(--panel); }
.amour-language[open] .language-options { animation:amour-language-down .52s cubic-bezier(.2,.7,.25,1) both; transform-origin:top center; }
@keyframes amour-language-down { from { opacity:0; transform:translateY(-6px); clip-path:inset(0 0 100%); } to { opacity:1; transform:translateY(0); clip-path:inset(0); } }
.language-options button { border:0; display:block; width:100%; min-height:34px; text-align:center; padding:4px; border-radius:8px; background:transparent; color:var(--cream); font-size:13px; font-weight:800; }
.language-options button:hover,.language-options button:focus-visible { background:#f6d5e5; }
.language-options button[aria-pressed="true"] { background:#8c264c;color:white; }
.editor-open .editor { min-height:100dvh; display:flex; flex-direction:column; justify-content:safe center; padding-block:clamp(14px,4vh,44px); }
.editor-open .editor > form,.editor-open .editor > #result,.editor-open .editor > .back-home { width:min(100%,630px); margin-inline:auto; }
.guest > main { justify-content:safe center; }
.amour-picker,.studio-preview { margin:auto; }
.falling-hearts { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; color:#a73e6d29; }
.falling-hearts span {
  position:absolute; left:var(--left); top:-70px; width:var(--size); height:var(--size);
  background:currentColor; mask:var(--fall-icon) center/contain no-repeat;
  animation:amour-fall var(--duration) linear var(--delay) infinite;
}
body { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%2021%203.5%2013C-1%208%206%201%2012%207c6-6%2013%201%208.5%206Z%22%2F%3E%3C%2Fsvg%3E"); }
body[data-theme="birthday"] { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%2012h16v7H4zM2%2020h20v2H2zM6%207h2v5H6zm5-2h2v7h-2zm5%202h2v5h-2zM7%202c2%202%202%204%200%204s-2-2%200-4Zm5-1c2%202%202%204%200%204s-2-2%200-4Zm5%201c2%202%202%204%200%204s-2-2%200-4Z%22%2F%3E%3C%2Fsvg%3E"); }
body[data-theme="wedding"] { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2214%22%20r%3D%226%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2214%22%20r%3D%226%22%2F%3E%3Cpath%20d%3D%22m13%205%203-3%203%203-3%203z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
@keyframes amour-fall {
  0% {transform:translate(0,0) rotate(var(--turn));opacity:0}
  12%,87% {opacity:1}
  100% {transform:translate(var(--drift),calc(100dvh + 140px)) rotate(calc(var(--turn) + 32deg));opacity:0}
}
@media(prefers-reduced-motion:reduce) {
  .amour-language[open] .language-options,.falling-hearts span { animation:none; }
  .falling-hearts span { top:16%; }
  .falling-hearts span:nth-child(even) { top:76%; }
}

.photo-control { display: grid; justify-items: start; gap: 8px; }
.photo-control #choosePhoto { min-height: 44px; }
.photo-control #photoPreview { width: min(140px,100%); aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; }
.photo-control #photoError:empty { display: none; }
#puzzlePhotoSlot { margin-top: 14px; }
.editor-open .cover-presets img { background: #fff3f7; object-fit: contain; }
.editor-open .card-options .joke-toggle { cursor: pointer; width: 100%; }
.joke-toggle strong,.joke-toggle small { display: block; color: inherit; }
.joke-toggle small { margin-top: 3px; font-weight: 400; }
.joke-switch { position: relative; flex: none; width: 38px; height: 22px; border-radius: 22px; background: #d9a5b8; }
.joke-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; }
.joke-toggle:has(input:checked) .joke-switch { background: #df88ad; }
.joke-toggle:has(input:checked) .joke-switch::after { transform: translateX(16px); }

#coverJokeHint { margin: 8px auto; text-align: center; }
#guestNext.joke-blocked::before { content: '×'; margin-right: .5em; font-size: 1.25em; }
.joke-runaway { animation: amour-runaway .28s ease-in both; }
@keyframes amour-runaway { to { transform: translateX(90px) rotate(12deg); opacity: 0; } }
@media (prefers-reduced-motion:reduce) { .joke-runaway { animation: none; } }
.guest .date-surprise { margin-top: 12px; }
.guest .date-surprise + p:empty, #confirmText:empty { display: none; }
.guest #finale #confirmTitle { margin-bottom: 8px; }
.guest #finale #confirmTitle:not([hidden]) ~ #finaleTitle { font-size: clamp(17px,4vw,25px); margin: 12px 0; }

.picker-wheel-frame { --wheel-row: 44px; position: relative; margin-top: 8px; border-radius: 16px; background: #fff7fa; overflow: hidden; text-align: center; }
.picker-wheel-frame::before { content: ''; position: absolute; inset: var(--wheel-row) 5px auto; height: var(--wheel-row); border-radius: 12px; background: var(--button, #99345d); box-shadow: inset 0 1px #ffffff60; }
.picker-wheel { position: relative; box-sizing: border-box; height: calc(var(--wheel-row) * 3); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; scroll-snap-type: y mandatory; padding-block: var(--wheel-row); border-radius: inherit; font-variant-numeric: tabular-nums; }
.picker-wheel::-webkit-scrollbar { display: none; }
.picker-wheel:focus-visible { outline: 2px solid #b04d77; outline-offset: -2px; }
.picker-wheel > div { height: var(--wheel-row); display: grid; place-items: center; scroll-snap-align: center; cursor: pointer; color: #785364; font-size: 1.05rem; user-select: none; }
.picker-wheel > div.selected { color: #fff; font-size: 1.4rem; font-weight: 750; }

.guest .guest-plan-entry { display: grid; gap: 6px; margin-top: 12px; text-align: start; }
.guest .guest-plan-entry textarea { width: 100%; min-height: 62px; }

body:is(.landing,.editor-open,.guest)[data-theme="wedding"] {
  --bg:#fff; --dark:#fbfbfa; --panel:#fff; --line:#dfddd4;
  --gold:#6d593a; --cream:#322c23; --rose:#776245; --soft:#62594c; --button:#6d5637;
  --theme-gloss:linear-gradient(118deg,#56432c,#866b45,#71583b,#514029);
  --theme-shadow:#75624732; --theme-glass:#faf9f5;
  background:radial-gradient(ellipse at 15% 8%,#f8f6f0,transparent 48%),#fff;
}
body:is(.landing,.editor-open,.guest)[data-theme="birthday"] {
  --bg:#fff0ad; --dark:#fff6ce; --panel:#fff9dc; --line:#e4cb76;
  --gold:#77410f; --cream:#3c2a17; --rose:#8a4c19; --soft:#67502f; --button:#804315;
  --theme-gloss:linear-gradient(118deg,#75400f,#a65b20,#884414,#6f390f);
  --theme-shadow:#9560213a; --theme-glass:#fff7d6;
  background:radial-gradient(ellipse at 9% 6%,#ffda6e,transparent 53%),
    radial-gradient(ellipse at 92% 78%,#ffde78,transparent 56%),
    linear-gradient(145deg,#fff0a6,#fff6ce 48%,#ffe69a);
}
body:is(.landing,.editor-open,.guest)[data-theme]:not([data-theme="date"]) {
  background-attachment:fixed;
}
body:is(.landing,.editor-open,.guest):is([data-theme="birthday"],[data-theme="wedding"]) :is(.button,.tabs button[aria-pressed="true"],.guest-choice-grid label:has(input:checked),.opening-choices input:checked + span) {
  background:var(--theme-gloss);
  background-size:200% 100%;
  box-shadow:inset 0 1px 0 #fff6,0 6px 15px var(--theme-shadow);
}
body:is([data-theme="birthday"],[data-theme="wedding"]) :is(.editor form,#result,.wizard-actions,.amour-picker,.picker-wheel-frame,.art,.bot-guide,#manualBotPanel) {
  background:var(--theme-glass);
}
body.guest:is([data-theme="birthday"],[data-theme="wedding"]) :is(.paper,.cards article,.finale-location,:is(#eventInfoList,#weddingGiftList) li,.guest-scene > article,#details .when-card) {
  background:linear-gradient(150deg,#fffffff0,var(--theme-glass));
  box-shadow:inset 0 1px 0 #fff,0 12px 36px var(--theme-shadow);
}
body[data-theme="wedding"] .falling-hearts { color:#8b74514d; }
body[data-theme="wedding"] .falling-hearts span:nth-child(even) { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M3%2013c3%200%205-1%207-3L8%204c4%201%206%203%207%205%201-3%205-4%206-1l2%201-2%201c-1%205-4%208-9%208-3%200-6%201-9%202l2-4-2-3Z%22%2F%3E%3C%2Fsvg%3E"); }
body[data-theme="birthday"] .falling-hearts { color:#9a5b2370; }
body[data-theme="birthday"] .falling-hearts span:nth-child(3n+2) { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M5%2021%2012%205l7%2016H5ZM8%2015l7%203m-5-8%204%202M12%205V2m-2%202%202%201%202-1%22%2F%3E%3C%2Fsvg%3E"); color:#a3523763; }
body[data-theme="birthday"] .falling-hearts span:nth-child(3n) { --fall-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M12%2018v4m0-19v4m8%205h3M1%2012h3m2-6%202%202m8%208%202%202m0-12-2%202m-8%208-2%202m6-9%201%202%202%201-2%201-1%202-1-2-2-1%202-1Z%22%2F%3E%3C%2Fsvg%3E"); color:#90631f70; }

html, body {
  overscroll-behavior: none;
  overflow-x: clip;
}
.amour-picker, .studio-preview, .picker-wheel {
  overscroll-behavior: none;
}

.amour-language summary { min-width: 63px; justify-content: space-between; }
.amour-language[open] summary { border-radius:13px 13px 0 0; background:var(--panel); box-shadow:none; }
.language-options button[aria-pressed="true"] { display:none; }

@media (prefers-reduced-motion: no-preference) {
  .amour-language[open] .language-options button { animation: amour-language-option .38s ease-out both; }
  .amour-language[open] .language-options button:nth-child(2) { animation-delay: .05s; }
  .amour-language[open] .language-options button:nth-child(3) { animation-delay: .10s; }
  .amour-language[open] .language-options button:nth-child(4) { animation-delay: .15s; }
}
@keyframes amour-language-option { from { opacity:0; transform:translateY(-7px); } to { opacity:1; transform:none; } }

.referral-link { border:0; background:none; color:var(--gold); font-weight:800; text-decoration:underline; text-underline-offset:3px; padding:8px; }
.landing .referral-link { margin-top:4px; }
.referral-dialog { width:min(740px,calc(100% - 24px)); overscroll-behavior:contain; }
.referral-dialog .picker-bar h2 { font-size:clamp(21px,5vw,32px); }
.referral-body { display:grid; grid-template-columns:minmax(100px,225px) minmax(0,1fr); gap:18px; }
.referral-body img { width:100%; border-radius:16px; }
.referral-body h3 { font-size:20px; }
.referral-body ol { padding-inline-start:20px; }
.referral-body li + li { margin-top:6px; }
#storyClaim { display:grid; gap:9px; }
#referralStats,#referralStatus { margin:8px 0; }
@media(max-width:540px) { .referral-body { grid-template-columns:1fr; } .referral-body img { width:min(40%,150px); margin-inline:auto; } }

body #referralDialog {
  color-scheme: light;
  color:#431c30;
  background:linear-gradient(145deg,#fff9fc,#fce7f1);
  border:0;
  border-radius:24px;
  box-shadow:0 24px 75px #56233742;
}
#referralDialog::backdrop { background:#74445c40; backdrop-filter:blur(5px); }
#referralDialog :is(label,li,#referralStats,#referralStatus,#instagramShareStatus) { color:#542b40; }
#referralDialog .outline { background:#fff9fc; color:#612744; border-color:#e6b8ce; }
#referralDialog input { background:#fffafb; color:#431c30; border-color:#dfaec7; border-radius:11px; }
#referralDialog input::placeholder { color:#795365; opacity:1; }
#referralDialog input::file-selector-button { border:0; border-radius:7px; padding:5px 9px; background:#f4d8e7; color:#542b40; margin-inline-end:8px; }
#referralDialog .actions { gap:8px; }
#instagramShareStatus { margin:8px 0; }
#instagramShareStatus:empty { display:none; }
#instagramShareStatus a { display:inline-block; text-decoration:underline; margin-top:6px; }

#storyClaim { margin-top: 12px; padding: 14px; border-radius: 15px; background: #fff9fc; }
#storyClaim .sms-opt-in { display:flex; align-items:center; gap:8px; }
#storyClaim .sms-opt-in input { width: auto; margin: 0; accent-color: #8c264c; }

#referralDialog .actions { display:grid; grid-template-columns:minmax(0,1fr); }
#referralDialog .actions > :is(a,button) { width:100%; min-height:48px; padding:8px 11px; }
#storyClaim .referral-phone { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:8px; align-items:end; }
#storyClaim .referral-phone select { min-width:0; background:#fffafb; color:#431c30; border-color:#dfaec7; border-radius:11px; }

.checkout-panel { margin-top:14px; padding:15px; border-radius:15px; background:#ffffffa8; }
.checkout-panel h4 { margin:0 0 6px; }
.checkout-panel button:disabled { opacity:.62; }
#checkoutBalance:empty { display:none; }

.draft-tools { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; margin:0 0 14px; }
.draft-tools [role=status] { font-size:.82rem; color:var(--soft); }
body.free-card-page { height:auto; min-height:100dvh; overflow-y:auto; }
body.free-card-page > :is(.site-header,main,footer) { display:none; }
#freeCardPage { min-height:100dvh; display:grid; align-content:center; justify-items:center; gap:12px; padding:20px; }
#freeCardPage #storyClaim { width:min(100%,490px); }
#freeCardPage #referralStatus { text-align:center; }

#detailsUpload { margin-top:12px; }
#venueUploadStatus:empty { display:none; }
.venue-uploads { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.venue-uploads > div { width:84px; display:grid; gap:4px; }
.venue-uploads img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; }
.venue-uploads .outline { padding:4px; min-height:30px; }
.venue-gallery { max-width:440px; margin:0 auto 14px; }
.venue-gallery .scene-image { width:100%; aspect-ratio:1.8; margin-bottom:0; }
.venue-gallery-controls { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:6px; }
.venue-gallery-controls .outline { min-width:44px; min-height:42px; padding:3px 8px; font-size:20px; }

:is(#birthdayWish,#weddingWish) .idea-buttons { margin-bottom:9px; }

#promoStatus:empty { display:none; }

.promo-link { border:0; background:none; color:var(--gold); padding:8px 0; font-weight:800; min-height:44px; }
.promo-sheet { position:fixed; inset:auto 0 0; margin:0 auto; width:min(100%,480px); border:0; border-radius:24px 24px 0 0; padding:20px 20px max(20px,env(safe-area-inset-bottom)); background:var(--panel); color:var(--cream); color-scheme:light; box-shadow:0 -10px 40px #3915272e; }
.promo-sheet::backdrop { background:#32142548; }
.promo-sheet[open] { animation:promo-rise .3s ease-out both; }
.promo-sheet h2 { margin:0; font-size:25px; }
.promo-sheet #applyPromo { width:100%; margin-top:10px; }
#promoFeedback:empty { display:none; }
#promoFeedback { margin:6px 0 0; color:var(--gold); }
.extra-note { max-width:650px; margin-inline:auto; padding:18px; border-radius:16px; }
.extra-note p { white-space:pre-wrap; margin:0; }
@keyframes promo-rise { from { transform:translateY(100%); } to { transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .promo-sheet[open] { animation:none; } }


.guest .compatibility-result:not(:empty) { width:fit-content; max-width:100%; margin:10px auto 0; padding:9px 15px; border-radius:12px; background:#fff8fb; color:#82294f; font-weight:800; }

.slide-editor { margin-top:9px; padding:9px 11px; border-radius:12px; background:#ffffff85; }
.slide-editor summary { cursor:pointer; font-weight:750; }
.slide-editor .fields { margin:8px 0; }
.slide-editor > button { margin-top:5px; }
body:not([data-theme="date"]) .date-slide-editor { display:none; }

:is(.landing,.guest) .hero .art:has(img[src$="-cutout.png"]) { background:transparent; border-color:transparent; box-shadow:none; }
.editor-open .cover-presets img[src$="-cutout.png"] { background:transparent; }

.wishlist-editor-item { display:grid; gap:8px; padding:12px; margin:10px 0; border-radius:14px; background:#ffffff8c; }
.wishlist-editor-item .actions { margin:0; gap:7px; }
.wishlist-preview { width:88px; height:88px; border-radius:10px; object-fit:cover; }
.guest :is(#eventInfoList,#weddingGiftList) .wishlist-gift { display:flex; align-items:center; gap:12px; }
.guest .wishlist-gift::before { display:none; }
.wishlist-gift img { width:72px; height:72px; object-fit:cover; border-radius:10px; flex:none; }
.wishlist-gift .outline { display:flex; width:fit-content; margin-top:6px; padding:5px 9px; }

body:is(.landing,.editor-open,.guest) .social-footer { display:flex; flex:none; justify-content:center; padding:4px 12px max(6px,env(safe-area-inset-bottom)); border:0; background:transparent; }
.project-telegram { display:inline-flex; align-items:center; gap:7px; padding:7px 12px; min-height:38px; border-radius:99px; background:#ffffffa8; color:var(--cream); font-size:13px; font-weight:750; }
.project-telegram:hover { background:#fff; }
.project-telegram svg { width:16px; height:16px; color:var(--gold); }
@media(max-height:690px) { .landing .hero { gap:6px; } .landing .art { width:min(54vw,25dvh,235px); } }
