/* Wedding invitation website — themes and layout. Everything is scoped to .inv. */
.inv-page { margin: 0; background: #f7f6f2; }
.inv {
  --bg: #f7f6f2; --paper: #fffef9; --ink: #515546; --muted: #656956; --accent: #61674f; --accent2: #868c72; --line: #c9ccbb; --on-accent: #fffef9;
  --serif: "Tinos", Georgia, serif; --sans: var(--serif);
  background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--serif); position: relative; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.inv[data-theme="olive"] { --bg: #f2f0e6; --paper: #fbfaf3; --ink: #2d3324; --muted: #6f7563; --accent: #6b7f3e; --accent2: #4b5a2b; --line: #dcdcc8; }
.inv[data-theme="aegean"] { --bg: #f4f8fc; --paper: #ffffff; --ink: #142a47; --muted: #5d6f86; --accent: #2c64b0; --accent2: #173f75; --line: #d7e3f1; }
.inv[data-theme="blush"] { --bg: #fbf0ee; --paper: #fffaf9; --ink: #3b2528; --muted: #8d6f73; --accent: #b4646f; --accent2: #c49a6c; --line: #f0d9d6; }
.inv[data-theme="night"] { --bg: #121726; --paper: #1a2135; --ink: #f4ecdd; --muted: #a9a8b3; --accent: #d8b46a; --accent2: #e9cf95; --line: #2e3650; --on-accent: #121726; }
/* Baptism (and boho) themes: each one also draws its own illustration (.inv-motif). */
.inv[data-theme="boho"] { --bg: #f4ebe0; --paper: #fffaf3; --ink: #4a3a2e; --muted: #6f5d4e; --accent: #a85c3c; --accent2: #7f8c68; --line: #eadbc9; --extra: #e2b58a; --serif: "EB Garamond", Georgia, serif; }
.inv[data-theme="unicorn"] { --bg: #f8f0fa; --paper: #fffaff; --ink: #4a3557; --muted: #6f5a7c; --accent: #9b4f9f; --accent2: #4f9fb3; --line: #ecdff0; --extra: #f4a6c8; --serif: "Literata", Georgia, serif; }
.inv[data-theme="pirates"] { --bg: #ece0c4; --paper: #fbf4e2; --ink: #2b2420; --muted: #5f5344; --accent: #9b2c22; --accent2: #23384f; --line: #e0d2b2; --extra: #c9a45c; --serif: "EB Garamond", Georgia, serif; }
.inv[data-theme="nautical"] { --bg: #eaf1f8; --paper: #ffffff; --ink: #12304f; --muted: #4f6378; --accent: #1f4e7a; --accent2: #b8372b; --line: #d6e1ec; --extra: #8fb3d3; }
.inv[data-theme="unicorn"] .inv-frame { border-color: var(--extra); border-radius: 18px; }
.inv[data-theme="unicorn"] .inv-frame::before { border-color: var(--line); border-radius: 13px; }
.inv[data-theme="nautical"] .inv-frame { border-style: double; border-width: 5px; }
.inv[data-theme="pirates"] .inv-sheet { background: linear-gradient(160deg, var(--paper), color-mix(in srgb, var(--extra) 18%, var(--paper))); }
.inv[data-theme="pirates"] .inv-frame { border-style: dashed; border-width: 2px; }
.inv-motif { width: min(100%, 150px); height: auto; display: block; margin: 0 auto; }
.inv-motif.inv-small { width: 92px; margin-bottom: 6px; }
.inv-monogram-motif { width: 150px; }
.inv-monogram-motif .inv-mono { margin-bottom: 4px; }
.inv-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.inv-quick .inv-btn { min-height: 44px; }
.inv-cal { position: relative; display: inline-block; }
.inv-cal summary { list-style: none; min-height: 44px; }
.inv-cal summary::-webkit-details-marker { display: none; }
.inv-cal[open] summary { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.inv-cal-menu { display: grid; gap: 6px; margin-top: 8px; padding: 8px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 14%, transparent); }
.inv-actions .inv-cal { display: block; }
.inv-actions .inv-cal summary { width: 100%; }
/* The builder shows the invitation inside a page with its own site-wide element styles
   (section padding, display headings, dark footer). Roll those back to the browser defaults,
   so the preview is identical to what guests see; the rules below still win (same specificity, later). */
.inv :where(section, header, footer, article, nav, h1, h2, h3, h1 em, h2 em, details, summary) {
  padding: revert; margin: revert; background: revert; color: revert; border: revert; border-radius: revert;
  font-family: revert; font-size: revert; font-weight: revert; font-style: revert; line-height: revert; letter-spacing: revert;
}
.inv *, .inv *::before, .inv *::after { box-sizing: border-box; }
.inv a { color: inherit; }
.inv h1, .inv h2, .inv h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.1; }

.inv-banner { position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--bg); text-align: center; font: 600 13px/1.4 var(--sans); padding: 9px 14px; }
.inv-banner a { color: var(--accent); }
.inv[data-theme="night"] .inv-banner { background: var(--accent); color: var(--bg); }

.inv-langs { width: fit-content; max-width: min(552px, calc(100% - 24px)); margin: 18px auto -12px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 8%, transparent); }
.inv-langs-caption { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 7px; color: var(--ink); font: 700 12px/1.3 var(--sans); }
.inv-langs-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.inv-langs .inv-lang { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 9px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--ink); font: 700 13px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.inv-lang span { display: grid; place-items: center; min-width: 25px; min-height: 23px; border-radius: 6px; background: color-mix(in srgb, currentColor 9%, transparent); font: 700 10px/1 system-ui, sans-serif; letter-spacing: .04em; }
.inv-langs .inv-lang:hover { background: var(--bg); border-color: var(--line); }
.inv-langs .inv-lang[aria-current] { background: color-mix(in srgb, var(--accent) 15%, var(--paper)); border-color: var(--accent); }
.inv-langs .inv-lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv-sheet { width: min(552px, calc(100% - 24px)); margin: 28px auto; padding: 12px; background: var(--paper); box-shadow: 0 18px 48px color-mix(in srgb, var(--ink) 14%, transparent); container-type: inline-size; }
.inv-frame { position: relative; border: 3px solid var(--accent2); padding: 36px clamp(13px, 5cqi, 27px) 22px; text-align: center; overflow-wrap: anywhere; }
.inv-frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--accent2); pointer-events: none; }
.inv-hero { margin-bottom: 27px; }
.inv-cover { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin: 18px 0 0; border: 1px solid var(--line); }
.inv-branch { width: min(100%, 150px); height: auto; display: block; margin: 0 auto; }
.inv-branch path { stroke: var(--accent); }
.inv-branch ellipse { fill: var(--accent); opacity: 0.75; }
.inv-branch .inv-berry { fill: var(--accent2); }
.inv-branch.inv-small { width: 96px; margin-bottom: 5px; }
.inv-monogram { position: relative; width: 118px; margin: 0 auto 16px; }
.inv-mono { display: block; font: italic 35px/1 var(--serif); color: var(--accent); }
.inv-mono i { font-size: .65em; margin-inline: .13em; }
.inv-hero .inv-names { font-size: clamp(32px, 10cqi, 55px); font-style: italic; color: var(--accent); }
.inv-hero .inv-names[tabindex="-1"]:focus { outline: none; }
.inv-names em { font-size: .72em; }
.inv-intro { font-style: italic; margin: 10px auto 0; max-width: 35ch; color: var(--muted); }
.inv[data-paper-font="serif"] { --serif: "Noto Serif Display", Georgia, serif; }
.inv[data-paper-font="italic"] { --serif: "Literata", Georgia, serif; }
.inv[data-paper-font="italic"] :is(h1, h2, h3) { font-style: italic; }
.inv[data-paper-font="sans"] { --serif: "Commissioner", system-ui, sans-serif; }
.inv[data-paper-font="didot"] { --serif: "GFS Didot", "Noto Serif Display", Georgia, serif; }
.inv[data-paper-font="garamond"] { --serif: "EB Garamond", Georgia, serif; }
.inv[data-paper-font="hand"] { --serif: "Mynerve", "Literata", Georgia, serif; }
.inv[data-paper-font="hand"] :is(h1, h2, h3, .inv-hero .inv-names, .inv-mono, .inv-intro, .inv-place, .inv-panel h3) { font-style: normal; }
.inv[data-paper-font="sans"] :is(.inv-hero .inv-names, .inv-mono, .inv-intro, .inv-place, .inv-panel h3) { font-style: normal; }
.inv-rule { display: flex; align-items: center; gap: 10px; width: min(120px, 55%); margin: 16px auto; color: var(--accent); }
.inv-rule::before, .inv-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.inv-rule i { width: 6px; height: 6px; background: currentColor; rotate: 45deg; }

/* sections */
.inv-sec { margin: 0 0 24px; }
.inv-frame .inv-divider { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--accent); font: 400 .72rem/1.45 var(--serif); letter-spacing: .15em; text-transform: uppercase; }
.inv-divider::before, .inv-divider::after { content: ""; flex: 1 0 7px; height: 1px; background: var(--line); }
.inv-ceremony { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 7px; padding-block: 14px; border-block: 1px solid var(--line); line-height: 1.22; }
.inv-ceremony-no-place { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inv-ceremony-no-date { grid-template-columns: 1fr; }
.inv-ceremony span, .inv-ceremony small, .inv-hours { display: block; }
.inv-day { display: grid; justify-items: center; gap: 3px; border-inline: 1px solid var(--line); padding: 4px; }
.inv-ceremony-no-place .inv-day { border-inline-end: 0; }
.inv-day b { font: italic clamp(32px, 10cqi, 53px)/.95 var(--serif); color: var(--accent); }
.inv-hours, .inv-day small { font-size: .77rem; letter-spacing: .08em; color: var(--muted); }
.inv-hours, .inv-place { margin-top: 4px; }
.inv-place { font-style: italic; color: var(--muted); }
.inv-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); gap: 10px; }
.inv-panel { border: 1px solid var(--line); border-radius: 2px; padding: 13px 9px; }
.inv-panel h3 { color: var(--accent); font-size: 1.22rem; font-style: italic; margin-bottom: 7px; }
.inv-panel p { margin: 0; }
.inv-panel p + p { margin-top: 3px; }
.inv-reception .inv-hours { display: inline-block; margin-top: 9px; padding: 2px 12px; border-block: 1px solid var(--line); }
.inv-count-panel h2 { margin: 0 0 10px; font-size: 1.02rem; color: var(--muted); }
.inv-count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.inv-count div + div { border-inline-start: 1px solid var(--line); }
.inv-count b { display: block; font: 400 clamp(21px, 6.8cqi, 36px)/1.1 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.inv-count small { font-size: clamp(9px, 2.9cqi, 12px); color: var(--muted); }
.inv-married { grid-column: 1 / -1; font-style: italic; color: var(--accent); }
.inv-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr)); gap: 7px; margin-bottom: 15px; }
.inv-actions .inv-btn { min-height: 44px; padding: 7px 10px; }
.inv-label { font: 400 .72rem/1.4 var(--serif); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin: 0 0 7px; }
.inv-gift-card { border: 1px solid var(--line); padding: 17px 11px; }

