:root{
    --bg:#0d1710;
    --bg-soft:#16241a;
    --panel:#1c2e1fb0;
    --line:#31492f;
    --text:#f2e4cc;
    --muted:#b7c3ac;
    --gold:#e3ba8d;
    --gold-soft:#e3ba8d33;
    --brown:#6c4632;
    --sage:#8ea06c;
    --base:#e0505f;
    --sacro:#f2a35f;
    --plexo:#e8c766;
    --coracao:#3fa892;
    --laringe:#4d8bb0;
    --terceiro:#7c6fe0;
    --coroa:#a563d1;
    --ease:cubic-bezier(.22,1,.36,1);
    --radius:10px;
    font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  }
  *{box-sizing:border-box;}
  html{ -webkit-text-size-adjust:100%; }
  html,body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    height:100%;
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    scroll-padding-top:env(safe-area-inset-top,0px);
  }
  body, .app *{ overflow-wrap:break-word; word-break:break-word; }
  body{
    min-height:100%;
    padding-top:env(safe-area-inset-top,0px);
    padding-bottom:env(safe-area-inset-bottom,0px);
    background:
      radial-gradient(ellipse 90% 40% at 20% -6%, #24402633 0%, transparent 60%),
      radial-gradient(ellipse 90% 40% at 85% 0%, #4a301f33 0%, transparent 55%),
      radial-gradient(ellipse at 50% 112%, #1c2e1f4d 0%, transparent 55%),
      var(--bg);
    overflow-x:hidden;
  }
  body::after{
    content:'';
    position:fixed; inset:0; z-index:1; pointer-events:none;
    opacity:.05; mix-blend-mode:overlay;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  }

  .bg-orbs{ position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
  .orb{
    position:absolute; border-radius:50%;
    filter:blur(70px); opacity:.35;
    animation:drift 22s ease-in-out infinite;
  }
  .orb-1{ width:280px; height:280px; top:-80px; left:-60px; background:radial-gradient(circle, var(--sage), transparent 70%); animation-duration:26s; }
  .orb-2{ width:320px; height:320px; bottom:5%; right:-100px; background:radial-gradient(circle, var(--brown), transparent 70%); animation-duration:30s; animation-delay:-6s; }
  .orb-3{ width:220px; height:220px; top:42%; left:60%; background:radial-gradient(circle, var(--gold), transparent 70%); opacity:.16; animation-duration:20s; animation-delay:-11s; }
  @keyframes drift{
    0%,100%{ transform:translate(0,0) scale(1); }
    33%{ transform:translate(18px,-24px) scale(1.08); }
    66%{ transform:translate(-14px,16px) scale(.96); }
  }
  @media (prefers-reduced-motion: reduce){ .orb{ animation:none; } }

  .app{ position:relative; z-index:2; }
  h1,h2,h3{
    font-family:'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight:700;
    margin:0;
    letter-spacing:-.01em;
    line-height:1.18;
  }
  p{ margin:0; }
  button{ font-family:inherit; }
  img{ max-width:100%; display:block; }

  .app{
    max-width:560px;
    width:100%;
    margin:0 auto;
    min-height:100dvh;
    display:flex;
    flex-direction:column;
    position:relative;
    overflow-x:hidden;
  }

  /* ---------- shared bits ---------- */
  .eyebrow{
    color:var(--sage);
    font-size:.72rem;
    letter-spacing:.14em;
    text-transform:uppercase;
    font-weight:600;
    display:inline-block;
    padding:.4rem .85rem;
    border-radius:999px;
    background:#1e2f1c;
    border:1px solid #33492f;
  }
  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    border:none;
    border-radius:var(--radius);
    padding:1rem 1.6rem;
    font-size:1rem;
    font-weight:500;
    cursor:pointer;
    transition:transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
    width:100%;
    text-decoration:none;
    letter-spacing:-.01em;
  }
  .btn-primary{
    background:linear-gradient(135deg,#efd0ac,var(--gold) 55%,#c99a68);
    background-size:160% 160%;
    color:#17241a;
    box-shadow:0 4px 18px var(--gold-soft);
  }
  .btn-primary:hover{ transform:translateY(-2px); box-shadow:0 10px 28px var(--gold-soft); background-position:100% 0; }
  .btn-primary:active{ transform:translateY(0) scale(.98); }
  .btn-ghost{
    background:transparent;
    color:var(--muted);
    border:1px solid var(--line);
  }
  .btn-ghost:hover{ color:var(--text); border-color:var(--muted); }

  input[type=text], input[type=date], input[type=time]{
    width:100%;
    background:var(--bg-soft);
    border:1px solid var(--line);
    color:var(--text);
    border-radius:var(--radius);
    padding:.9rem 1rem;
    font-size:1rem;
    font-family:inherit;
  }
  input:focus{ outline:2px solid var(--gold); outline-offset:1px; }
  label{
    display:block;
    font-size:.82rem;
    color:var(--muted);
    margin-bottom:.4rem;
  }
  .field{ margin-bottom:1.3rem; }
  .field label{ display:flex; align-items:center; }
  .field input{ transition:border-color .25s var(--ease), box-shadow .25s var(--ease); }
  .field input:focus{ box-shadow:0 0 0 3px var(--gold-soft); }
  .field-error{
    display:none;
    color:#f0707d;
    font-size:.76rem;
    margin-top:.45rem;
    line-height:1.4;
  }
  .field.invalid input{ border-color:#e0505f; animation:shake .38s var(--ease); }
  .field.invalid .field-error{ display:block; }
  .field.valid input{ border-color:#3fa892; }
  @keyframes shake{
    10%,90%{ transform:translateX(-1px); }
    20%,80%{ transform:translateX(2px); }
    30%,50%,70%{ transform:translateX(-4px); }
    40%,60%{ transform:translateX(4px); }
  }

  .tip-wrap{ position:relative; display:inline-flex; margin-left:.4rem; }
  .tip-btn{
    width:16px; height:16px; border-radius:50%;
    border:1px solid var(--muted); background:transparent; color:var(--muted);
    font-size:.6rem; line-height:1; cursor:pointer; padding:0;
    display:inline-flex; align-items:center; justify-content:center;
    transition:border-color .2s var(--ease), color .2s var(--ease);
  }
  .tip-btn:hover, .tip-btn:focus{ border-color:var(--gold); color:var(--gold); }
  .tip-bubble{
    position:absolute; bottom:135%; left:50%;
    transform:translateX(-50%) translateY(4px);
    background:var(--bg-soft); border:1px solid var(--line); color:var(--text);
    font-size:.74rem; line-height:1.45; padding:.6rem .75rem;
    border-radius:8px; width:208px; max-width:60vw;
    opacity:0; pointer-events:none; text-align:left; font-weight:400;
    transition:opacity .25s var(--ease), transform .25s var(--ease);
    box-shadow:0 10px 26px #00000070; z-index:30;
  }
  .tip-wrap.open .tip-bubble{ opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
  .field small{ display:block; color:var(--muted); font-size:.74rem; margin-top:.4rem; line-height:1.4; }

  /* ---------- screens ---------- */
  .screen{
    display:none;
    flex:1;
    flex-direction:column;
    padding:2.2rem 1.25rem 6rem;
    animation:fadein .6s var(--ease);
    width:100%;
    max-width:100%;
  }
  .screen.active{ display:flex; }
  @keyframes fadein{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
  @keyframes floatIn{ from{opacity:0; transform:translateY(14px) scale(.96);} to{opacity:1; transform:translateY(0) scale(1);} }
  @keyframes softPulse{ 0%,100%{ box-shadow:0 8px 26px var(--gold-soft), 0 0 0 0 var(--gold-soft);} 50%{ box-shadow:0 8px 30px var(--gold-soft), 0 0 0 8px transparent;} }
  @media (prefers-reduced-motion: reduce){
    *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  }

  /* ---------- landing / hero ---------- */
  .hero-figure{
    width:150px;
    margin:0 auto 1.2rem;
    border-radius:50%;
    overflow:hidden;
    box-shadow:0 0 60px var(--gold-soft);
  }
  .hero-figure img{ width:100%; display:block; }
  .landing{ justify-content:flex-start; text-align:center; gap:1.1rem; }
  .landing h1{ font-size:2.35rem; line-height:1.16; }
  .landing .lede{ color:var(--muted); font-size:1.02rem; line-height:1.6; max-width:40ch; margin:0 auto; }
  .landing .signature{ margin-top:.6rem; color:var(--muted); font-size:.85rem; }
  .landing .signature strong{ color:var(--text); font-weight:500; }
  .landing .handle{ color:var(--gold); }

  .diag-intro{ margin-top:2.6rem; padding-top:2.2rem; border-top:1px solid var(--line); text-align:left; }
  .diag-intro h2{ font-size:1.85rem; margin:.5rem 0 .9rem; }
  .diag-intro .lede{ margin:0; text-align:left; max-width:none; }

  .fonte-list{ position:relative; margin-top:1.6rem; padding-left:2px; }
  .fonte-item{
    position:relative;
    display:flex;
    gap:1rem;
    align-items:flex-start;
    padding:1.1rem 0;
    border-bottom:1px solid var(--line);
  }
  .fonte-item:first-child{ padding-top:0; }
  .fonte-item:last-child{ border-bottom:none; }
  .fonte-icon{
    width:46px; height:46px; border-radius:50%; flex:none;
    box-shadow:0 0 0 2px var(--bg), 0 0 0 3px var(--c);
    position:relative; z-index:1;
  }
  .fonte-spine{
    position:absolute; left:22px; top:0; bottom:0; width:2px;
    background:linear-gradient(180deg,var(--base),var(--sacro),var(--plexo),var(--coracao),var(--laringe),var(--terceiro),var(--coroa));
    opacity:.45;
  }
  .fonte-txt h4{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:1.12rem; color:var(--c); margin-bottom:.3rem; letter-spacing:-.01em; }
  .fonte-txt h4 span{ color:var(--muted); font-size:.92rem; font-family:'Work Sans',sans-serif; }
  .fonte-txt p{ font-size:.88rem; color:var(--muted); line-height:1.5; margin-bottom:.5rem; }
  .fonte-tags{ font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; color:var(--c); opacity:.85; }

  .about-card{
    margin-top:2.4rem;
    padding-top:2.2rem;
    border-top:1px solid var(--line);
    text-align:left;
    display:flex;
    gap:1.1rem;
    align-items:flex-start;
  }
  .about-card .photo{
    width:92px; height:92px; border-radius:50%; overflow:hidden; flex:none;
    border:1px solid var(--gold-soft);
    box-shadow:0 0 24px var(--gold-soft);
  }
  .about-card .photo img{ width:100%; height:100%; object-fit:cover; }
  .about-card .txt p{ color:var(--muted); font-size:.9rem; line-height:1.55; }
  .about-card .txt .who{ color:var(--text); font-size:.95rem; margin-bottom:.35rem; display:block; }

  /* ---------- capture ---------- */
  .capture h2{ font-size:1.9rem; margin-bottom:.6rem; }
  .capture .lede{ color:var(--muted); margin-bottom:2rem; line-height:1.55; }

  /* ---------- quiz ---------- */
  .quiz-top{ display:flex; align-items:center; gap:.8rem; margin-bottom:1.4rem; }
  .progress-track{ flex:1; height:3px; background:var(--line); border-radius:2px; overflow:hidden; }
  .progress-fill{ height:100%; background:linear-gradient(90deg,var(--gold),#e8c766); transition:width .4s ease; }
  .progress-label{ font-size:.75rem; color:var(--muted); white-space:nowrap; }
  .block-tag{ font-size:.78rem; color:var(--gold); text-transform:uppercase; letter-spacing:.1em; margin-bottom:.6rem; }
  .question-text{ font-size:1.4rem; line-height:1.38; margin-bottom:1.8rem; font-family:'Plus Jakarta Sans', sans-serif; font-weight:700; letter-spacing:-.01em; }
  .options{ display:flex; flex-direction:column; gap:.7rem; }
  .option{
    text-align:left;
    background:var(--bg-soft);
    border:1px solid var(--line);
    color:var(--text);
    padding:1rem 1.1rem;
    border-radius:var(--radius);
    cursor:pointer;
    font-size:.98rem;
    transition:border-color .3s var(--ease), background .3s var(--ease), transform .2s var(--ease);
  }
  .option:active{ transform:scale(.98); }
  .option:hover{ border-color:var(--gold); }
  .option.selected{ border-color:var(--gold); background:#22331f; }
  .quiz-nav{ margin-top:auto; padding-top:1.6rem; }
  .back-link{ background:none; border:none; color:var(--muted); font-size:.85rem; cursor:pointer; padding:0; }

  /* ---------- processing ---------- */
  .processing{ justify-content:center; align-items:center; text-align:center; gap:1.6rem; }
  .processing p{ color:var(--muted); font-size:.95rem; min-height:1.4em; }

  /* ---------- result ---------- */
  .result-header{ text-align:center; margin-bottom:1.2rem; }
  .result-header .eyebrow{ display:block; margin-bottom:.5rem; }
  .result-header h2{ font-size:2rem; }
  .cards-row{ display:grid; grid-template-columns:1fr 1fr; gap:.7rem; margin:1.6rem 0 2rem; }
  .mini-card{
    background:var(--panel);
    backdrop-filter:blur(14px) saturate(140%);
    -webkit-backdrop-filter:blur(14px) saturate(140%);
    border:1px solid var(--line);
    border-radius:12px;
    padding:.9rem;
    text-align:center;
    transition:transform .3s var(--ease), border-color .3s var(--ease);
  }
  .mini-card:hover{ transform:translateY(-2px); border-color:var(--gold-soft); }
  .mini-card .num{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:1.6rem; color:var(--gold); line-height:1; }
  .mini-card .lab{ font-size:.7rem; color:var(--muted); margin-top:.3rem; text-transform:uppercase; letter-spacing:.06em; }

  .lens-intro{ display:flex; gap:1rem; align-items:center; margin:2rem 0 1.6rem; padding:1.1rem; background:var(--panel); backdrop-filter:blur(14px) saturate(140%); -webkit-backdrop-filter:blur(14px) saturate(140%); border:1px solid var(--line); border-radius:12px; }
  .lens-intro img{ width:76px; height:76px; object-fit:cover; border-radius:8px; flex:none; }
  .lens-intro p{ color:var(--muted); font-size:.87rem; line-height:1.5; }
  .lens-intro b{ color:var(--text); font-weight:500; }

  .section-title{ font-size:1.5rem; margin:1.6rem 0 1rem; }
  .chakra-card{
    border:1px solid var(--line);
    border-left:3px solid var(--c);
    border-radius:10px;
    padding:1.3rem;
    margin-bottom:1.3rem;
    background:linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--panel)), var(--bg-soft) 65%);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    box-shadow:0 10px 30px -18px #000000aa;
    transition:transform .35s var(--ease), box-shadow .35s var(--ease);
  }
  .chakra-card:hover{ transform:translateY(-3px); box-shadow:0 16px 36px -16px #000000cc; }
  .chakra-card .ch-head{ display:flex; align-items:center; gap:.8rem; margin-bottom:.9rem; }
  .chakra-card .ch-icon{ width:42px; height:42px; border-radius:50%; flex:none; }
  .chakra-card .ch-head-txt{ flex:1; }
  .chakra-card h3{ font-size:1.3rem; color:var(--c); line-height:1.1; }
  .chakra-card .pct{ font-size:.74rem; color:var(--muted); }
  .chakra-card .fn{ color:var(--muted); font-size:.9rem; line-height:1.5; margin-bottom:1rem; }
  .lens-block{ margin-bottom:.9rem; }
  .lens-block .lens-label{ font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:var(--c); margin-bottom:.3rem; display:block; }
  .lens-block p{ font-size:.87rem; line-height:1.55; color:var(--text); }
  .chakra-card ul{ margin:.4rem 0 1rem; padding-left:1.1rem; color:var(--muted); font-size:.86rem; line-height:1.55; }
  .chakra-card .cost{ font-size:.87rem; font-style:italic; color:var(--text); border-top:1px dashed var(--line); padding-top:.8rem; margin-bottom:.8rem; }
  .chakra-card .mini-invite{ font-size:.84rem; color:var(--gold); }

  .offer{
    margin-top:1.6rem;
    padding:1.8rem 1.5rem;
    background:radial-gradient(ellipse at top, #3a2415cc, var(--bg-soft)cc);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border:1px solid var(--gold-soft);
    border-radius:14px;
    text-align:center;
    box-shadow:0 20px 50px -24px #000000cc;
  }
  .offer h2{ font-size:1.7rem; margin-bottom:.9rem; }
  .offer p{ color:var(--muted); line-height:1.6; margin-bottom:1.4rem; font-size:.96rem; }
  .offer .btn-primary{ margin-bottom:.8rem; }
  .offer .note{ font-size:.75rem; color:var(--muted); }

  footer.brand{
    text-align:center;
    padding:2rem 1.6rem 2.4rem;
    color:var(--muted);
    font-size:.78rem;
    letter-spacing:.04em;
  }
  footer.brand strong{ color:var(--gold); font-weight:500; }
  footer.brand .handle{ display:block; margin-top:.3rem; color:var(--gold); }

  @media (max-width:380px){
    .landing h1{ font-size:1.9rem; }
    .diag-intro h2{ font-size:1.55rem; }
    .question-text{ font-size:1.22rem; }
    .cards-row{ gap:.55rem; }
    .mini-card{ padding:.7rem; }
    .mini-card .num{ font-size:1.35rem; }
    .about-card{ flex-direction:column; align-items:flex-start; }
    .about-card .photo{ width:76px; height:76px; }
  }

  @media (max-width:340px){
    .fonte-item{ gap:.7rem; }
    .fonte-icon{ width:38px; height:38px; }
    .lens-intro{ flex-direction:column; }
    .lens-intro img{ width:100%; height:120px; }
  }

  /* ---------- floating CTA ---------- */
  .floating-cta{
    position:fixed;
    right:1rem;
    bottom:calc(1rem + env(safe-area-inset-bottom,0px));
    z-index:60;
    display:none;
    align-items:center;
    gap:.55rem;
    padding:.85rem 1.25rem;
    border:none;
    border-radius:999px;
    background:linear-gradient(135deg,#efd0ac,var(--gold) 55%,#c99a68);
    color:#17241a;
    font-family:'Inter',sans-serif;
    font-weight:600;
    font-size:.86rem;
    letter-spacing:-.01em;
    cursor:pointer;
    box-shadow:0 8px 26px var(--gold-soft);
    animation:floatIn .5s var(--ease), softPulse 3.2s ease-in-out 1.2s infinite;
    transition:transform .3s var(--ease);
    max-width:calc(100vw - 2rem);
  }
  .floating-cta:hover{ transform:translateY(-2px); }
  .floating-cta:active{ transform:translateY(0) scale(.97); }
  .floating-cta.show{ display:inline-flex; }
  .floating-cta .fc-arrow{ font-size:1rem; line-height:1; transition:transform .3s var(--ease); }
  .floating-cta:hover .fc-arrow{ transform:translateX(3px); }
  @media (max-width:360px){
    .floating-cta{ padding:.75rem 1.05rem; font-size:.8rem; right:.75rem; bottom:calc(.75rem + env(safe-area-inset-bottom,0px)); }
  }

  /* fade-in on scroll */
  .reveal{ opacity:0; transform:translateY(16px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in{ opacity:1; transform:translateY(0); }
  .fonte-item:nth-child(2).reveal{ transition-delay:.05s; }
  .fonte-item:nth-child(3).reveal{ transition-delay:.1s; }
  .fonte-item:nth-child(4).reveal{ transition-delay:.15s; }
  .fonte-item:nth-child(5).reveal{ transition-delay:.2s; }
  .fonte-item:nth-child(6).reveal{ transition-delay:.25s; }
  .fonte-item:nth-child(7).reveal{ transition-delay:.3s; }
  .fonte-item:nth-child(8).reveal{ transition-delay:.35s; }
  .chakra-card:nth-of-type(2).reveal{ transition-delay:.08s; }
  .chakra-card:nth-of-type(3).reveal{ transition-delay:.16s; }