:root{
  --ll-blue:#405cc8;
  --ll-purple:#7c3aed;
  --ll-pink:#ff3ea5;
  --ll-mint:#06d6a0;
  --ll-gold:#ffb703;

  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --soft:#f3f5ff;
  --shadow: 0 24px 60px rgba(0,0,0,.22);
  --r:22px;
}

*{box-sizing:border-box;font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 18px 0;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(255,62,165,.18), transparent 60%),
    radial-gradient(800px 600px at 90% 30%, rgba(6,214,160,.18), transparent 55%),
    radial-gradient(900px 700px at 50% 90%, rgba(64,92,200,.22), transparent 60%),
    linear-gradient(135deg, #0b1026, #171140);
  overflow-x:hidden;
}



#confettiCanvas{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:50;
}

.shell{
  width:min(980px, 94vw);
  padding:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* ---------- Topbar ---------- */
.topbar{
  width: 100%;
  max-width: 860px;
  margin: 0 auto 14px;
  display:flex;
  gap:16px;
  justify-content:space-between;
  align-items:flex-start;
  color:#fff;
}

.brand{display:flex; gap:12px; align-items:center;}
.logoDot{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, var(--ll-blue), var(--ll-purple));
  box-shadow: 0 14px 32px rgba(0,0,0,.25);
}
.brandName{font-weight:800; letter-spacing:.2px; font-size:18px;}
.brandTag{font-size:13px; color: rgba(255,255,255,.75);}



@keyframes floaty{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}

/* ---------- Card ---------- */
.card{
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 26px;
}

.screen{
  display:none;
}

.screen.active{
  display:block;
  width:100%;
}


@keyframes in{
  from{opacity:0; transform: translateY(12px) scale(.99);}
  to{opacity:1; transform: translateY(0) scale(1);}
}

h1{margin:0 0 8px; font-size:28px; color:var(--text);}
h2{margin:0 0 8px; font-size:22px; color:var(--text);}
h3{margin:0 0 10px; font-size:16px; color:var(--text);}



/* ===== Simple Intro Screen ===== */
.introSimple{
  min-height: 52vh;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 26px;
}

/* Only show intro as flex when it is the active screen */
.screen.active.introSimple{
  display:flex;
}

/* ===== Intro Mascot ===== */
.introSimple{
  position: relative; /* anchor for absolute mascot */
}

.introMascot{
  position: absolute;
  bottom: -50px;
  left: -70px;

 width: min(420px, 48vw);
transform: scale(1.05);
transform-origin: bottom left;
 filter: drop-shadow(-12px 18px 28px rgba(0,0,0,0.25));

  pointer-events: none; /* prevents blocking clicks */
  user-select: none;

  opacity: 0.95;
}

/* Tablet */
@media (max-width: 900px){
  .introMascot{
    bottom: -50px;   /* keep offset */
    left: -50px;     /* keep offset */

    width: min(320px, 55vw);
    transform: scale(1.05);
    transform-origin: bottom left;
  }
}

/* Mobile */
@media (max-width: 600px){
  .introMascot{
    bottom: -70px;   /* keep offset (or adjust) */
    left: -75px;     /* keep offset (or adjust) */

    width: min(260px, 80vw);
    transform: scale(1.05);
    transform-origin: bottom left;
    opacity: 0.9;
  }
}


/* ===== Stacked Hero Title ===== */
.heroTitle.stacked{
  margin: 0;
  text-align:center;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.05;
  font-size: clamp(34px, 6vw, 72px);
  color: var(--text);
}

.heroTitle.stacked span{
  display:block;
}


.sub{
  margin:0 auto 18px;
  color:var(--muted);
  line-height:1.45;
  max-width: 58ch;
}

.pill{
  background: var(--soft);
  padding:10px 12px;
  border-radius: 14px;
  color:#334155;
  border:1px solid rgba(64,92,200,.12);
}