.inv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 15px; border-radius: 2px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent) !important; font: 400 14px/1.3 var(--serif); text-decoration: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.inv-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px var(--accent); }
.inv-btn-ghost { background: transparent; color: var(--accent) !important; }
.inv-btn-big { width: 100%; padding: 16px; font-size: 16px; margin-top: 6px; }
.inv-btn:disabled { opacity: 0.6; cursor: progress; }

.inv-story-text { font: 400 19px/1.75 var(--serif); max-width: 640px; margin: 0 auto; }
.inv-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.inv-gallery.n1 { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
.inv-gallery.n3 figure:first-child { grid-column: 1 / -1; }
.inv-gallery figure { margin: 0; background: var(--paper); padding: 10px 10px 34px; box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.45); transform: rotate(var(--r)); transition: transform 0.4s; }
.inv-gallery figure:hover { transform: rotate(0) scale(1.02); }
.inv-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.inv-gallery.n3 figure:first-child img { aspect-ratio: 16 / 10; }

.inv-rsvp { max-width: 600px; }
.inv-sub { color: var(--muted); margin: 0 0 12px; }
.inv-sub a { color: var(--accent); }
.inv-form { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: clamp(8px, 4cqi, 18px); display: grid; gap: 12px; }
.inv-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-choice input { position: absolute; opacity: 0; pointer-events: none; }
.inv-choice span { display: grid; place-items: center; height: 100%; text-align: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.inv-choice input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.inv-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv-field { display: grid; gap: 6px; font: 600 13px var(--sans); color: var(--muted); }
.inv-field small { font-weight: 400; }
.inv-field input, .inv-field select, .inv-field textarea { font: 400 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 9px; width: 100%; min-width: 0; }
.inv-field input:focus, .inv-field select:focus, .inv-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.inv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-row.hide { display: none; }
.inv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.inv-msg { margin: 0; min-height: 1.2em; color: var(--accent); font-weight: 600; text-align: center; }
.inv-thanks { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 18px 10px; }
.inv-thanks h3 { font-size: 28px; margin-bottom: 10px; }
.inv-thanks p { color: var(--muted); margin: 0; }

.inv-gift { max-width: 600px; }
.inv-gift h2 { font-size: 34px; margin-bottom: 14px; }
.inv-gift-text { font: 400 17px/1.7 var(--serif); margin: 0 0 20px; overflow-wrap: anywhere; }
.inv-pay { display: grid; gap: 12px; text-align: left; position: relative; z-index: 1; margin-top: 8px; }
.inv-pay-way { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 12px; display: grid; gap: 6px; }
.inv-pay-head { display: flex; align-items: center; gap: 10px; font: 600 15px var(--sans); }
.inv-pay-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font-size: 17px; flex: none; }
.inv-pay-code { margin: 2px 0 0; font: 600 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.03em; overflow-wrap: anywhere; }
.inv-pay-note { margin: 0; font-size: 13px; color: var(--muted); }
.inv-pay-way .inv-btn { justify-self: start; margin-top: 6px; padding: 9px 16px; font-size: 13px; }

