/*
 * Face Design 2.0 — base visual (manual de marca v2.1) com Liquid Glass.
 * Duas camadas, como nas diretrizes de materiais da Apple:
 *   - conteúdo (cartões): "material" fosco translúcido, com borda de luz;
 *   - controles e navegação: Liquid Glass (mais claro, com brilho que segue o dedo).
 * Dourado só na ação principal. Alvos de toque com no mínimo 44 px.
 * Safari/iOS: vidro fosco. Chromium: refração real via fd-glass.js (.lg-refract no <html>).
 * Só carregada pelas telas de public/v2/.
 */
@import url('/assets/brand/face-design/brand-tokens.css');

@view-transition { navigation: auto; }

:root {
  --bg: #11100E;
  --surface: var(--fd-graphite);
  --surface-2: var(--fd-graphite-2);
  --line: rgba(237, 230, 214, 0.09);
  --text: var(--fd-ivory);
  --text-2: #B7B1A6;
  --text-3: #8A8478;
  --accent: var(--fd-gold);
  --accent-hi: var(--fd-gold-hi);
  --danger: #E89A8A;
  --success: #9BD3AE;

  /* Material de conteúdo (cartões) */
  --mat: rgba(40, 36, 31, 0.46);
  --mat-strong: rgba(48, 43, 37, 0.58);
  --mat-blur: 30px;
  --mat-shadow: 0 1px 1px rgba(0,0,0,.25), 0 18px 48px -12px rgba(0,0,0,.55);

  /* Liquid Glass (controles) */
  --glass-tint: rgba(255, 250, 240, 0.07);
  --glass-tint-strong: rgba(255, 250, 240, 0.12);
  --glass-blur: 22px;
  --glass-sat: 150%;
  --glass-spec: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.42), 0 2px 6px rgba(0, 0, 0, 0.25);

  /* Ouro da ação principal: champanhe com relevo sutil (sem degradê metálico) */
  --gold-face: linear-gradient(180deg, #E4CA95 0%, #D6B880 48%, #C5A46B 100%);

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --spring-soft: cubic-bezier(.22, 1.12, .36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(120% 60% at 50% -12%, rgba(210,180,124,.13), transparent 62%),
    radial-gradient(80% 50% at 110% 105%, rgba(111,84,40,.20), transparent 60%),
    linear-gradient(180deg, #171512 0%, var(--bg) 55%, #0E0D0B 100%);
  background-attachment: fixed;
  min-height: 100%;
}
body {
  min-height: 100dvh;
  background: transparent;
  color: var(--text);
  font-family: var(--fd-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 12px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Luz ambiente: brilho dourado suave atrás do vidro ── */
.fd-ambient { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; overflow: hidden; }
.fd-ambient::before, .fd-ambient::after, .fd-ambient i {
  content: ''; position: absolute; border-radius: 50%; filter: blur(60px);
}
.fd-ambient::before { width: 58vmax; height: 58vmax; left: 8%; top: -6%; background: radial-gradient(circle, rgba(210,180,124,.30), transparent 66%); animation: fd-drift-a 26s var(--ease) infinite alternate; }
.fd-ambient::after { width: 52vmax; height: 52vmax; right: -6%; top: 38%; background: radial-gradient(circle, rgba(154,122,72,.30), transparent 66%); animation: fd-drift-b 32s var(--ease) infinite alternate; }
.fd-ambient i { width: 40vmax; height: 40vmax; left: 22%; bottom: -8%; background: radial-gradient(circle, rgba(242,227,188,.12), transparent 66%); animation: fd-drift-a 38s var(--ease) infinite alternate-reverse; }
@keyframes fd-drift-a { to { transform: translate3d(8vmax, 7vmax, 0) scale(1.08); } }
@keyframes fd-drift-b { to { transform: translate3d(-7vmax, -6vmax, 0) scale(.94); } }

/* ── Tipografia ── */
.fd-display { font-weight: 300; font-size: clamp(28px, 7.4vw, 38px); letter-spacing: -.012em; line-height: 1.12; }
.fd-title { font-weight: 500; font-size: 21px; letter-spacing: -.006em; line-height: 1.25; }
.fd-subtitle { font-weight: 500; font-size: 17px; letter-spacing: -.004em; }
.fd-eyebrow { font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.fd-body { color: var(--text-2); }
.fd-small { font-size: 13px; color: var(--text-2); }
.fd-gold { color: var(--accent-hi); }

/* ── Marca ── */
.fd-brand-name { font-weight: 400; font-size: 16px; letter-spacing: .02em; color: var(--accent-hi); }
.fd-lockup { width: min(250px, 68vw); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 24px rgba(210,180,124,.18)); }

/* ── Layout ── */
.fd-shell, .fd-screen { max-width: 560px; margin: 0 auto; padding: calc(108px + var(--safe-top)) var(--s4) calc(140px + var(--safe-bottom)); }
.fd-row { display: flex; align-items: center; gap: var(--s3); }
.fd-spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.fd-center-screen { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--s6) + var(--safe-top)) var(--s5) calc(var(--s6) + var(--safe-bottom)); }

/* ══════════════ BORDA DE LUZ (compartilhada por vidro e material) ══════════════ */
.lg, .fd-card, .fd-card-hero, .fd-proc, .fd-receipt { position: relative; isolation: isolate; }
.lg::after, .fd-card::after, .fd-card-hero::after, .fd-proc::after, .fd-receipt::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255,255,255,.34), rgba(255,255,255,.08) 28%, rgba(255,255,255,0) 52%, rgba(255,255,255,.04) 74%, rgba(242,227,188,.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

/* ══════════════ CAMADA DE CONTEÚDO: material translúcido ══════════════ */
.fd-card {
  border-radius: var(--r-lg);
  padding: var(--s5);
  background: linear-gradient(180deg, var(--mat-strong), var(--mat));
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(160%);
  backdrop-filter: blur(var(--mat-blur)) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), var(--mat-shadow);
}
.fd-card-hero {
  overflow: hidden;
  border-radius: var(--r-xl); padding: var(--s6);
  background:
    radial-gradient(90% 110% at 100% 0%, rgba(210,180,124,.20), transparent 58%),
    linear-gradient(180deg, rgba(52,46,38,.55), rgba(30,27,23,.50));
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(170%);
  backdrop-filter: blur(var(--mat-blur)) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), var(--mat-shadow);
}

