/* StarJar intro site. Same tokens, fonts and chunky "pressable" look as the PWA (frontend/src/styles). */
:root {
  --ink: #23264a;
  --ink-soft: #4a5078;
  --ink-faint: #8a90b0;
  --white: #ffffff;
  --sky: #eef8ff;
  --sky-line: #d3e4f3;
  --cream: #fff6e0;
  --cream-line: #eed9a6;
  --grape: #6c4bf4;
  --grape-dark: #4b2fc9;
  --grape-soft: #e4dcff;
  --grape-tint: #f3f0ff;
  --sun: #ffc531;
  --sun-dark: #e0a000;
  --sun-soft: #ffe08a;
  --sun-tint: #fff1c2;
  --mint: #5fd39a;
  --mint-dark: #3bae78;
  --mint-soft: #d6f5e7;
  --mint-text: #0b7a55;
  --coral: #ff8a8a;
  --coral-dark: #d95f5f;
  --coral-soft: #ffe3e3;
  --coral-text: #b3232a;
  --pink: #ff8fb1;
  --pink-soft: #ffe3ec;
  --blue-soft: #d6f0ff;
  --blue-text: #1f6fb8;
  --orange-soft: #ffe9d1;
  --orange-text: #a34f00;

  --font-display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-card: 24px;
  --gutter: 20px;
  --line: var(--sky-line);
}
:lang(zh-Hans) {
  --font-display: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Nunito', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--grape); }
h1, h2, h3 { margin: 0; line-height: 1.12; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 8px; }
.display { font-family: var(--font-display); font-weight: 800; }
.muted { color: var(--ink-soft); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; border-radius: 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* icons are filled in by site.js (Lucide-style strokes, like the app) */
.ic, [data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic svg { width: 1.15em; height: 1.15em; }

/* ───────── Buttons + cards (same press-down look as the app) ───────── */
.btn {
  border: 0;
  border-radius: 22px;
  min-height: 56px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn.big { min-height: 62px; font-size: 21px; padding: 0 28px; }
.btn.small { min-height: 42px; font-size: 16px; padding: 0 16px; border-radius: 16px; }
.btn-sun { background: var(--sun); box-shadow: 0 6px 0 var(--sun-dark); }
.btn-sun:active { box-shadow: 0 2px 0 var(--sun-dark); }
.btn-grape { background: var(--grape); color: var(--white); box-shadow: 0 5px 0 var(--grape-dark); }
.btn-grape:active { box-shadow: 0 1px 0 var(--grape-dark); }
.glow { animation: sj-glow-sun 1.9s ease-in-out infinite; }
.btn .ic svg { width: 24px; height: 24px; }
.card { background: var(--white); border-radius: var(--r-card); box-shadow: 0 5px 0 var(--line); padding: 20px; }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 248, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(211, 228, 243, 0.7);
}
.topbar-in { display: flex; align-items: center; gap: 14px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { border-radius: 12px; }
.brand-name { font-family: 'Baloo 2', var(--font-display); font-weight: 800; font-size: 23px; line-height: 1; }
.brand-zh { font-family: 'ZCOOL KuaiLe', sans-serif; font-weight: 400; font-size: 19px; color: var(--grape); }
.links { display: flex; gap: 4px; }
.links a { color: var(--ink-soft); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 12px; }
.links a:hover { background: var(--white); color: var(--grape); }
.lang {
  border: 0;
  background: var(--white);
  box-shadow: 0 3px 0 var(--line);
  border-radius: 14px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 900;
}
.lang span { font-family: 'ZCOOL KuaiLe', 'Nunito', sans-serif; font-size: 17px; }
:lang(zh-Hans) .lang span { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 15px; }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky) 0%, #e4f2ff 100%);
  padding: 40px 0 90px;
  overflow: hidden;
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-radius: 999px;
  padding: 6px 16px 6px 8px;
  font-weight: 900;
  color: var(--grape);
  box-shadow: 0 3px 0 var(--line);
  margin-bottom: 18px;
  animation: sj-rise 0.5s ease-out both;
}
.mascot-mini { width: 34px; height: 34px; }
.hero h1 { font-size: clamp(40px, 6vw, 70px); letter-spacing: -0.5px; animation: sj-rise 0.55s 0.05s ease-out both; }
:lang(zh-Hans) .hero h1 { letter-spacing: 1px; font-weight: 400; }
:lang(zh-Hans) h2.display, :lang(zh-Hans) h3.display, :lang(zh-Hans) .display { font-weight: 400; }
.hl { color: var(--grape); position: relative; isolation: isolate; white-space: nowrap; }
.hl::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.28em;
  background: var(--sun);
  opacity: 0.55;
  border-radius: 8px;
  z-index: -1;
  transform-origin: 0 50%;
  animation: hl-in 0.8s 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes hl-in { from { transform: scaleX(0) } }
.lead { font-size: 20px; color: var(--ink-soft); margin: 18px 0 26px; max-width: 34em; font-weight: 600; animation: sj-rise 0.55s 0.1s ease-out both; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; animation: sj-rise 0.55s 0.15s ease-out both; }
.promise { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.promise li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint-soft);
  color: var(--mint-text);
  font-weight: 900;
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  animation: sj-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.promise li:nth-child(1) { animation-delay: 0.3s }
.promise li:nth-child(2) { animation-delay: 0.4s }
.promise li:nth-child(3) { animation-delay: 0.5s }
.promise li:nth-child(4) { animation-delay: 0.6s }
.promise .ic svg { width: 18px; height: 18px; }

.sky-deco { position: absolute; inset: 0; pointer-events: none; }
.tw { position: absolute; width: 22px; height: 22px; animation: sj-twinkle 1.8s ease-in-out infinite; }
.tw::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sun);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.tw.pink::before { background: var(--pink); }
.tw.grape::before { background: #9c8cff; }
.tw.mint::before { background: var(--mint); }
.t1 { left: 4%; top: 14%; }
.t2 { left: 44%; top: 8%; width: 16px; height: 16px; animation-delay: 0.5s; }
.t3 { right: 6%; top: 18%; animation-delay: 1s; }
.t4 { left: 38%; bottom: 22%; width: 14px; height: 14px; animation-delay: 0.3s; }
.t5 { right: 44%; top: 70%; width: 18px; height: 18px; animation-delay: 1.3s; }
.t6 { left: 8%; bottom: 18%; width: 16px; height: 16px; animation-delay: 0.8s; }
.cloud { position: absolute; background: var(--white); border-radius: 999px; opacity: 0.8; animation: sj-drift 9s ease-in-out infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.c1 { width: 120px; height: 36px; left: 50%; top: 5%; }
.c1::before { width: 56px; height: 56px; left: 18px; top: -28px; }
.c1::after { width: 40px; height: 40px; left: 62px; top: -18px; }
.c2 { width: 90px; height: 28px; right: 3%; bottom: 16%; animation-delay: -4s; }
.c2::before { width: 44px; height: 44px; left: 14px; top: -22px; }
.c2::after { width: 30px; height: 30px; left: 48px; top: -14px; }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; }

/* ───────── Demo phones (laid out at 520 × 540, scaled by site.js) ───────── */
.stage-wrap { position: relative; width: 100%; animation: sj-rise 0.6s 0.2s ease-out both; }
.stage { position: relative; width: 520px; height: 540px; transform-origin: 0 0; }
.phone {
  position: absolute;
  width: 248px;
  height: 500px;
  border-radius: 40px;
  background: var(--ink);
  padding: 9px;
  box-shadow: 0 24px 50px rgba(35, 38, 74, 0.22), 0 6px 0 #11132e;
}
.phone .notch { position: absolute; left: 50%; top: 15px; width: 70px; height: 18px; margin-left: -35px; border-radius: 12px; background: var(--ink); z-index: 2; }
.phone .screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; padding: 38px 13px 0; display: flex; flex-direction: column; gap: 10px; }
.phone.parent { left: 0; top: 34px; transform: rotate(-4deg); }
.phone.parent .screen { background: var(--cream); --line: var(--cream-line); }
.phone.kid { left: 268px; top: 4px; transform: rotate(3deg); }
.phone.kid .screen { background: var(--sky); }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.p-title { font-size: 21px; }
.seg { display: inline-flex; background: var(--white); border-radius: 999px; padding: 3px; font-size: 11px; font-weight: 900; box-shadow: 0 2px 0 var(--cream-line); }
.seg > * { padding: 3px 8px; border-radius: 999px; color: var(--ink-faint); }
.seg b { background: var(--grape); color: var(--white); }
.kidpills { display: flex; gap: 6px; }
.kp { display: inline-flex; align-items: center; gap: 3px; background: var(--white); border-radius: 999px; padding: 3px 9px 3px 3px; font-weight: 900; font-size: 13px; box-shadow: 0 2px 0 var(--cream-line); }
.kp:last-child { padding-left: 10px; }
.kp.on { background: var(--grape); color: var(--white); box-shadow: 0 2px 0 var(--grape-dark); }
.kp .bud svg { width: 24px; height: 24px; }
.p-hint { font-size: 12px; font-weight: 900; color: var(--ink-faint); margin-top: 2px; }
.deeds { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.deed {
  position: relative;
  border: 0;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--cream-line);
  padding: 9px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 80px;
  transition: transform 0.08s, box-shadow 0.08s;
}
.deed:active, .deed.press { transform: translateY(3px); box-shadow: 0 1px 0 var(--cream-line); }
.deed.bump { animation: sj-bump 0.45s ease-out; }
.dic { width: 36px; height: 36px; border-radius: 12px; }
.dic svg { width: 21px; height: 21px; }
.dn { font-weight: 900; font-size: 12.5px; line-height: 1.15; text-align: center; }
.pts { position: absolute; top: 6px; right: 6px; background: var(--sun); color: var(--ink); font-weight: 900; font-size: 11px; border-radius: 999px; padding: 0 6px; }
.deed.else { background: transparent; box-shadow: none; border: 2px dashed var(--cream-line); cursor: default; }
/* colour tiles (deed, benefit and kid-feature icons) */
:is(.dic, .btile, .ktile).sun { background: var(--sun-tint); color: #7a5600; }
:is(.dic, .btile, .ktile).pink { background: var(--pink-soft); color: #b0234f; }
:is(.dic, .btile, .ktile).grape { background: var(--grape-soft); color: var(--grape-dark); }
:is(.dic, .btile, .ktile).mint { background: var(--mint-soft); color: var(--mint-text); }
:is(.dic, .btile, .ktile).sky { background: var(--blue-soft); color: var(--blue-text); }
:is(.dic, .btile, .ktile).orange { background: var(--orange-soft); color: var(--orange-text); }
:is(.dic, .btile, .ktile).ink { background: var(--white); color: var(--ink-faint); }
.tabbar {
  margin-top: auto;
  margin-left: -13px;
  margin-right: -13px;
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 16px;
  background: var(--white);
  color: var(--ink-faint);
  border-radius: 22px 22px 0 0;
}
.tabbar span { width: 34px; height: 30px; border-radius: 10px; }
.tabbar span svg { width: 20px; height: 20px; }
.tabbar .on { background: var(--grape-tint); color: var(--grape); }
.finger {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(108, 75, 244, 0.25);
  border: 3px solid rgba(108, 75, 244, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.finger.go { animation: finger 0.9s ease-out; }
@keyframes finger {
  0% { opacity: 0; transform: scale(1.6) }
  35% { opacity: 1; transform: scale(1) }
  55% { opacity: 1; transform: scale(0.8) }
  100% { opacity: 0; transform: scale(1.4) }
}
.k-head { display: flex; align-items: center; gap: 8px; }
.k-head .bud svg { width: 52px; height: 52px; }
.k-hi { font-size: 22px; }
.total {
  position: relative;
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--sky-line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}
.total.bump { animation: sj-bump 0.45s ease-out; }
.total-star svg { width: 40px; height: 40px; animation: sj-sway 2.4s ease-in-out infinite; transform-origin: 50% 70%; }
.total-num { font-size: 40px; line-height: 1; }
.total-lbl { font-weight: 900; color: var(--ink-soft); align-self: flex-end; margin-bottom: 4px; }
.plus {
  position: absolute;
  right: 14px;
  top: 8px;
  color: var(--mint-text);
  font-size: 24px;
  opacity: 0;
}
.plus.go { animation: plus-up 1.1s ease-out; }
@keyframes plus-up {
  0% { opacity: 0; transform: translateY(10px) scale(0.6) }
  25% { opacity: 1; transform: translateY(0) scale(1.15) }
  70% { opacity: 1; transform: translateY(-10px) scale(1) }
  100% { opacity: 0; transform: translateY(-22px) }
}
.goal {
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--sky-line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  transition: background 0.4s;
}
.goal.done { background: linear-gradient(180deg, var(--white), var(--sun-tint)); box-shadow: 0 4px 0 var(--sun-dark); }
.jar { width: 92px; height: 115px; flex-shrink: 0; }
.jar svg { width: 100%; height: 100%; overflow: visible; }
.jar .fill { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(0.2, 0.9, 0.3, 1); }
.jar .st { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; transform: scale(0); transition: opacity 0.2s, transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.jar .st.on { opacity: 1; transform: scale(1); }
.goal-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.goal-name { font-size: 19px; line-height: 1.1; }
.goal-frac { font-weight: 900; color: var(--ink-soft); }
.goal-togo { font-weight: 900; font-size: 13px; color: var(--mint-text); }
.goal.done .goal-togo { font-family: var(--font-display); font-size: 17px; animation: sj-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.did { min-height: 46px; font-size: 16px; border-radius: 18px; cursor: default; }
.did:hover { transform: none; }
.kidbar { margin-top: auto; }
.kfriends { display: flex; align-items: center; gap: 4px; background: var(--white); border-radius: 20px; box-shadow: 0 4px 0 var(--sky-line); padding: 6px 10px; font-size: 15px; white-space: nowrap; }
.kf-b { display: flex; margin-left: auto; }
.kf-b .bud svg { width: 27px; height: 27px; }
.kf-s { font-size: 20px; animation: sj-wiggle 3s ease-in-out infinite; }
.tap-tip {
  position: absolute;
  left: 18px;
  top: -6px;
  background: var(--grape);
  color: var(--white);
  font-weight: 900;
  font-size: 15px;
  border-radius: 14px;
  padding: 6px 12px;
  box-shadow: 0 4px 0 var(--grape-dark);
  animation: sj-bob 2.6s ease-in-out infinite;
  transition: opacity 0.4s;
  z-index: 4;
}
.tap-tip::after { content: ''; position: absolute; left: 30px; bottom: -7px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--grape); }
.tap-tip.gone { opacity: 0; }
.flyer { position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 60; pointer-events: none; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 40px; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: sj-fall 1.8s ease-in forwards; }

/* ───────── Sections ───────── */
.sec { position: relative; padding: 84px 0; }
.sec.white { background: var(--white); }
.sec.cream { background: var(--cream); --line: var(--cream-line); }
.sec.sky { background: var(--sky); }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 50px); margin: 14px 0 14px; }
.sub { font-size: 19px; color: var(--ink-soft); font-weight: 600; }
.kicker { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 14px; font-weight: 900; font-size: 15px; }
.kicker .ic svg { width: 18px; height: 18px; }
.mint-k { background: var(--mint-soft); color: var(--mint-text); }
.sun-k { background: var(--sun-tint); color: #7a5600; }
.grape-k { background: var(--grape-soft); color: var(--grape-dark); }

.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pcard {
  background: var(--sky);
  border-radius: 26px;
  padding: 24px 20px;
  box-shadow: 0 5px 0 var(--sky-line);
  transition: transform 0.2s;
}
.pcard:hover { transform: translateY(-4px) rotate(-0.5deg); }
.pcard h3 { font-size: 25px; margin: 14px 0 8px; }
.pcard p { color: var(--ink-soft); font-size: 16px; }
.ptile { position: relative; width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.ptile .ic svg { width: 34px; height: 34px; }
.pcard:hover .ptile { animation: sj-wiggle 1.2s ease-in-out; }
.ptile.grape { background: var(--grape); color: var(--white); box-shadow: 0 4px 0 var(--grape-dark); }
.ptile.sun { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--sun-dark); }
.ptile.sky { background: #5bb8f5; color: var(--white); box-shadow: 0 4px 0 #3c93d6; }
.ptile.coral { background: var(--coral); color: var(--white); box-shadow: 0 4px 0 var(--coral-dark); }

.kidsafe {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--mint-soft);
  border-radius: 28px;
  padding: 26px 30px;
}
.kidsafe-art svg { width: 120px; height: 120px; }
.kidsafe ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
.kidsafe li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.kidsafe li .ic { color: var(--white); background: var(--mint-dark); border-radius: 50%; width: 24px; height: 24px; margin-top: 1px; }
.kidsafe li .ic svg { width: 16px; height: 16px; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bcard { background: var(--white); border-radius: 26px; padding: 22px; box-shadow: 0 5px 0 var(--cream-line); transition: transform 0.2s; }
.bcard:hover { transform: translateY(-4px); }
.bcard h3 { font-size: 22px; margin: 14px 0 6px; }
.bcard p { color: var(--ink-soft); font-size: 16px; }
.btile, .ktile { width: 54px; height: 54px; border-radius: 18px; }
.btile svg, .ktile svg { width: 28px; height: 28px; }
.bcard:hover .btile { animation: sj-bump 0.45s ease-out; }

.kids-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.buddy-box { text-align: center; padding: 26px 22px 18px; }
.buddy-box h3 { font-size: 28px; }
.buddy-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; }
.bb { border: 0; background: var(--sky); border-radius: 18px; padding: 6px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.1s; }
.bb:hover { background: var(--grape-tint); }
.bb.on { background: var(--sun-tint); box-shadow: 0 0 0 3px var(--sun) inset; }
.bb svg { width: 100%; height: 100%; }
.buddy-name { font-size: 22px; margin-top: 10px; min-height: 1.3em; color: var(--grape); }
.kid-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kid-feats li { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border-radius: 24px; padding: 18px; box-shadow: 0 5px 0 var(--sky-line); }
.kid-feats h3 { font-size: 21px; margin-bottom: 4px; }
.kid-feats p { color: var(--ink-soft); font-size: 16px; }
.kid-feats li:hover .ktile { animation: sj-jump 0.9s cubic-bezier(0.3, 1.6, 0.5, 1); }

.friends {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(135deg, var(--grape) 0%, #8a6cff 100%);
  color: var(--white);
  border-radius: 32px;
  padding: 34px;
  box-shadow: 0 6px 0 var(--grape-dark);
}
.friends h3 { font-size: 30px; margin-bottom: 10px; }
.friends p { opacity: 0.95; font-size: 17px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tool { background: rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 15px; }
.rain-card { position: relative; height: 300px; background: var(--sky); border-radius: 26px; overflow: hidden; color: var(--ink); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.5); }
.rain-head { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; background: var(--white); border-radius: 18px; padding: 6px 12px 6px 6px; z-index: 2; box-shadow: 0 3px 0 var(--sky-line); font-size: 17px; }
.rain-head .bud svg { width: 36px; height: 36px; }
.rain { position: absolute; inset: 0; }
.rain span { position: absolute; top: -50px; font-size: 30px; animation: sj-fall linear forwards; }
.rain-big { position: absolute; left: 50%; top: 48%; font-size: 92px; line-height: 1; transform: translate(-50%, -50%) scale(0); opacity: 0; }
.rain-big.go { animation: big-sticker 2.2s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes big-sticker {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0 }
  25% { transform: translate(-50%, -50%) scale(1.15) rotate(6deg); opacity: 1 }
  40% { transform: translate(-50%, -50%) scale(1) rotate(-4deg) }
  80% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1 }
  100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0 }
}
.rain-stickers { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 6px; z-index: 2; }
.stk { border: 0; flex: 1; height: 48px; border-radius: 16px; background: var(--white); box-shadow: 0 4px 0 var(--sky-line); font-size: 24px; transition: transform 0.08s; }
.stk:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sky-line); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; text-align: center; background: var(--sky); border-radius: 28px; padding: 30px 22px 26px; box-shadow: 0 5px 0 var(--sky-line); }
.num { position: absolute; left: 18px; top: 14px; width: 42px; height: 42px; border-radius: 50%; background: var(--grape); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 3px 0 var(--grape-dark); }
.step-art { display: flex; justify-content: center; margin-bottom: 10px; }
.step-art svg { width: 110px; height: 110px; }
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 16px; }
.more-phones { margin: 26px auto 0; max-width: 760px; display: flex; gap: 12px; align-items: center; justify-content: center; text-align: left; background: var(--grape-tint); color: var(--grape-dark); border-radius: 20px; padding: 14px 20px; font-weight: 800; }
.more-phones .ic svg { width: 28px; height: 28px; }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--white); border-radius: 22px; box-shadow: 0 5px 0 var(--cream-line); padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; font-size: 21px; padding: 14px 34px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--sun-tint); text-align: center; line-height: 30px; font-family: 'Nunito', sans-serif; font-weight: 900; transition: transform 0.25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); }