.inv-foot { text-align: center; padding-top: 16px; border-top: 1px solid var(--line); }
.inv-foot-names { font: italic 17px/1.4 var(--serif); margin: 0 0 10px; color: var(--muted); }
.inv-foot-names span { font-size: 24px; color: var(--ink); font-style: normal; }
.inv-made { font: 600 12px var(--sans); color: var(--muted) !important; text-decoration: none; opacity: 0.8; }
.inv-made:hover { opacity: 1; color: var(--accent) !important; }
.inv-demo-note { margin: 0; color: var(--muted); font-size: .85rem; }

.inv[data-paper-motif="plain"] .inv-frame::before { content: none; }

/* envelope intro */
.inv-envelope { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; align-content: center; gap: 24px; background: var(--bg); cursor: pointer; transition: opacity .48s ease; }
.inv-envelope.gone { opacity: 0; pointer-events: none; }
.inv-sheet.inv-arrive { animation: inv-arrive .72s ease both; }
.inv-envelope:focus:not(:focus-visible) { outline: none; }
.inv-envelope:focus-visible .env-hint { outline: 2px solid var(--ink); outline-offset: 6px; }
.env { position: relative; isolation: isolate; width: min(480px, 82vw, 73svh); aspect-ratio: 1.45; perspective: 850px; filter: drop-shadow(0 19px 24px rgba(35, 39, 25, .26)); }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; }
.env-back { background: color-mix(in srgb, var(--accent) 55%, var(--paper)); border-radius: 8px; }
.env-front { background: linear-gradient(to top right, color-mix(in srgb, var(--accent) 32%, var(--paper)) 50%, transparent 50.5%) left / 50.5% 100% no-repeat, linear-gradient(to top left, color-mix(in srgb, var(--accent) 38%, var(--paper)) 50%, transparent 50.5%) right / 50.5% 100% no-repeat, linear-gradient(to top, color-mix(in srgb, var(--accent) 26%, var(--paper)) 0 52%, transparent 52%); border-radius: 0 0 8px 8px; z-index: 3; }
.env-flap { z-index: 4; clip-path: polygon(0 0, 100% 0, 50% 58%); background: color-mix(in srgb, var(--accent) 46%, var(--paper)); transform-origin: top; transition: transform 0.7s ease, z-index 0s 0.35s; border-radius: 8px 8px 0 0; }
.env-card { position: absolute; left: 7%; right: 7%; top: 8%; bottom: 8%; z-index: 2; background: var(--paper); border: 1px solid var(--line); border-radius: 2px; display: grid; place-content: center; text-align: center; padding: 12px; transition: transform .65s cubic-bezier(.2, .8, .2, 1) .36s; }
.inv-envelope[data-theme="classic"]:not(.has-envelope-photo) .env-back { background: color-mix(in srgb, var(--accent) 65%, var(--ink)); }
.inv-envelope[data-theme="classic"]:not(.has-envelope-photo) .env-front { background: linear-gradient(to top right, color-mix(in srgb, var(--accent) 85%, var(--paper)) 49.7%, transparent 50.4%) left / 50.5% 100% no-repeat, linear-gradient(to top left, color-mix(in srgb, var(--accent) 92%, var(--paper)) 49.7%, transparent 50.4%) right / 50.5% 100% no-repeat, linear-gradient(to top, var(--accent) 50%, transparent 50%); }
.inv-envelope[data-theme="classic"]:not(.has-envelope-photo) .env-flap { background: linear-gradient(150deg, var(--accent2), var(--accent)); }
.env-card span, .env-card small { transition: opacity 0.4s 0.6s; }
.inv-envelope:not(.open) .env-card > * { opacity: 0; transition: none; }
.env-card span { font: italic 24px/1.2 var(--serif); color: var(--ink); }
.env-card small { font: 600 10px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.env-seal { position: absolute; z-index: 5; left: 50%; top: 58%; translate: -50% -50%; width: 66px; height: 66px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent2) 70%, #fff), var(--accent2) 60%, color-mix(in srgb, var(--accent2) 70%, #000)); color: #fff; display: flex; align-items: center; justify-content: center; gap: 1px; font: 400 19px var(--serif); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(255, 255, 255, 0.15); transition: opacity 0.4s, transform 0.4s; }
.env-seal i { font-size: 0.8em; }
.env-hint { font: 600 12px var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin: 0; animation: inv-pulse 2s ease-in-out infinite; }
.inv-envelope.open .env-seal { opacity: 0; transform: scale(1.4); }
.inv-envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.inv-envelope.open .env-card { transform: translateY(-48%); z-index: 2; }
.inv-envelope.open .env-hint { opacity: 0; }
.env-hint { transition: opacity 0.4s; }
.env-card { flex-direction: column; overflow: hidden; }
.env-card .env-branch { width: 70%; margin: 0 auto 4px; }
.inv-envelope:not(.open) .env-card .env-branch { opacity: 0; }
/* inside the builder's phone mockup */
.inv-envelope-in { position: absolute; inset: 12px; border-radius: 38px; overflow: hidden; z-index: 25; }
.inv-envelope-in .env { width: 78%; }
.inv-envelope-in .env-card span { font-size: 20px; }
.env-photo { display: none; }
.has-envelope-photo .env { width: min(480px, 82vw, var(--env-photo-width)); aspect-ratio: var(--env-photo-ratio); }
.inv-envelope-in.has-envelope-photo .env { width: min(83%, var(--env-photo-width)); }
.has-envelope-photo .env-photo { display: block; position: absolute; left: var(--env-image-left); top: var(--env-image-top); width: var(--env-image-width); height: var(--env-image-height); max-width: none; }
/* The couple's own envelope photo, opening like a real envelope: the flap (cut from the same
   photo, seal included) folds back over the top and shows its inside, the card with the print's
   monogram, lettering and colours slides up out of the pocket, then the invitation takes over. */
.env-inside, .env-flap-out, .env-flap-in, .env-patch { display: none; }
.inv-envelope.has-envelope-photo.open .env-patch { display: block; position: absolute; inset: 0; z-index: 3; background: var(--env-paper); clip-path: var(--env-patch-shape, circle(0)); }
.inv-envelope.has-envelope-photo { --env-paper: color-mix(in srgb, var(--accent2) 30%, var(--paper)); }
.has-envelope-photo .env { perspective: 1100px; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .28)); overflow: visible; transition: transform .4s ease, translate .9s cubic-bezier(.4, 0, .2, 1); }
.has-envelope-photo .env-back, .has-envelope-photo .env-seal { display: none; }
.has-envelope-photo .env-front { z-index: 3; overflow: hidden; background: none; border-radius: 0; }
.inv-envelope.has-envelope-photo.open .env-front { clip-path: var(--env-body-shape); }
.has-envelope-photo .env-inside { display: block; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--env-paper) 52%, #000) 0%, color-mix(in srgb, var(--env-paper) 72%, #000) 60%, color-mix(in srgb, var(--env-paper) 60%, #000) 100%); }
.has-envelope-photo .env-card { left: 5%; right: 5%; top: 4%; bottom: 6%; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4%; padding: 6% 6% 4%; container-type: inline-size; border: 0; border-radius: 1px; box-shadow: 0 -2px 10px rgba(0, 0, 0, .18), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); transition: transform 1s cubic-bezier(.3, .7, .2, 1) .8s; }
.inv-envelope.has-envelope-photo.open .env-card { transform: translateY(var(--env-card-rise, -40%)); }
.has-envelope-photo .env-card > * { transition: opacity .4s .9s; }
.env-card-cut { display: block; max-width: 72%; object-fit: contain; }
.env-card-mono { height: 30%; }
.env-card-names { height: 18%; max-width: 86%; }
.has-envelope-photo .env-card span { font-size: clamp(13px, 7cqi, 24px); }
.has-envelope-photo .env-card small { font-size: clamp(7px, 2.6cqi, 10px); }
.has-envelope-photo .env-card .env-branch { width: 46%; margin: 0 auto; }
.has-envelope-photo .env-flap { z-index: 4; clip-path: none; background: none; border-radius: 0; transform-style: preserve-3d; transform-origin: top; transition: transform .95s cubic-bezier(.45, .05, .25, 1), z-index 0s .5s; }
.has-envelope-photo :is(.env-flap-out, .env-flap-in) { display: block; position: absolute; inset: 0; overflow: hidden; clip-path: var(--env-flap-shape); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.has-envelope-photo .env-flap-in { transform: rotateY(180deg); background: linear-gradient(180deg, color-mix(in srgb, var(--env-paper) 92%, #000), color-mix(in srgb, var(--env-paper) 80%, #000)); }
.inv-envelope.has-envelope-photo.open .env { translate: 0 16%; }
.inv-envelope.has-envelope-photo.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.inv-envelope.has-envelope-photo.open .env-flap-in { filter: brightness(1.04); }
.inv-envelope.has-envelope-photo { gap: 32px; transition: opacity 1s cubic-bezier(.4, 0, .2, 1), transform 1s cubic-bezier(.4, 0, .2, 1); }
.inv-envelope.has-envelope-photo.gone { transform: scale(1.1); }
.inv-envelope.has-envelope-photo .env-hint { font: 400 .8rem/1.4 var(--serif); letter-spacing: 2px; color: var(--muted); }
.inv-envelope-in.has-envelope-photo .env-hint { font-size: .68rem; letter-spacing: 1.4px; padding-inline: 12px; text-align: center; }
@media (hover: hover) and (pointer: fine) { .inv-envelope.has-envelope-photo:not(.open):hover .env { transform: translateY(-6px); } }
.inv-sheet.inv-rise { animation: inv-rise 1.2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes inv-rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Lettering cut from the printed invitation (transparent PNG), used in place of typed text. */
.inv-cut { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.inv-monogram-cut { width: clamp(110px, 36cqi, 150px); margin-bottom: 10px; }
.inv-monogram-cut .inv-cut { width: 100%; max-height: 150px; object-fit: contain; }
.inv-names-cut { margin: 18px auto 10px; line-height: 0; }
.inv-names-cut .inv-cut { width: min(100%, 400px); max-height: 120px; object-fit: contain; }
.inv-day b:has(.inv-cut) { line-height: 0; }
.inv-cut-day { width: clamp(58px, 17cqi, 82px); max-height: 66px; object-fit: contain; }
.inv-panel h3:has(.inv-cut) { line-height: 0; margin-bottom: 9px; }
.inv-cut-families, .inv-cut-koumbaroi { width: min(100%, 138px); max-height: 44px; object-fit: contain; }
.inv-envelope[data-paper-font="sans"] .env-card span { font-style: normal; }

.inv-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.inv-confetti span { position: absolute; top: -30px; color: var(--accent); animation: inv-fall 3.2s ease-in forwards; }

.inv-missing { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: 30px; font: 400 16px/1.6 "Commissioner", system-ui, sans-serif; color: #2b2522; max-width: 520px; margin: 0 auto; }
.inv-missing h1 { font: 400 32px/1.2 "Noto Serif Display", Georgia, serif; margin: 10px 0; }
.inv-missing a { color: #b08d57; font-weight: 600; }
.inv-ring { font-size: 46px; }

@keyframes inv-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes inv-pulse { 50% { opacity: 0.45; } }
@keyframes inv-fall { to { transform: translate(var(--dx), 110vh) rotate(540deg); opacity: 0.2; } }

@container (max-width: 295px) {
  .inv-frame { padding-top: 24px; }
  .inv-ceremony:not(.inv-ceremony-no-place, .inv-ceremony-no-date) { grid-template-columns: 1fr; }
  .inv-ceremony:not(.inv-ceremony-no-place) .inv-day { margin-inline: 16%; padding-block: 8px; border-inline: 0; border-block: 1px solid var(--line); }
  .inv-people { grid-template-columns: 1fr 1fr; }
  .inv-people > :only-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .inv *, .inv *::before { animation: none !important; transition: none !important; }
}

/* Live tools: menu choice, find your table, album link */
.inv-field.hide, .inv-menu.hide { display: none; }
.inv-menu { border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; }
.inv-menu legend { font: 600 13px var(--sans); color: var(--muted); padding: 0 6px; }
.inv-menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.inv-menu-left { color: var(--muted); font-size: 12px; min-height: 1em; }
.inv-seat { text-align: center; }
.inv-seat h2 { margin-top: 0; }
.inv-seat-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.inv-seat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; border-radius: 2px; }
.inv-seat-out { list-style: none; padding: 0; margin: 14px auto 0; max-width: 420px; display: grid; gap: 8px; }
.inv-seat-out li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); background: var(--paper); text-align: start; }
.inv-seat-out li b { color: var(--accent); }
.inv-seat-out .inv-seat-none { justify-content: center; color: var(--muted); }
.inv-album-cta { text-align: center; }

/* Layout chosen by the hosts (public/invite-layout.js): emoji above a block, its look and own colour. */
.inv-sec-ico { display: block; font-size: 30px; line-height: 1; margin: 0 auto 8px; }
.inv-sec.inv-look-card { border: 1px solid var(--line); border-radius: 10px; padding: 18px 12px; background: var(--paper); box-shadow: 0 8px 22px -16px color-mix(in srgb, var(--ink) 40%, transparent); }
.inv-sec.inv-look-tinted { border-radius: 10px; padding: 18px 12px; background: color-mix(in srgb, var(--tint, var(--accent2)) 13%, var(--paper)); }
.inv-sec.inv-look-double { border: 3px double var(--accent2); padding: 18px 12px; }
.inv-sec.inv-look-solid { --solid: var(--accent); border-radius: 10px; padding: 18px 12px; background: var(--solid); color: var(--paper); }
.inv-sec.inv-look-solid > * { --ink: var(--paper); --muted: color-mix(in srgb, var(--paper) 85%, var(--solid)); --accent: var(--paper); --accent2: var(--paper); --line: color-mix(in srgb, var(--paper) 45%, var(--solid)); --on-accent: var(--solid); color: var(--ink); }
.inv-sec.inv-look-solid :is(.inv-field input, .inv-field select, .inv-field textarea) { background: color-mix(in srgb, var(--paper) 14%, var(--solid)); }
.inv-sec.inv-look-solid .inv-cal-menu { background: var(--solid); }
.inv-map-embeds { display: grid; gap: 12px; margin-bottom: 14px; }
.inv-map { margin: 0; border: 1px solid var(--line); background: var(--paper); overflow: hidden; border-radius: 6px; }
.inv-map iframe { display: block; width: 100%; height: 220px; border: 0; }
.inv-map figcaption { padding: 9px 10px; font-size: 14px; color: var(--ink); }
.inv-map figcaption small { display: block; color: var(--muted); }
.inv-dear { margin: 14px auto 0; font-family: var(--serif, inherit); font-size: 1.15em; font-weight: 600; color: var(--ink, inherit); }