/* ══════════════ CAMADA DE CONTROLES: Liquid Glass ══════════════ */
.lg {
  background: linear-gradient(180deg, var(--glass-tint-strong), var(--glass-tint));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.08);
  box-shadow: inset 0 1px 0.5px var(--glass-spec), inset 0 -1px 1px rgba(255,255,255,.06), var(--glass-shadow);
}
/* Brilho especular que segue o dedo (--mx/--my vêm de fd-glass.js) */
.lg::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(120% 80% at var(--mx, 24%) var(--my, -12%), rgba(255,255,255,.18), transparent 52%),
    radial-gradient(90% 60% at 100% 118%, rgba(242,227,188,.07), transparent 60%);
}
.lg-panel { border-radius: var(--r-xl); }
/* Vidro claro: controles sobre fotos (escurece levemente para manter leitura) */
.lg-clear { --glass-tint: rgba(12,11,9,.22); --glass-tint-strong: rgba(12,11,9,.32); --glass-blur: 14px; --glass-sat: 115%; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
/* Vidro de navegação: base escura, legível sobre qualquer conteúdo */
.lg-nav { --glass-tint: rgba(22,20,17,.50); --glass-tint-strong: rgba(36,33,28,.60); --glass-sat: 135%; }
.lg-refract .lg.lg-lens {
  -webkit-backdrop-filter: url(#fd-lens) blur(calc(var(--glass-blur) * .55)) saturate(var(--glass-sat)) brightness(1.08);
  backdrop-filter: url(#fd-lens) blur(calc(var(--glass-blur) * .55)) saturate(var(--glass-sat)) brightness(1.08);
}

/* ══════════════ BOTÕES ══════════════ */
.fd-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 var(--s6);
  border-radius: var(--pill); border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .4s var(--spring), box-shadow .25s var(--ease), filter .2s, opacity .2s;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.fd-btn:active, .fd-btn.is-pressed { transform: scale(.965); }
.fd-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
/* Ação principal: único ouro da tela, com relevo sutil */
.fd-btn-primary {
  color: #1B150A;
  background: var(--gold-face);
  box-shadow:
    inset 0 1px 0 rgba(255,249,232,.9),
    inset 0 -1px 0 rgba(111,84,40,.45),
    inset 0 0 0 1px rgba(154,122,72,.30),
    0 1px 2px rgba(0,0,0,.45),
    0 10px 26px -8px rgba(210,180,124,.55);
}
.fd-btn-primary::before {
  content: ''; position: absolute; inset: 1px 1px 50%; border-radius: var(--pill) var(--pill) 40% 40% / var(--pill) var(--pill) 12px 12px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0));
}
.fd-btn-primary:hover { filter: brightness(1.03); }
/* Secundário: vidro neutro (sem ouro) */
.fd-btn-glass {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,250,240,.13), rgba(255,250,240,.06));
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,.42), inset 0 0 0 0.5px rgba(255,255,255,.16), 0 6px 18px rgba(0,0,0,.28);
}
.fd-btn-secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(237,230,214,.3); }
.fd-btn-ghost { background: transparent; color: var(--text-2); font-weight: 500; padding: 0 var(--s3); }
.fd-btn-block { width: 100%; }
.fd-btn-lg { min-height: 56px; font-size: 16px; }
.fd-btn-sm { min-height: var(--tap); padding: 0 var(--s4); font-size: 13.5px; }
.fd-link { background: none; border: 0; color: var(--accent-hi); cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ── Campos (vidro afundado) ── */
.fd-field { display: block; }
.fd-label { display: block; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); margin: 0 0 var(--s2) var(--s2); }
.fd-input {
  width: 100%; min-height: 52px; padding: 0 var(--s5);
  border: 0; border-radius: var(--r);
  background: rgba(0,0,0,.28);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5), inset 0 0 0 0.5px rgba(255,255,255,.10), 0 1px 0 rgba(255,255,255,.05);
  font-size: 16px; color: var(--text); outline: none;
  transition: box-shadow .2s var(--ease), background .2s;
}
.fd-input::placeholder { color: var(--text-3); }
.fd-input:focus { background: rgba(0,0,0,.36); box-shadow: inset 0 1px 3px rgba(0,0,0,.5), inset 0 0 0 1px rgba(237,230,214,.45), 0 0 0 4px rgba(237,230,214,.08); }
.fd-input-wrap { position: relative; display: block; }
.fd-input-wrap .fd-input { padding-right: 80px; }
.fd-input-action {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  min-width: 64px; height: var(--tap); border: 0; border-radius: var(--pill); cursor: pointer;
  background: rgba(255,250,240,.08); color: var(--text-2); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  box-shadow: inset 0 0.5px 0 rgba(255,255,255,.25);
}

