:root {
  /* Logo colours: mint background and the deep teal of the face. */
  --mint: #5DCAA5;
  --mint-hover: #4BBE96;
  --mint-deep: #04342C;
  --mint-100: #d9f3e9;
  --mint-50: #f0faf6;
  /* Playful companions to the mint, used for stickers, icons and confetti. */
  --sun: #FFD166;
  --coral: #FF8A80;
  --grape: #B39DFF;
  --sky: #74C9FF;
  --sun-100: #fff3cf;
  --coral-100: #ffe3e0;
  --grape-100: #ece6ff;
  --sky-100: #ddf1ff;
  --ink: #10241f;
  --ink-soft: #48605a;
  --line: #d5e8e0;
  --bg: #fffdf8;
  --card: #ffffff;
  --tint: var(--mint-50);
  --accent: #0e7a5f;          /* mint darkened enough to read as text on white */
  --btn-bg: var(--mint);
  --btn-ink: var(--mint-deep);
  --shadow: 0 1px 2px rgba(4, 52, 44, .06), 0 8px 24px rgba(4, 52, 44, .07);
  --pop: 0 4px 0 rgba(4, 52, 44, .9);   /* chunky "sticker" drop shadow */
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4f2ec;
    --ink-soft: #a3bdb3;
    --line: #23382f;
    --bg: #0b1714;
    --card: #11221d;
    --tint: #0e1d19;
    --mint-100: #173a30;
    --sun-100: #3a3016;
    --coral-100: #3a2120;
    --grape-100: #2a2542;
    --sky-100: #16303f;
    --accent: var(--mint);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --pop: 0 4px 0 rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* The tilted band and floating bubbles poke past the edges; clip without breaking the sticky top bar. */
html, body { overflow-x: clip; }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

/* Language switching: only the spans for the current language show. */
html:not([lang="en"]) [data-l="en"],
html:not([lang="zh-CN"]) [data-l="zh"],
html:not([lang="fr"]) [data-l="fr"] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.1); }
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; padding: 6px 12px; border-radius: 999px; transition: background .15s; }
.nav a:hover { color: var(--ink); background: var(--mint-100); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-actions .game-mobile { display: none; }
.brand { flex-shrink: 0; }
.lang-switch a { white-space: nowrap; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border: 2px solid var(--line); border-radius: 999px; }
.lang-switch a {
  font-size: .82rem; font-weight: 800; line-height: 1; text-decoration: none;
  color: var(--ink-soft); border-radius: 999px; padding: 6px 10px;
}
.lang-switch a:hover { color: var(--ink); background: var(--mint-100); }
.lang-switch a[aria-current="page"] { background: var(--mint); color: var(--mint-deep); }

/* Buttons: pill-shaped and "pressable" */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-ink);
  border: 2px solid var(--mint-deep); border-radius: 999px;
  padding: 12px 24px; font-weight: 800; text-decoration: none;
  box-shadow: var(--pop);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(4, 52, 44, .9); background: var(--mint-hover); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(4, 52, 44, .9); }
.btn-small { padding: 6px 16px; font-size: .9rem; box-shadow: 0 3px 0 rgba(4, 52, 44, .9); }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn-ghost:hover { background: var(--sun-100); }
@media (prefers-color-scheme: dark) {
  .btn { border-color: transparent; }
  .btn-ghost { border-color: var(--line); }
}
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 96px;
  background:
    radial-gradient(700px 380px at 88% 12%, color-mix(in srgb, var(--mint) 30%, transparent), transparent 70%),
    radial-gradient(420px 260px at 60% 95%, color-mix(in srgb, var(--sun) 26%, transparent), transparent 70%),
    radial-gradient(500px 300px at 0% 80%, color-mix(in srgb, var(--grape) 18%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mint-deep); background: var(--sun); border: 2px solid var(--mint-deep);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 18px; transform: rotate(-2deg);
}
html[lang="zh-CN"] .eyebrow { letter-spacing: .15em; }
@media (prefers-color-scheme: dark) { .eyebrow { border-color: transparent; } }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); letter-spacing: -.02em; }
/* Hand-drawn style highlight under key words */
.hl {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--sun) 85%, transparent) 62%, color-mix(in srgb, var(--sun) 85%, transparent) 92%, transparent 92%);
  color: inherit; padding: 0 .08em;
}
@media (prefers-color-scheme: dark) {
  .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--mint) 45%, transparent) 62%, color-mix(in srgb, var(--mint) 45%, transparent) 92%, transparent 92%); }
}
.wave { display: inline-block; transform-origin: 70% 80%; animation: wave 2.4s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--ink-soft); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 24px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; font-size: .9rem; font-weight: 700; }
.hero-points li { padding: 5px 12px; border-radius: 999px; color: var(--ink); }
.hero-points li:nth-child(1) { background: var(--mint-100); }
.hero-points li:nth-child(2) { background: var(--grape-100); }
.hero-points li:nth-child(3) { background: var(--sky-100); }