/* Optional subtle link */
.linkBtn{
  margin-top: 14px;
  background: transparent;
  border: 0;
  color: rgba(15,23,42,.75);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.btn{
  width:100%;
  padding:14px 14px;
  border-radius:16px;
  border:0;
  cursor:pointer;
  font-weight:700;
  font-size:15px;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}
.btn:hover{transform: translateY(-2px);}
.btn:active{transform: translateY(0px) scale(.99); filter: brightness(.98);}

.primary{
  color:#fff;
  background: linear-gradient(135deg, var(--ll-blue), var(--ll-purple));
}
.ghost{
  background: transparent;
  border: 1px solid rgba(15,23,42,.14);
  color:#1f2937;
  box-shadow:none;
}

.role.kid{background: linear-gradient(135deg, var(--ll-gold), #ff7a00); color:#1f2937;}
.role.parent{background: linear-gradient(135deg, var(--ll-mint), #00b894); color:#06261b;}

/* ---------- Layout blocks ---------- */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  max-width: 640px;
  margin: 0 auto;
}
@media (max-width:720px){ .grid2{grid-template-columns:1fr;} }

.ctaRow{
  display:grid;
  gap:12px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width:720px){ .ctaRow{grid-template-columns:1fr;} }

.ctaRow.single{
  grid-template-columns: 1fr;
  max-width: 420px;
  margin: 0 auto;
}

/* ---------- Quiz Progress (CENTERED) ---------- */
.meta.centered{
  display:flex;
  justify-content:center;
  align-items:center;
  margin-bottom: 14px;
}

.progressWrap{
  width:100%;
  max-width: 420px;
  text-align:center;
}

.progress{
  height:10px;
  background: #e9ecff;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(64,92,200,.14);
}
.bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--ll-pink), var(--ll-blue), var(--ll-mint));
  transition: width .35s ease;
}
.count{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
  text-align:center;
}

/* ---------- Question + Options ---------- */
.q{margin-top:12px;}

.options{
  display:grid;
  gap:12px;
  max-width: 720px;
  margin: 0 auto 10px;
}

.options .btn{
  text-align:left;
  background: #f6f7ff;
  color:#0f172a;
  border:1px solid rgba(64,92,200,.12);
}
.options .btn:hover{
  box-shadow: 0 16px 28px rgba(64,92,200,.14);
}

/* ---------- Nav Row ---------- */
.navRow{
  display:flex;
  gap:12px;
  margin-top:12px;
  justify-content:center;
}
.navRow .btn{
  width:auto;
  flex:1;
  max-width: 320px;
}

/* ---------- Results ---------- */
.resultHero{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
  text-align:left;
}
@media (max-width:720px){
  .resultHero{flex-direction:column; text-align:center;}
}

.badge{
  width:64px; height:64px;
  border-radius:22px;
  background: linear-gradient(135deg, var(--ll-pink), var(--ll-purple));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:28px;
  box-shadow: 0 18px 36px rgba(255,62,165,.20);
}

/* Results-only profile panel */
.profilePanel{
  margin: 14px 0 10px;
  background: #f7f8ff;
  border: 1px solid rgba(64,92,200,.12);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
}

.profileGrid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}

.profileChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(64,92,200,.12);
  color:#334155;
  font-weight:700;
  font-size:13px;
  white-space:nowrap;
}

@media (max-width:720px){
  .profilePanel{ text-align:center; }
  .profileGrid{ justify-content:center; }
}

.resultGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin: 14px 0;
}
@media (max-width:720px){ .resultGrid{grid-template-columns:1fr;} }

.panel{
  background: #f7f8ff;
  border: 1px solid rgba(64,92,200,.12);
  border-radius: 18px;
  padding: 14px;
  text-align:left;
}
.panel ul{margin:10px 0 0; padding-left:18px; color:#334155;}
.panel li{margin:6px 0; line-height:1.35;}

.shareRow{
  display:flex;
  gap:12px;
  margin-top:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.shareRow .btn{
  width:auto;
  flex:1;
  min-width:220px;
  max-width: 420px;
}

/* Email area */
.emailPanel{margin-top:14px;}
.emailRow{display:flex; gap:10px; flex-wrap:wrap;}
.emailRow input{
  flex:1;
  min-width:220px;
  padding:14px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.14);
  outline:none;
  font-size:14px;
}
.note{margin-top:10px; font-size:13px; color: var(--muted);}

/* ---------- Footer ---------- */
.footer{
  width: 100%;
  max-width: 860px;
  display:flex;
  justify-content:space-between;
  margin-top:12px;
  color: rgba(255,255,255,.72);
  font-size:12px;
}
.footer .muted{opacity:.8}

@media (max-width:720px){
  .topbar{flex-direction:column; align-items:center; text-align:center;}
  .brand{justify-content:center;}
  .mascot{max-width: 100%; justify-content:center;}
  .bubble{max-width: 320px;}
  .footer{flex-direction:column; gap:6px; text-align:center;}
}

/* ---------- How It Works Modal (Bottom Sheet) ---------- */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}
.modal.show{ display:block; }

.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  animation: fadeIn .18s ease;
}

.modalSheet{
  position:absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(720px, 94vw);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(0,0,0,.35);
  padding: 14px 14px 18px;
  animation: sheetUp .22s ease;
}

.modalHandle{
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,.18);
  margin: 6px auto 10px;
}

.modalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 0 6px 10px;
}

.iconBtn{
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 18px;
  transition: background .12s ease, transform .12s ease;
}
.iconBtn:hover{ background: rgba(15,23,42,.06); }
.iconBtn:active{ transform: scale(.98); }

.modalBody{
  display:grid;
  gap: 10px;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

@keyframes sheetUp{
  from{ transform: translateX(-50%) translateY(18px); opacity:0; }
  to{ transform: translateX(-50%) translateY(0); opacity:1; }
}