/* ── Mensagens ── */
.fd-alert { border-radius: var(--r); padding: var(--s3) var(--s4); font-size: 14px; line-height: 1.45; }
.fd-alert-error { background: rgba(232,154,138,.10); box-shadow: inset 0 0 0 1px rgba(232,154,138,.35); color: #F4C2B7; }
.fd-alert-ok { background: rgba(155,211,174,.10); box-shadow: inset 0 0 0 1px rgba(155,211,174,.35); color: #C7E8D2; }
.fd-alert-info { background: rgba(255,250,240,.05); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.14); color: var(--text-2); }

/* ── Lista, chips, medidor ── */
.fd-list { list-style: none; }
.fd-list > li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-bottom: 0.5px solid rgba(237,230,214,.10); }
.fd-list > li:last-child { border-bottom: 0; }
.who { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.who b { font-weight: 550; font-size: 15px; }
.who span { font-size: 13px; color: var(--text-2); }
.fd-list-item { display: flex; align-items: center; gap: var(--s3); min-height: 68px; padding: var(--s3) 0; border-bottom: 0.5px solid rgba(237,230,214,.10); }
.fd-list-item:last-child { border-bottom: 0; }
.fd-thumb { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); flex: none; object-fit: cover; box-shadow: 0 0 0 0.5px rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.35); }
.fd-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 46vw; padding: 0 var(--s3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none;
  border-radius: var(--pill); font-size: 12px; font-weight: 500; color: var(--text-2);
  background: rgba(255,250,240,.06); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.16);
}
.fd-meter { height: 6px; border-radius: var(--pill); background: rgba(0,0,0,.35); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); overflow: hidden; }
.fd-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(237,230,214,.55), var(--fd-ivory)); box-shadow: 0 0 10px rgba(237,230,214,.35); }
.fd-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--pill); font-size: 11px; font-weight: 600; color: var(--text); background: rgba(255,250,240,.10); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.2); }

