/* Lead form (/f/<form>): black and white, Cormorant Garamond + Jost, like the couple's portal.
   Look: theme light / dark · background white / soft / clear · button black / white · corners square / round · type studio / sans / serif ·
   width narrow / wide. .build = the admin builder's canvas (pages as cards, selection, toolbar, words edited in place, drag). */
:root {
  --bg: #FFFFFF; --page: #FFFFFF; --ink: #0B0B0B; --ink2: #3A3A3A; --mute: #6E6E73; --line: #D6D6D6; --line-on: #0B0B0B; --fill: #F4F4F4; --bad: #C4161C;
  --btn-bg: #000000; --btn-ink: #FFFFFF; --btn-line: #000000; --r: 2px; --rc: 999px;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --head: var(--serif); --body: var(--sans); --maxw: 640px;
  color-scheme: light;
}
.t-dark { --bg: #0B0B0B; --page: #0B0B0B; --ink: #FFFFFF; --ink2: #D6D6D6; --mute: #9A9A9A; --line: #3A3A3A; --line-on: #FFFFFF; --fill: #1A1A1A; --bad: #FF6B6B; color-scheme: dark; }
.bg-soft { --page: #F4F4F4; } .t-dark.bg-soft { --page: #161616; }
.a-white { --btn-bg: #FFFFFF; --btn-ink: #000000; --btn-line: #000000; }
.t-dark.a-white { --btn-line: #FFFFFF; }
.t-dark.a-black { --btn-bg: #000000; --btn-ink: #FFFFFF; --btn-line: #FFFFFF; }
.sh-round { --r: 12px; }
.f-sans { --head: var(--sans); }
.f-serif { --body: var(--serif); }
.w-wide { --maxw: 860px; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font: 300 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.f-serif body { font-size: 18px; font-weight: 400; }
.embed:not(.build), .embed:not(.build) body { background: transparent; }
.bg-clear, .bg-clear body { background: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 72px; }
.bg-soft:not(.embed) .wrap { background: var(--bg); margin: 40px auto; padding: 48px 40px 56px; border-radius: var(--r); max-width: calc(var(--maxw) + 32px); }
.embed .wrap { max-width: none; padding: 4px 2px 8px; }
.mark { text-align: center; font: 400 13px/1 var(--sans); letter-spacing: .44em; padding-left: .44em; text-transform: uppercase; margin: 0 0 18px; }
.mark.img { letter-spacing: 0; padding: 0; margin-bottom: 28px; } .mark.img img { max-height: 64px; max-width: 220px; object-fit: contain; }
.rule { width: 44px; height: 1px; background: var(--ink); margin: 0 auto 40px; }
h1 { font: 400 40px/1.12 var(--head); text-align: center; margin: 0 0 14px; letter-spacing: -.005em; }
.f-sans h1 { font-weight: 400; font-size: 34px; letter-spacing: -.01em; }
.intro { text-align: center; color: var(--ink2); margin: 0 auto 36px; max-width: 520px; white-space: pre-line; }
.head { margin-bottom: 8px; }
.embed h1 { font-size: 32px; }

/* progress (multi-page) */
.prog { margin: 6px 0 30px; }
.prog-t { display: flex; justify-content: space-between; gap: 12px; font: 400 11px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin-bottom: 10px; }
.prog-t span:last-child { color: var(--mute); letter-spacing: .08em; }
.prog-b { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.prog-b i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .3s ease; }

form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
form > * { grid-column: span 2; min-width: 0; }
.fld.half { grid-column: span 1; }
@media (max-width: 520px) { .fld.half { grid-column: span 2; } h1 { font-size: 34px; } .wrap { padding: 40px 20px 56px; } .bg-soft:not(.embed) .wrap { margin: 0; padding: 40px 20px 56px; border-radius: 0; } }
.lab { display: block; font: 400 11px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin: 0 0 8px; }
.lab em, .consent em { font-style: normal; color: var(--mute); letter-spacing: 0; }
.help { display: block; font: 300 13px/1.5 var(--sans); color: var(--mute); margin: -4px 0 8px; }
.inp { display: block; width: 100%; height: 46px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
textarea.inp { height: auto; min-height: 120px; resize: vertical; padding-top: 10px; line-height: 1.6; }
select.inp { background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 10px) 21px, calc(100% - 5px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 22px; }
select.inp.empty, .inp::placeholder { color: var(--mute); }
.inp:focus { border-bottom-color: var(--line-on); }
.chip:focus-visible, .star:focus-visible, .scale button:focus-visible, .btn:focus-visible, .drop:focus-visible { outline: 2px solid var(--line-on); outline-offset: 3px; }
.inp[type=date], .inp[type=time], .inp[type=datetime-local] { min-height: 46px; }
.inp.other { margin-top: 10px; }
.fld.bad .inp { border-bottom-color: var(--bad); border-bottom-width: 2px; }
.ferr { margin: 8px 0 0; font: 400 13px/1.4 var(--sans); color: var(--bad); }
.ferr:empty { display: none; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.addr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; } .addr .full { grid-column: span 3; }
@media (max-width: 520px) { .addr { grid-template-columns: repeat(2, minmax(0, 1fr)); } .addr .full { grid-column: span 2; } .addr input:last-child { grid-column: span 2; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: var(--rc); background: transparent; font: 400 14px/1.2 var(--sans); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sh-square .chip { border-radius: 999px; }
.chip:hover { border-color: var(--line-on); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fld.bad .chips .chip, .fld.bad .scale button { border-color: var(--bad); }
.stars { display: flex; gap: 6px; }
.star { width: 44px; height: 44px; border: 0; background: none; padding: 6px; cursor: pointer; color: var(--line); }
.star svg { width: 100%; height: 100%; fill: currentColor; }
.star.on { color: var(--ink); }
.scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.scale button { height: 44px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; font: 400 15px/1 var(--sans); cursor: pointer; padding: 0; }
.scale button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.scale-ends { display: flex; justify-content: space-between; font: 300 12px/1.4 var(--sans); color: var(--mute); margin-top: 6px; }
@media (max-width: 420px) { .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.consent.small { margin-top: 12px; font-size: 14px; color: var(--ink2); }
.consent.small input { width: 18px; height: 18px; margin-top: 2px; }
.fld.bad .consent { color: var(--bad); }
.fh { font: 400 26px/1.2 var(--head); margin: 14px 0 -6px; }
.fi { color: var(--ink2); margin: 0; white-space: pre-line; }

.filebox { display: grid; gap: 8px; }
.drop { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: var(--r); background: transparent; cursor: pointer; text-align: left; }
.drop:hover, .drop.over { border-color: var(--line-on); background: var(--fill); }
.drop small { margin-left: auto; color: var(--mute); font-size: 13px; }
.fic { width: 22px; height: 22px; flex: none; } .fic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.file { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 4px 6px 12px; background: var(--fill); border-radius: var(--r); }
.file .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file small { color: var(--mute); font-size: 12px; }
.fx { width: 36px; height: 36px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink2); }
.fstat { font-size: 13px; color: var(--mute); } .fstat:empty { display: none; }
.sigbox { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fld.bad .sigbox { border-color: var(--bad); }
.sig { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; background: var(--bg); }
.sig-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.sig-clear { border: 0; background: none; font: 400 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 10px 10px; cursor: pointer; color: var(--ink2); }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.go { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 10px; }
.go.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.go.two .btn { min-width: 0; width: 100%; padding-left: 14px; padding-right: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* Back · Send inquiry side by side on a phone: one line each */
@media (max-width: 420px) { .go.two .btn { letter-spacing: .14em; } }
.btn { min-width: 220px; min-height: 52px; padding: 16px 36px; border: 1px solid var(--btn-line); border-radius: var(--r); background: var(--btn-bg); color: var(--btn-ink); font: 400 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; transition: opacity .2s; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.build .btn:disabled { opacity: 1; }
.err { min-height: 20px; margin: 0; font-size: 14px; color: var(--bad); text-align: center; }
.err:empty { display: none; }
.sms-ok { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--mute, #8E8E93); }
.sms-ok a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.done { text-align: center; padding: 24px 0 8px; }
.done h1 { margin-bottom: 18px; }
.done p { max-width: 480px; margin: 0 auto; color: var(--ink2); white-space: pre-line; }
.closed { text-align: center; color: var(--ink2); padding: 48px 0; }
.load { height: 240px; }

/* ---------- the builder's canvas (?build=1): each page a card on the admin's backdrop ---------- */
.build, .build body { background: transparent; }
.build.t-dark { color-scheme: light; }   /* a dark page in a light admin would get an opaque frame */
.bcanvas { padding: 34px 20px 64px; }
.bpage { position: relative; max-width: calc(var(--maxw) + 56px); margin: 0 auto; background: var(--page); border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(17,17,26,.06), 0 1px 2px rgba(17,17,26,.06), 0 24px 48px -24px rgba(17,17,26,.28); }
.bpage + .bpage { margin-top: 36px; }
.t-dark .bpage { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 48px -20px rgba(0,0,0,.7); }
.build .wrap { max-width: none; padding: 44px 34px 34px; }
.bg-soft.build .bpage { padding: 22px; }
.bg-soft.build .wrap { background: var(--bg); border-radius: var(--r); margin: 0; padding: 38px 30px 30px; }
.build .head { margin-bottom: 14px; }
.build .prog { margin: 0 0 30px; }
.build .head + .prog { margin-top: 30px; }
@media (max-width: 520px) { .bcanvas { padding: 18px 10px 40px; } .build .wrap { padding: 34px 20px 26px; } .bg-soft.build .bpage { padding: 12px; } .bg-soft.build .wrap { padding: 30px 18px 24px; } }
.build .go { margin-top: 18px; }
.build .btn, .build .chip, .build .star, .build .scale button, .build .drop, .build .inp, .build .sig { cursor: pointer; }
.build .btn:disabled { opacity: 1; }
.bempty { grid-column: span 2; display: grid; place-items: center; min-height: 120px; border: 1.5px dashed #C7C7CC; border-radius: 14px; }
.bempty-b { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: #0062CC; color: #fff; font: 600 14px/1 -apple-system, system-ui, sans-serif; cursor: pointer; }
.bempty-b span { width: 18px; height: 18px; display: grid; place-items: center; } .bempty-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* selection: a soft dashed ring on hover, a blue ring with its type tag when selected */
.build .bx { position: relative; cursor: pointer; }
.build .bx > :not(.bx-bar):not(.bx-add):not(.bx-tag) { pointer-events: none; }
.build .bx.editing .lt, .build .bx.editing h1, .build .bx.editing .intro { pointer-events: auto; }
.build .bx::after { content: ''; position: absolute; inset: -11px -12px; border-radius: 14px; border: 1.5px dashed transparent; pointer-events: none; transition: border-color .15s ease, background-color .15s ease, box-shadow .2s ease; }
@media (hover: hover) { .build .bx:hover::after { border-color: #AEAEB2; } .build .bx:hover > .bx-tag { opacity: 1; transform: none; } }
.build .bx.sel { z-index: 4; }
.build .bx.sel::after { border: 2px solid #007AFF; background: rgba(0,122,255,.035); box-shadow: 0 0 0 4px rgba(0,122,255,.10); }
.build .bx.drag { opacity: .3; }
.build .bx.drag::after { border-color: transparent; box-shadow: none; }
.build .head.bx::after { inset: -14px -16px; }
.build .go.bx::after { inset: -10px -14px; }
.build .fld.half.bx::after { inset: -11px -10px; }
.bx-tag { position: absolute; z-index: 3; left: -12px; top: -22px; padding: 4px 8px 4px; border-radius: 7px; background: #8E8E93; color: #fff; font: 600 10.5px/1 -apple-system, system-ui, 'Helvetica Neue', sans-serif; letter-spacing: .02em; white-space: nowrap; opacity: 0; transform: translateY(3px); transition: opacity .15s ease, transform .15s ease; pointer-events: none; }
.build .bx.sel > .bx-tag { opacity: 1; transform: none; background: #007AFF; }
.build .bx.editing > .bx-tag { opacity: 0; }
.bx-bar { position: absolute; z-index: 6; right: -12px; top: -27px; display: flex; align-items: center; gap: 1px; padding: 3px; background: #1C1C1E; border-radius: 11px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06) inset; animation: bxin .18s cubic-bezier(.2,.9,.25,1); }
@keyframes bxin { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }
.bx-b, .bx-grip { width: 30px; height: 28px; border: 0; border-radius: 8px; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.bx-b:hover, .bx-grip:hover { background: rgba(255,255,255,.16); }
.bx-b.red:hover { background: #FF3B30; }
.bx-b:disabled { opacity: .3; cursor: default; background: none; }
.bx-b svg, .bx-grip svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bx-grip { cursor: grab; touch-action: none; } .bx-grip:active { cursor: grabbing; } .bx-grip svg { fill: currentColor; stroke: none; }
.bx-sep { width: 1px; height: 16px; margin: 0 3px; background: rgba(255,255,255,.18); }
.bx-add { position: absolute; z-index: 6; left: 50%; bottom: -24px; width: 26px; height: 26px; margin-left: -13px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #0062CC; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px -4px rgba(0,122,255,.6); transition: transform .15s ease; animation: bxin .2s ease; }
.bx-add:hover { transform: scale(1.12); }
.bx-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.t-dark .bx-add { border-color: #0B0B0B; }
.bx-logic { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 10px; padding: 5px 9px 5px 7px; border-radius: 8px; background: rgba(0,122,255,.09); color: #0062CC; font: 500 12px/1.2 -apple-system, system-ui, 'Helvetica Neue', sans-serif; letter-spacing: 0; text-transform: none; }
.bx-logic > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-logic svg { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.t-dark .bx-logic { background: rgba(0,122,255,.22); color: #64AAFF; }
.build .bx.editing [contenteditable] { outline: none; cursor: text; border-radius: 4px; background: rgba(0,122,255,.10); box-shadow: 0 0 0 3px rgba(0,122,255,.10); -webkit-user-select: text; user-select: text; caret-color: #007AFF; }
.build .bx.editing .btn [contenteditable] { background: rgba(255,255,255,.18); }
.build .bx.sel:not(.editing) .lt, .build .head.bx.sel:not(.editing) h1, .build .head.bx.sel:not(.editing) .intro { cursor: text; }
.bx-new { animation: bxnew .5s cubic-bezier(.2,.9,.25,1); }
@keyframes bxnew { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bx-line { position: absolute; z-index: 10; height: 3px; background: #007AFF; border-radius: 3px; pointer-events: none; box-shadow: 0 0 0 4px rgba(0,122,255,.16); transition: top .08s ease; }
.bx-line::before, .bx-line::after { content: ''; position: absolute; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid #007AFF; box-sizing: border-box; }
.bx-line::before { left: -6px; } .bx-line::after { right: -6px; }
.hidf span { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 -apple-system, system-ui, sans-serif; color: #6E6E73; border: 1px dashed #C7C7CC; border-radius: 9px; padding: 10px 12px; }
.build .go { cursor: pointer; }

/* a venue's "Is my date open?" under the wedding date (shared/spacecheck.js) */
.spc{margin-top:14px}
.spc-pick{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#F5F5F7;font-size:14px}
.spc-pick b{flex:1;min-width:0;font-weight:600}
.spc-pick button{width:28px;height:28px;border-radius:50%;border:1px solid #E4E4E8;background:#fff;font-size:16px;line-height:1;cursor:pointer;padding:0}
.spc-box{padding:14px;border:1px solid #E4E4E8;border-radius:16px;background:#fff}
