/* Zippite royal editorial layer — deliberately scoped to the site UI, not .inv templates. */
:root {
  --porcelain: #fbf7f0;
  --ink: #2b172a;
  --aubergine: #38182f;
  --marigold: #d7ad56;
  --marigold-deep: #8b6424;
  --rose: #f3e4e1;
  --slate: #625864;
  --line: #e4d8cf;
  --white: #fffefa;
  --green: #176b55;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
html { scroll-padding-top: 124px; }
body { background: var(--porcelain); color: var(--ink); }
::selection { background: #e8d29b; color: var(--aubergine); }
:focus-visible { outline: 3px solid #bd8426; outline-offset: 3px; }
.wrap { width: min(1160px, 100% - 40px); }
.top { background: rgba(251,247,240,.96); border-bottom-color: rgba(103,74,62,.16); box-shadow: 0 8px 25px rgba(48,25,43,.05); }
.top .wrap { min-height: 72px; }
.logo { color: var(--aubergine); letter-spacing: -.025em; }
.logo svg circle:first-child { stroke: var(--aubergine) !important; }
.logo svg circle:last-child { stroke: var(--marigold) !important; }
.logo .tld { color: var(--marigold-deep); }
.nav a { color: #625561; border-radius: 9px; }
.nav a:hover, .nav a:focus-visible { background: #f1e7dd; color: var(--aubergine); }
.bmc { background: #f1e4cc; color: var(--aubergine); border: 1px solid #deca9e; }
.bmc:hover { background: #e9d29c; color: #241225; }
.gig { border-color: var(--aubergine); color: var(--aubergine); border-radius: 11px; }
.gig:hover { background: var(--aubergine); color: var(--white); }
.btn-primary { background: var(--aubergine); color: #fffefa; border-color: var(--aubergine); border-radius: 12px; box-shadow: 0 8px 18px rgba(56,24,47,.14); }
.btn-primary:hover { background: #512347; }
.btn-ghost { border-color: #7d6378; color: var(--aubergine); border-radius: 12px; }
.btn-ghost:hover { background: var(--aubergine); color: #fffefa; }
.btn-danger { border-radius: 12px; }
.hero-home { position: relative; isolation: isolate; gap: clamp(26px, 5vw, 68px); padding: clamp(34px, 6vw, 72px) 0; }
.hero-home::before { content: ''; position: absolute; z-index: -1; width: 52vw; height: 72%; max-height: 600px; right: -14vw; top: 10%; border-radius: 50%; background: radial-gradient(ellipse, rgba(215,173,86,.17), rgba(243,228,225,.24) 43%, transparent 72%); }
.hero-home h1 { color: var(--aubergine); font-size: clamp(2.8rem, 6.1vw, 5.1rem); line-height: .99; max-width: 12ch; }
.hero-home h1 .swap-word { background: linear-gradient(transparent 67%, rgba(215,173,86,.44) 67%); }
.hero-home .lead { color: #574b57; max-width: 36em; }
.hero-note { color: #615660; }
.hero-actions { align-items: center; }
.hero-actions .btn-primary { min-height: 54px; padding-inline: 27px; }
.hero-actions .btn-ghost { min-height: 52px; }
.stage { background: linear-gradient(150deg, #efe1d8, #f8eee2 55%, #e9d8c9); border: 1px solid rgba(139,100,36,.24); border-radius: 220px 220px 24px 24px; box-shadow: 0 24px 70px rgba(65,34,55,.11); }
.stage .phone { border-color: #251526; box-shadow: 0 24px 52px rgba(43,23,42,.3); }
.stage-cap { color: #40303d; font-weight: 600; }
.sec { padding-block: clamp(46px, 6vw, 76px); }
.sec h2, .doc h1, .builder h1 { color: var(--aubergine); }
.sec .sub, .hero-home p.lead, .foot p { color: var(--slate); }
#how { position: relative; }
.steps { gap: 18px; margin-top: 28px; }
.steps li { position: relative; min-height: 185px; padding: 24px 22px 22px; border: 1px solid #e7d9cc; border-top: 3px solid var(--marigold); border-radius: 15px; background: var(--white); box-shadow: 0 10px 30px rgba(56,24,47,.045); }
.steps .step-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 15px; border-radius: 14px; background: #f2e6d6; color: var(--aubergine); }
.steps .step-icon svg { width: 25px; height: 25px; }
.steps b { display: none; }
.steps h3 { color: var(--aubergine); font-size: 1.2rem; }
.steps p { color: #625864; }
.how-more-toggle { margin-top: 26px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,254,250,.68); }
.how-more-toggle summary { cursor: pointer; padding: 16px 19px; color: var(--aubergine); font-weight: 700; }
.how-more-toggle summary::marker { color: var(--marigold-deep); }
.how-more { padding: 3px 20px 20px; }
.how-more > div { padding: 18px 0; border-top: 1px solid var(--line); }
.how-more h3 { color: var(--aubergine); }
.how-guides { color: #5d505b; }
.how-guides a { color: #59334f; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; }
#designs { padding-top: 42px; }
.gallery-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 22px 0 24px; padding: 16px; border: 1px solid #e7d9cc; border-radius: 16px; background: #fffefa; }
.gallery-filters .field { flex: 1 1 180px; min-width: 150px; margin: 0; }
.gallery-filters label { color: #4b3948; font-weight: 700; font-size: .88rem; }
.gallery-filters select { min-height: 46px; border-color: #d6c8bc; border-radius: 10px; background: #fffefa; }
.filter-note, .result-count { flex: 1 1 100%; margin: 0; color: #625864; font-size: .9rem; }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin: 0 0 34px; }
.featured-invitation { position: relative; display: grid; align-items: center; min-height: 410px; overflow: hidden; padding: 20px; border-radius: 18px; background-color: #f3e7d5; background-size: cover !important; background-position: center !important; text-align: center; text-decoration: none; box-shadow: 0 14px 32px rgba(43,23,42,.14); transition: transform .22s, box-shadow .22s; }
.featured-invitation::before { content: ''; position: absolute; inset: 12px; border: 1px solid var(--feature-accent, #d7ad56); outline: 1px solid color-mix(in srgb, var(--feature-accent, #d7ad56) 50%, transparent); outline-offset: 4px; pointer-events: none; }
.featured-invitation::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,13,19,.12), rgba(17,13,19,.04) 32%, rgba(17,13,19,.48)); pointer-events: none; }
.featured-invitation:hover, .featured-invitation:focus-visible { transform: translateY(-4px); box-shadow: 0 20px 38px rgba(43,23,42,.2); }
.featured-copy { position: relative; z-index: 1; align-self: end; padding: 20px 12px 12px; color: var(--feature-ink, #fff); text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.featured-copy .feature-kicker { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.featured-copy strong { display: block; font: 400 clamp(1.8rem,3vw,2.55rem)/1.02 var(--serif); }
.featured-copy .feature-date { display: block; margin-top: 12px; font-size: .92rem; }
.featured-copy .feature-use { display: inline-block; margin-top: 16px; padding: 8px 13px; border: 1px solid currentColor; border-radius: 999px; font-size: .83rem; font-weight: 700; }

/* Featured cards whose text is dark: use a light fade behind the text instead of the dark one */
.featured-invitation.ink-dark::after { background: linear-gradient(180deg, rgba(255,250,243,0), rgba(255,250,243,.08) 40%, rgba(255,250,243,.62)); }
.featured-invitation.ink-dark .featured-copy { text-shadow: 0 1px 8px rgba(255,255,255,.75); }
.grid { grid-template-columns: repeat(auto-fill, minmax(188px,1fr)); gap: 24px 20px; }
.card { padding: 8px 8px 14px; border: 1px solid #eee2d8; border-radius: 15px; background: var(--white); box-shadow: 0 7px 18px rgba(56,24,47,.04); }
.card .thumb { border-radius: 10px; }
.card b { color: var(--aubergine); }
.card small { color: #655966; }
.card .stars { color: #75521b; }
.ad.on { margin-block: 32px; padding: 10px 14px 14px; border: 1px solid #e8ddd4; border-radius: 12px; background: rgba(255,254,250,.65); }
.ad.on::before { content: 'Advertisement'; display: block; margin-bottom: 7px; color: #665c62; font: 600 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.faq details { border-top-color: #e4d8cf; }
.faq summary { color: var(--aubergine); }
.faq summary::after { color: var(--marigold-deep); }
.faq details p { color: #5f5360; }
#support { padding: 30px 28px; margin-block: 22px 40px; border: 1px solid #e6d6c0; border-radius: 20px; background: linear-gradient(135deg, #f3e8d7, #fffefa); }
#support h2 { font-size: clamp(1.8rem,3vw,2.5rem); }
#support .bmc { margin-top: 8px; }
.foot { margin-top: 46px; background: #29182b; color: #f2e8e8; padding-block: 42px 50px; }
.foot p, .foot strong { color: #fff5e5; }
.foot a { color: #fff5dc; text-decoration-color: #d7ad56; text-underline-offset: 3px; }
.foot nav { gap: 14px 22px; }
body[data-adsense="off"] .vad-slot { display: none !important; }

/* Five-step builder */
.builder { grid-template-columns: minmax(0,1fr) 360px; gap: clamp(26px,5vw,58px); padding-top: 36px; }
.builder .intro { margin-bottom: 17px; }
.wizard-progress { margin: 18px 0 24px; padding: 17px 16px 15px; border: 1px solid #e6d9cf; border-radius: 16px; background: var(--white); box-shadow: 0 8px 24px rgba(56,24,47,.045); }
.wizard-steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; list-style: none; padding: 0; margin: 0; }
.wizard-step-button { display: grid; justify-items: center; gap: 7px; width: 100%; padding: 4px 2px; border: 0; background: none; color: #746875; font: 600 .79rem/1.2 var(--sans); text-align: center; }
.wizard-step-button .step-number { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #cbbfca; border-radius: 50%; background: #fffefa; color: #60445d; font-size: .86rem; }
.wizard-step-button[aria-current="step"] { color: var(--aubergine); font-weight: 800; }
.wizard-step-button[aria-current="step"] .step-number { border-color: var(--aubergine); background: var(--aubergine); color: #fff; box-shadow: 0 0 0 4px #efe3eb; }
.wizard-step-button[data-done="true"] .step-number { border-color: var(--green); background: var(--green); color: #fff; }
.progress-track { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 10px; background: #eee7eb; }
.progress-fill { width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#886076,#d7ad56); transition: width .22s ease; }
.wizard-step { min-width: 0; padding: 20px 21px 17px; border: 1px solid #eaded5; border-radius: 17px; background: rgba(255,254,250,.92); box-shadow: 0 10px 26px rgba(56,24,47,.045); }
.wizard-step[hidden] { display: none !important; }
.wizard-step-heading { display: flex; align-items: center; gap: 13px; margin: 0 0 15px; }
.wizard-step-heading .step-medallion { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 14px; background: #f1e6d7; color: var(--aubergine); font: 400 1.35rem var(--serif); }
.wizard-step-heading h2 { margin: 0; color: var(--aubergine); font: 400 1.7rem/1 var(--serif); }
.wizard-step-heading p { margin: 4px 0 0; color: var(--slate); font-size: .88rem; }
.wizard-step fieldset { border-top-color: #e8ddd4; }
.wizard-step fieldset:first-of-type { padding-top: 16px; }
.wizard-step legend { color: var(--aubergine); font-size: 1.4rem; }
input[type=text], input[type=url], input[type=date], input[type=time], select, textarea { border-color: #d6c9c0; border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: #9b6d25; outline-color: rgba(215,173,86,.45); }
.wizard-controls { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; margin-top: 8px; border-top: 1px solid #e7dcd4; }
.wizard-controls .btn-primary, .wizard-controls .btn-ghost { min-width: 126px; }
.wizard-controls .btn-primary { margin-left: auto; }
.wizard-controls [hidden] { display: none !important; }
.draft-return { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; padding: 13px 15px; border: 1px solid #d3bd8b; border-radius: 13px; background: #fbf0d5; color: #382636; }
.draft-return p { margin: 0; }
.draft-return button { flex: none; }
.review-card { padding: 18px; margin: 4px 0 18px; border: 1px solid #e8d8c0; border-radius: 14px; background: #f8f0e4; }
.review-card h3 { margin: 0 0 8px; color: var(--aubergine); font: 400 1.45rem var(--serif); }
.review-card p { margin: 5px 0; color: #564857; }
.wording-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wording-row label { font-weight: 600; }
.wording-trigger { flex: none; padding: 5px 9px; border: 1px solid #c6ad78; border-radius: 9px; background: #fff8e8; color: #533e20; font: 700 .79rem var(--sans); cursor: pointer; }
.wording-trigger:hover { background: #f2e0bb; }
.wording-help { margin: -8px 0 14px; color: var(--slate); font-size: .86rem; }
.second-language { margin: 12px 0; padding: 15px; border: 1px solid #e4d5c5; border-radius: 13px; background: #faf4ea; }
.second-language summary { cursor: pointer; color: var(--aubergine); font-weight: 700; }
.second-language .field:first-of-type { margin-top: 12px; }
.second-language [hidden] { display: none !important; }
.mine { border-color: #e6d8ce; border-radius: 15px; background: var(--white); }
.mine-note { color: #625864; font-size: .9rem; line-height: 1.5; }
.mine li { padding: 12px 0; border-top: 1px solid #f0e8e1; }
.mine .mine-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; }
.mine .mine-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; width: 100%; color: #5f5360; font-size: .88rem; }
.mine .mine-status { color: #6a5c65; font-size: .85rem; }
.mine .mine-open { font-variant-numeric: tabular-nums; }
.mine a { color: var(--aubergine); }
.err { color: #982d3b; }
.resp { padding: 22px 18px; border: 1px solid #eaded5; border-radius: 16px; background: var(--white); }
.resp th { background: #efe6dc; color: #382638; }
.pv { top: 92px; }
.pv .phone { border-color: #29182b; box-shadow: 0 22px 48px rgba(43,23,42,.24); }
.replay { color: var(--aubergine); }

/* Share and wording dialogs */
dialog { max-height: min(88vh, 820px); overflow: auto; border: 1px solid #e7d8cc; border-radius: 20px; box-shadow: 0 28px 80px rgba(37,17,35,.28); }
dialog::backdrop { background: rgba(36,18,35,.64); }
dialog h2 { color: var(--aubergine); }
.share a, .share button { border-color: #73536b; color: var(--aubergine); border-radius: 10px; }
.share a.wa { border-color: #1e8a5a; background: #1e8a5a; color: #fff; }
.copy-status { min-height: 1.4em; color: #176b55 !important; font-weight: 700; }
.qr-panel { display: grid; justify-items: center; gap: 10px; padding: 16px; margin: 12px 0; border: 1px solid #e9dfd6; border-radius: 14px; background: #fbf8f3; }
.qr-code { display: grid; place-items: center; min-width: 208px; min-height: 208px; padding: 12px; background: #fff; border: 1px solid #ece4dc; border-radius: 10px; }
.qr-code img, .qr-code canvas { display: block; max-width: 100%; height: auto; }
.qr-panel p { margin: 0; font-size: .88rem; color: #645963; }
.wording-list { display: grid; gap: 10px; margin: 12px 0; }
.wording-option { padding: 14px; border: 1px solid #e4d7ca; border-radius: 12px; background: #fffefa; }
.wording-option p { margin: 0 0 9px; color: #463946; white-space: pre-line; }
.wording-option .wording-source { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wording-option a { color: #503149; }
.wording-option button { padding: 8px 12px; border: 0; border-radius: 9px; background: var(--aubergine); color: #fff; font: 700 .84rem var(--sans); cursor: pointer; }
.wording-note { color: #625864; font-size: .9rem; }

/* Guest language controls are outside the template-specific invitation. */
.guest-lang-switch { position: fixed; z-index: 100; top: 12px; right: 12px; display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; background: rgba(39,23,40,.82); box-shadow: 0 5px 18px rgba(0,0,0,.2); }
.guest-lang-switch button { padding: 7px 11px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 .82rem var(--sans); cursor: pointer; }
.guest-lang-switch button[aria-pressed="true"] { background: #f2d89e; color: #2b172a; }
.invite-loading { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; color: #fff; font: 500 1rem var(--sans); }
.invite-loading .spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.28); border-top-color: #f2d89e; border-radius: 50%; animation: zippite-spin 1s linear infinite; }
@keyframes zippite-spin { to { transform: rotate(360deg); } }
.tap-hint-label { display: block; margin-bottom: 3px; font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.tap-hint-arrow { display: block; font-size: 1.5rem; line-height: 1; }

.mobile-create, .preview-fab { display: none; }
@media (max-width: 960px) {
  html { scroll-padding-top: 116px; }
  .top .wrap { min-height: unset; flex-wrap: wrap; gap: 5px 10px; padding-block: 8px; }
  .logo { flex: none; }
  .top .spacer { min-width: 8px; }
  .nav { display: flex; order: 4; flex: 1 0 100%; gap: 3px; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 7px 11px; font-size: .88rem; }
  .bmc { padding: 8px 12px; font-size: .86rem; }
  .gig { padding: 8px 10px; }
  .hero-home { grid-template-columns: minmax(0,1fr); gap: 30px; padding-top: 30px; }
  .hero-home h1 { max-width: 14ch; }
  .stage { justify-self: center; }
  .steps { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .steps li { min-height: 190px; padding: 19px 15px; }
  .builder { grid-template-columns: minmax(0,1fr); gap: 0; padding-bottom: 110px; }
  .pv { position: fixed; inset: 114px 0 78px; height: auto; z-index: 80; background: rgba(251,247,240,.98); padding: 14px; display: none; align-content: start; align-self: auto; overflow: auto; }
  .pv .phone { height: min(620px, calc(100svh - 245px)); }
  body.show-pv .pv { display: grid; }
  .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(251,247,240,.97); border-top: 1px solid var(--line); box-shadow: 0 -7px 24px rgba(43,23,42,.08); }
  .bar button { flex: 1; }
  .actions .btn-primary { display: none; }
  .preview-fab { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 12px 17px; border: 1px solid #d8c08d; border-radius: 999px; background: #fbf0d5; color: #2b172a; box-shadow: 0 9px 25px rgba(43,23,42,.22); font: 800 .92rem var(--sans); cursor: pointer; }
  body.show-pv .preview-fab { background: var(--aubergine); color: #fff; border-color: var(--aubergine); }
  .pv #replay { display: none; }
  body.show-pv .preview-fab { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .mobile-create { position: fixed; display: flex; justify-content: center; align-items: center; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 70; transform: translateX(-50%); width: min(360px, calc(100% - 32px)); min-height: 52px; border: 1px solid #e4c67d; border-radius: 999px; background: var(--aubergine); color: #fff; box-shadow: 0 12px 30px rgba(43,23,42,.28); text-decoration: none; font-weight: 800; }
  body.home-page { padding-bottom: 82px; }
  .mobile-create:focus-visible { outline-color: #d7ad56; }
  #support { margin-inline: 20px; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 30px, 1160px); }
  .hero-home h1 { font-size: clamp(2.65rem, 11vw, 4rem); }
  .hero-home .lead { font-size: 1.05rem; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li { min-height: unset; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-invitation { min-height: 390px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .gallery-filters { display: grid; grid-template-columns: 1fr; }
  .gallery-filters .field { min-width: 0; }
  .wizard-step { padding: 16px 14px 13px; }
  .wizard-steps { gap: 2px; }
  .wizard-step-button { font-size: .67rem; }
  .wizard-step-button .step-number { width: 28px; height: 28px; font-size: .78rem; }
  .wizard-progress { padding: 12px 9px; }
  .draft-return { align-items: flex-start; flex-direction: column; }
  .wizard-controls .btn-primary, .wizard-controls .btn-ghost { min-width: unset; padding: 12px 15px; }
  .qr-code { min-width: 184px; min-height: 184px; }
  .share { gap: 8px; }
  .share a, .share button { padding: 10px 13px; }
  .foot .wrap { align-items: flex-start; }
  .foot nav { gap: 12px 17px; }
}
@media (max-width: 400px) {
  .logo .tld { display: none; }
  .gallery-filters { padding: 12px; }
  .wizard-step-button { font-size: .62rem; }
  .wizard-step-button .step-number { width: 25px; height: 25px; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .invite-loading .spinner { animation: none !important; border: 0; }
}