/* ══════════════ NAVEGAÇÃO ══════════════ */
/* Topo sem barra sólida: o conteúdo esmaece ao passar por baixo (scroll edge) */
.fd-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--s3) + var(--safe-top)) var(--s4) var(--s3);
  pointer-events: none; view-transition-name: fd-topbar;
}
.fd-topbar > * { pointer-events: auto; }
.fd-topbar::before {
  content: ''; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(17,16,14,.9) 0%, rgba(17,16,14,.55) 55%, rgba(17,16,14,0) 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask: linear-gradient(180deg, #000 50%, transparent); mask: linear-gradient(180deg, #000 50%, transparent);
}
.fd-brand-pill { display: inline-flex; align-items: center; gap: 10px; height: var(--tap); padding: 0 var(--s4) 0 var(--s3); border-radius: var(--pill); }
.fd-brand-pill img { width: 28px; height: 28px; display: block; object-fit: contain; }
.fd-avatar { width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; color: var(--text); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.fd-round { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.fd-round svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fd-topbar-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 15px; font-weight: 500; letter-spacing: .01em; pointer-events: none; }

/* Barra inferior: pílula de vidro flutuante, câmera no centro (sem sobrepor abas) */
.fd-tabbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(14px + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px;
  padding: 6px; border-radius: var(--pill);
  view-transition-name: fd-tabbar;
  transition: padding .35s var(--ease);
}
.fd-tab {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 62px; height: 54px; border: 0; border-radius: var(--pill); background: none; cursor: pointer;
  color: var(--text-2); font-size: 10px; font-weight: 500; letter-spacing: .02em;
  transition: color .25s, width .35s var(--ease), height .35s var(--ease);
}
.fd-tab svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fd-tab[aria-current="page"] { color: var(--text); }
.fd-tab-drop {
  position: absolute; z-index: 0; top: 6px; left: 6px; width: 62px; height: 54px; border-radius: var(--pill);
  background: linear-gradient(180deg, rgba(255,250,240,.16), rgba(255,250,240,.08));
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,.45), inset 0 0 0 0.5px rgba(255,255,255,.18);
  transition: transform .55s var(--spring), width .35s var(--ease), height .35s var(--ease);
}
.fd-tab-cam {
  position: relative; isolation: isolate; z-index: 1; flex: none;
  width: 54px; height: 54px; margin: 0 6px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #1B150A;
  transition: transform .45s var(--spring), width .35s var(--ease), height .35s var(--ease);
}
.fd-tab-cam svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fd-tab-cam::before { border-radius: 50% 50% 40% 40% / 50% 50% 14px 14px; }
/* Minimizada ao rolar para baixo */
.is-scrolled-down .fd-tab { width: 50px; height: 44px; }
.is-scrolled-down .fd-tab span { display: none; }
.is-scrolled-down .fd-tab-drop { width: 50px; height: 44px; }
.is-scrolled-down .fd-tab-cam { width: 44px; height: 44px; }

/* ══════════════ SELETOR EM PÍLULA (iOS): desliza e pode ser arrastado ══════════════ */
.fd-seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; border-radius: var(--pill);
  background: rgba(0,0,0,.30);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.55), inset 0 0 0 0.5px rgba(255,255,255,.08), 0 1px 0 rgba(255,255,255,.04);
  touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.fd-seg button {
  position: relative; z-index: 1; min-height: var(--tap); padding: 0 var(--s3);
  border: 0; border-radius: var(--pill); background: none; cursor: pointer;
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .25s, transform .3s var(--spring);
}
.fd-seg button[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.fd-seg-drop {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--pill);
  background: linear-gradient(180deg, rgba(255,250,240,.22), rgba(255,250,240,.11));
  -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,.55), inset 0 0 0 0.5px rgba(255,255,255,.2), 0 6px 16px rgba(0,0,0,.4);
  transition: transform .55s var(--spring), width .35s var(--ease), scale .3s var(--spring);
}
.fd-seg.is-dragging .fd-seg-drop { transition: width .35s var(--ease), scale .3s var(--spring); scale: 1.06; }
.fd-seg-sm button { font-size: 13px; padding: 0 var(--s2); }

/* Ajuste fino: trilho com área de toque de 44 px e alça de vidro grande */
.fd-range { -webkit-appearance: none; appearance: none; width: 100%; height: var(--tap); background: transparent; cursor: pointer; --val: 40%; }
.fd-range::-webkit-slider-runnable-track { height: 8px; border-radius: var(--pill); background: linear-gradient(90deg, rgba(237,230,214,.7) var(--val), rgba(0,0,0,.4) var(--val)); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.fd-range::-moz-range-track { height: 8px; border-radius: var(--pill); background: rgba(0,0,0,.4); }
.fd-range::-moz-range-progress { height: 8px; border-radius: var(--pill); background: rgba(237,230,214,.7); }
.fd-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff, #E9E3D7 60%, #CFC8BA);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.45), inset 0 -1px 2px rgba(0,0,0,.15);
  transition: transform .3s var(--spring);
}
.fd-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.fd-range::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #EEE8DC; box-shadow: 0 4px 12px rgba(0,0,0,.45); }