/* Confetti dots scattered over the hero */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; display: block; width: 12px; height: 12px; border-radius: 50%; opacity: .8; animation: bob 5s ease-in-out infinite; }
.confetti i:nth-child(1) { top: 14%; left: 6%;  background: var(--sun); }
.confetti i:nth-child(2) { top: 70%; left: 3%;  background: var(--grape); width: 18px; height: 18px; animation-delay: -1s; }
.confetti i:nth-child(3) { top: 8%;  left: 48%; background: var(--coral); width: 9px; height: 9px; animation-delay: -2s; }
.confetti i:nth-child(4) { top: 86%; left: 44%; background: var(--sky); animation-delay: -3s; }
.confetti i:nth-child(5) { top: 22%; left: 94%; background: var(--grape); width: 10px; height: 10px; animation-delay: -1.5s; }
.confetti i:nth-child(6) { top: 78%; left: 92%; background: var(--sun); width: 16px; height: 16px; border-radius: 4px; transform: rotate(20deg); animation-delay: -2.5s; }
.confetti i:nth-child(7) { top: 50%; left: 52%; background: var(--mint); width: 8px; height: 8px; animation-delay: -.5s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* Phone frame around the app screenshot, with floating chat bubbles */
.phone { position: relative; justify-self: center; width: min(290px, 100%); margin: 0; }
.phone-screen {
  position: relative; z-index: 1;
  border: 10px solid #1a1f1b; border-radius: 40px; overflow: hidden;
  background: #f6f8f4; line-height: 0;
  box-shadow: 14px 14px 0 var(--mint), var(--shadow);
  transform: rotate(3deg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-10px); } }
.phone-screen img { display: block; width: 100%; height: auto; }
.phone-note { text-align: center; font-size: .8rem; color: var(--ink-soft); margin-top: 22px; }

