/* Saudaki · site do piloto */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/young-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/caveat-latin-600-normal.woff2) format("woff2"); }

:root {
  /* Manual de Identidade Saudaki v1.0: cores principais e de apoio */
  --verde: #1F4E37; --terra: #D35400; --azul: #1A5276; --areia: #FDF5E6;
  --tinta: #1C2A23; --basalto: #55635B; --terra-funda: #A84300; --folha: #E3EDE6;
  --terra-clara: #F6DCC6; --azul-claro: #DCE8F0; --linha: #E6D6BA; --linha-forte: #CDB892; --cartao: #FFFCF6; --papel: #F7EBD3;
  --bg: var(--areia); --surface: var(--papel); --raised: var(--cartao); --fg: var(--tinta); --muted: var(--basalto); --line: var(--linha); --soft: var(--papel);
  --atlantic: var(--azul); --atlantic-soft: var(--azul-claro); --cta: var(--verde); --cta-hover: #163A29; --on-cta: #FFFFFF;
  --sun: var(--terra); --leaf: var(--verde); --leaf-soft: var(--folha);
  --focus: var(--verde); --warn: var(--terra-funda); --warn-bg: var(--terra-clara); --err: #B3261E; --err-bg: #FCE8E6; --ok: var(--verde);
  --paper: var(--cartao); --ink: var(--tinta); --rule: var(--linha-forte);
  --shadow: 0 1px 2px rgb(28 42 35 / .08), 0 18px 40px -18px rgb(28 42 35 / .3);
  --shadow-s: 0 1px 2px rgb(28 42 35 / .1), 0 6px 16px -8px rgb(28 42 35 / .26);
  --f-display: "Young Serif", Georgia, "Palatino Linotype", Palatino, serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive; /* só no postal de exemplo, identificado como exemplo */
  --r-s: 8px; --r-m: 14px; --r-l: 20px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --col: 36rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 1rem; line-height: 1.56; min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; max-width: 65ch; }