/* ══════════════ FLUXO DA CONSULTA ══════════════ */
.fd-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.fd-step { position: relative; border: 0; background: none; cursor: pointer; padding: 6px 0 4px; min-height: var(--tap); text-align: left; color: var(--text-3); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.fd-step::before { content: ''; display: block; height: 4px; border-radius: var(--pill); margin-bottom: var(--s2); background: rgba(237,230,214,.10); transition: background .45s var(--ease), box-shadow .45s; }
.fd-step b { font-weight: 600; margin-right: 4px; }
.fd-step.is-done { color: var(--text-2); }
.fd-step.is-done::before { background: rgba(237,230,214,.45); }
.fd-step[aria-current="step"] { color: var(--text); }
.fd-step[aria-current="step"]::before { background: var(--fd-ivory); box-shadow: 0 0 12px rgba(237,230,214,.45); }

/* Etapas deslizam (a direção segue o avanço/volta) */
.fd-pane { display: none; }
.fd-pane.is-on { display: block; }
.fd-pane.in-fwd { animation: fd-in-fwd .55s var(--spring-soft) both; }
.fd-pane.in-back { animation: fd-in-back .55s var(--spring-soft) both; }
.fd-pane.out-fwd { animation: fd-out-fwd .22s var(--ease) both; }
.fd-pane.out-back { animation: fd-out-back .22s var(--ease) both; }
@keyframes fd-in-fwd { from { opacity: 0; transform: translateX(44px) scale(.985); } }
@keyframes fd-in-back { from { opacity: 0; transform: translateX(-44px) scale(.985); } }
@keyframes fd-out-fwd { to { opacity: 0; transform: translateX(-28px) scale(.985); } }
@keyframes fd-out-back { to { opacity: 0; transform: translateX(28px) scale(.985); } }

/* Guia da foto */
.fd-guide { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(80% 60% at 50% 40%, rgba(237,230,214,.07), transparent 70%), #0E0D0B; box-shadow: 0 0 0 0.5px rgba(255,255,255,.12), var(--mat-shadow); }
.fd-guide img, .fd-guide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-guide video { transform: scaleX(-1); }
.fd-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.fd-guide .oval { position: absolute; left: 50%; top: 45%; width: 62%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); box-shadow: 0 0 0 999px rgba(12,11,9,.45), 0 0 30px rgba(255,255,255,.12) inset; }
.fd-guide .hint { position: absolute; left: 50%; bottom: var(--s4); transform: translateX(-50%); height: 38px; padding: 0 var(--s4); border-radius: var(--pill); display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.fd-guide .hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.fd-checks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.fd-checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.fd-checks li::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,250,240,.10) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EDE6D6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.2); }

/* Procedimento: cartão de material + seletor de dose em pílula (alvos de 44 px) */
.fd-procs { display: grid; gap: var(--s3); }
.fd-proc {
  padding: var(--s4); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--mat-strong), var(--mat));
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(160%); backdrop-filter: blur(var(--mat-blur)) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--mat-shadow);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.fd-proc-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.fd-proc .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); background: rgba(255,250,240,.06); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.12); transition: color .3s, background .3s; }
.fd-proc .ic svg { width: 24px; height: 24px; }
.fd-proc b { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.fd-proc small { display: block; font-size: 12.5px; color: var(--text-3); transition: color .3s; }
.fd-proc.is-on { background: linear-gradient(180deg, rgba(60,53,44,.62), rgba(42,38,32,.56)); box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 0 0 0.5px rgba(237,230,214,.22), var(--mat-shadow); }
.fd-proc.is-on .ic { color: var(--text); background: rgba(255,250,240,.12); }
.fd-proc.is-on small { color: var(--text-2); }
.fd-proc:not(.is-on) .fd-seg-drop { background: rgba(255,250,240,.06); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.12); -webkit-backdrop-filter: none; backdrop-filter: none; }
.fd-proc:not(.is-on) .fd-seg button[aria-pressed="true"] { color: var(--text-2); font-weight: 500; }

/* Barra de ação flutuante (dentro de um fluxo) */
.fd-actionbar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: var(--s2); padding: 7px; border-radius: var(--pill); view-transition-name: fd-tabbar; }
.fd-actionbar .fd-btn { min-height: 52px; padding: 0 var(--s5); }
.fd-actionbar .grow { flex: 1; }
.fd-actionbar-note { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 100%; padding: 5px 12px; border-radius: var(--pill); font-size: 12px; color: var(--text-2); background: rgba(17,16,14,.66); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.12); }
.fd-actionbar-note:empty { display: none; }

