/* Form renderer, shared by the public form page (f.html) and the admin preview */
.fb {
  --fb-bg: #f6f3f2; --fb-card: #fff; --fb-ink: #141414; --fb-muted: #6b6767; --fb-line: #e4dfdd; --fb-err: #c0362c;
  --fb-radius: 18px;
  font-family: var(--font-body, "Aileron", "Helvetica Neue", Arial, sans-serif);
  color: var(--fb-ink); background: var(--fb-bg); min-height: 100vh; padding: 0 0 72px;
  box-sizing: border-box; -webkit-font-smoothing: antialiased; position: relative;
}
.fb *, .fb *::before, .fb *::after { box-sizing: border-box; }
.fb[data-mode="dark"] { --fb-bg: #0d0d0d; --fb-card: #171717; --fb-ink: #f4f0ef; --fb-muted: #a39f9e; --fb-line: #2c2a2a; --fb-err: #ff7b6e; }
@media (prefers-color-scheme: dark) {
  .fb[data-mode="auto"] { --fb-bg: #0d0d0d; --fb-card: #171717; --fb-ink: #f4f0ef; --fb-muted: #a39f9e; --fb-line: #2c2a2a; --fb-err: #ff7b6e; }
}
.fb--embed { min-height: 0; padding-bottom: 28px; border-radius: 16px; overflow: hidden; }

.fb-progress { position: sticky; top: 0; height: 3px; z-index: 5; }
.fb-progress i { display: block; height: 100%; width: 0; background: var(--fb-accent); transition: width .3s ease; }
.fb-cover { height: clamp(120px, 26vw, 220px); background-size: cover; background-position: center; background-color: var(--fb-line); }
.fb-wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.fb-brand { display: flex; align-items: center; gap: 10px; padding: 22px 0 6px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--fb-muted); text-decoration: none; }
.fb-brand img { width: 22px; height: 22px; }

.fb-card { background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 22px 20px; margin-top: 14px; transition: border-color .2s ease; }
.fb-head { border-top: 6px solid var(--fb-accent); margin-top: 16px; }
.fb-title { font-family: var(--font-display, "Agrandir", "Outfit", "Helvetica Neue", Arial, sans-serif); font-size: clamp(26px, 6vw, 36px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.02em; font-weight: 700; }
.fb-desc { white-space: pre-line; color: var(--fb-muted); line-height: 1.6; margin: 0; }
.fb-reqnote { margin: 14px 0 0; font-size: 13px; color: var(--fb-err); }

.fb-label { display: block; font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.fb-req { color: var(--fb-err); margin-left: 4px; }
.fb-help { margin: 0 0 12px; color: var(--fb-muted); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.fb-label + .fb-input, .fb-label + .fb-opts, .fb-label + .fb-scale { margin-top: 10px; }

.fb-input { width: 100%; font: inherit; font-size: 16px; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--fb-line); background: transparent; color: inherit; transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none; }
textarea.fb-input { min-height: 112px; resize: vertical; line-height: 1.5; }
.fb-input::placeholder { color: var(--fb-muted); opacity: .7; }
.fb-input:focus { outline: none; border-color: var(--fb-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fb-accent) 22%, transparent); }
select.fb-input { padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
select.fb-input option { color: #141414; }

.fb-opts { display: grid; gap: 8px; }
.fb-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; border: 1px solid var(--fb-line); border-radius: 12px; cursor: pointer; transition: border-color .2s ease, background .2s ease; line-height: 1.35; }
.fb-opt:hover { border-color: color-mix(in srgb, var(--fb-accent) 55%, var(--fb-line)); }
.fb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fb-mark { width: 22px; height: 22px; border: 2px solid var(--fb-muted); border-radius: 50%; flex: none; display: grid; place-items: center; transition: border-color .2s ease, background .2s ease; }
.fb-opt.is-multi .fb-mark { border-radius: 6px; }
.fb-opt input:checked + .fb-mark { border-color: var(--fb-accent); background: var(--fb-accent); }
.fb-opt:not(.is-multi) input:checked + .fb-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-on-accent); }
.fb-opt.is-multi input:checked + .fb-mark::after { content: ""; width: 6px; height: 11px; border: solid var(--fb-on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.fb-opt:has(input:checked) { border-color: var(--fb-accent); background: color-mix(in srgb, var(--fb-accent) 8%, transparent); }
.fb-opt:has(input:focus-visible) { outline: 2px solid var(--fb-accent); outline-offset: 2px; }

.fb-scale { display: flex; gap: 8px; }
.fb-sc { position: relative; flex: 1 1 0; min-width: 0; }
.fb-sc input { position: absolute; opacity: 0; pointer-events: none; }
.fb-sc span { display: grid; place-items: center; min-height: 50px; border: 1px solid var(--fb-line); border-radius: 12px; font-weight: 600; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.fb-sc:hover span { border-color: color-mix(in srgb, var(--fb-accent) 55%, var(--fb-line)); }
.fb-sc input:checked + span { background: var(--fb-accent); border-color: var(--fb-accent); color: var(--fb-on-accent); }
.fb-sc input:focus-visible + span { outline: 2px solid var(--fb-accent); outline-offset: 2px; }
.fb-scale-lab { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--fb-muted); margin-top: 8px; }

.fb-err { display: none; color: var(--fb-err); font-size: 14px; margin: 10px 0 0; }
.fb-card.has-error { border-color: var(--fb-err); }
.fb-card.has-error .fb-err { display: block; }

.fb-section { padding: 22px 6px 0; }
.fb-section h2 { font-family: var(--font-display, "Agrandir", "Outfit", "Helvetica Neue", Arial, sans-serif); font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.fb-section p { margin: 0; color: var(--fb-muted); line-height: 1.55; white-space: pre-line; }

.fb-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 22px; flex-wrap: wrap; }
.fb-submit { font: inherit; font-weight: 600; font-size: 16px; min-height: 52px; padding: 0 32px; border-radius: 999px; border: 0; background: var(--fb-accent); color: var(--fb-on-accent); cursor: pointer; flex: 1 1 220px; transition: transform .15s ease, opacity .2s ease; }
.fb-submit:hover { transform: translateY(-1px); }
.fb-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.fb-submit:focus-visible, .fb-clear:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 3px; }
.fb-clear { font: inherit; background: none; border: 0; color: var(--fb-muted); cursor: pointer; padding: 12px; text-decoration: underline; }
.fb-banner { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--fb-err); color: var(--fb-err); font-size: 15px; line-height: 1.45; }
.fb-banner.info { border-color: var(--fb-line); color: var(--fb-muted); }
.fb-foot { text-align: center; margin-top: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fb-muted); }
.fb-foot a { color: inherit; }