a { color: var(--azul); }
img, canvas, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Faixas de aviso */
.banner { padding: 10px var(--gut); font-size: .9375rem; text-align: center; line-height: 1.4; }
.banner-test { background: var(--warn-bg); color: var(--warn); }
.banner-demo { background: var(--atlantic-soft); color: var(--atlantic); }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 64rem; margin: 0 auto; padding: 16px var(--gut); display: flex; align-items: center; gap: 12px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-size: 1.4rem; background: none; border: 0; padding: 0; cursor: pointer; }
.brand img { width: auto; height: 40px; }
.brand small { display: block; font-family: var(--f-body); font-size: .75rem; color: var(--muted); letter-spacing: .02em; line-height: 1.1; }
.lang { margin-left: auto; display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--raised); }
.lang button { border: 0; background: transparent; min-width: 48px; min-height: 40px; font-weight: 600; font-size: .9375rem; cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
/* Escolha da língua no site: lista com o nome de cada língua na própria língua */
.langsel { margin-left: auto; position: relative; display: inline-flex; align-items: center; }
.langsel svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--verde); pointer-events: none; }
.langsel select { appearance: none; -webkit-appearance: none; min-height: 40px; padding: 0 34px 0 38px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231F4E37' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 8px; font: 600 .9375rem/1 var(--f-body); color: var(--fg); cursor: pointer; }
.langsel select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Russo e chinês: o Figtree e o Young Serif não têm estes alfabetos, usam-se as letras do sistema */
html[lang="ru-RU"] { --f-display: "Young Serif", Georgia, "Times New Roman", serif; }
html[lang="zh-CN"] { --f-display: "Young Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif; }
html[lang="zh-CN"] { --f-body: "Figtree", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; }
.progress { max-width: var(--col); margin: 0 auto; padding: 0 var(--gut) 10px; display: grid; gap: 6px; }
.progress-bar { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--verde); border-radius: 99px; transition: width .35s ease; }
.progress-label { font-size: .75rem; color: var(--muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 12px; }
#progressName { color: var(--fg); }

main { flex: 1; width: 100%; }
.screen { max-width: var(--col); margin: 0 auto; padding: 22px var(--gut) 120px; display: grid; gap: 18px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); }
.lead { color: var(--muted); font-size: 1.0625rem; }
.note { color: var(--muted); font-size: .9375rem; }
.small { font-size: .875rem; color: var(--muted); }

/* Botões */
.btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 1.0625rem; text-decoration: none; text-align: center; line-height: 1.2; transition: background .15s, transform .1s, border-color .15s; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-cta { background: var(--cta); color: var(--on-cta); }
.btn-cta:hover { background: var(--cta-hover); }
.btn-cta:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--verde); border: 1.5px solid var(--verde); }
.btn-ghost:hover { background: var(--folha); }
.btn-zap { background: #25D366; color: #0B2A17; text-decoration: none; }
.btn-zap:hover { background: #1FBE5A; }
.btn-zap svg { width: 22px; height: 22px; }
.askaddr { margin-top: 2px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .9375rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.row-btns .btn { flex: 1 1 10rem; }

/* Barra de acções em baixo */
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom, 0px)); }
.actions-in { max-width: var(--col); margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.actions .btn-back { flex: 0 0 auto; padding: 0 18px; }
.actions .btn-next { flex: 1; }
.actions .total { font-weight: 700; font-size: 1.0625rem; white-space: nowrap; color: var(--terra-funda); font-variant-numeric: tabular-nums; }
/* O selo "Powered by Netlify" (iframe fixo no canto inferior direito) tapava o botão Continuar: enquanto existir, a barra sobe acima dele */
body:has(#nl-badge-frame) .actions { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

/* Cartões e blocos */
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; display: grid; gap: 12px; }
.card h2 { font-size: 1.3rem; }

/* Início */
.hero { display: grid; gap: 18px; }
.hero h1 { font-size: clamp(2.15rem, 1.4rem + 4vw, 3.3rem); }
.hero h1 em { font-style: normal; color: var(--terra); }
.hero-art { position: relative; padding: 4% 6% 2% 2%; }
.flip { position: relative; perspective: 1800px; transform: rotate(-2deg); }
.flip-in { display: grid; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }
.flip.virado .flip-in { transform: rotateY(180deg); }
.flip-in > .hero-card { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.hero-card { position: relative; aspect-ratio: 3 / 2; background: #FFFDF8; padding: 2.6%; border-radius: 10px; box-shadow: 0 2px 4px rgb(10 40 50 / .12), 0 22px 34px -14px rgb(10 40 50 / .38); overflow: hidden; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.hero-card img.hero-stamp { position: absolute; top: 5%; right: 4.5%; width: 15%; height: auto; object-fit: contain; border-radius: 0; transform: rotate(5deg); filter: drop-shadow(0 2px 3px rgb(0 0 0 / .28)); }
.hero-mark { position: absolute; top: 9%; right: 20%; width: 14%; height: auto; }
.hero-card img.hero-sym { position: absolute; right: 5.5%; bottom: 6%; width: 7%; height: auto; object-fit: contain; border-radius: 0; }
.face-back { transform: rotateY(180deg); container-type: inline-size; color: var(--tinta); background: var(--cartao); display: grid; grid-template-columns: 1.12fr 1px .88fr; gap: 0; padding: 5% 4.5% 4.5%; }
.hb-msg { margin: 0; padding: 0 6% 13% 0; display: flex; flex-direction: column; gap: 1.6cqw; font-family: var(--f-hand); font-size: 3.9cqw; line-height: 1.18; color: #1E3354; text-wrap: pretty; max-width: none; }
.hb-bye { margin-top: auto; }
.hb-div { background: var(--linha-forte); width: 1px; margin: 6% 0; }
.hb-right { padding-left: 8%; display: grid; grid-template-rows: auto auto 1fr auto; min-width: 0; }
.hb-top { display: flex; justify-content: space-between; align-items: flex-start; }
.face-back .hb-carimbo { width: 38%; height: auto; object-fit: contain; border-radius: 0; opacity: .85; transform: rotate(-8deg); margin-top: 3%; }
.face-back .hb-stamp { width: 30%; height: auto; object-fit: contain; border-radius: 0; }
.hb-resp { display: none; font-weight: 600; font-size: 2.2cqw; line-height: 1.25; color: var(--azul); margin-top: 2cqw; }
.hb-addr { align-self: center; display: grid; gap: 1.1cqw; font-weight: 500; font-size: 2.35cqw; line-height: 1.2; letter-spacing: .02em; }
.hb-addr > * { border-bottom: 1px solid var(--linha-forte); padding-bottom: .6cqw; }
.hb-pe { display: flex; gap: 4%; align-items: flex-end; font-weight: 500; font-size: 1.6cqw; line-height: 1.3; color: var(--basalto); }
.face-back canvas.hb-qr { width: 22%; height: auto; flex: none; position: static; max-width: none; }
.hb-pe-txt { display: grid; gap: .5cqw; }
.hb-pe-txt b { color: var(--azul); font-weight: 600; }
.hb-pe-txt span { color: var(--verde); }
.modo-resposta .hb-qr, .modo-resposta .hb-pe-txt b { display: none; }
.face-back .hb-palavra { position: absolute; left: 4.5%; bottom: 4.5%; width: 13%; height: auto; object-fit: contain; border-radius: 0; }
.hb-exemplo { position: absolute; left: 4.5%; top: 2.4%; font-size: 1.5cqw; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--basalto); }
.flipbtn { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: -22px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--verde); color: #FFFFFF; font-weight: 600; font-size: .9375rem; cursor: pointer; box-shadow: var(--shadow-s); }
.flipbtn svg { width: 18px; height: 18px; transition: transform .5s; }
.flip.virado .flipbtn svg { transform: rotate(-180deg); }
.flip.virado .flipbtn { transform: rotate(2deg); }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }
.trust { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.trust li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .9375rem; color: var(--muted); line-height: 1.4; }
.trust svg { width: 22px; height: 22px; color: var(--verde); margin-top: 0; }
.faq { display: grid; gap: 0; }
.faq h2 { font-size: 1.5rem; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; min-height: 56px; display: grid; grid-template-columns: 1fr 24px; align-items: center; gap: 12px; font-weight: 600; padding: 8px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); max-width: 60ch; }
.secure { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: .875rem; color: var(--muted); }
.secure svg { width: 20px; height: 20px; color: var(--verde); margin-top: 1px; }
.next { display: grid; gap: 12px; }
.next h2 { font-size: 1.3rem; }
.next .steps3 li::before { background: var(--leaf); }
.pc.a-processar::after { content: ""; position: absolute; inset: 0; background: rgb(255 255 255 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='14' fill='none' stroke='%231F4E37' stroke-width='4' stroke-dasharray='60 30'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center / 40px no-repeat; }
.hero-art .stamp-hand { display: block; text-align: right; margin-top: 30px; padding-right: 2%; font-family: var(--f-display); font-size: clamp(.95rem, .85rem + .4vw, 1.1rem); color: var(--verde); }
.hero-from { text-align: center; margin-top: -6px; }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps3 li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.steps3 li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--f-body); font-size: 1.1rem; }
.prices { display: grid; gap: 0; }
.prices div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.prices div:last-child { border-bottom: 0; }
.prices b { white-space: nowrap; color: var(--terra-funda); font-weight: 700; font-variant-numeric: tabular-nums; }
.prices .price-normal { color: var(--muted); font-weight: 400; margin-right: 4px; }
.price-launch { margin: 6px 0 0; color: var(--muted); }
.tree-box { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--leaf-soft); border-radius: var(--r-m); padding: 14px; color: var(--fg); }
.tree-box svg { width: 36px; height: 36px; color: var(--verde); }
.resume { border: 1.5px dashed var(--atlantic); }