/* Gerando: linha de escaneamento desce lendo os pontos do rosto; na 2ª passada revela o resultado */
.fd-gen { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; background: #000; box-shadow: 0 0 0 0.5px rgba(255,255,255,.12), var(--mat-shadow); --scan: 0%; --mesh: 0%; --reveal: 0%; }
.fd-gen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-gen .before { transition: filter .8s var(--ease); }
.fd-gen.is-scanning .before { filter: brightness(.78) saturate(.85); }
.fd-gen .after { clip-path: inset(0 0 calc(100% - var(--reveal)) 0); }
.fd-gen.is-ready .after { clip-path: inset(0); transition: clip-path .4s var(--ease); }
.fd-scan { position: absolute; left: 0; right: 0; top: var(--scan); height: 0; opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 3; }
.fd-gen.is-scanning .fd-scan { opacity: 1; }
.fd-scan::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: linear-gradient(180deg, transparent, rgba(242,227,188,.07) 55%, rgba(242,227,188,.24)); }
.fd-scan::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,247,230,.9) 12%, #fff 50%, rgba(255,247,230,.9) 88%, transparent); box-shadow: 0 0 10px rgba(255,240,210,.95), 0 0 30px rgba(242,227,188,.6); }
.fd-scan i { position: absolute; top: -5px; width: 10px; height: 10px; border: 1.5px solid #fff; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 8px rgba(255,255,255,.8); }
.fd-scan i:first-child { left: 8px; } .fd-scan i:last-child { right: 8px; }
.fd-mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; clip-path: inset(0 0 calc(100% - var(--mesh)) 0); transition: opacity .7s var(--ease); }
.fd-mesh path { fill: none; stroke: rgba(255,255,255,.42); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.fd-mesh .dash { stroke-dasharray: 3 4; stroke: rgba(255,255,255,.3); }
.fd-mesh .thirds { stroke: rgba(242,227,188,.7); stroke-dasharray: 2 5; opacity: 0; transition: opacity .5s var(--ease); }
.fd-gen.is-calc .fd-mesh .thirds { opacity: 1; }
.fd-pts { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity .7s var(--ease); }
.fd-pt { position: absolute; left: var(--x); top: var(--y); width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 0 10px rgba(255,255,255,.85); transform: scale(0); transition: transform .4s var(--spring); }
.fd-pt.on { transform: scale(1); }
.fd-pt.zone::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 1px solid rgba(242,227,188,.9); opacity: 0; transform: scale(.4); }
.fd-gen.is-calc .fd-pt.zone::after, .fd-gen.is-applying .fd-pt.zone::after { opacity: 1; animation: fd-ping 1.4s var(--ease) infinite; }
@keyframes fd-ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.fd-hud { position: absolute; z-index: 4; top: var(--s3); left: var(--s3); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; transition: opacity .6s var(--ease); }
.fd-zone-label { height: 26px; padding: 0 10px; border-radius: var(--pill); display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; opacity: 0; transform: translateX(-8px); transition: opacity .4s var(--ease), transform .55s var(--spring); }
.fd-zone-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 8px var(--accent); }
.fd-zone-label.on { opacity: 1; transform: none; }
.fd-gen.is-settling .fd-mesh, .fd-gen.is-settling .fd-pts, .fd-gen.is-ready .fd-mesh, .fd-gen.is-ready .fd-pts { opacity: 0; }
.fd-gen.is-settling .fd-hud, .fd-gen.is-ready .fd-hud { opacity: 0; }
.fd-gen .status { position: absolute; z-index: 5; left: 50%; bottom: var(--s4); transform: translateX(-50%); min-width: 230px; padding: 10px var(--s5) 12px; border-radius: var(--r-lg); text-align: center; font-size: 13.5px; font-weight: 500; }
.fd-gen .status .bar { display: block; height: 3px; margin-top: 8px; border-radius: var(--pill); background: rgba(255,255,255,.18); overflow: hidden; }
.fd-gen .status .bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.8); }

/* ══════════════ RESULTADO ══════════════ */
.fd-compare { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; background: #000; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-shadow: 0 0 0 0.5px rgba(255,255,255,.12), var(--mat-shadow); }
.fd-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fd-compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.fd-compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 1.5px; transform: translateX(-50%); background: linear-gradient(180deg, transparent, rgba(255,255,255,.9) 18%, rgba(255,255,255,.9) 82%, transparent); box-shadow: 0 0 12px rgba(0,0,0,.4); }
.fd-compare .knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: grab; }
.fd-compare .knob svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.fd-compare .tag { position: absolute; top: var(--s3); height: 30px; padding: 0 var(--s3); border-radius: var(--pill); display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.fd-compare .tag.l { left: var(--s3); }
.fd-compare .tag.r { right: var(--s3); }

.fd-variants { display: flex; gap: var(--s3); overflow-x: auto; padding: 8px 4px; scrollbar-width: none; }
.fd-variants::-webkit-scrollbar { display: none; }
.fd-variant { flex: none; width: 76px; border: 0; padding: 0; background: none; cursor: pointer; color: var(--text-3); font-size: 12px; text-align: center; }
.fd-variant img { width: 76px; height: 94px; object-fit: cover; border-radius: var(--r); margin-bottom: 6px; box-shadow: 0 0 0 0.5px rgba(255,255,255,.14); opacity: .7; transition: opacity .3s, box-shadow .3s, transform .4s var(--spring); }
.fd-variant[aria-pressed="true"] { color: var(--text); }
.fd-variant[aria-pressed="true"] img { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px rgba(237,230,214,.9), 0 10px 24px rgba(0,0,0,.45); transform: translateY(-2px); }

/* Compartilhar: blocos de vidro com ícone próprio e descrição */
.fd-share { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.fd-share-item { display: flex; align-items: center; gap: var(--s3); min-height: 68px; padding: var(--s3); border: 0; border-radius: var(--r-lg); cursor: pointer; text-align: left; color: var(--text); transition: transform .4s var(--spring); }
.fd-share-item:active { transform: scale(.97); }
.fd-share-item .ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,250,240,.16), rgba(255,250,240,.06)); box-shadow: inset 0 1px 0.5px rgba(255,255,255,.4), inset 0 0 0 0.5px rgba(255,255,255,.14); }
.fd-share-item .ico svg { width: 24px; height: 24px; }
.fd-share-item b { display: block; font-size: 14px; font-weight: 600; }
.fd-share-item small { display: block; font-size: 11.5px; color: var(--text-2); line-height: 1.3; }