.bubble {
  position: absolute; z-index: 2; white-space: nowrap;
  font-size: .9rem; font-weight: 800; color: var(--mint-deep);
  padding: 8px 14px; border-radius: 18px; border: 2px solid var(--mint-deep);
  box-shadow: 0 3px 0 rgba(4, 52, 44, .9);
  animation: bob 4.5s ease-in-out infinite;
}
.bubble::after {
  content: ""; position: absolute; bottom: -8px; width: 12px; height: 12px;
  background: inherit; border-right: 2px solid var(--mint-deep); border-bottom: 2px solid var(--mint-deep);
}
.bubble-1 { top: 9%;  left: -64px; background: var(--sun); transform: rotate(-6deg); }
.bubble-1::after { right: 18px; transform: rotate(45deg); }
.bubble-2 { top: 46%; right: -58px; background: var(--grape); color: #1d1540; animation-delay: -1.5s; transform: rotate(5deg); }
.bubble-2::after { left: 18px; transform: rotate(45deg); }
.bubble-3 { bottom: 12%; left: -48px; background: var(--coral); color: #3b0f0b; animation-delay: -3s; transform: rotate(-4deg); }
.bubble-3::after { right: 22px; transform: rotate(45deg); }
@media (prefers-color-scheme: dark) {
  .bubble, .bubble::after { border-color: transparent; }
  .bubble { box-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
}

/* Scrolling emoji band */
.band {
  background: var(--mint-deep); color: #fff; overflow: hidden;
  border-block: 3px solid var(--mint-deep); transform: rotate(-1.2deg); margin: -18px -10px 0;
  position: relative; z-index: 3;
}
.band-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.band-track span { padding: 12px 22px; font-weight: 800; font-size: 1.02rem; white-space: nowrap; }
.band-track span:nth-child(4n+1) { color: var(--sun); }
.band-track span:nth-child(4n+2) { color: var(--mint); }
.band-track span:nth-child(4n+3) { color: var(--grape); }
.band-track span:nth-child(4n+4) { color: var(--coral); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 88px 0; position: relative; }
.section-tint { background: var(--tint); }
/* Wavy top and bottom edges on tinted sections */
.section-tint::before, .section-tint::after {
  content: ""; position: absolute; left: 0; right: 0; height: 28px; background: var(--tint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28V14C20 0 40 0 60 14s40 14 60 0v14z'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 28px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28V14C20 0 40 0 60 14s40 14 60 0v14z'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 28px;
}
.section-tint::before { top: -27px; }
.section-tint::after { bottom: -27px; transform: scaleY(-1); }
.section-tint + .section, .section + .section-tint { margin-top: 0; }
.section-lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 46em; margin-bottom: 40px; }

/* Little doodle next to section titles */
.section h2::after {
  content: ""; display: block; width: 64px; height: 10px; margin-top: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 10'%3E%3Cpath d='M2 6c8-6 12 4 20 0s12-6 20 0 12 4 20-2' fill='none' stroke='%235DCAA5' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card, .scene, .dl-card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s, border-color .2s;
}
.card:hover, .scene:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--mint); box-shadow: 0 6px 0 var(--mint), var(--shadow); }
.card:nth-child(even):hover, .scene:nth-child(even):hover { transform: translateY(-6px) rotate(1deg); }
.card p, .scene p { color: var(--ink-soft); margin: 0; }
.icon {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 900; margin-bottom: 16px; color: var(--mint-deep);
  transform: rotate(-6deg); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.card:hover .icon { transform: rotate(6deg) scale(1.12); }
.card:nth-child(6n+1) .icon { background: var(--mint-100); }
.card:nth-child(6n+2) .icon { background: var(--grape-100); }
.card:nth-child(6n+3) .icon { background: var(--sun-100); color: #7a5600; }
.card:nth-child(6n+4) .icon { background: var(--coral-100); }
.card:nth-child(6n+5) .icon { background: var(--sky-100); }
.card:nth-child(6n+6) .icon { background: var(--sun-100); }
@media (prefers-color-scheme: dark) { .icon, .card:nth-child(6n+3) .icon { color: var(--mint); } }

.scene { position: relative; overflow: hidden; }
.scene-emoji {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.2rem; margin-bottom: 14px;
}
.scene:nth-child(1) .scene-emoji { background: var(--sun-100); }
.scene:nth-child(2) .scene-emoji { background: var(--grape-100); }
.scene:nth-child(3) .scene-emoji { background: var(--sky-100); }
.scene:hover .scene-emoji { animation: jelly .6s; }
@keyframes jelly { 30% { transform: scale(1.2, .85); } 50% { transform: scale(.9, 1.1); } 70% { transform: scale(1.05, .95); } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { display: flex; gap: 16px; }
.steps p { color: var(--ink-soft); margin: 0; }
.step-n {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  color: var(--mint-deep); font-weight: 900; font-size: 1.15rem;
  border: 2px solid var(--mint-deep); box-shadow: 0 3px 0 rgba(4, 52, 44, .9);
}
.steps li:nth-child(1) .step-n { background: var(--mint); transform: rotate(-6deg); }
.steps li:nth-child(2) .step-n { background: var(--sun); transform: rotate(4deg); }
.steps li:nth-child(3) .step-n { background: var(--grape); transform: rotate(-3deg); }
@media (prefers-color-scheme: dark) { .step-n { border-color: transparent; box-shadow: none; } }
.mesh svg { width: 100%; height: auto; display: block; }
.mesh-links line { stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 10; animation: flow 1s linear infinite; }
.mesh-nodes circle { stroke: var(--mint-deep); stroke-width: 2.5; animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.mesh-nodes circle:nth-child(1) { fill: var(--mint); }
.mesh-nodes circle:nth-child(2) { fill: var(--sun); animation-delay: .3s; }
.mesh-nodes circle:nth-child(3) { fill: var(--coral); animation-delay: .6s; }
.mesh-nodes circle:nth-child(4) { fill: var(--grape); animation-delay: .9s; }
.mesh-nodes circle:nth-child(5) { fill: var(--sky); animation-delay: 1.2s; }
@media (prefers-color-scheme: dark) { .mesh-nodes circle { stroke: transparent; } }
@keyframes flow { to { stroke-dashoffset: -12; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* Privacy facts */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 14px 18px 14px 52px; position: relative; }
.facts li::before { position: absolute; left: 16px; top: 13px; font-size: 1.15rem; line-height: 1.4; }
.facts li:nth-child(1)::before { content: "📵"; }
.facts li:nth-child(2)::before { content: "🔐"; }
.facts li:nth-child(3)::before { content: "🙈"; }

/* Download */
.dl-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 560px; }
.dl-card { display: flex; flex-direction: column; gap: 14px; }
.dl-card { background: linear-gradient(160deg, var(--mint-100), var(--card) 60%); }
.dl-head { display: flex; gap: 14px; align-items: flex-start; }
.dl-head h3 { margin: 0; }
.dl-head p { margin: 2px 0 0; font-size: .9rem; }
.dl-icon {
  flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--mint); color: var(--mint-deep);
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 900; transform: rotate(-6deg);
}
.dl-card .small { margin: 0; }
/* Download QR code */
.qr {
  display: flex; gap: 16px; align-items: center; margin-top: 4px;
  padding: 14px; border: 2px dashed var(--mint); border-radius: 18px; background: var(--card);
}
.qr img { flex: none; width: 116px; height: 116px; border-radius: 10px; background: #fff; padding: 6px; transform: rotate(-2deg); }
.qr p { margin: 0; }
.qr-title { font-weight: 800; margin-bottom: 4px !important; }
.qr-url { margin-top: 6px !important; font-size: .85rem; font-weight: 700; color: var(--accent); }
.soon {
  margin: -4px 0 0; font-size: .85rem; font-weight: 700; color: #8a5a00;
  background: #fff4d6; border: 2px dashed #e0b44c; border-radius: 12px; padding: 6px 10px; text-align: center;
}
.soon[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  .soon { color: #f3cf7a; background: #2e2610; border-color: #6b5520; }
}

/* FAQ */
details { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 0 20px; margin-bottom: 12px; transition: border-color .2s; }
details:hover, details[open] { border-color: var(--mint); }
summary { cursor: pointer; padding: 16px 0; font-weight: 800; list-style: none; position: relative; padding-right: 40px; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mint-100); color: var(--accent); font-size: 1.2rem; line-height: 1;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
details[open] summary::after { transform: rotate(45deg); background: var(--sun-100); }
details p { color: var(--ink-soft); }

/* Footer */
.footer { padding: 56px 0 48px; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
.footer p { margin: 0; }
.footer-love { font-weight: 800; color: var(--ink); }
.footer-links { font-size: .9rem; }
.footer-links a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent); }

/* Privacy policy page */
.policy h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: .2em; }
.policy h2 { font-size: 1.3rem; margin: 2em 0 .6em; }
.policy h2::after { display: none; }
.policy p, .policy li { color: var(--ink-soft); }
.policy strong { color: var(--ink); }
.policy ul { padding-left: 1.2em; margin: 0 0 1em; }
.policy li { margin-bottom: .5em; }
.policy-back { margin-top: 3em; font-weight: 800; }
.policy-back a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .topbar-actions .game-mobile { display: inline-flex; }
  .hero { padding: 40px 0 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .section { padding: 64px 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .grid, .grid-3, .dl-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .phone { width: min(230px, 64%); }
  .topbar-inner { gap: 10px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn-small { padding: 6px 12px; }
  .brand span { display: none; }
  .bubble { font-size: .8rem; padding: 6px 10px; }
  .bubble-1 { left: -52px; }
  .bubble-2 { right: -54px; }
  .bubble-3 { left: -44px; }
}
@media (max-width: 400px) {
  /* Very narrow phones: the game button shows only its icon; the label stays for screen readers. */
  .game-mobile span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Game hub (/game/) */
.games-page { padding-top: 56px; }
.games-page h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); letter-spacing: -.01em; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 18px; }
.games-group { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 44px 0 0; }
.games-note { margin: 6px 0 0; color: var(--ink-soft); font-size: .98rem; }
/* Game hub categories: big categories, then a sub-row (grades / game types) */
.cat-nav { display: none; margin-top: 30px; padding: 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cats-on .cat-nav { display: block; }
.cats-on .games-sec:not(.on) { display: none; }
.cats-on .games-sec .games-group { margin-top: 26px; }
.subj-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }   /* 第一级：学科 */
.subj-btn { font: inherit; cursor: pointer; font-size: 1.2rem; font-weight: 900; padding: 11px 24px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); transition: background .15s, color .15s, border-color .15s; }
.subj-btn:hover { border-color: var(--mint); }
.subj-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-btn[hidden] { display: none; }
.cat-main, .cat-sub { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-sub { margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--line); gap: 7px; }   /* 二级菜单：比一级菜单小一号、细一点 */
.cat-sub[hidden] { display: none; }
.cat-btn, .cat-sub button { font: inherit; cursor: pointer; border-radius: 999px; transition: background .15s, color .15s, border-color .15s; }
.cat-btn { font-size: 1rem; font-weight: 800; padding: 8px 18px; border: 2px solid var(--line); background: var(--tint); color: var(--ink); }
.cat-btn:hover { border-color: var(--mint); }
.cat-btn.on { background: var(--mint); border-color: var(--mint); color: var(--mint-deep); }
.cat-sub button { font-size: .78rem; font-weight: 600; padding: 4px 11px; border: 2px solid var(--line); background: var(--card); color: var(--ink-soft); }
.cat-sub button:hover { border-color: var(--mint); color: var(--ink); }
.cat-sub button.on { background: var(--sun-100); border-color: var(--sun); color: var(--ink); }
.games-group .crumb { color: var(--ink-soft); font-weight: 700; }
.games-group .crumb-sep { color: var(--ink-soft); margin: 0 .15em; }
@media (max-width: 520px) {
  .cat-nav { padding: 12px; }
  .subj-btn { font-size: 1.05rem; padding: 9px 16px; }
  .cat-btn { font-size: .92rem; padding: 7px 14px; }
  .cat-sub button { font-size: .74rem; padding: 4px 9px; }
}
.game-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); color: var(--ink); text-decoration: none;
  border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s, border-color .2s;
}
a.game-card:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--mint); box-shadow: 0 6px 0 var(--mint), var(--shadow); }
a.game-card:nth-child(even):hover { transform: translateY(-6px) rotate(1deg); }
a.game-card:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.game-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tint); border-bottom: 2px solid var(--line); }
.game-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; }
.game-body h3 { font-size: 1.35rem; margin: 0; }
.game-body p { color: var(--ink-soft); margin: 0; }
.game-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.game-tags li { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--mint-100); }
.game-tags li:nth-child(2) { background: var(--sun-100); }
.game-tags li:nth-child(3) { background: var(--grape-100); }
.game-body .btn { align-self: flex-start; margin-top: auto; }
.game-soon {
  align-items: center; justify-content: center; gap: 8px; min-height: 220px; padding: 32px 24px;
  border-style: dashed; box-shadow: none; color: var(--ink-soft); font-weight: 800; text-align: center;
}
.game-soon-icon { font-size: 2.4rem; }
.games-note { margin-top: 28px; }
@media (max-width: 640px) {
  .games-page { padding-top: 36px; }
  .game-grid { grid-template-columns: 1fr; }
}


