/* ============================================================
   GenZ Library — Landing page
   Palette + type lifted from the iOS app (Coiny + pastel purple)
   Fonts self-hosted (assets/fonts) — no third-party render-blocking.
   ============================================================ */

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: 'Coiny'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/coiny-400-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Coiny'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/coiny-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/quicksand-400-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/quicksand-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/quicksand-500-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/quicksand-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/quicksand-600-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/quicksand-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/quicksand-700-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Quicksand'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/quicksand-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --purple: #8C7BFF;
  --purple-dark: #6E5ED6;
  --ink-purple: #3A2F85;
  --pink: #FF5C8A;          /* brand accent */
  --pink-cta: #C93A62;      /* AA-safe pink for white text on buttons */
  --pink-soft: #FFEEF3;
  --teal: #00C0CC;
  --teal-soft: #EEFEFF;
  --yellow: #FFD803;
  --cream: #FFFBE6;
  --lav: #F3F2FF;
  --ink: #2D2D2D;
  --gray: #5D626B;          /* AA-safe on tinted card backgrounds */
  --white: #ffffff;
  --shadow-hard: 6px 6px 0 rgba(58, 47, 133, 0.14);
  --shadow-hard-lg: 10px 10px 0 rgba(58, 47, 133, 0.16);
  --radius: 24px;
  --radius-lg: 32px;
  --font-display: 'Coiny', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Quicksand', -apple-system, 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--purple-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink-purple); color: #fff; padding: 10px 18px; border-radius: 12px;
}
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 999px; padding: 14px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:active { transform: scale(0.97); }

.btn-pink {
  background: var(--pink-cta); color: #fff;
  box-shadow: 5px 5px 0 rgba(58, 47, 133, 0.25);
}
.btn-pink:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(58, 47, 133, 0.28); }

.btn-ghost {
  background: rgba(58, 47, 133, 0.5); color: #fff;
  border: 2px solid #fff;
}
.btn-ghost:hover { background: rgba(58, 47, 133, 0.7); }

/* App Store badge */
.badge-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 16px; padding: 10px 22px 10px 16px;
  box-shadow: 5px 5px 0 rgba(58, 47, 133, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.badge-store:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(58, 47, 133, 0.28); }