.final { position: relative; background: linear-gradient(180deg, var(--sky), #e1f1ff); padding: 80px 0 0; text-align: center; overflow: hidden; }
.final-in { display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative; }
.final-mascot { width: 110px; height: 110px; }
.final h2 { font-size: clamp(32px, 4.6vw, 52px); }
.final .btn { margin-top: 10px; }
.tiny { font-size: 14px; color: var(--ink-faint); font-weight: 700; }
.parade { position: relative; height: 120px; margin-top: 30px; overflow: hidden; }
.parade .grass { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; }
.parade .line { position: absolute; left: 0; bottom: 18px; display: flex; gap: 18px; align-items: flex-end; animation: parade 34s linear infinite; }
.parade .line > span { animation: sj-walk 0.45s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.parade .line svg { width: 60px; height: 60px; }
@keyframes parade { from { transform: translateX(100vw) } to { transform: translateX(-100%) } }

.foot { background: var(--ink); color: #c9cde6; padding: 34px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.foot .brand { color: var(--white); margin-right: 0; }
.foot .brand-zh { color: var(--sun); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--white); font-weight: 800; text-decoration: none; }
.foot-links a:hover { color: var(--sun); }
.copy { margin-left: auto; font-size: 14px; }

/* buddies + mascot */
.buddy { overflow: visible; }
.mascot { position: relative; display: block; width: 100%; height: 100%; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }
.m-float svg { animation: sj-bob 3s ease-in-out infinite; }
.m-wink svg { animation: sj-sway 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.m-dance svg { animation: dance 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes dance {
  0%, 100% { transform: translateY(0) rotate(-12deg) scale(1, 1) }
  25% { transform: translateY(-14%) rotate(0) scale(0.94, 1.08) }
  50% { transform: translateY(0) rotate(12deg) scale(1.08, 0.92) }
  75% { transform: translateY(-14%) rotate(0) scale(0.94, 1.08) }
}
.blink { animation: sj-blink 4s infinite; }
.b-breathe { animation: sj-breathe 3s ease-in-out infinite; transform-origin: 50% 90%; }
.b-bounce { animation: sj-bounce 0.7s ease-in-out infinite; }
.b-jump { animation: sj-jump 1s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; transform-origin: 50% 90%; }
.b-pulse { animation: sj-pulse 1.2s ease-in-out infinite; }
.b-wave { animation: sj-wave 0.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 30% 90%; }
.b-twinkle { animation: sj-twinkle 1.6s ease-in-out infinite; }

/* scroll reveal (only when JS is on; without JS everything just shows) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-kids > * { opacity: 0; transform: translateY(26px); transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.js .reveal-kids.in > * { opacity: 1; transform: none; }
.js .reveal-kids.in > *:nth-child(2) { transition-delay: 0.08s; }
.js .reveal-kids.in > *:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-kids.in > *:nth-child(4) { transition-delay: 0.24s; }
.js .reveal-kids.in > *:nth-child(5) { transition-delay: 0.32s; }
.js .reveal-kids.in > *:nth-child(6) { transition-delay: 0.4s; }

/* the app's shared animation library (frontend/src/styles/anim.css) */
@keyframes sj-rise { from { transform: translateY(18px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes sj-pop { 0% { transform: scale(0); opacity: 0 } 70% { transform: scale(1.15); opacity: 1 } 100% { transform: scale(1); opacity: 1 } }
@keyframes sj-breathe { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.04) } }
@keyframes sj-bounce { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8%) } }
@keyframes sj-sway { 0%, 100% { transform: rotate(-4deg) } 50% { transform: rotate(4deg) } }
@keyframes sj-jump { 0%, 100% { transform: translateY(0) rotate(0) } 30% { transform: translateY(-14%) rotate(-6deg) } 60% { transform: translateY(0) rotate(4deg) } }
@keyframes sj-pulse { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.08) } }
@keyframes sj-blink { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(0.1) } }
@keyframes sj-wave { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(-22deg) } }
@keyframes sj-twinkle { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(0.35); opacity: 0.35 } }
@keyframes sj-bob { 0%, 100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-8px) rotate(4deg) } }
@keyframes sj-fall { 0% { transform: translateY(-40px) rotate(0) } 100% { transform: translateY(420px) rotate(600deg) } }
@keyframes sj-glow-sun { 0%, 100% { box-shadow: 0 6px 0 var(--sun-dark), 0 0 0 0 rgba(255, 197, 49, 0.6) } 50% { box-shadow: 0 6px 0 var(--sun-dark), 0 0 0 14px rgba(255, 197, 49, 0) } }
@keyframes sj-wiggle { 0%, 80%, 100% { transform: rotate(0) } 85% { transform: rotate(-12deg) } 90% { transform: rotate(12deg) } 95% { transform: rotate(-6deg) } }
@keyframes sj-drift { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(-14px, 10px) } }
@keyframes sj-bump { 0% { transform: scale(1) } 40% { transform: scale(1.12) rotate(-3deg) } 70% { transform: scale(0.96) rotate(2deg) } 100% { transform: scale(1) } }
@keyframes sj-walk { 0% { transform: translateY(0) rotate(-7deg) } 100% { transform: translateY(-9px) rotate(7deg) } }