/* Short videos (/video/) */
.hide-xs { display: inline; }
.video-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); color: var(--ink); text-decoration: none;
  border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), border-color .2s; }
.video-card:hover { transform: translateY(-4px); border-color: var(--mint); }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #ff4f8b; font-size: 26px; display: grid; place-items: center; padding-left: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.video-dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: .82rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.video-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.video-body h3 { margin: 0; font-size: 1.25rem; }
.video-body p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.video-body .game-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.video-body .game-tags span { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.video-grade { font-size: .88rem; color: var(--ink-soft); }
.video-body .btn { align-self: flex-start; margin-top: auto; }
.video-page { padding-top: 40px; }
.video-wrap { max-width: 860px; }
.video-crumb { font-size: .95rem; color: var(--ink-soft); margin-bottom: 8px; }
.video-crumb a { color: var(--accent); text-decoration: none; font-weight: 700; }
.video-crumb span { margin: 0 4px; }
.video-page h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); margin: 0 0 6px; }
.video-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.video-meta span { font-size: .88rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--tint); color: var(--ink-soft); }
.video-player { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.video-player video { width: 100%; height: 100%; display: block; background: #000; }
.video-summary { font-size: 1.08rem; line-height: 1.7; margin: 16px 0 4px; }
.video-note { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.video-sec { margin-top: 28px; }
.video-sec h2 { font-size: 1.3rem; margin: 0 0 10px; }
.video-points, .video-narr, .video-quiz { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.video-points li, .video-narr li, .video-quiz li { line-height: 1.75; }
.video-points b { color: var(--accent); }
.video-narr { color: var(--ink-soft); }
.video-quiz p { margin: 0; }
.video-quiz details { margin-top: 4px; }
.video-quiz summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.video-quiz details p { background: var(--sun-100); border-radius: 10px; padding: 6px 12px; margin-top: 6px; }
.video-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.video-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--card); }
.video-link:hover { border-color: var(--mint); }
.video-link span { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.video-link em { font-style: normal; color: var(--accent); font-weight: 700; font-size: .92rem; }
@media (max-width: 640px) { .video-links { grid-template-columns: 1fr; } .video-page { padding-top: 24px; } }
@media (max-width: 400px) { .hide-xs { display: none; } }

/* 教学大厅 · 知识点视频搜索 */
.kp-search { margin-top: 16px; }
.kp-box { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 6px 16px; max-width: 560px; }
.kp-box:focus-within { border-color: var(--mint); }
.kp-box input { flex: 1; border: none; outline: none; background: transparent; font: inherit; font-size: 1rem; color: var(--ink); padding: 6px 0; min-width: 0; }
.kp-hot { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-soft); }
.kp-hot button { font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; border: 2px solid var(--line); background: var(--tint); color: var(--accent); border-radius: 999px; padding: 3px 12px; }
.kp-hot button:hover { border-color: var(--mint); }
.kp-count { margin: 10px 0 0; font-size: .92rem; color: var(--ink-soft); }
.kp-empty { margin-top: 18px; color: var(--ink-soft); }
.kp-hit { margin: 0; padding: 8px 12px 8px 26px; background: var(--sun-100); border-radius: 12px; font-size: .9rem; line-height: 1.6; color: var(--ink); }
.kp-hit li[hidden] { display: none; }
.video-card[hidden] { display: none; }

/* ---------- 教学大厅顶部导航：市场 / 创作 ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub-tabs { display: flex; gap: 4px; padding: 4px; background: var(--tint); border: 2px solid var(--line); border-radius: 999px; }   /* 顶部导航栏里 */
.hub-tab { font: inherit; cursor: pointer; font-size: 1rem; font-weight: 900; padding: 6px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); white-space: nowrap; transition: background .15s, color .15s; }
.hub-tab:hover { color: var(--ink); background: var(--card); }
.hub-tab.on { background: var(--ink); color: #fff; }
.hub-tab:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.topbar-inner:has(.hub-tabs) { position: relative; }
.topbar-inner .hub-tabs { margin: 0 auto; }                          /* 窄屏：在标志和语言按钮中间 */
@media (min-width: 641px) {                                          /* 宽屏：正好在页面正中间 */
  .topbar-inner .hub-tabs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
}
@media (max-width: 640px) { .hub-tab { font-size: .9rem; padding: 6px 12px; } }
@media (max-width: 380px) { .hub-tab { padding: 6px 9px; } .hub-tab > span[aria-hidden] { display: none; } }
.hub-pane[hidden] { display: none; }

/* ---------- 创作：大输入框 ---------- */
.create-title { font-size: clamp(1.7rem, 4.2vw, 2.6rem); margin: 10px 0 6px; }
.composer { margin-top: 26px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--mint); box-shadow: 0 0 0 4px var(--mint-100), var(--shadow); }
.composer.shake { animation: nf-shake .4s; }
@keyframes nf-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.kind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 2px dashed var(--line); }
.kind-label { font-weight: 900; margin-right: 4px; }
.kind-btn { font: inherit; cursor: pointer; font-weight: 800; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--tint); color: var(--ink); transition: background .15s, border-color .15s; }
.kind-btn small { font-weight: 700; color: var(--ink-soft); margin-left: 2px; }
.kind-btn:hover { border-color: var(--mint); }
.kind-btn.on { background: var(--mint); border-color: var(--mint); color: var(--mint-deep); }
.kind-btn.on small { color: var(--mint-deep); }
.composer-text { display: block; width: 100%; min-height: 150px; resize: vertical; font: inherit; font-size: 1.1rem; line-height: 1.6; color: var(--ink); background: transparent; border: 0; outline: 0; padding: 6px 4px; }
.composer-text::placeholder { color: var(--ink-soft); opacity: .75; }
.attach-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; }
.attach-list:empty { display: none; }
.attach-list li { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 8px 5px 5px; border: 2px solid var(--line); border-radius: 14px; background: var(--tint); font-size: .85rem; font-weight: 700; }
.attach-list img, .attach-list .attach-ico { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--card); font-size: 1.3rem; flex: none; }
.attach-list .attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.attach-list button { font: inherit; cursor: pointer; border: 0; background: transparent; color: var(--ink-soft); font-size: 1.1rem; line-height: 1; padding: 2px 4px; }
.composer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--line); }
.tool-btn { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .95rem; padding: 9px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); transition: border-color .15s, background .15s; }
.tool-btn:hover { border-color: var(--mint); }
.tool-btn:focus-within, .tool-btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.mic-btn .mic-on { display: none; }
.mic-btn.on { background: var(--coral-100); border-color: var(--coral); }
.mic-btn.on .mic-idle { display: none; }
.mic-btn.on .mic-on { display: inline; }
.mic-btn.on > span:first-child { animation: nf-pulse 1s infinite; }
@keyframes nf-pulse { 50% { transform: scale(1.25); } }
.composer-spacer { flex: 1; }
.send-btn { font-size: 1.05rem; }
.composer-hint { margin: 10px 0 0; color: #c2410c; font-weight: 700; }
.idea-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.idea-label { font-weight: 800; color: var(--ink-soft); }
.idea-btn { font: inherit; cursor: pointer; font-size: .9rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 2px dashed var(--line); background: transparent; color: var(--ink); }
.idea-btn:hover { border-style: solid; border-color: var(--mint); background: var(--tint); }
.soon-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 30, 25, .45); }
.soon-modal[hidden] { display: none; }
.soon-card { width: min(380px, 100%); text-align: center; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px 24px; animation: nf-pop .3s cubic-bezier(.34, 1.56, .64, 1); }
.soon-card h2 { margin: 6px 0 8px; font-size: 1.6rem; }
.soon-card p { color: var(--ink-soft); margin: 0 0 18px; }
.soon-icon { font-size: 3rem; }
@keyframes nf-pop { from { transform: scale(.8); opacity: 0; } }
@media (max-width: 520px) {
  .composer { padding: 14px; }
  .composer-text { min-height: 130px; font-size: 1rem; }
  .tool-btn { padding: 8px 11px; font-size: .88rem; }
  .send-btn { width: 100%; justify-content: center; }
  .composer-spacer { display: none; }
}

/* ---------- 创作页底部：热门创作 ---------- */
.hot-sec { margin-top: 56px; padding-top: 28px; border-top: 2px dashed var(--line); }
.hot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hot-title { margin: 0; font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.hot-note { margin-top: 6px; }
.hot-more { font: inherit; cursor: pointer; font-weight: 800; padding: 7px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.hot-more:hover { border-color: var(--mint); }
.hot-grid > a { position: relative; }
.hot-tag { position: absolute; top: 10px; right: 10px; z-index: 1; font-size: .78rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: var(--shadow); }
.hot-grid .kp-hit { display: none; }