/* Formulários */
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 600; font-size: .9375rem; }
.field .hint { font-size: .8125rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r-s); border: 1.5px solid var(--linha-forte); background: var(--raised); font-size: 1.0625rem; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--verde); outline: none; box-shadow: 0 0 0 3px var(--folha); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--err); }
.err { color: var(--err); font-size: .875rem; font-weight: 600; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: .9875rem; line-height: 1.45; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--atlantic); }
.check.bad { color: var(--err); }
.two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
@media (max-width: 380px) { .two { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* Fotografias */
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph { position: relative; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: var(--soft); box-shadow: var(--shadow-s); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .n { position: absolute; left: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgb(255 253 248 / .95); color: #1D2A30; font-weight: 700; display: grid; place-items: center; font-size: .95rem; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.ph .x { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(18 32 42 / .78); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.ph .mv { position: absolute; bottom: 6px; display: flex; gap: 6px; left: 6px; right: 6px; justify-content: space-between; }
.ph .mv button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 253 248 / .92); color: #1D2A30; cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; }
.ph .mv button[disabled] { visibility: hidden; }
.ph .lowres { position: absolute; left: 6px; right: 6px; bottom: 52px; background: var(--warn-bg); color: var(--warn); font-size: .75rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; line-height: 1.25; }
.add { aspect-ratio: 1; border: 2px dashed var(--muted); border-radius: var(--r-s); display: grid; place-items: center; align-content: center; gap: 6px; background: var(--raised); cursor: pointer; font-weight: 600; color: var(--fg); text-align: center; padding: 10px; position: relative; }
.add svg { width: 34px; height: 34px; color: var(--verde); }
.add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.busy { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: .9375rem; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--atlantic); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Pré-visualização do postal */
.pcwrap { display: grid; gap: 10px; }
.pc { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.pc img, .pc canvas { position: absolute; width: calc(100% * 156 / 150); height: calc(100% * 106 / 100); left: calc(-100% * 3 / 150); top: calc(-100% * 3 / 100); max-width: none; }
.pc.mini { box-shadow: var(--shadow-s); }
.pc.edit canvas { user-select: none; -webkit-user-select: none; }
.adj-hint { margin: 0; }
.adj { display: grid; gap: 10px; background: var(--raised); border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; }
.adj-which { font-weight: 700; font-size: .9375rem; }
.adj-zoom { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; font-weight: 600; font-size: .9375rem; }
.adj-zoom input { width: 100%; min-height: 32px; accent-color: var(--atlantic); }
.adj-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.adj-btns .btn { flex: 1 1 auto; }
.pc-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9375rem; background: repeating-linear-gradient(135deg, var(--soft) 0 12px, var(--surface) 12px 24px); }
.pc-tabs { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; justify-self: start; background: var(--raised); }
.pc-tabs button { border: 0; background: transparent; min-height: 40px; padding: 0 16px; font-weight: 600; font-size: .9375rem; cursor: pointer; color: var(--muted); }
.pc-tabs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* Mensagem à mão: recorte */
.cropbox { position: relative; width: 100%; background: #222; border-radius: var(--r-s); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.cropbox img { width: 100%; height: auto; pointer-events: none; }
.crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgb(0 0 0 / .5); cursor: move; }
.crop .h { position: absolute; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: #fff; border: 3px solid var(--cta); }
.crop .h.tl { left: 0; top: 0; cursor: nwse-resize; } .crop .h.tr { left: 100%; top: 0; cursor: nesw-resize; }
.crop .h.bl { left: 0; top: 100%; cursor: nesw-resize; } .crop .h.br { left: 100%; top: 100%; cursor: nwse-resize; }
.inkfield { border: 0; margin: 0; padding: 0; min-width: 0; }
.inkfield legend { padding: 0; margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--raised); font-weight: 600; font-size: .9375rem; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .6); }
.dot-orig { background: conic-gradient(#1E3A8A 0 33%, #1A1D22 0 66%, #7A2E2E 0); }
.dot-preto { background: #1C2A23; }
.dot-azul { background: #1E3354; }
.swatch:has(input:checked) { border-color: var(--fg); box-shadow: 0 0 0 1.5px var(--fg); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.adjust { border-top: 1px solid var(--line); padding-top: 4px; }
.adjust summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9375rem; color: var(--atlantic); list-style: none; }
.adjust summary::-webkit-details-marker { display: none; }
.adjust summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin: 0 4px; }
.adjust[open] summary::before { transform: rotate(45deg); }
.adjust-in { display: grid; gap: 12px; padding-bottom: 6px; }
.adjust .hint { font-size: .875rem; color: var(--muted); }
#msgEditor { display: grid; gap: 18px; }
#msgEditor[hidden] { display: none !important; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toggle { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; font-size: .9375rem; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--atlantic); }

/* Árvore */
.choice { display: grid; gap: 12px; }
.opt { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; background: var(--raised); border: 2px solid var(--line); border-radius: var(--r-m); padding: 16px; cursor: pointer; font-weight: 600; }
.opt input { width: 24px; height: 24px; accent-color: var(--leaf); margin: 0; }
.opt .p { font-weight: 700; white-space: nowrap; color: var(--terra-funda); font-variant-numeric: tabular-nums; }
.opt:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); }
.opt.no:has(input:checked) { border-color: var(--fg); background: var(--surface); }

/* Resumo */
.sum { display: grid; gap: 0; }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.sum .tot { border-top: 1.5px solid var(--fg); margin-top: 4px; padding-top: 12px; font-weight: 700; font-size: 1.15rem; }

/* Sobreposição de envio */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgb(11 22 27 / .72); display: grid; place-items: center; padding: var(--gut); }
.overlay .box { background: var(--raised); color: var(--fg); border-radius: var(--r-l); padding: 26px 22px; width: min(26rem, 100%); display: grid; gap: 14px; text-align: center; box-shadow: var(--shadow); }
.overlay .bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.overlay .bar span { display: block; height: 100%; width: 0; background: var(--cta); transition: width .3s ease; }

.alert { border-radius: var(--r-s); padding: 12px 14px; font-size: .9375rem; line-height: 1.45; }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--leaf-soft); color: var(--fg); }
.alert-warn { background: var(--terra-clara); color: var(--terra-funda); }

