/* Not My Event: the "gilded" look shared by the silver-and-gold Friendsgiving designs (The Gilded Table, Candlelit Friendsgiving).
   It is the Christmas Eve design's palette and layout: white, gold and silver only; full-screen scenes over a fixed, endless field of light rings that
   flows past as you scroll; foil headings; paper cards with a double gold-and-silver rule; a reply card with a wax seal. Each design adds its own opening,
   its centrepiece and its toys in its own file. Needs /assets/gilded.js (the field, the garland, the medallion) and party-kit.js. */
:root {
  --snow: #fbfaf7; --pearl: #f3f0e9; --frost: #e8ebee; --silver: #b9bec6; --silver-light: #e2e5e9; --silver-deep: #7f8690;
  --gold: #c6a15b; --gold-light: #e8d29e; --gold-deep: #8c6a2c; --ink: #23211d; --ink-soft: #6d6860;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; --caps: "Cinzel", "Trajan Pro", Georgia, serif; --body: "Jost", "Futura", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gold-foil: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 18%, #e9d6a4 34%, #fff7e0 42%, #e9d6a4 50%, var(--gold) 66%, var(--gold-deep) 100%);
  --silver-foil: linear-gradient(100deg, #6f7680 0%, #a9b0b9 22%, #eef1f4 40%, #ffffff 46%, #d2d7dd 56%, #8c939d 80%, #6f7680 100%);
  /* what the shared boards (food board, seating table in /assets/packs.js) read */
  --accent: var(--gold); --muted: var(--ink-soft); --cream: var(--ink); --line: rgba(185, 190, 198, .9);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: var(--snow); color: var(--ink); }
body { margin: 0; font-family: var(--body); font-weight: 300; font-size: 17px; line-height: 1.6; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 3px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--gold); transition: top .15s; }
.skip-link:focus { top: 12px; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#invite { position: relative; z-index: 1; overflow-x: hidden; overflow-x: clip; }
p { margin: 0; }

/* ---------- Type ---------- */
.caps { margin: 0; font-family: var(--caps); font-weight: 500; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.gold { color: var(--gold-deep); }
h1, h2, h3 { margin: 0; }
h2 { font-family: var(--display); font-weight: 300; font-size: clamp(42px, 7.6vw, 74px); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
h2 em { font-style: italic; background: var(--gold-foil); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 8s ease-in-out infinite; padding-right: .06em; }
.lede { font-size: clamp(17px, 2.2vw, 19px); color: var(--ink-soft); max-width: 46ch; }

/* ---------- Scenes ---------- */
.scene { position: relative; min-height: 100svh; display: grid; align-content: center; padding-block: 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.scene.short { min-height: auto; padding-block: 72px; }
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; display: grid; gap: 34px; }
.split { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } .split.flip > :first-child { order: 2; } }
.stack { display: grid; gap: 18px; align-content: start; }
.center { justify-items: center; text-align: center; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); }
.divider span { width: min(120px, 22vw); height: 1px; background: linear-gradient(90deg, transparent, var(--silver)); }
.divider span:last-child { background: linear-gradient(90deg, var(--silver), transparent); }
.divider svg { width: 16px; height: 16px; animation: spin 14s linear infinite; }

/* ---------- Bands between scenes ---------- */
.marquee { position: relative; z-index: 1; overflow: hidden; padding-block: 4px; border-block: 1px solid rgba(185, 190, 198, .7); background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.marquee.tilt-a { transform: rotate(-2deg); margin-inline: -4vw; }
.marquee.tilt-b { transform: rotate(1.6deg); margin-inline: -4vw; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track span { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(40px, 9vw, 100px); line-height: 1.15; white-space: nowrap; padding-right: .45em; color: transparent; -webkit-text-stroke: 1px var(--gold); }
.marquee-track span:nth-child(even) { -webkit-text-stroke: 0; background: var(--silver-foil); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; font-family: var(--caps); font-size: clamp(26px, 6vw, 64px); letter-spacing: .14em; }

/* ---------- Leaf garland and medallions (drawn by gilded.js) ---------- */
.garland { display: block; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.bulb { animation: twinkle 2.6s ease-in-out infinite alternate; }

/* ---------- Hero ---------- */
.hero { padding-top: 0; align-content: start; overflow: hidden; }
.hero .garland { position: relative; z-index: 2; margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); width: calc(100% + 2 * max(16px, env(safe-area-inset-left, 0px))); max-width: none; }
.medallion { position: absolute; z-index: 0; width: min(54vw, 560px); aspect-ratio: 1; pointer-events: none; }
.medallion svg { width: 100%; height: 100%; animation: spin 80s linear infinite; }
.medallion.l { left: calc(min(54vw, 560px) * -.45); top: 18%; }
.medallion.r { right: calc(min(54vw, 560px) * -.45); top: 52%; }
.medallion.r svg { animation-direction: reverse; animation-duration: 100s; }
.hero-inner { justify-items: center; text-align: center; gap: 20px; padding-top: clamp(16px, 5vw, 50px); }
.hosts { color: var(--gold-deep); font-size: 13px; }
.italic-line { font-family: var(--display); font-style: italic; font-size: clamp(22px, 3.6vw, 30px); color: var(--ink-soft); overflow-wrap: anywhere; }
.title { display: grid; justify-items: center; line-height: .9; user-select: none; -webkit-user-select: none; }
.t1 { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(70px, 16vw, 176px); letter-spacing: -.02em; }
.t2 { font-family: var(--caps); font-weight: 400; font-size: clamp(30px, 7.4vw, 80px); letter-spacing: .5em; margin-right: -.5em; margin-top: .1em; }
.tl { display: inline-block; cursor: pointer; padding: 0 .02em .08em; background: var(--gold-foil); background-size: 900% 100%; background-position: calc(var(--i) * 9%) 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
.t2 .tl { background: var(--silver-foil); background-size: 500% 100%; background-position: calc(var(--i) * 14%) 0; -webkit-background-clip: text; background-clip: text; }
.revealed .tl { animation: letterIn 1.2s cubic-bezier(.2, .8, .2, 1) both, shimmer 6s ease-in-out infinite; animation-delay: calc(200ms + var(--i) * 90ms), calc(1.6s + var(--i) * 120ms); }
.tl.spin { animation: letterSpin .9s cubic-bezier(.3, .7, .3, 1) !important; }
.title-hint { font-size: 13px; color: var(--ink-soft); }
.when { font-family: var(--display); font-size: clamp(21px, 3.6vw, 28px); line-height: 1.35; }
.where { font-family: var(--caps); font-size: 13px; letter-spacing: .22em; color: var(--gold-deep); overflow-wrap: anywhere; }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 3vw, 20px); margin-top: 6px; }
.countdown div { display: grid; justify-items: center; min-width: 70px; padding: 12px 10px 10px; border-radius: 3px; background: linear-gradient(180deg, #ffffff, var(--frost)); box-shadow: 0 0 0 1px rgba(185, 190, 198, .8), inset 0 1px 0 #fff, 0 10px 20px -12px rgba(60, 55, 45, .35); }
.countdown b { font-family: var(--display); font-weight: 300; font-size: clamp(36px, 7vw, 54px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.countdown span { font-family: var(--caps); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); margin-top: 6px; }
.cd-label { font-family: var(--caps); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--silver-deep); }

/* ---------- Paper cards (the double gold-and-silver rule) ---------- */
.paper { --f-bg: #fff; --f-ink: var(--ink); --f-shadow: none; --chip-bg: rgba(185, 190, 198, .16); --row-bg: var(--pearl); --ok: #2f6b3a; --bad: #8c2a2a; --accent-d: var(--gold-deep);
  position: relative; background: #ffffff; color: var(--ink); border-radius: 3px; padding: 30px 24px; display: grid; gap: 18px; box-shadow: 0 30px 60px -26px rgba(60, 55, 45, .45), 0 0 0 1px rgba(198, 161, 91, .55), inset 0 0 0 7px #fff, inset 0 0 0 8px rgba(185, 190, 198, .7); }
@media (min-width: 600px) { .paper { padding: 38px 36px; } }
.paper > .caps { color: var(--gold-deep); text-align: center; }
.paper h3 { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(26px, 5vw, 34px); text-align: center; line-height: 1.1; }
.paper .db-sr, .paper label { font-family: var(--body); }
.facts { margin: 0; display: grid; gap: 4px; }
.facts > div { display: grid; grid-template-columns: 5.4em 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(185, 190, 198, .7); align-items: baseline; }
.facts > div:first-child { border-top: 0; }
.facts dt { font-family: var(--caps); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }
.facts dd { margin: 0; font-family: var(--display); font-size: clamp(20px, 3vw, 24px); line-height: 1.3; overflow-wrap: anywhere; }
.note { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(20px, 3vw, 24px); line-height: 1.4; color: var(--ink-soft); padding-left: 16px; border-left: 2px solid var(--gold); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sample-note { font-size: 13px; color: var(--ink-soft); text-align: center; }
.board-note { font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ---------- Buttons ---------- */
.btn-gold { border: 0; border-radius: 999px; padding: 15px 30px; min-height: 52px; background: var(--gold-foil); background-size: 220% 100%; color: var(--ink); font-family: var(--caps); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; box-shadow: 0 12px 26px -10px rgba(140, 106, 44, .6), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-gold:disabled { opacity: .75; cursor: default; }
.ghost-btn { border: 1px solid var(--silver); background: rgba(255, 255, 255, .7); border-radius: 999px; padding: 12px 20px; min-height: 46px; font-family: var(--caps); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.ghost-btn:hover { border-color: var(--gold); }
.shine { position: relative; overflow: hidden; isolation: isolate; }
.shine::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .75) 50%, transparent 70%); transform: translateX(-130%); animation: sweep 5s ease-in-out infinite; }
.mute { position: fixed; z-index: 45; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 1px var(--gold), 0 8px 18px -8px rgba(60, 55, 45, .4); display: grid; place-items: center; font-size: 20px; }
.nme-edit .mute { top: 64px; }

/* ---------- Opening (each design draws its own object; the frame is shared) ---------- */
.intro { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; align-content: center; gap: 22px; text-align: center; padding-inline: max(16px, env(safe-area-inset-left, 0px)); background: radial-gradient(60% 50% at 50% 50%, rgba(255, 255, 255, .9), rgba(243, 240, 233, .78)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .9s ease, visibility .9s; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-kicker { font-family: var(--caps); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-deep); }
.intro-title { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(30px, 7vw, 46px); line-height: 1.05; color: var(--ink); overflow-wrap: anywhere; }
.tap-hint { font-family: var(--caps); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); animation: pulse 1.8s ease-in-out infinite; }
.quiet { border: 0; background: none; min-height: 44px; padding: 10px; color: var(--ink-soft); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.intro-card { width: min(78vw, 330px); padding: 28px 20px; border-radius: 3px; background: #fff; display: grid; gap: 8px; justify-items: center; text-align: center; box-shadow: 0 0 0 1px rgba(198, 161, 91, .6), inset 0 0 0 7px #fff, inset 0 0 0 8px rgba(185, 190, 198, .7), 0 40px 70px -18px rgba(60, 55, 45, .5); }
.ic-kicker { font-family: var(--caps); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-deep); }
.ic-title { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 44px; line-height: 1; background: var(--gold-foil); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 7s ease-in-out infinite; padding-bottom: .06em; overflow-wrap: anywhere; }
.ic-rule { width: 36%; height: 1px; margin: 4px 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.ic-line { font-family: var(--display); font-size: 19px; line-height: 1.25; color: var(--ink); }

/* ---------- Reply card ---------- */
.reply-card { padding-bottom: 66px; }
@media (min-width: 600px) { .reply-card { padding-bottom: 72px; } }
.reply-head { margin: 6px 0 14px; font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(26px, 5vw, 34px); text-align: center; line-height: 1.1; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field > label, .field legend, .flabel { font-family: var(--caps); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--silver-deep); padding: 0; }
.field input[type="text"] { width: 100%; border: 0; border-bottom: 1px solid var(--silver); background: transparent; color: var(--ink); padding: 8px 2px; min-height: 46px; font-family: var(--display); font-size: 22px; }
.field input[type="text"]:focus { outline: none; border-bottom-color: var(--gold); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; place-items: center; text-align: center; min-height: 54px; padding: 8px; border-radius: 2px; border: 1px solid var(--silver); font-family: var(--display); font-size: 19px; font-style: italic; cursor: pointer; transition: all .25s; }
.choice input:checked + span { background: var(--gold-foil); background-size: 220% 100%; border-color: var(--gold); color: var(--ink); box-shadow: 0 8px 18px -10px rgba(140, 106, 44, .7); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.stepper { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--silver); background: linear-gradient(180deg, #fff, var(--frost)); color: var(--ink); font-size: 20px; line-height: 1; }
.stepper output { font-family: var(--display); font-size: 30px; min-width: 1.4ch; text-align: center; font-variant-numeric: lining-nums; }
.err { margin: -8px 0 0; color: #8c2a2a; font-size: 14px; }
.seal-btn { justify-self: center; border: 0; border-radius: 999px; padding: 16px 32px; min-height: 54px; background: var(--ink); color: #fff; font-family: var(--caps); font-size: 13px; letter-spacing: .26em; text-transform: uppercase; box-shadow: 0 12px 24px -10px rgba(35, 33, 29, .6); transition: transform .15s; }
.seal-btn:active { transform: scale(.97); }
.reply-done { display: grid; gap: 12px; justify-items: center; text-align: center; }
.reply-done h3 { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(32px, 6vw, 44px); line-height: 1.05; background: var(--gold-foil); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 7s ease-in-out infinite; padding-bottom: .06em; }
.reply-done p { color: var(--ink-soft); max-width: 34ch; }
.linkish { border: 0; background: none; padding: 10px; min-height: 44px; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 4px; font-size: 15px; }
.wax { opacity: 0; position: absolute; left: 50%; bottom: -40px; width: 88px; height: 88px; translate: -50% 0; z-index: 3; display: grid; place-items: center; border-radius: 47% 53% 49% 51% / 52% 46% 54% 48%; background: radial-gradient(circle at 38% 32%, #f6e6b8, var(--gold) 48%, var(--gold-deep) 92%); box-shadow: 0 10px 18px rgba(60, 55, 45, .35), inset 0 -5px 9px rgba(90, 64, 20, .35), inset 0 3px 6px rgba(255, 255, 255, .5); }
.wax::before { content: ""; position: absolute; inset: 15%; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(90, 64, 20, .3), inset 0 2px 3px rgba(255, 255, 255, .4); }
.wax span { font-family: var(--caps); font-weight: 600; font-size: 30px; color: #7a5a22; text-shadow: 0 1px 0 rgba(255, 255, 255, .5), 0 -1px 0 rgba(90, 64, 20, .35); }
.wax.stamped { animation: stamp .6s cubic-bezier(.5, 0, .75, 0) both; }

/* ---------- Who is coming: place cards ---------- */
.who { display: grid; gap: 14px; justify-items: center; text-align: center; }
.who-count { font-family: var(--display); font-weight: 300; font-size: clamp(64px, 12vw, 110px); line-height: .9; font-variant-numeric: lining-nums; background: var(--gold-foil); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 8s ease-in-out infinite; }
.crowd { display: flex; flex-wrap: wrap; gap: 14px 12px; justify-content: center; max-width: 880px; }
.gempty { font-family: var(--display); font-style: italic; font-size: 22px; color: var(--ink-soft); }
.place { position: relative; min-width: 108px; max-width: 200px; padding: 14px 16px 10px; border-radius: 2px; background: #fff; text-align: center; box-shadow: 0 0 0 1px rgba(198, 161, 91, .55), inset 0 0 0 4px #fff, inset 0 0 0 5px rgba(185, 190, 198, .7), 0 12px 20px -12px rgba(60, 55, 45, .4); transform: rotate(var(--r, 0deg)); }
.place b { display: block; font-family: var(--display); font-style: italic; font-weight: 400; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.place span { font-family: var(--caps); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.place.me { background: linear-gradient(#fffdf6, #fbf1d6); box-shadow: 0 0 0 1px var(--gold), inset 0 0 0 4px #fff7e0, inset 0 0 0 5px var(--gold), 0 14px 24px -12px rgba(140, 106, 44, .6); }
.place.new { animation: placeIn .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.more { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--ink-soft); }

/* ---------- Footer, toast ---------- */
.end { min-height: auto; padding-block: 64px 100px; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.foot { text-align: center; font-size: 13px; color: var(--ink-soft); }
.song-credit a { color: inherit; text-decoration: underline; }

@keyframes foil { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes letterIn { 0% { opacity: 0; transform: translateY(.35em) scale(.9); filter: blur(10px); } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes letterSpin { 0% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(180deg) translateY(-.12em); } 100% { transform: rotateY(360deg) translateY(0); } }
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes stamp { 0% { opacity: 0; scale: 2.4; filter: blur(4px); } 78% { opacity: 1; scale: .9; filter: blur(0); } 100% { opacity: 1; scale: 1; filter: blur(0); } }
@keyframes placeIn { 0% { opacity: 0; transform: translateY(-40px) rotate(-10deg) scale(.8); } 100% { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes flame { 0% { transform: scale(1, 1) translateX(0); opacity: .92; } 50% { transform: scale(.92, 1.12) translateX(2%); opacity: 1; } 100% { transform: scale(1.06, .9) translateX(-2%); opacity: .86; } }
@keyframes glow { from { opacity: .7; } to { opacity: 1; } }
@keyframes steam { 0% { opacity: 0; transform: translateY(0) scaleX(1); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-90px) scaleX(1.5); } }

@media (prefers-reduced-motion: reduce) {
  .medallion svg, .divider svg, .bulb, .shine::after, .tap-hint, h2 em, .ic-title, .who-count, .reply-done h3 { animation: none; }
  .revealed .tl { animation: none; opacity: 1; }
}