/* Orçamento como recibo premium */
.fd-receipt {
  --cut: 112px;
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s5) var(--s5);
  background:
    radial-gradient(100% 60% at 100% 0%, rgba(210,180,124,.12), transparent 60%),
    linear-gradient(180deg, rgba(56,50,42,.60), rgba(34,31,27,.56));
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(170%); backdrop-filter: blur(var(--mat-blur)) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), var(--mat-shadow);
  -webkit-mask: radial-gradient(circle 11px at 0 calc(100% - var(--cut)), transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% calc(100% - var(--cut)), transparent 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 calc(100% - var(--cut)), transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% calc(100% - var(--cut)), transparent 97%, #000) right / 51% 100% no-repeat;
}
.fd-receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s5); }
.fd-receipt-head img { width: 30px; opacity: .9; }
.fd-receipt-head .fd-title { margin-top: 4px; }
.fd-receipt-lines { list-style: none; margin-top: var(--s4); }
.fd-receipt-lines li { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s3) 0; transition: opacity .3s; }
.fd-receipt-lines li + li { border-top: 0.5px solid rgba(237,230,214,.10); }
.fd-receipt-lines .what { flex: 1; min-width: 0; }
.fd-receipt-lines .what b { display: block; font-weight: 500; font-size: 15px; }
.fd-receipt-lines .what small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.fd-receipt-lines .val { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
/* Fora do Plano B: riscado, mas legível */
.fd-receipt-lines li.is-off .what b, .fd-receipt-lines li.is-off .val { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: rgba(237,230,214,.75); }
.fd-receipt-lines .off-tag { display: none; margin-top: 6px; }
.fd-receipt-lines li.is-off .off-tag { display: inline-flex; }
.fd-perf { position: relative; height: 0; margin: var(--s4) calc(var(--s5) * -1) 0; border-top: 1.5px dashed rgba(237,230,214,.20); }
.fd-receipt-total { display: flex; justify-content: space-between; align-items: flex-end; padding-top: var(--s5); }
.fd-receipt-total .amount { font-weight: 300; font-size: 36px; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.fd-receipt-total .amount small { font-size: 16px; font-weight: 400; margin-right: 4px; color: var(--text-2); }
.fd-receipt-note { margin-top: var(--s3); font-size: 12px; color: var(--text-3); }

/* Orçamento: interruptor (iOS), editor, avulso e pagamento */
.fd-switch { position: relative; flex: none; width: 51px; height: 31px; border: 0; border-radius: var(--pill); cursor: pointer; padding: 0; background: rgba(0,0,0,.38); box-shadow: inset 0 1px 3px rgba(0,0,0,.55), inset 0 0 0 0.5px rgba(255,255,255,.12); transition: background .3s var(--ease); }
.fd-switch::before { content: ''; position: absolute; inset: -7px -2px; }
.fd-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff, #ECE6DA 60%, #D6CFC1); box-shadow: 0 3px 8px rgba(0,0,0,.4); transition: transform .45s var(--spring); }
.fd-switch[aria-checked="true"] { background: rgba(155,211,174,.55); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.2); }
.fd-switch[aria-checked="true"]::after { transform: translateX(20px); }
.fd-receipt-lines li.has-switch { align-items: center; }
.fd-receipt-sub { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s5); }
.fd-receipt-sub .fd-small { font-weight: 500; }
.fd-edit-row { padding: var(--s3) 0; }
.fd-edit-row + .fd-edit-row { border-top: 0.5px solid rgba(237,230,214,.10); }
.fd-edit-top { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.fd-edit-top b { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; }
.fd-edit-ctrls { display: grid; grid-template-columns: 1fr 112px; gap: var(--s2); align-items: center; }
.fd-money { position: relative; display: block; }
.fd-money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-3); pointer-events: none; }
.fd-money .fd-input { min-height: 52px; padding: 0 12px 0 38px; border-radius: var(--pill); font-variant-numeric: tabular-nums; }
.fd-remove { width: var(--tap); height: var(--tap); flex: none; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #F4C2B7; background: rgba(232,154,138,.10); box-shadow: inset 0 0 0 0.5px rgba(232,154,138,.35); }
.fd-remove svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.fd-select { -webkit-appearance: none; appearance: none; width: 100%; min-height: 52px; padding: 0 40px 0 18px; border: 0; border-radius: var(--pill); color: var(--text); font-size: 15px; background: rgba(0,0,0,.28) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B7B1A6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; box-shadow: inset 0 1px 3px rgba(0,0,0,.5), inset 0 0 0 0.5px rgba(255,255,255,.10); }
.fd-select option { background: #1F1C18; color: var(--text); }
.fd-add { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); margin-top: var(--s3); }
.fd-add-3 { grid-template-columns: 1fr 112px auto; }
.fd-edit-block { margin-top: var(--s5); padding-top: var(--s4); border-top: 0.5px solid rgba(237,230,214,.10); }
.fd-edit-block .fd-eyebrow { margin-bottom: 2px; }
.fd-receipt-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.fd-pay { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
.fd-pay-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.fd-pay-row .big { font-weight: 300; font-size: 26px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fd-pay-save { font-size: 12.5px; color: #C7E8D2; }
.fd-toast { position: fixed; z-index: 120; left: 50%; top: calc(64px + var(--safe-top)); transform: translate(-50%, -12px); max-width: calc(100% - 32px); padding: 10px 18px; border-radius: var(--pill); font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .45s var(--spring); }
.fd-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Modo apresentação */
.is-presenting { overflow: hidden; }
.is-presenting .fd-present-target { position: fixed; inset: 0; z-index: 90; border-radius: 0; aspect-ratio: auto; box-shadow: none; }
.fd-present-close { position: fixed; z-index: 91; top: calc(14px + var(--safe-top)); right: 14px; display: none; }
.is-presenting .fd-present-close { display: grid; }
.is-presenting .fd-tabbar, .is-presenting .fd-topbar, .is-presenting .fd-actionbar { opacity: 0; pointer-events: none; }

/* ══════════════ PACIENTES ══════════════ */
.fd-search { position: relative; display: block; }
.fd-search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); stroke: var(--text-3); fill: none; stroke-width: 2; stroke-linecap: round; }
.fd-search .fd-input { padding-left: 48px; border-radius: var(--pill); }
.fd-initials { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 500; color: var(--text); background: radial-gradient(100% 100% at 30% 0%, rgba(237,230,214,.18), rgba(40,36,31,.9)); box-shadow: 0 0 0 0.5px rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.35); }

/* ── Abertura (manual: símbolo em fade-in de 400 ms) ── */
.fd-splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity .35s var(--ease); }
.fd-splash img { width: 76px; animation: fd-fade .4s var(--ease) both; }
.fd-splash.is-done { opacity: 0; pointer-events: none; }
@keyframes fd-fade { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* Entrada suave dos blocos */
.fd-rise { animation: fd-rise .65s var(--spring-soft) both; }
.fd-rise:nth-child(2) { animation-delay: .04s; } .fd-rise:nth-child(3) { animation-delay: .08s; } .fd-rise:nth-child(4) { animation-delay: .12s; } .fd-rise:nth-child(5) { animation-delay: .16s; }
@keyframes fd-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Troca de tela (View Transitions: Chrome e Safari 18.2+) */
::view-transition-old(root) { animation: fd-vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: fd-vt-in .45s var(--spring-soft) both; }
@keyframes fd-vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes fd-vt-in { from { opacity: 0; transform: translateY(16px); } }

.fd-signature { text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.fd-signature b { color: var(--text-2); font-weight: 500; }

@media (min-width: 900px) {
  body { font-size: 16px; }
  .fd-shell { max-width: 720px; }
}
@media (prefers-reduced-transparency: reduce) {
  .lg, .fd-card, .fd-card-hero, .fd-proc, .fd-receipt, .fd-btn-glass, .fd-seg-drop { background: var(--surface-2) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .fd-ambient { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
.fd-tab-cam:active, .fd-tab-cam.is-pressed { transform: scale(.92); }
.fd-add-3 { grid-template-columns: 1fr auto; }
.fd-add-3 > :first-child { grid-column: 1 / -1; }
.fd-gen.is-calc .fd-scan { opacity: 0; }
.fd-pt.zone { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--accent-hi); box-shadow: 0 0 0 3px rgba(210,180,124,.28), 0 0 14px rgba(242,227,188,.95); transition: transform .4s var(--spring), background .3s, width .3s, height .3s, margin .3s; }
.fd-zone-label::before { content: none; }
.fd-zone-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 8px var(--accent); flex: none; }
.fd-toast { top: calc(76px + var(--safe-top)); width: max-content; max-width: calc(100vw - 40px); text-align: center; line-height: 1.35; }
.fd-pay-row { gap: var(--s3); }
.fd-pay-row .big { white-space: nowrap; }
.fd-pay-row .big#inst { font-size: 24px; }