.done-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); display: grid; place-items: center; }
.done-mark svg { width: 46px; height: 46px; }
.code { font-family: var(--f-body); font-weight: 700; letter-spacing: .08em; }

/* Rodapé */
.foot { border-top: 1px solid var(--line); padding: 22px var(--gut) calc(110px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .875rem; }
.foot.nobar { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
body:has(#nl-badge-frame) .foot { padding-bottom: calc(166px + env(safe-area-inset-bottom, 0px)); }
body:has(#nl-badge-frame) .foot.nobar { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
.foot-in { max-width: var(--col); margin: 0 auto; display: grid; gap: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--azul); }

/* Páginas legais */
.legal { max-width: 44rem; margin: 0 auto; padding: 26px var(--gut) 40px; display: grid; gap: 16px; }
.legal section { display: grid; gap: 14px; }
.legal h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.3rem); }
.legal h2 { font-size: 1.15rem; font-family: var(--f-body); font-weight: 700; margin-top: 8px; }
.legal ol { padding-left: 1.3rem; display: grid; gap: 12px; margin: 0; }
.legal li p { margin-top: 8px; }
.legal .fill { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }

.msg-opts { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
#msgTextBlock textarea { min-height: 170px; font-size: 1.0625rem; }
.sigfield { margin-top: -4px; padding-left: 38px; }
.framefield { border: 0; padding: 0; margin: 0; }
.dot-none { background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 7px); }
.dot-branca { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px #B9B2A6 !important; }
/* Formato da frente: pequeno rectângulo deitado ou de pé */
.swatch .dot-or { border-radius: 3px; background: var(--verde); box-shadow: none; }
.swatch .dot-h { width: 24px; height: 16px; }
.swatch .dot-v { width: 16px; height: 24px; margin: 0 4px; }
.pc.vertical { aspect-ratio: 2 / 3; width: min(100%, 300px); margin: 0 auto; }
.pc.vertical img, .pc.vertical canvas { width: calc(100% * 106 / 100); height: calc(100% * 156 / 150); left: calc(-100% * 3 / 100); top: calc(-100% * 3 / 150); }
.modo-resposta .hb-resp { display: block; }
#sumTotal { color: var(--terra-funda); font-variant-numeric: tabular-nums; }
.lang button[aria-pressed="true"] { background: var(--verde); color: #FFFFFF; }
.sugcard { display: grid; gap: 14px; border-left: 4px solid var(--verde); }
.sugcard p { line-height: 1.55; }
