:root{
  --p1:#5b2be0;
  --p2:#2e0d75;
  --accent:#ffd84d;
  --danger:#ff4d6d;
  --ok:#42f5a7;
  --text:#f4f6ff;
  --muted:rgba(244,246,255,.78);
  --stroke:rgba(255,255,255,.16);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:linear-gradient(180deg,var(--p1),var(--p2));
}
.screen{
  max-width:430px;
  margin:0 auto;
  min-height:100vh;
  position:relative;
  padding-bottom:112px;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(255,216,77,.16), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(91,43,224,.35), transparent 55%),
    linear-gradient(180deg,var(--p1),var(--p2));
  overflow:hidden;
}
.art{
  position:absolute; inset:-18px;
  background:linear-gradient(180deg, rgba(255,216,77,.18), rgba(91,43,224,.10)),
             radial-gradient(900px 700px at 30% 20%, rgba(255,216,77,.22), transparent 60%),
             radial-gradient(900px 700px at 80% 40%, rgba(91,43,224,.26), transparent 62%);
  background-repeat:no-repeat;
  opacity:.18;
  filter:saturate(1.05) contrast(1.05);
  transform:scale(1.05);
}
.vignette{position:absolute; inset:0;
  background:radial-gradient(90% 60% at 50% 20%, transparent, rgba(0,0,0,.42) 78%),
             linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.38));
}
.topbar{position:relative; padding:20px 18px 10px; display:flex; justify-content:space-between; align-items:center; gap:12px; z-index:2;}
.iconbtn{width:40px;height:40px; border-radius:14px; border:1px solid var(--stroke); background:rgba(255,255,255,.10); color:var(--text); display:grid; place-items:center; cursor:pointer; text-decoration:none;}
.badge{padding:10px 14px; border-radius:999px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.10); font-weight:900;}
.progress-wrap{position:relative; padding:0 18px 14px; z-index:2;}
.progressbar{height:7px; border-radius:999px; background:rgba(255,255,255,.28); overflow:hidden;}
.progress{height:100%; width:25%; background:linear-gradient(90deg,var(--accent),rgba(255,216,77,.86)); box-shadow:0 12px 30px rgba(255,216,77,.18);}
.page{position:relative; padding:20px 18px; z-index:2;}
.title{font-size:22px; font-weight:900; margin-bottom:8px}
.subtitle{font-size:13px; color:var(--muted); margin-bottom:18px; line-height:1.35}
.panel{background:rgba(255,255,255,.12); border:1px solid var(--stroke); border-radius:22px; padding:16px; backdrop-filter:blur(14px);}
.field{width:100%; padding:14px; border-radius:16px; border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.20); color:var(--text); margin-bottom:10px; outline:none;}
.field::placeholder{color:rgba(244,246,255,.72)}
.btn{width:100%; padding:15px; border-radius:999px; font-weight:900; border:none; margin-top:10px; cursor:pointer; text-decoration:none; display:inline-block; text-align:center;}
.btn-primary{background:linear-gradient(90deg,var(--accent),rgba(255,216,77,.92)); color:#2a1a00}
.btn-danger{background:var(--danger); color:#fff}
.btn-ghost{background:rgba(255,255,255,.18); color:#fff}
.btn-ok{background:rgba(66,245,167,.18); border:1px solid rgba(66,245,167,.32); color:#eafff6}
.row{display:flex; gap:10px} .row>*{flex:1}
.stack{display:flex; flex-direction:column; gap:10px}
.hidden{display:none !important}
.small{font-size:12.5px}
.toast{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(88px + env(safe-area-inset-bottom)); width:min(430px, calc(100% - 24px));
  background:rgba(0,0,0,.62); color:rgba(244,246,255,.95); border:1px solid rgba(255,255,255,.18); border-radius:18px; padding:12px 14px;
  font-weight:900; line-height:1.25; backdrop-filter:blur(12px); z-index:1000;}
.toast.hidden{display:none !important}
.modal{position:fixed; inset:0; background:transparent !important; display:none; z-index:999;}
.modal video{width:100%; height:100%; object-fit:cover; display:block; transition:opacity .28s ease, transform .28s ease}
.modal video.fade-out{opacity:0; transform:scale(1.01)}
.modal::after{display:none !important;content:none !important;}
.modalTop{position:absolute; top:0; left:0; right:0; padding:18px; display:flex; justify-content:space-between; z-index:2;}
.qr-card{position:absolute; bottom:calc(92px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:85%;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.18); border-radius:24px; padding:16px; backdrop-filter:blur(18px); z-index:2;
  transition:opacity .28s ease, transform .28s ease;}
.qr-card.hidden{opacity:0; transform:translateX(-50%) translateY(10px)}
.qr-card.fade-in{opacity:1; transform:translateX(-50%) translateY(0)}
.qrHead{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; gap:10px}
.qrHead span{font-weight:900}
.qrChip{font-size:12px; font-weight:900; padding:8px 10px; border-radius:999px; background:rgba(255,216,77,.18); border:1px solid rgba(255,216,77,.32); color:rgba(255,216,77,.95)}


/* ==== PATCH V20: setas amarelas (voltar/fechar) ==== */
.iconbtn{background:rgba(255,216,77,.18)!important;border-color:rgba(255,216,77,.42)!important;color:#2a1a00!important}
.iconbtn:active{filter:brightness(.98)}


/* ===== ClickConvite Branding (fixo e clicável) ===== */
.click-brand-fixed{
  position:fixed;
  left:12px;
  right:12px;
  top:10px;
  z-index:9999;
  pointer-events:none;
}
.click-brand-fixed .inner{
  max-width:430px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:18px;
  background:rgba(46,13,117,.72);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(10px);
  box-shadow:0 18px 40px rgba(0,0,0,.25);
  pointer-events:auto;
}
.click-brand-fixed .inner img{
  width:38px;height:38px;object-fit:contain;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  padding:6px;
  filter:none !important; /* evita inverter a logo */
}
.click-brand-fixed .inner .txt{
  display:flex;flex-direction:column;gap:2px;
  line-height:1.1;
}
.click-brand-fixed .inner .t1{font-weight:950;font-size:13px;color:rgba(244,246,255,.96)}
.click-brand-fixed .inner .t2{font-weight:900;font-size:11px;color:rgba(244,246,255,.80)}
.click-brand-fixed .inner a{color:inherit;text-decoration:underline}
body{padding-top:78px;} /* espaço pra barra fixa */


/* Branding: botão Instagram (ícone) */
.click-brand-fixed .igbtn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:12px;border:1px solid rgba(255,216,77,.45);background:rgba(255,216,77,.18);box-shadow:0 12px 26px rgba(0,0,0,.20)}
.click-brand-fixed .igbtn svg{width:18px;height:18px;fill:#2a1a00}


/* Instagram (ícone clicável) */
.igLink{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.14)}
.igLink img{width:18px;height:18px;display:block;filter:none;object-fit:contain;background:none;padding:0;border-radius:0}

select.field{color:#1f1637;background:rgba(255,255,255,.92)}
.click-brand-fixed{position:sticky;top:0;z-index:30;background:linear-gradient(180deg, rgba(46,13,117,.95), rgba(46,13,117,0));backdrop-filter:blur(10px);padding:8px 12px 10px}.click-brand-fixed .inner{max-width:430px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px}.click-brand-fixed img{width:38px;height:38px;border-radius:14px;object-fit:contain;background:rgba(255,255,255,.10);padding:6px}.click-brand-fixed .txt{flex:1}.click-brand-fixed .t1{font-size:14px;font-weight:900}.click-brand-fixed .t2{font-size:11px;color:var(--muted);font-weight:800}.click-brand-fixed .t2 img{width:16px;height:16px;padding:0;background:none;border-radius:0}
