@font-face { font-family: Fredoka; font-weight: 400; font-display: swap; src: url(/s/vendor/fonts/fredoka-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url(/s/vendor/fonts/fredoka-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(/s/vendor/fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(/s/vendor/fonts/fredoka-latin-700-normal.woff2) format('woff2'); }

:root {
  --purple: #7B2CBF;
  --purple-2: #9D4EDD;
  --night: #2B104A;
  --night-2: #1C0933;
  --lime: #6BEB1A;
  --lime-dark: #4FBF0C;
  --orange: #FF7A1A;
  --blue: #2F5BEA;
  --yellow: #FFC93C;
  --red: #FF4D5E;
  --text: #FFFFFF;
  --muted: #D9C8F0;
  --card: rgba(255, 255, 255, .08);
  --radius: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { background: #1C0933; }
body {
  font-family: Fredoka, ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--purple) 0%, var(--night) 55%, var(--night-2) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#app { position: relative; max-width: 480px; margin: 0 auto; min-height: 100%; padding: max(12px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: center; padding: 6px 0 4px; }
.logo { width: 168px; height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }

.screen { display: none; animation: enter .45s cubic-bezier(.2,.9,.3,1.2) both; }
.screen.on { display: block; }
.screen.center { text-align: center; padding-top: 4vh; }
@keyframes enter { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

h1 { font-size: 30px; line-height: 1.12; margin: 6px 0 10px; font-weight: 700; letter-spacing: -.2px; }
h2 { font-size: 25px; line-height: 1.15; margin: 10px 0 8px; font-weight: 700; }
.lead { font-size: 18px; line-height: 1.4; color: var(--muted); margin: 0 auto 18px; max-width: 26em; }
.lead b { color: var(--lime); font-weight: 600; }
.fine { font-size: 13px; line-height: 1.45; color: #BFA9DD; text-align: center; margin: 12px 6px; }
.hero { text-align: center; }

/* ---------- Botões ---------- */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; margin: 12px 0; padding: 14px 20px; border: 0; border-radius: 999px;
  font: 600 20px/1 Fredoka, system-ui, sans-serif; text-decoration: none; cursor: pointer; color: var(--night);
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn-call { background: linear-gradient(180deg, #8BFF3E, var(--lime) 55%, var(--lime-dark)); box-shadow: 0 10px 0 #3a9a07, 0 18px 40px rgba(107,235,26,.35); min-height: 72px; font-size: 23px; margin-bottom: 22px; overflow: hidden; }
.btn-call:active { box-shadow: 0 4px 0 #3a9a07; transform: translateY(6px); }
.btn-call .pulse { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(107,235,26,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70% { box-shadow: 0 0 0 18px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.btn-secondary { background: #fff; color: var(--purple); box-shadow: 0 6px 0 #C9B3E6; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.35); min-height: 52px; font-size: 18px; }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 6px 0 #B92B39; }
.link-small { display: block; text-align: center; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; margin: 18px 0 8px; cursor: pointer; }

.card { background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; text-align: left; backdrop-filter: blur(6px); }
.card p { margin: 6px 0 4px; color: var(--muted); }
.tips ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.5; }
.emergency { border-color: rgba(255,77,94,.5); }

/* ---------- Mascote ---------- */
.mascot-slot { width: 150px; height: 172px; margin: 0 auto; }
.mascot-slot.small { width: 112px; height: 128px; }
.mascot { width: 100%; height: 100%; overflow: visible; }
.m-body { transform-origin: 100px 200px; animation: bob 2.4s ease-in-out infinite; }
.m-shadow { fill: rgba(0,0,0,.25); transform-origin: 100px 218px; animation: shadow 2.4s ease-in-out infinite; }
.m-arm-r { transform-origin: 156px 120px; animation: wave 1.2s ease-in-out infinite; }
.m-eyes { transform-origin: 100px 86px; animation: blink 4s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes shadow { 0%,100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.8); opacity: .6; } }
@keyframes wave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-28deg); } }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.ringing .m-body { animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.dancing .m-body { animation: dance 1s ease-in-out infinite; }
.dancing .m-arm-l { transform-origin: 44px 120px; animation: wave 0.8s ease-in-out infinite reverse; }
@keyframes dance { 0%,100% { transform: translateY(0) rotate(-8deg); } 25% { transform: translateY(-16px) rotate(0); } 50% { transform: translateY(0) rotate(8deg); } 75% { transform: translateY(-16px) rotate(0); } }
.sad .m-mouth { d: path('M84 120 Q100 108 116 120'); }
.sad .m-arm-r { animation: none; }

/* ---------- Fundo animado ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#app > * { position: relative; z-index: 1; }
.bubble { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(157,78,221,.15)); animation: float 14s linear infinite; }
.b1 { width: 90px; height: 90px; left: -20px; top: 70%; }
.b2 { width: 40px; height: 40px; right: 10%; top: 85%; animation-duration: 10s; animation-delay: -3s; }
.b3 { width: 60px; height: 60px; left: 70%; top: 95%; animation-duration: 17s; animation-delay: -8s; }
.b4 { width: 26px; height: 26px; left: 30%; top: 90%; animation-duration: 9s; animation-delay: -5s; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-120vh); } }
.star { position: absolute; color: var(--yellow); font-size: 18px; animation: twinkle 2.6s ease-in-out infinite; }
.s1 { top: 14%; left: 10%; } .s2 { top: 24%; right: 12%; animation-delay: -1s; color: var(--lime); } .s3 { top: 52%; left: 6%; animation-delay: -2s; font-size: 12px; }
@keyframes twinkle { 0%,100% { opacity: .2; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(45deg); } }

/* ---------- Tocando ---------- */
.ring-stage { position: relative; width: 240px; height: 240px; margin: 10px auto 0; display: grid; place-items: center; }
.ring { position: absolute; inset: 40px; border-radius: 50%; border: 4px solid var(--lime); opacity: 0; animation: ripple 2.1s ease-out infinite; }
.r2 { animation-delay: .7s; } .r3 { animation-delay: 1.4s; }
@keyframes ripple { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.dots i { animation: dot 1.2s infinite; font-style: normal; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%,60%,100% { opacity: .2; } 30% { opacity: 1; } }
.self-round { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); border: 4px solid var(--lime); margin: 4px auto 6px; display: block; background: var(--night); }

/* ---------- Em chamada ---------- */
#app > .screen.incall.on { display: flex; flex-direction: column; position: fixed; inset: 0; padding: 0; z-index: 5; background: var(--night-2); }
.stage { position: relative; flex: 1; overflow: hidden; }
.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.party { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: radial-gradient(90% 60% at 50% 30%, var(--purple-2), var(--purple) 40%, var(--night) 100%); }
.party h2 { font-size: 26px; margin-top: 14px; }
.party .lead.kid { font-size: 20px; color: #fff; }
.party .mascot-slot { width: 190px; height: 218px; }
.balloon { position: absolute; top: 24%; left: 12%; background: #fff; color: var(--purple); font-weight: 700; font-size: 20px; padding: 10px 16px; border-radius: 20px 20px 4px 20px; animation: pop 2.4s ease-in-out infinite; }
@keyframes pop { 0%,100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.1) rotate(4deg); } }
.eq { display: flex; gap: 6px; height: 34px; align-items: flex-end; margin-top: 8px; }
.eq i { width: 8px; border-radius: 4px; background: var(--lime); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; background: var(--yellow); } .eq i:nth-child(3) { animation-delay: .3s; background: var(--orange); }
.eq i:nth-child(4) { animation-delay: .45s; background: var(--blue); } .eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%,100% { height: 8px; } 50% { height: 34px; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.self-pip { position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); width: 104px; height: 140px; border-radius: 18px; object-fit: cover; transform: scaleX(-1); border: 3px solid rgba(255,255,255,.85); background: #000; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 3; }
.self-pip.back { transform: none; }
.parent-map { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 34%; border-radius: 18px; overflow: hidden; border: 3px solid var(--lime); z-index: 2; }
.status-pill { position: absolute; left: 14px; top: max(14px, env(safe-area-inset-top)); background: rgba(0,0,0,.45); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 16px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(107,235,26,.7); animation: pulse 1.6s infinite; }
.banner { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); background: var(--yellow); color: var(--night); padding: 8px 16px; border-radius: 999px; font-weight: 600; z-index: 4; }
.controls { display: flex; justify-content: space-around; padding: 14px 16px max(18px, env(safe-area-inset-bottom)); background: var(--night); }
.ctl { width: 74px; height: 74px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.ctl small { font: 500 11px Fredoka, sans-serif; color: var(--muted); }
.ctl.off { background: #fff; color: var(--night); }
.ctl-end { background: var(--red); }
.ctl-end small { color: #fff; }

/* ---------- Onboarding ---------- */
.code-chip { margin: 6px auto 4px; width: max-content; padding: 10px 18px; border-radius: 14px; background: rgba(0,0,0,.25); border: 2px dashed rgba(107,235,26,.6); font-size: 16px; color: var(--muted); }
.code-chip b { color: var(--lime); letter-spacing: 3px; font-size: 22px; margin-left: 8px; }
.steps { list-style: none; padding: 0; margin: 18px 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.steps .n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--night); font-weight: 700; font-size: 20px; }
.steps b { font-size: 18px; }
.steps p { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
.stores { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.store { display: flex; flex-direction: column; justify-content: center; min-width: 128px; padding: 8px 16px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; font-weight: 600; font-size: 18px; border: 1px solid rgba(255,255,255,.3); cursor: pointer; }
.store small { font-size: 11px; font-weight: 400; color: #ccc; }
.store.primary { order: -1; border-color: var(--lime); }

.spinner { width: 48px; height: 48px; margin: 30px auto; border-radius: 50%; border: 5px solid rgba(255,255,255,.18); border-top-color: var(--lime); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; color: var(--night); padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 90vw; text-align: center; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
@media (min-height: 760px) { .screen.center { padding-top: 8vh; } }
