:root {
  --bg: #0c0b10;
  --bg2: #16141d;
  --card: #1c1a25;
  --line: rgba(255, 255, 255, .1);
  --ink: #f6f3ff;
  --mute: #a39fb5;
  --lime: #c6ff3d;
  --pink: #ff3dae;
  --violet: #7b5cff;
  --cyan: #2fd6ff;
  --r: 22px;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { min-height: 100%; }
body.no-scroll { overflow: hidden; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a.btn { text-decoration: none; }
img { max-width: 100%; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- ecrãs ---------- */
.screen { display: none; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen.is-active { display: flex; flex-direction: column; animation: screenIn .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes screenIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; position: relative; z-index: 3; }
.logo { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.logo sup { font-size: 10px; color: var(--lime); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.pill-lime { background: var(--lime); color: #111; transform: rotate(-4deg); }
.pill-pink { background: var(--pink); color: #fff; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); font-size: 18px; display: grid; place-items: center; flex: none; transition: transform .15s; }
.icon-btn:active { transform: scale(.9); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 24px; border-radius: 99px; font-weight: 700; font-size: 16px; transition: transform .15s, box-shadow .15s, opacity .15s; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-lime { background: var(--lime); color: #0c0b10; box-shadow: 0 6px 0 #7fae10, 0 16px 40px -10px rgba(198, 255, 61, .55); }
.btn-lime:active { box-shadow: 0 2px 0 #7fae10; transform: translateY(4px); }
.btn-ghost { background: var(--bg2); border: 1.5px solid var(--line); color: var(--ink); }
.btn-xl { font-size: 18px; padding: 19px 30px; }
.btn-block { width: 100%; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* ---------- entrada ---------- */
#s-home { overflow-x: clip; padding-bottom: calc(96px + env(safe-area-inset-bottom)); background: radial-gradient(90% 60% at 80% 0%, rgba(123, 92, 255, .35), transparent 70%), radial-gradient(70% 50% at 0% 100%, rgba(255, 61, 174, .25), transparent 70%), var(--bg); }
.home-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 20px 28px; max-width: 760px; width: 100%; margin: 0 auto; position: relative; z-index: 2; }
.home-crowd { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.crowd-item { width: 64px; height: 72px; border-radius: 20px; overflow: hidden; transform: rotate(var(--r)); animation: floaty 3.2s ease-in-out calc(var(--i) * -.37s) infinite; transition: transform .26s; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); }
.crowd-item.flip { transform: rotate(var(--r)) rotateY(90deg) scale(.8); }
.crowd-item svg { width: 100%; height: 100%; display: block; }
@keyframes floaty { 50% { translate: 0 -7px; } }
.home-title { font-family: var(--display); font-weight: 900; font-size: clamp(38px, 10.5vw, 76px); line-height: .98; letter-spacing: -.035em; margin-bottom: 22px; }
.hl { background: linear-gradient(90deg, var(--lime), var(--cyan), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wiggle { display: inline-block; animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(12deg) scale(1.1); } }
.home-sub { font-size: 18px; color: var(--mute); max-width: 520px; margin-bottom: 30px; }
.home-wrap .btn { align-self: flex-start; }
.home-meta { margin-top: 18px; font-size: 14px; color: var(--mute); }
.marquee { overflow: hidden; background: var(--lime); color: #0c0b10; transform: rotate(-2deg) translateY(-6px); margin: 0 -20px 28px; padding: 12px 0; position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 18s linear infinite; font-family: var(--display); font-weight: 700; font-size: 16px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- construtor ---------- */
#s-builder { background: var(--bg); height: 100vh; height: var(--app-h, 100dvh); }
.steps { display: flex; gap: 6px; font-size: 12px; font-weight: 600; overflow: hidden; }
.step { padding: 6px 10px; border-radius: 99px; background: var(--bg2); color: var(--mute); white-space: nowrap; }
.step.is-on { background: var(--ink); color: var(--bg); }
.builder { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.builder-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px 20px 16px; flex: none; }
.stage-avatar { width: min(52vw, 250px); aspect-ratio: 200/222; border-radius: 36% 36% 30% 30%; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(123, 92, 255, .6), 0 0 0 4px rgba(255, 255, 255, .06); animation: breathe 3.6s ease-in-out infinite; }
.stage-avatar.pop { animation: pop .38s cubic-bezier(.3, 1.6, .5, 1), breathe 3.6s ease-in-out .38s infinite; }
@keyframes pop { 0% { transform: scale(.92) rotate(-3deg); } 60% { transform: scale(1.05) rotate(2deg); } }
@keyframes breathe { 50% { transform: translateY(-5px); } }
.stage-avatar svg, .avatar-svg { width: 100%; height: 100%; display: block; }
.avatar-svg.live .av-eyes { transform-origin: 100px 102px; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.avatar-svg.live .av-head { transform-origin: 100px 150px; animation: nod 5s ease-in-out infinite; }
@keyframes nod { 30% { transform: rotate(-2deg); } 60% { transform: rotate(1.6deg); } }
.stage-shadow { width: 160px; height: 14px; border-radius: 50%; background: rgba(123, 92, 255, .35); filter: blur(10px); margin-top: 8px; }
.stage-hint { position: absolute; top: 6px; right: max(20px, calc(50% - 200px)); background: var(--pink); color: #fff; padding: 8px 14px; border-radius: 16px 16px 4px 16px; font-weight: 700; font-size: 14px; transform: rotate(5deg); box-shadow: 0 8px 20px -6px rgba(255, 61, 174, .6); }

.builder-panel { flex: 1; min-height: 0; background: var(--bg2); border-radius: 30px 30px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 12px; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: flex; align-items: center; gap: 6px; padding: 10px 15px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--mute); transition: all .15s; }
.tab.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel-body { flex: 1; overflow-y: auto; padding: 6px 16px 16px; }
.swatches { display: flex; gap: 12px; overflow-x: auto; padding: 8px 8px 18px; margin: 0 -6px; scrollbar-width: none; }
.sw { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.sw.is-on { box-shadow: 0 0 0 3px var(--bg2), 0 0 0 6px var(--lime); transform: scale(1.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.opt { background: var(--card); border: 2px solid transparent; border-radius: 20px; padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .15s, border-color .15s; }
.opt:active { transform: scale(.94); }
.opt svg { width: 100%; aspect-ratio: 1; height: auto; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.opt small { font-size: 12px; font-weight: 600; color: var(--mute); }
.opt.is-on { border-color: var(--lime); background: #24292a; }
.opt.is-on small { color: var(--lime); }
.grid-bg .opt { aspect-ratio: 1; }
.builder-cta { display: flex; gap: 12px; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.builder-cta .btn-lime { flex: 1; white-space: nowrap; }
.builder-cta .btn-ghost { flex: none; padding: 15px 18px; white-space: nowrap; }

@media (min-width: 900px) {
  .builder { flex-direction: row; padding: 0 28px 28px; gap: 28px; }
  .builder-stage { flex: 1; justify-content: center; }
  .stage-avatar { width: min(34vw, 400px); }
  .stage-hint { top: 18%; right: 12%; }
  .builder-panel { flex: none; width: 460px; border-radius: 30px; border: 1px solid var(--line); }
}

/* ---------- conversa ---------- */
#s-chat { height: 100vh; height: var(--app-h, 100dvh); overflow: hidden; background: radial-gradient(80% 40% at 50% 0%, rgba(123, 92, 255, .22), transparent 70%), var(--bg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 14px; border-bottom: 1px solid var(--line); position: relative; flex: none; max-width: 760px; width: 100%; margin: 0 auto; }
.host { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.host strong { display: block; font-family: var(--display); font-size: 16px; }
.host small { color: var(--lime); font-size: 12px; }
.host-blob { width: 42px; height: 42px; border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; background: conic-gradient(from 90deg, var(--lime), var(--cyan), var(--violet), var(--pink), var(--lime)); display: flex; align-items: center; justify-content: center; gap: 6px; animation: morph 5s ease-in-out infinite; flex: none; }
.host-blob i { width: 7px; height: 10px; border-radius: 50%; background: #0c0b10; animation: blink 3.6s infinite; }
@keyframes morph { 50% { border-radius: 58% 42% 45% 55% / 45% 58% 42% 55%; transform: rotate(8deg); } }
.me-mini { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--bg2); border: 2px solid var(--lime); flex: none; }
.me-mini.pop, .msg-face { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.progress { position: absolute; left: 16px; right: 16px; bottom: -2px; height: 4px; border-radius: 4px; background: var(--bg2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--cyan), var(--pink)); transition: width .5s cubic-bezier(.3, 1.3, .5, 1); }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px 16px 12px; display: flex; flex-direction: column; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 13px 17px; border-radius: 22px; font-size: 16.5px; animation: msgIn .32s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.typing { display: flex; gap: 5px; padding: 16px 18px; }
.msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: dots 1s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .15s; } .msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 30% { transform: translateY(-5px); background: var(--lime); } }
.msg-row.me { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; margin: 4px 0 8px; }
.msg.user { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; font-weight: 600; border-bottom-right-radius: 6px; }
.msg-face { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg2); }
.msg-face svg { width: 100%; height: 100%; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); vertical-align: -2px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }

.chat-input { flex: none; max-height: 56%; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: rgba(12, 11, 16, .92); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.chat-input:empty { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.chip { min-height: 46px; display: inline-flex; align-items: center; padding: 11px 17px; border-radius: 99px; background: var(--bg2); border: 1.5px solid rgba(255, 255, 255, .18); font-weight: 600; font-size: 15px; animation: chipIn .35s cubic-bezier(.3, 1.5, .5, 1) var(--d, 0ms) backwards; transition: transform .12s, background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--lime); }
.chip:active { transform: scale(.94); }
.chip.is-on { background: var(--lime); color: #0c0b10; border-color: var(--lime); }
@keyframes chipIn { from { opacity: 0; transform: translateY(14px) scale(.8); } }
.text-in { display: flex; gap: 10px; }
.text-in input { flex: 1; min-width: 0; font-size: 16px !important; background: var(--bg2); border: 1.5px solid rgba(255, 255, 255, .18); border-radius: 99px; padding: 15px 20px; color: var(--ink); font: 600 16px var(--body); }
.text-in input:focus { border-color: var(--lime); outline: none; }
.send { width: 54px; height: 54px; border-radius: 50%; background: var(--lime); color: #0c0b10; font-size: 22px; font-weight: 900; flex: none; }

.slider { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 18px; }
.slider-val { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.slider-val strong { font-family: var(--display); font-size: 30px; color: var(--lime); }
.slider-val span { font-weight: 600; color: var(--mute); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 12px; background: linear-gradient(90deg, var(--lime), var(--pink)) 0 / var(--p, 50%) 100% no-repeat, #2a2735; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 4px solid var(--lime); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--lime); }

.tt { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.tt-card { aspect-ratio: 1 / 1.05; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.15; padding: 14px; text-align: center; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; animation: chipIn .45s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.tt-card span { font-size: 48px; }
.tt-card.a { background: linear-gradient(160deg, var(--cyan), var(--violet)); transform: rotate(-3deg); }
.tt-card.b { background: linear-gradient(160deg, #ffb13d, var(--pink)); transform: rotate(3deg); animation-delay: .1s; }
.tt-card.chosen { transform: scale(1.08) rotate(0); box-shadow: 0 0 0 4px var(--lime); }
.tt-card.lost { opacity: .25; transform: scale(.85); }
.tt-vs { font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--lime); }
.colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.color { display: flex; flex-direction: column; align-items: center; gap: 7px; animation: chipIn .35s cubic-bezier(.3, 1.5, .5, 1) var(--d) backwards; }
.color i { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), transparent 40%), var(--c); box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .35); transition: transform .15s; }
.color:active i { transform: scale(.9); }
.color small { font-size: 12px; color: var(--mute); font-weight: 600; }

/* ---------- revelação ---------- */
#s-reveal { background: radial-gradient(80% 50% at 50% 20%, rgba(255, 61, 174, .28), transparent 70%), var(--bg); }
.scan { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 24px; position: relative; }
.scan[hidden], .result[hidden] { display: none; }
.scan-avatar { width: 190px; aspect-ratio: 200/222; border-radius: 40%; overflow: hidden; animation: breathe 1.2s ease-in-out infinite; position: relative; z-index: 1; }
.scan-orb { position: relative; width: 280px; height: 280px; display: grid; place-items: center; }
.scan-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px dashed var(--lime); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-line { font-family: var(--display); font-weight: 700; font-size: 18px; text-align: center; min-height: 2.6em; color: var(--lime); }

.result { padding: 28px 16px 40px; max-width: 620px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.res-top { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.res-top .pill { font-family: var(--display); font-size: 15px; padding: 9px 16px; transform: rotate(-2deg); }
.res-persona { color: var(--mute); font-size: 16px; }
.res-card { background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 26px 20px 22px; position: relative; overflow: hidden; }
.res-card::before { content: ''; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, rgba(198, 255, 61, .18), transparent); pointer-events: none; }
.res-pct { position: absolute; top: 18px; right: 18px; background: var(--lime); color: #0c0b10; border-radius: 18px; padding: 8px 12px; text-align: center; line-height: 1; transform: rotate(4deg); z-index: 2; }
.res-pct strong { font-family: var(--display); font-size: 28px; display: block; }
.res-pct span { font-size: 11px; font-weight: 700; }
.res-duo { display: flex; align-items: flex-end; gap: 6px; margin: 12px 0 18px; position: relative; }
.res-me { width: 30%; aspect-ratio: 200/222; border-radius: 30%; overflow: hidden; flex: none; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) .1s backwards; }
.res-heart { position: absolute; left: 26%; top: 0; font-size: 30px; animation: wiggle 1.4s ease-in-out infinite; z-index: 2; }
.res-car { flex: 1; animation: drive .9s cubic-bezier(.2, .9, .3, 1.15) .2s backwards; }
@keyframes drive { from { transform: translateX(120%); } }
.car-svg { width: 100%; height: auto; display: block; }
.res-name { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 7vw, 40px); letter-spacing: -.03em; line-height: 1.02; margin-bottom: 10px; }
.res-pitch { color: var(--mute); font-size: 16.5px; margin-bottom: 20px; }
.res-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.res-specs div { background: var(--bg2); border-radius: 16px; padding: 12px 14px; }
.res-specs small { display: block; color: var(--mute); font-size: 12px; margin-bottom: 3px; }
.res-specs b { font-size: 15px; }
@media (min-width: 560px) { .res-specs { grid-template-columns: repeat(4, 1fr); } }
.res-h { font-family: var(--display); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--lime); margin-bottom: 12px; }
.res-h.center { text-align: center; margin: 8px 0 -8px; }
.res-why { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.res-why li { background: rgba(123, 92, 255, .14); border: 1px solid rgba(123, 92, 255, .35); padding: 12px 14px 12px 42px; border-radius: 16px; position: relative; font-weight: 500; animation: chipIn .4s cubic-bezier(.3, 1.5, .5, 1) calc(.6s + var(--d)) backwards; }
.res-why li::before { content: '✦'; position: absolute; left: 15px; top: 11px; color: var(--lime); }
.res-cta { display: flex; flex-direction: column; gap: 12px; }
.res-alts { display: flex; flex-direction: column; gap: 12px; }
.alt { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 12px 16px 12px 12px; }
.alt-car { width: 120px; flex: none; }
.alt b { display: block; font-size: 16px; margin-bottom: 3px; }
.alt small { color: var(--mute); font-size: 13px; }
.res-note { font-size: 12px; color: var(--mute); text-align: center; opacity: .75; }
.res-again { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); background: var(--ink); color: var(--bg); font-weight: 700; padding: 13px 20px; border-radius: 99px; z-index: 200; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), visibility .3s; visibility: hidden; max-width: calc(100vw - 32px); text-align: center; font-size: 15px; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 3px; animation: fall 2.8s cubic-bezier(.3, .5, .6, 1) forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- resposta livre ---------- */
.text-in.free input { padding: 13px 18px; border-style: dashed; background: transparent; }
.text-in.free .send { width: 48px; height: 48px; font-size: 20px; background: var(--violet); color: #fff; }
.chips.left { justify-content: flex-start; }

/* ---------- introdução ---------- */
.home-top { position: sticky; top: 0; z-index: 20; background: rgba(12, 11, 16, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.home-top .pill { border: 0; cursor: pointer; font-size: 14px; padding: 9px 14px; }
.hero { min-height: calc(var(--app-h, 100svh) - 150px); }
.sec { padding: 56px 20px 8px; max-width: 760px; margin: 0 auto; opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.1); }
.sec.in { opacity: 1; transform: none; }
.kicker { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 14px; }
.sec-title { font-family: var(--display); font-weight: 900; font-size: clamp(30px, 8.4vw, 56px); line-height: 1; letter-spacing: -.035em; margin-bottom: 22px; overflow-wrap: anywhere; }
.sec-sub { color: var(--mute); font-size: 17px; margin: -6px 0 24px; max-width: 540px; }
.how { display: grid; gap: 16px; }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-card { position: relative; border-radius: 28px; padding: 20px 20px 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.how-card::before { content: ''; position: absolute; inset: auto -30% -50% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--acc); opacity: .18; filter: blur(40px); }
.c-lime { --acc: var(--lime); } .c-violet { --acc: var(--violet); } .c-pink { --acc: var(--pink); }
.how-n { font-family: var(--display); font-weight: 900; font-size: 14px; color: var(--acc); display: block; margin-bottom: 14px; }
.how-card h3 { font-family: var(--display); font-size: 20px; margin: 18px 0 8px; }
.how-card p { color: var(--mute); font-size: 15.5px; }
.how-vis { height: 168px; border-radius: 20px; background: var(--bg2); display: flex; align-items: center; justify-content: center; position: relative; }
.how-avatar svg { height: 150px; width: auto; border-radius: 36px; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.how-chat { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 12px; }
.mb { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: 14px; animation: msgIn .32s cubic-bezier(.3, 1.4, .5, 1); }
.mb.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.mb.me { align-self: flex-end; background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; font-weight: 600; border-bottom-right-radius: 5px; }
.mb.typing { display: flex; gap: 5px; padding: 12px 14px; }
.mb.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--mute); animation: dots 1s infinite; }
.mb.typing span:nth-child(2) { animation-delay: .15s; } .mb.typing span:nth-child(3) { animation-delay: .3s; }
.mb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; align-self: flex-end; animation: chipIn .35s cubic-bezier(.3, 1.5, .5, 1); }
.mb-tags small { width: 100%; text-align: right; color: var(--lime); font-size: 12px; font-weight: 600; }
.mb-tags span { background: var(--lime); color: #0c0b10; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.how-match { gap: 0; padding: 0 10px; }
.hm-av { width: 74px; height: 74px; border-radius: 50%; overflow: hidden; flex: none; border: 3px solid var(--pink); z-index: 1; }
.hm-av svg { width: 100%; height: 100%; }
.hm-car { flex: 1; margin-left: -14px; }
.hm-pct { position: absolute; top: 12px; right: 12px; background: var(--lime); color: #0c0b10; font-family: var(--display); font-weight: 900; font-size: 18px; padding: 6px 10px; border-radius: 12px; transform: rotate(5deg); }
.demo-chat { display: flex; flex-direction: column; gap: 10px; min-height: 380px; padding: 18px 16px; border-radius: 28px; background: var(--bg2); border: 1px solid var(--line); }
.demo-chat .mb { font-size: 15.5px; }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; margin: 0 -20px; padding: 6px 20px 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.persona { scroll-snap-align: start; flex: none; width: 190px; padding: 18px 16px; border-radius: 24px; background: var(--c); color: #0c0b10; transform: rotate(var(--r)); display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.persona span { font-size: 40px; }
.persona b { font-family: var(--display); font-size: 17px; line-height: 1.1; }
.persona small { font-size: 14px; font-weight: 500; opacity: .75; }
.garage-car { scroll-snap-align: start; flex: none; width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 14px 16px 16px; }
.gc-img { margin: 4px -4px 12px; }
.garage-car b { display: block; font-size: 16px; margin-bottom: 3px; }
.garage-car small { color: var(--mute); font-size: 13px; }
.why { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .why { grid-template-columns: 1fr 1fr; } }
.why-item { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 20px; }
.why-item span { font-size: 30px; display: block; margin-bottom: 10px; }
.why-item h3 { font-family: var(--display); font-size: 17px; margin-bottom: 6px; }
.why-item p { color: var(--mute); font-size: 15px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 0 18px; }
.faq summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 16px; padding: 18px 28px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--lime); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mute); padding: 0 0 18px; font-size: 15.5px; }
.sec.final { text-align: center; padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.foot { text-align: center; color: var(--mute); font-size: 13px; padding: 12px 20px 30px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); transform: translateY(110%); transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); pointer-events: none; }
.sticky-cta.on { transform: none; pointer-events: auto; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* ---------- resultado no telemóvel ---------- */
.res-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 40%); }
.res-sticky .btn-lime { flex: 1; }
.result { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .res-sticky { display: none; } .result { padding-bottom: 40px; } }

/* ---------- folha inferior ---------- */
.sheet { position: fixed; inset: 0; z-index: 180; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .28s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet.on .sheet-bg { opacity: 1; }
.sheet-card { position: relative; width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; background: var(--bg2); border: 1px solid var(--line); border-bottom: 0; border-radius: 30px 30px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .32s cubic-bezier(.3, 1.2, .5, 1); }
.sheet.on .sheet-card { transform: none; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 30px; border-bottom: 1px solid var(--line); } }
.sheet-grab { width: 48px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .25); margin: 4px auto 20px; cursor: pointer; }
.sheet-title { font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 12px; }
.sheet-sub { color: var(--mute); font-size: 16px; margin-bottom: 24px; }
.drive { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 700; color: var(--mute); margin-bottom: 8px; }
.field input { background: var(--card); border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 15px 16px; color: var(--ink); font: 600 16px var(--body); }
.field input:focus { outline: none; border-color: var(--lime); }
.chip.radio { cursor: pointer; }
.chip.radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip.radio:has(input:checked) { background: var(--lime); color: #0c0b10; border-color: var(--lime); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--mute); cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--lime); flex: none; margin-top: 1px; }
.form-err { color: #ff7a8a; font-weight: 600; font-size: 14px; min-height: 1em; margin: -4px 0; }
.form-err:empty { display: none; }
.done { text-align: center; padding: 10px 0 4px; }
.done-emoji { font-size: 64px; margin-bottom: 12px; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.story-wait { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 0; color: var(--mute); font-weight: 600; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--card); border-top-color: var(--lime); animation: spin .8s linear infinite; }
.story-img { display: block; width: auto; max-width: 100%; max-height: 52vh; margin: 0 auto 20px; border-radius: 20px; box-shadow: 0 20px 50px -20px rgba(123, 92, 255, .6); }
.story-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------- ecrãs pequenos / baixos ---------- */
@media (max-height: 740px) and (max-width: 899px) {
  .stage-avatar { width: min(40vw, 170px); }
  .builder-stage { padding-bottom: 10px; }
  .stage-shadow { display: none; }
  .tabs { padding-top: 12px; padding-bottom: 8px; }
}
@media (max-width: 360px) {
  .home-title { font-size: 34px; }
  .chip { padding: 10px 14px; font-size: 14px; }
  .tt-card span { font-size: 38px; }
  .tt-card { font-size: 13px; }
  .steps .step:not(.is-on) { display: none; }
}
@media (hover: hover) { .btn-lime:hover { transform: translateY(-2px); } }