.fb-done { text-align: center; padding: 44px 22px; }
.fb-done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--fb-accent); margin: 0 auto 18px; display: grid; place-items: center; }
.fb-done .tick::after { content: ""; width: 14px; height: 26px; border: solid var(--fb-on-accent); border-width: 0 4px 4px 0; transform: rotate(45deg) translate(-2px, -2px); }
.fb-done h2 { font-family: var(--font-display, "Agrandir", "Outfit", "Helvetica Neue", Arial, sans-serif); font-size: 26px; margin: 0 0 8px; }
.fb-done p { color: var(--fb-muted); line-height: 1.6; margin: 0 auto; max-width: 440px; white-space: pre-line; }
.fb-done button { margin-top: 20px; }

.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fb * { transition: none !important; } }
@media (max-width: 480px) { .fb-card { padding: 18px 16px; } .fb-scale { gap: 6px; } }

.fb-pay { display:flex; gap:16px; align-items:center; }
.fb-pay-amt { font-family: var(--font-display, "Agrandir", "Outfit", "Helvetica Neue", Arial, sans-serif); font-size: 30px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.fb-pay-txt { color: var(--fb-muted); font-size: 14px; line-height: 1.5; }

.fb-manual { text-align:center; }
.fb-manual h2 { font-family: var(--font-display, "Agrandir", "Outfit", "Helvetica Neue", Arial, sans-serif); font-size: 28px; margin: 0 0 6px; }
.fb-manual-sub, .fb-manual-ins { color: var(--fb-muted); line-height: 1.6; margin: 0 auto 14px; max-width: 440px; white-space: pre-line; }
.fb-manual-imgs { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin: 16px 0; }
.fb-manual-imgs img { width: min(100%, 320px); height: auto; border-radius: 14px; border: 1px solid var(--fb-line); background: #fff; }
.fb-manual-ref { display:grid; gap:4px; margin: 14px auto 0; padding: 12px 14px; border: 1px dashed var(--fb-line); border-radius: 12px; max-width: 360px; }
.fb-manual-ref span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--fb-muted); }
.fb-manual-ref strong { font-size: 20px; letter-spacing: .08em; user-select: all; }