.badge-store svg { width: 28px; height: 34px; flex: none; }
.badge-store .lines { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.badge-store .small { font-size: 0.7rem; font-weight: 500; opacity: 0.9; }
.badge-store .big { font-size: 1.15rem; font-weight: 700; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 0 0 rgba(58, 47, 133, 0);
}
.nav.scrolled { box-shadow: 0 4px 24px rgba(58, 47, 133, 0.12); }
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px; max-width: 1120px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-purple);
  flex-shrink: 0;
}
.brand img { width: 42px; height: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.95rem;
  padding: 4px 2px; border-bottom: 3px solid transparent; transition: border-color 0.15s, color 0.15s;
}
.nav-links a:hover { color: var(--purple-dark); border-bottom-color: var(--yellow); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-links + .nav-cta { margin-left: 0; }
.nav .btn { padding: 10px 20px; font-size: 0.9rem; white-space: nowrap; }

.lang-switch {
  display: inline-flex; border: 2px solid var(--purple); border-radius: 999px; overflow: hidden;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.lang-switch a, .lang-switch span { padding: 5px 12px; text-decoration: none; }
.lang-switch span { background: var(--purple-dark); color: #fff; }
.lang-switch a { color: var(--purple-dark); }
.lang-switch a:hover { background: var(--lav); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #6E5ED6 0%, #5A49C6 55%, #4B3BB0 100%);
  color: #fff;
  padding: 72px 0 110px;
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
  position: relative; z-index: 2;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 20px; }
.hero .hl {
  display: inline-block; background: var(--yellow); color: var(--ink-purple);
  padding: 0 14px 2px; border-radius: 14px; transform: rotate(-2deg);
}
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 34rem; margin-bottom: 30px; color: #fff; }
.hero p.lead strong { color: var(--yellow); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-note { margin-top: 16px; font-size: 0.85rem; color: #EDEAFF; }

/* floating emojis */
.float-emoji {
  position: absolute; z-index: 1; font-size: 2rem; opacity: 0.9;
  animation: floaty 6s ease-in-out infinite;
  user-select: none; pointer-events: none;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

/* blobs */
.blob { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); z-index: 0; }

/* phone mockup */
.phone {
  position: relative;
  width: min(320px, 78vw); margin: 0 auto;
  border-radius: 52px; padding: 12px;
  background: #1e1b33;
  box-shadow: 0 30px 60px rgba(30, 20, 80, 0.45);
  transform: rotate(4deg);
  transition: transform 0.35s ease;
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone img { border-radius: 40px; width: 100%; height: auto; }
.phone.static { transform: none; }

/* hero wave bottom */
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 3; line-height: 0; }
.hero-wave svg { width: 100%; height: 56px; display: block; }

/* ---------- Ticker ---------- */
.ticker {
  position: relative;
  background: var(--yellow);
  transform: rotate(-1.2deg) scale(1.02);
  margin: -28px 0 0; z-index: 4;
  overflow: hidden; padding: 12px 0;
  border-top: 3px solid var(--ink-purple); border-bottom: 3px solid var(--ink-purple);
}
.ticker-track {
  display: flex; gap: 0; width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.paused .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-purple);
  white-space: nowrap; padding-right: 34px;
}
@keyframes ticker { to { transform: translateX(-50%); } }

.ticker-toggle {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%) rotate(1.2deg);
  z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--ink-purple); background: rgba(255, 255, 255, 0.85);
  color: var(--ink-purple); font-size: 0.9rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ticker-toggle:hover { background: #fff; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--ink-purple); margin-bottom: 12px; }
.section-head p { color: var(--gray); font-size: 1.05rem; }

.alt { background: var(--lav); }

/* ---------- Features ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature {
  border-radius: var(--radius); padding: 28px 24px;
  border: 2.5px solid; box-shadow: var(--shadow-hard);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--cream); border-color: var(--yellow);
}
.feature:nth-child(3n+2) { background: var(--pink-soft); border-color: var(--pink); }
.feature:nth-child(3n) { background: var(--teal-soft); border-color: var(--teal); }
.feature:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard-lg); }
.feature .emoji { font-size: 2.3rem; line-height: 1; margin-bottom: 14px; display: block; }
.feature h3 { color: var(--ink-purple); font-size: 1.15rem; margin-bottom: 8px; }
.feature p { font-size: 0.95rem; color: #43434d; }

/* ---------- Word flip cards ---------- */
.words-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.word-card {
  perspective: 900px; border: none; background: none; cursor: pointer;
  font: inherit; text-align: center; padding: 0; min-height: 190px;
}
.word-card-inner {
  display: block; position: relative; width: 100%; height: 100%; min-height: 190px;
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.4, 1.4, 0.6, 1);
}
.word-card.flipped .word-card-inner { transform: rotateY(180deg); }
.word-face {
  position: absolute; inset: 0; border-radius: var(--radius);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px; border: 2.5px solid var(--ink-purple);
  box-shadow: var(--shadow-hard);
}
.word-front { background: var(--white); }
.word-front .emoji { font-size: 2.4rem; margin-bottom: 10px; }
.word-front .w { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-purple); }
.word-front .tap { font-size: 0.72rem; color: var(--gray); margin-top: 10px; font-weight: 700; }
.word-back { background: var(--ink-purple); color: #fff; transform: rotateY(180deg); }
.word-back .def { font-weight: 700; font-size: 0.92rem; margin-bottom: 8px; }
.word-back .ex { font-size: 0.8rem; font-style: italic; color: #E7E3FF; }
.word-card:nth-child(4n+1) .word-front { background: var(--cream); }
.word-card:nth-child(4n+2) .word-front { background: var(--pink-soft); }
.word-card:nth-child(4n+3) .word-front { background: var(--teal-soft); }
.word-card:focus-visible .word-card-inner { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: var(--radius); }

/* ---------- Quiz ---------- */
.quiz-box {
  max-width: 560px; margin: 0 auto; background: var(--white);
  border: 3px solid var(--ink-purple); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard-lg); padding: 36px 32px; text-align: center;
}
.quiz-progress { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.quiz-progress i {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--lav); border: 2px solid var(--purple);
}
.quiz-progress i.done { background: var(--purple); }
.quiz-progress i.now { background: var(--yellow); border-color: var(--ink-purple); }
.quiz-q { font-family: var(--font-display); color: var(--ink-purple); font-size: 1.35rem; margin-bottom: 24px; min-height: 3em; }
.quiz-q:focus { outline: none; }
.quiz-answers { display: grid; gap: 12px; }
.quiz-answers button {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--lav); color: var(--ink);
  border: 2.5px solid var(--purple); border-radius: 16px; padding: 13px 18px;
  transition: transform 0.15s ease, background 0.15s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.quiz-answers button:hover:not(:disabled) { background: var(--purple-dark); color: #fff; transform: translateY(-2px); }
.quiz-answers button:disabled { cursor: default; opacity: 0.85; }
.quiz-answers button.correct { background: #C9F7D4; border-color: #12B76A; color: #054F31; opacity: 1; }
.quiz-answers button.wrong { background: #FFE2E0; border-color: #F04438; color: #7A271A; opacity: 1; }
.quiz-answers button .mark { font-weight: 800; }
.quiz-result .big-emoji { font-size: 3.6rem; display: block; margin-bottom: 10px; }
.quiz-result h3 { font-size: 1.6rem; color: var(--ink-purple); margin-bottom: 8px; }
.quiz-result p { color: var(--gray); margin-bottom: 22px; }
.quiz-result .btn { margin: 6px; }

/* ---------- Screenshots ---------- */
.shots-grid {
  display: flex; justify-content: center; align-items: flex-start; gap: 34px; flex-wrap: wrap;
}
.shot { width: 250px; text-align: center; }
.shot .phone { width: 100%; padding: 9px; border-radius: 42px; }
.shot .phone img { border-radius: 34px; }
.shot:nth-child(1) .phone { transform: rotate(-5deg); }
.shot:nth-child(3) .phone { transform: rotate(5deg); }
.shot:nth-child(1) .phone:hover, .shot:nth-child(3) .phone:hover { transform: rotate(0); }
.shot figcaption {
  margin-top: 20px; font-family: var(--font-display); color: var(--ink-purple); font-size: 1.05rem;
}
.shot:nth-child(2) { margin-top: 36px; }

/* ---------- Categories ---------- */
.cat-cloud { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 820px; margin: 0 auto; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream); border: 2.5px solid var(--yellow);
  border-radius: 999px; padding: 12px 22px;
  font-weight: 700; color: var(--ink-purple); font-size: 1rem;
  box-shadow: 4px 4px 0 rgba(58, 47, 133, 0.12);
  transition: transform 0.18s ease;
}
.cat-chip:hover { transform: translateY(-4px) rotate(-1.5deg); }
.cat-chip .emoji { font-size: 1.35rem; }
.cat-chip .count { font-size: 0.8rem; color: var(--gray); font-weight: 700; }
.cat-chip:nth-child(2n) { background: var(--pink-soft); border-color: var(--pink); }
.cat-chip:nth-child(3n) { background: var(--teal-soft); border-color: var(--teal); }
.cat-note { text-align: center; margin-top: 22px; color: var(--gray); font-size: 0.9rem; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  background: var(--white); border: 2.5px solid var(--purple);
  border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow-hard);
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--ink-purple); font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.4rem; color: var(--pink-cta); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: #43434d; font-size: 0.95rem; }

/* ---------- CTA ---------- */
.cta-card {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--purple-dark) 0%, #5A49C6 70%, var(--ink-purple) 130%);
  border-radius: 40px; padding: 64px 48px; color: #fff;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: center;
  box-shadow: 14px 14px 0 rgba(58, 47, 133, 0.18);
}
.cta-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
.cta-card p { color: #EDEAFF; margin-bottom: 28px; max-width: 30rem; }
.cta-qr {
  background: #fff; border-radius: 24px; padding: 18px; text-align: center;
  width: 200px; justify-self: center;
  box-shadow: 0 16px 40px rgba(20, 10, 60, 0.35);
}
.cta-qr img { width: 100%; height: auto; border-radius: 8px; }
.cta-qr span { display: block; margin-top: 8px; font-size: 0.8rem; font-weight: 700; color: var(--ink-purple); }
.cta-logo { position: absolute; right: -40px; top: -46px; width: 180px; opacity: 0.16; transform: rotate(12deg); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink-purple); color: #DAD4FF; padding: 48px 0 36px; font-size: 0.92rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); color: #fff; font-size: 1.15rem; }
.footer-brand img { width: 40px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: #EDEAFF; text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.18); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 0.82rem; color: #C4BCF5; }

/* ---------- Lang toast ---------- */
.lang-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(140%);
  background: var(--ink-purple); color: #fff; border-radius: 18px;
  padding: 14px 20px; display: flex; gap: 14px; align-items: center;
  box-shadow: 0 12px 32px rgba(20, 10, 60, 0.4); z-index: 150;
  transition: transform 0.4s cubic-bezier(0.2, 1.2, 0.4, 1); font-size: 0.9rem; max-width: 92vw;
}
.lang-toast.show { transform: translateX(-50%) translateY(0); }
.lang-toast a { color: var(--yellow); font-weight: 700; }
.lang-toast button {
  background: none; border: none; color: #DAD4FF; font-size: 1.1rem; cursor: pointer; padding: 2px 6px;
}

/* ---------- Reveal animations (gated behind .js so no-JS shows everything) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .words-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .nav-links { display: none; }
  .cta-card { grid-template-columns: 1fr; text-align: center; padding: 48px 28px; }
  .cta-card p { margin-inline: auto; }
  .cta-actions { justify-content: center; display: flex; }
  .cta-qr { display: none; }
}
@media (max-width: 600px) {
  .nav-inner { gap: 10px; }
  .brand span { display: none; }
  .nav .btn { padding: 9px 16px; font-size: 0.82rem; }
}
@media (max-width: 540px) {
  section { padding: 64px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .words-grid { gap: 14px; }
  .word-card, .word-card-inner { min-height: 225px; }
  .hero { padding: 48px 0 96px; }
  .footer-grid, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .quiz-box { padding: 28px 20px; }
}
@media (max-width: 360px) {
  .words-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-emoji, .ticker-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .word-card-inner { transition: none; }
  .phone, .feature, .cat-chip, .btn, .badge-store { transition: none; }
}

/* ============================================================
   Content / legal pages (privacy · terms · support)
   ============================================================ */
.legal-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #6E5ED6 0%, #5A49C6 55%, #4B3BB0 100%);
  color: #fff; padding: 64px 0 52px; text-align: center;
}
.legal-hero .wrap { position: relative; z-index: 2; }
.legal-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 10px; }
.legal-hero p { color: #EDEAFF; max-width: 40rem; margin: 0 auto; }
.legal-updated {
  display: inline-block; margin-top: 18px; background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.4); color: #fff;
  border-radius: 999px; padding: 6px 18px; font-size: 0.82rem; font-weight: 700;
}
.legal-hero .blob { background: rgba(255, 255, 255, 0.07); }

.legal-body { max-width: 760px; margin: 0 auto; padding: 56px 24px 40px; }
.legal-body > p:first-child { font-size: 1.08rem; color: #2d2d2d; }
.legal-body h2 {
  color: var(--ink-purple); font-size: 1.4rem; margin: 40px 0 14px;
  padding-top: 6px; scroll-margin-top: 80px;
}
.legal-body h2:first-of-type { margin-top: 8px; }
.legal-body h3 {
  font-family: var(--font-body); font-weight: 700; color: var(--ink);
  font-size: 1.05rem; margin: 22px 0 8px;
}
.legal-body p, .legal-body li { color: #43434d; line-height: 1.75; margin-bottom: 12px; }
.legal-body ul { padding-left: 24px; margin-bottom: 16px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--purple-dark); font-weight: 700; }
.legal-body strong { color: var(--ink); }
.legal-body .lead-note {
  background: var(--lav); border-left: 4px solid var(--purple);
  border-radius: 12px; padding: 16px 20px; margin: 0 0 26px;
}
.legal-body .lead-note p { margin: 0; color: var(--ink-purple); font-weight: 600; }

/* Table of contents */
.legal-toc {
  background: var(--cream); border: 2px solid var(--yellow); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 34px;
}
.legal-toc h2 { margin: 0 0 10px; font-size: 1rem; color: var(--ink-purple); font-family: var(--font-body); font-weight: 800; }
.legal-toc ol { padding-left: 20px; margin: 0; }
.legal-toc li { margin-bottom: 5px; }
.legal-toc a { color: var(--ink-purple); }

/* Support page */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0 34px; }
.support-card {
  border: 2.5px solid var(--purple); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-hard); background: #fff; text-align: center;
}
.support-card:nth-child(2) { border-color: var(--pink); }
.support-card .emoji { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.support-card h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink-purple); font-size: 1.15rem; margin-bottom: 6px; }
.support-card p { font-size: 0.9rem; margin-bottom: 16px; }
.support-card .btn { padding: 12px 22px; font-size: 0.92rem; }
.support-card .email-plain { display: block; margin-top: 10px; font-size: 0.82rem; color: var(--gray); font-weight: 700; }
.help-topics { display: grid; gap: 12px; margin-bottom: 10px; }
.help-topics details {
  background: #fff; border: 2px solid var(--lav); border-radius: 16px; padding: 16px 20px;
}
.help-topics summary {
  cursor: pointer; font-weight: 700; color: var(--ink-purple); list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.help-topics summary::-webkit-details-marker { display: none; }
.help-topics summary::after { content: '+'; font-family: var(--font-display); color: var(--pink-cta); font-size: 1.3rem; }
.help-topics details[open] summary::after { content: '–'; }
.help-topics details p { margin: 10px 0 0; font-size: 0.94rem; }

/* Footer legal links row */
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; }
.footer-legal a { color: #EDEAFF; text-decoration: none; font-weight: 700; font-size: 0.88rem; }
.footer-legal a:hover { color: var(--yellow); }

@media (max-width: 540px) {
  .support-grid { grid-template-columns: 1fr; }
  .legal-body { padding-top: 40px; }
}