/* fun tools unlock ladder */
.unlock { margin-top: 34px; padding: 26px 28px 22px; }
.unlock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.unlock h3 { font-size: 28px; margin-bottom: 6px; }
.unlock-count { display: flex; align-items: center; gap: 6px; background: var(--sun-tint); border-radius: 20px; padding: 8px 16px; flex-shrink: 0; }
.unlock-count .display { font-size: 34px; line-height: 1; min-width: 2.2em; text-align: right; }
.total-star.small svg { width: 30px; height: 30px; }
.unl-lbl { font-weight: 900; color: var(--ink-soft); font-size: 14px; }
.ladder { position: relative; margin: 36px 26px 6px; height: 120px; }
.ladder-track { position: absolute; left: 0; right: 0; top: 28px; height: 14px; border-radius: 999px; background: #eaf0f7; overflow: hidden; }
.ladder-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), #ffb020); border-radius: 999px; transition: width 0.12s linear; }
.rungs { position: absolute; inset: 0; }
.rung { position: absolute; top: 0; width: 76px; margin-left: -38px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rung:last-child { margin-left: -60px; }
.rung-ic {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: #e9edf5;
  box-shadow: 0 4px 0 #d5dbe8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.3s, opacity 0.3s, background 0.3s;
}
.lock { position: absolute; right: -6px; top: -8px; font-size: 18px; }
.rung.open .rung-ic { background: var(--white); box-shadow: 0 4px 0 var(--sun-dark), 0 0 0 3px var(--sun) inset; filter: none; opacity: 1; }
.rung.open .lock { display: none; }
.rung.pop .rung-ic { animation: sj-bump 0.5s ease-out; }
.rung-n { font-weight: 900; font-size: 13px; color: var(--ink-faint); margin-top: 4px; }
.rung.open .rung-n { color: #7a5600; }
.rung-name { font-weight: 800; font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.15; }
.unlock-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; background: var(--grape-tint); color: var(--grape-dark); border-radius: 16px; padding: 10px 14px; font-weight: 800; font-size: 15px; }

/* events */
.sec.mintbg { background: #e9f7f0; --line: #bfe9d4; }
.events-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.race { position: relative; padding: 20px; box-shadow: 0 6px 0 #bfe9d4; }
.race-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.race-cover { width: 54px; height: 54px; border-radius: 18px; background: var(--mint); color: var(--white); box-shadow: 0 4px 0 var(--mint-dark); }
.race-cover svg { width: 30px; height: 30px; }
.race-name { font-size: 22px; line-height: 1.1; }
.race-sub { font-weight: 800; color: var(--ink-faint); font-size: 14px; }
.race-rows { position: relative; }
.rrow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sky);
  border-radius: 16px;
  padding: 0 12px 0 6px;
  transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.rrow.lead { background: var(--sun-tint); }
.rrow.bump .rb { animation: sj-bump 0.5s ease-out; }
.medal { width: 22px; font-size: 18px; text-align: center; }
.rb svg { width: 38px; height: 38px; }
.rname { font-weight: 900; width: 54px; }
.rbar { flex: 1; height: 12px; background: var(--white); border-radius: 999px; overflow: hidden; }
.rfill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--mint-dark)); border-radius: 999px; transition: width 0.6s ease-out; }
.lead .rfill { background: linear-gradient(90deg, var(--sun), #ffb020); }
.rstars { font-size: 18px; min-width: 52px; text-align: right; }
.race-toast {
  position: absolute;
  right: 16px;
  top: -16px;
  z-index: 2;
  box-shadow: 0 3px 0 #000;
  background: var(--ink);
  color: var(--white);
  border-radius: 14px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
}
.race-toast.go { animation: toast 2.2s ease-out; }
@keyframes toast {
  0% { opacity: 0; transform: translateY(8px) scale(0.9) }
  12% { opacity: 1; transform: none }
  80% { opacity: 1 }
  100% { opacity: 0; transform: translateY(-6px) }
}
.race-deeds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.rd { background: var(--mint-soft); color: var(--mint-text); border-radius: 999px; padding: 4px 12px; font-weight: 900; font-size: 13px; }
.ev-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ev-steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border-radius: 24px; padding: 18px; box-shadow: 0 5px 0 #bfe9d4; }
.ev-steps h3 { font-size: 21px; margin-bottom: 4px; }
.ev-steps p { color: var(--ink-soft); font-size: 16px; }
.ev-steps li:hover .ktile { animation: sj-jump 0.9s cubic-bezier(0.3, 1.6, 0.5, 1); }

/* ───────── Narrower screens ───────── */
@media (max-width: 1000px) {
  .links { display: none; }
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding-top: 26px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .cta-row, .promise { justify-content: center; }
  .stage-wrap { max-width: 520px; margin: 0 auto; }
  .kids-grid, .friends, .events-grid { grid-template-columns: minmax(0, 1fr); }
  .unlock-head { flex-direction: column; }
  .kidsafe { flex-direction: column; text-align: left; }
  .kidsafe ul { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .copy { margin-left: 0; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .topbar-in { gap: 8px; height: 60px; }
  .brand-name { font-size: 20px; }
  .brand-zh { display: none; }
  .topbar .btn.small { padding: 0 12px; font-size: 15px; }
  .lead { font-size: 18px; }
  .hl { white-space: normal; }
  .cta-row { flex-direction: column; width: 100%; }
  .cta-row .btn { width: 100%; }
  .promise-grid, .benefits { grid-template-columns: 1fr; }
  .sec { padding: 60px 0; }
  .friends { padding: 22px; }
  .buddy-grid { gap: 4px; }
  .unlock { padding: 20px 14px; }
  .unlock-count { align-self: stretch; justify-content: center; }
  .ladder { margin: 22px 0 0; height: auto; }
  .ladder-track { position: static; margin-bottom: 16px; }
  .rungs { position: static; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
  .rung, .rung:last-child { position: static; width: auto; margin: 0; }
  .rung-ic { width: 58px; height: 58px; border-radius: 18px; font-size: 28px; }
  .rung-name { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .parade .line { animation: none; transform: none; justify-content: center; width: 100%; flex-wrap: nowrap; }
}
