/* ================================================================== */
/*  NeoLinguo — landing styles                                         */
/*  Dark, editorial, premium. Chinese-first. Minimal palette.          */
/* ================================================================== */

:root {
  --bg:        #08090a;
  --bg-2:      #0b0c0e;
  --bg-3:      #101113;
  --line:      rgba(255, 255, 255, .08);
  --line-2:    rgba(255, 255, 255, .16);
  --ink:       #f1f3f5;
  --ink-2:     rgba(241, 243, 245, .78);
  --ink-3:     rgba(241, 243, 245, .56);
  --ink-4:     rgba(241, 243, 245, .34);
  --accent:    #62f0b8;
  --accent-2:  #7af3c4;
  --accent-ink:#06231a;
  --warm:      #f5b06a;
  --warn:      #f0a8a8;
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1180px;
  --pad:       clamp(20px, 4vw, 40px);
  --shadow-1:  0 1px 0 rgba(255,255,255,.04) inset, 0 30px 60px -30px rgba(0,0,0,.6);
  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "Segoe UI",
          "Inter", Helvetica, Arial, sans-serif;
  --font-zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
             "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: 86px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "ss03";
  overflow-x: clip;
}

[lang="zh"] { font-family: var(--font-zh); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% -10%, rgba(98, 240, 184, .07), transparent 60%),
    radial-gradient(40% 30% at 90% 0%, rgba(122, 132, 255, .04), transparent 60%);
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 8px 12px; border-radius: 6px;
}
.skip-link:focus { left: 12px; top: 12px; z-index: 100; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------------------ */
/*  Buttons                                                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn--ghost {
  background: rgba(255,255,255,.03);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--line-2); background: rgba(255,255,255,.06); }
.btn--lg { padding: 14px 22px; font-size: 15px; }

/* ------------------------------------------------------------------ */
/*  Nav                                                                */
/* ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(8, 9, 10, .7);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 9, 10, .88);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: rgba(8, 9, 10, .94); }
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 15px;
}
.brand__mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: linear-gradient(160deg, rgba(98,240,184,.25), rgba(98,240,184,.05));
  border: 1px solid rgba(98,240,184,.35);
  display: inline-grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.brand__mark::after {
  content: "";
  position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(98,240,184,.4), transparent 30%);
  animation: spin 8s linear infinite;
}
.brand__dot {
  position: relative;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  z-index: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand__word { font-weight: 600; }
.nav__links {
  display: flex; gap: 22px;
  justify-self: center;
  font-size: 14px;
  color: var(--ink-2);
}
.nav__links a {
  position: relative;
  padding: 6px 2px;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.nav__cta {
  display: flex;
  gap: 10px;
  justify-self: end;
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: auto 1fr; }
  .nav__cta { justify-self: end; }
  .nav__cta .btn { padding-inline: 18px; }
  .nav__cta .btn--ghost { display: none; }
}

/* ------------------------------------------------------------------ */
/*  Type system                                                        */
/* ------------------------------------------------------------------ */
.display {
  font-size: clamp(44px, 7.4vw, 86px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.display--sm { font-size: clamp(34px, 5.6vw, 64px); }
.display__accent {
  color: var(--accent);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .display__accent {
    background: linear-gradient(90deg, var(--accent) 0%, #d6f8ec 60%, var(--accent) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: shine 9s ease-in-out infinite;
  }
}
@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.h2 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
  max-width: 24ch;
}
.h2--sm { font-size: clamp(24px, 3.2vw, 34px); }

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin: 0 0 14px;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}
.lede--center { margin-left: auto; margin-right: auto; text-align: center; }
.sub {
  font-size: clamp(16px, 1.45vw, 18px);
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/*  Hero                                                               */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(88px, 15vh, 160px) var(--pad) clamp(82px, 13vh, 138px);
  overflow: hidden;
  z-index: 0;
  display: grid;
  align-items: center;
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(-430px, -26vw, -260px);
  width: 120vw;
  height: 120vw;
  max-width: 1400px;
  max-height: 1400px;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(98,240,184,.12), transparent 55%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  z-index: 2;
  display: grid;
  gap: 30px;
  transform: translateY(clamp(-78px, -6vh, -42px));
}

.hero__field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.atom {
  position: absolute;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(20, 22, 24, .55);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-grid;
  gap: 2px;
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation:
    atomIn .8s ease-out forwards,
    atomFloat 11s ease-in-out infinite;
  animation-delay: calc(.2s + var(--d, 0s)), calc(1.2s + var(--d, 0s));
}
.atom b {
  font-family: var(--font-zh);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.1;
}
.atom small {
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.atom--accent {
  border-color: rgba(98, 240, 184, .24);
  background: rgba(98, 240, 184, .05);
}
.atom--accent b { color: var(--accent); }

/* Desktop positions — right half, pulled toward the centre but clear of the lede */
.atom--1 { top: 18%;    right: 16%; }
.atom--2 { top: 50%;    right: 12%; }
.atom--3 { bottom: 16%; right: 22%; }
.atom--4 { bottom: 6%;  left: 42%; }
.atom--5 { top: 30%;    right: 30%; }
.atom--6,
.atom--7,
.atom--8,
.atom--9,
.atom--10 { display: none; }

@keyframes atomIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: var(--atom-opacity, .42); transform: none; }
}
@keyframes atomFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes mobileAtomBlink {
  0%, 6% {
    opacity: 0;
    transform: translate3d(var(--x0), var(--y0), 0) scale(.96);
  }
  10%, 19% {
    opacity: var(--atom-opacity, .22);
    transform: translate3d(var(--x0), var(--y0), 0) scale(1);
  }
  24% {
    opacity: 0;
    transform: translate3d(var(--x0), var(--y0), 0) scale(.98);
  }
  24.01%, 54% {
    opacity: 0;
    transform: translate3d(var(--x1), var(--y1), 0) scale(.96);
  }
  58%, 67% {
    opacity: var(--atom-opacity, .22);
    transform: translate3d(var(--x1), var(--y1), 0) scale(1);
  }
  72% {
    opacity: 0;
    transform: translate3d(var(--x1), var(--y1), 0) scale(.98);
  }
  72.01%, 100% {
    opacity: 0;
    transform: translate3d(var(--x2), var(--y2), 0) scale(.96);
  }
}
.atom { --atom-opacity: .42; }

/* Narrower desktops — pull pills back toward the edge so they clear the lede */
@media (max-width: 1200px) {
  .atom--5 { display: none; }
  .atom--1 { right: 8%; }
  .atom--2 { right: 5%; }
  .atom--3 { right: 12%; }
  .atom--4 { left: 38%; }
}
/* Tablet — pull back further; drop the bottom-left (clashes with CTAs) */
@media (max-width: 980px) {
  .atom { --atom-opacity: .32; }
  .atom--4 { display: none; }
  .atom--1 { right: 5%; }
  .atom--2 { right: 3%; }
  .atom--3 { right: 8%; }
}
/* Narrow tablets — only keep the two far-right pills */
@media (max-width: 820px) {
  .atom--3 { display: none; }
}

/* Mobile — use the word atoms as a quiet lower-background layer. */
@media (max-width: 640px) {
  .hero__field { display: block; }
  .atom {
    --atom-opacity: .24;
    --dur: 36s;
    --delay: 0s;
    --x0: 10vw;
    --y0: 70svh;
    --x1: 58vw;
    --y1: 83svh;
    --x2: 28vw;
    --y2: 91svh;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    padding: 7px 10px;
    background: rgba(20, 22, 24, .34);
    border-color: rgba(255, 255, 255, .07);
    opacity: 0;
    will-change: opacity, transform;
    animation: mobileAtomBlink var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
  }
  .atom b { font-size: 14px; }
  .atom small { font-size: 10px; }
  .atom--1 {
    --delay: 0s;
    --x0: 62vw;
    --y0: 61svh;
    --x1: 13vw;
    --y1: 81svh;
    --x2: 44vw;
    --y2: 88svh;
  }
  .atom--2 {
    --delay: -3.6s;
    --x0: 8vw;
    --y0: 66svh;
    --x1: 55vw;
    --y1: 76svh;
    --x2: 24vw;
    --y2: 92svh;
  }
  .atom--3 {
    --delay: -7.2s;
    --x0: 61vw;
    --y0: 86svh;
    --x1: 31vw;
    --y1: 70svh;
    --x2: 5vw;
    --y2: 88svh;
  }
  .atom--4 {
    --delay: -10.8s;
    --x0: 36vw;
    --y0: 94svh;
    --x1: 66vw;
    --y1: 68svh;
    --x2: 11vw;
    --y2: 77svh;
  }
  .atom--5 {
    --delay: -14.4s;
    --x0: 6vw;
    --y0: 91svh;
    --x1: 42vw;
    --y1: 64svh;
    --x2: 63vw;
    --y2: 82svh;
    display: inline-grid;
  }
  .atom--6 {
    --delay: -18s;
    --x0: 52vw;
    --y0: 72svh;
    --x1: 18vw;
    --y1: 93svh;
    --x2: 66vw;
    --y2: 86svh;
    display: inline-grid;
  }
  .atom--7 {
    --delay: -21.6s;
    --x0: 14vw;
    --y0: 74svh;
    --x1: 62vw;
    --y1: 91svh;
    --x2: 39vw;
    --y2: 67svh;
    display: inline-grid;
  }
  .atom--8 {
    --delay: -25.2s;
    --x0: 67vw;
    --y0: 79svh;
    --x1: 8vw;
    --y1: 87svh;
    --x2: 48vw;
    --y2: 95svh;
    display: inline-grid;
  }
  .atom--9 {
    --delay: -28.8s;
    --x0: 25vw;
    --y0: 84svh;
    --x1: 64vw;
    --y1: 64svh;
    --x2: 9vw;
    --y2: 71svh;
    display: inline-grid;
  }
  .atom--10 {
    --delay: -32.4s;
    --x0: 57vw;
    --y0: 95svh;
    --x1: 12vw;
    --y1: 63svh;
    --x2: 34vw;
    --y2: 79svh;
    display: inline-grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atom { animation: atomIn .4s ease-out forwards; }
}
.hero .display { max-width: 14.5ch; }
.hero .lede { max-width: 70ch; }
.hero__cta {
  margin: 10px 0 46px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero {
    align-items: start;
    padding-top: clamp(72px, 13svh, 120px);
    padding-bottom: clamp(56px, 9svh, 86px);
  }
  .hero::after {
    left: 48%;
    bottom: auto;
    top: clamp(360px, 48svh, 500px);
    width: 190vw;
    height: 190vw;
    max-width: none;
    max-height: none;
    background: radial-gradient(circle at center, rgba(98,240,184,.24), transparent 58%);
    filter: blur(18px);
  }
  .hero__inner { transform: none; }
  @supports not (height: 1svh) {
    .hero {
      padding-top: 90px;
      padding-bottom: 62px;
    }
  }
  .display { font-size: clamp(42px, 12vw, 56px); line-height: 1.08; }
  .display--sm { font-size: clamp(34px, 9.6vw, 50px); line-height: 1.12; letter-spacing: -0.02em; }
  .hero .lede { max-width: 38ch; }
  .hero__cta { margin-bottom: 34px; }
}
/* ------------------------------------------------------------------ */
/*  Section frame                                                      */
/* ------------------------------------------------------------------ */
.section {
  position: relative;
  padding: clamp(80px, 12vh, 140px) var(--pad);
  border-top: 1px solid var(--line);
}
.section--alt {
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0)),
    var(--bg-2);
}
.section__head {
  max-width: var(--maxw);
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.section__head--left { max-width: var(--maxw); }
.section--alt .kicker { color: var(--accent-2); }

/* ------------------------------------------------------------------ */
/*  Shared: chip, wave, checklist, badge, picklist, playbtn            */
/* ------------------------------------------------------------------ */
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 500;
}
.chip--primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.chip--quiet { color: var(--ink-3); }

.wave {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  height: 18px;
}
.wave i {
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
  animation: wave 1.2s ease-in-out infinite;
}
.wave i:nth-child(1) { height: 30%; animation-delay: 0s; }
.wave i:nth-child(2) { height: 60%; animation-delay: .1s; }
.wave i:nth-child(3) { height: 90%; animation-delay: .2s; }
.wave i:nth-child(4) { height: 50%; animation-delay: .3s; }
.wave i:nth-child(5) { height: 80%; animation-delay: .4s; }
.wave i:nth-child(6) { height: 40%; animation-delay: .5s; }
.wave i:nth-child(7) { height: 70%; animation-delay: .6s; }
.wave--lg { height: 34px; gap: 3px; }
.wave--lg i { width: 3px; }
@keyframes wave {
  0%, 100% { transform: scaleY(.7); }
  50%      { transform: scaleY(1.4); }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.checklist li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.checklist li::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 5px;
  background: rgba(98,240,184,.14);
  border: 1px solid rgba(98,240,184,.45);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 7.5 L6 10.5 L11 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 11px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 7.5 L6 10.5 L11 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 11px no-repeat;
  pointer-events: none;
}
.checklist li b {
  color: var(--ink);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--ink-3);
}
.badge--pending {
  background: rgba(245, 176, 106, .12);
  border-color: rgba(245, 176, 106, .35);
  color: var(--warm);
}
.badge--approved {
  background: rgba(98, 240, 184, .12);
  border-color: rgba(98, 240, 184, .35);
  color: var(--accent);
}
.badge--rejected {
  background: rgba(240, 168, 168, .12);
  border-color: rgba(240, 168, 168, .3);
  color: var(--warn);
}

.playbtn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  flex-shrink: 0;
  transition: transform .15s ease, background .2s ease;
}
.playbtn:hover { transform: scale(1.04); background: var(--accent-2); }
.playbtn__tri {
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--accent-ink);
  margin-left: 2px;
}
.playbtn__pause {
  display: none;
  gap: 3px;
}
.playbtn__pause i {
  width: 3px; height: 12px;
  background: var(--accent-ink);
  border-radius: 1px;
  display: inline-block;
}
.playbtn.is-playing .playbtn__tri { display: none; }
.playbtn.is-playing .playbtn__pause { display: inline-flex; }

.picklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pick {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
  cursor: pointer;
}
.pick__rm { cursor: pointer; }
.pick[data-included="true"] {
  border-color: rgba(98,240,184,.35);
  background: rgba(98,240,184,.05);
}
.pick:not([data-included="true"]) { opacity: .55; }
.pick b {
  font-family: var(--font-zh);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  line-height: 1;
}
.pick__pin {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pick__gloss {
  color: var(--ink-3);
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick--sentence {
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
}
.pick--sentence .pick__sent {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.pick--sentence .pick__sent b {
  font-size: 16px;
  line-height: 1.45;
}
.pick__rm {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  transition: background .15s ease, color .15s ease;
}
.pick__rm:hover { background: rgba(255,105,105,.15); color: var(--warn); }

.pick__check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pick__check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pick__box {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.04);
  display: inline-grid;
  place-items: center;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.pick__check input:checked + .pick__box {
  background: var(--accent);
  border-color: var(--accent);
}
.pick__check input:checked + .pick__box::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}

@media (max-width: 640px) {
  .pick {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "check name remove"
      ". pin pin"
      ". gloss gloss";
    gap: 5px 10px;
    padding: 10px;
  }
  .pick > .pick__check { grid-area: check; }
  .pick > b { grid-area: name; min-width: 0; }
  .pick > .pick__pin { grid-area: pin; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .pick > .pick__gloss { grid-area: gloss; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .pick > .pick__rm { grid-area: remove; align-self: start; }
  .pick--sentence { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "check sent remove"; }
  .pick--sentence .pick__sent { grid-area: sent; }
  .pick--sentence .pick__sent b { font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
  .pick--sentence .pick__sent .pick__pin { white-space: normal; overflow-wrap: anywhere; }
  .pick--sentence .pick__sent .pick__gloss { white-space: normal; overflow-wrap: anywhere; }
}

/* ------------------------------------------------------------------ */
/*  01 — Voice Memos                                                  */
/* ------------------------------------------------------------------ */
.capture {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .capture { grid-template-columns: 1fr; }
}

.reviewmemo {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(98,240,184,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.reviewmemo__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
}
.reviewmemo__file { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.reviewmemo__name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.reviewmemo__head .badge { flex: 0 0 auto; }

.reviewmemo__prompt {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.reviewmemo__time {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
}

.reviewmemo__player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
}
.reviewmemo__track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  min-width: 0;
}
.reviewmemo__bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
}
.reviewmemo__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width .15s linear;
}

.reviewmemo__langs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.018);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.reviewmemo__lang { display: inline-flex; align-items: baseline; gap: 6px; }
.reviewmemo__lang b { color: var(--ink); font-weight: 500; }
.reviewmemo__arrow { color: var(--ink-3); }
.reviewmemo__langs .chip { margin-left: auto; }

.extract2 {
  display: grid;
  gap: 14px;
}
.extract2__steps { display: grid; gap: 12px; }
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.process li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink-3);
  background: rgba(255,255,255,.018);
  border: 1px solid transparent;
  font-size: 14px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.process li::before {
  content: attr(data-step);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.extract2[data-step="1"] .process li:nth-child(1),
.extract2[data-step="2"] .process li:nth-child(2),
.extract2[data-step="3"] .process li:nth-child(3) {
  color: var(--ink);
  background: rgba(98,240,184,.07);
  border-color: rgba(98,240,184,.24);
}
.extract2[data-step="1"] .process li:nth-child(1)::before,
.extract2[data-step="2"] .process li:nth-child(2)::before,
.extract2[data-step="3"] .process li:nth-child(3)::before {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}
.extract2__hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.extract2__result {
  display: none;
  gap: 16px;
}
.extract2[data-extract-state="ready"] .extract2__result {
  display: grid;
  animation: memoIn .35s ease-out;
}
.extract2[data-extract-state="ready"] .extract2__steps { display: none; }
@keyframes memoIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.extract2__group { display: grid; gap: 10px; }
.extract2__grouphead {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.extract2__grouptitle { color: var(--ink-3); }
.extract2__groupcount { color: var(--ink-2); }
.extract2__grouphead .chip { margin-left: auto; text-transform: none; letter-spacing: 0; }

.extract2__foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.extract2__foot [data-memo-delete] { margin-left: auto; }

@media (max-width: 640px) {
  .capture { gap: 18px; }
  .reviewmemo {
    padding: 16px;
    gap: 14px;
    border-radius: 18px;
  }
  .reviewmemo__head { gap: 10px; }
  .reviewmemo__name {
    font-size: 12px;
  }
  .reviewmemo__time { font-size: 11px; }
  .reviewmemo__prompt { font-size: 13px; }
  .reviewmemo__player {
    gap: 10px;
    padding: 10px;
  }
  .reviewmemo__track { gap: 8px; }
  .reviewmemo__langs {
    gap: 8px 10px;
    padding: 10px 12px;
    flex-wrap: nowrap;
    font-size: 12.5px;
  }
  .reviewmemo__lang { min-width: 0; }
  .extract2 { gap: 12px; }
  .process li { padding: 10px; font-size: 13px; }
  .extract2__grouphead {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title chip"
      "count count";
    gap: 4px 10px;
    align-items: center;
  }
  .extract2__grouptitle { grid-area: title; }
  .extract2__groupcount { grid-area: count; }
  .extract2__grouphead .chip { grid-area: chip; margin-left: 0; justify-self: end; }
  .extract2__foot { padding-top: 14px; gap: 8px; }
  .extract2__foot .btn { flex: 1 1 100%; justify-content: center; }
  .extract2__foot [data-memo-delete] { margin-left: 0; }
}

/* Side rail */
.memo-side {
  display: grid;
  gap: 22px;
  align-content: start;
  padding-top: 8px;
}
.memo-quick {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(98,240,184,.10), transparent 60%),
    rgba(255,255,255,.025);
  display: grid;
  gap: 8px;
}
.memo-quick__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.memo-quick__line {
  margin: 4px 0 0;
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.memo-quick__sub {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/*  02 — Object Photo                                                  */
/* ------------------------------------------------------------------ */
.photo {
  max-width: 980px;
  margin: 0 auto;
}
.photo__card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(122,243,196,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  padding: clamp(20px, 2.6vw, 30px);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.photo__head { display: grid; gap: 4px; }
.photo__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.photo__sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
}
.photo__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo__frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #11100e;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  max-height: 360px;
}
@media (max-width: 640px) {
  .photo__frame {
    aspect-ratio: 4 / 5;
    max-height: none;
  }
  .photo__box--cup { display: none; }
  .pick--photo.pick--cup { display: none; }
}
.photo__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 60%;
}
.photo__viewfinder {
  position: absolute;
  inset: 18px;
  pointer-events: none;
}
.photo__corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(98,240,184,.6);
}
.photo__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.photo__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.photo__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.photo__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.photo__scan-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.photo__card.is-detecting .photo__scan-layer { opacity: 1; }
.photo__card[data-photo-state="detected"] .photo__scan-layer { opacity: 0; transition: opacity .4s ease; }

/* Subtle HUD grid that fades in for the duration of detection */
.photo__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(98,240,184,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98,240,184,.10) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 85%);
  opacity: 0;
  animation: gridFade 1.6s ease-out forwards;
}
@keyframes gridFade {
  0%   { opacity: 0; }
  20%  { opacity: .9; }
  85%  { opacity: .6; }
  100% { opacity: 0; }
}

/* Sweeping scan beam — a thin glowing line that drops top → bottom */
.photo__scan {
  position: absolute;
  left: -6%;
  right: -6%;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(98,240,184,.95) 50%, transparent 100%);
  box-shadow: 0 0 18px rgba(98,240,184,.85), 0 0 48px rgba(98,240,184,.45);
  opacity: 0;
  transform: translateY(0);
  animation: scanSweep 1.4s cubic-bezier(.55, 0, .35, 1) forwards;
}
.photo__scan::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -60px;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(98,240,184,.18) 80%, rgba(98,240,184,.35));
  filter: blur(1px);
  pointer-events: none;
}
@keyframes scanSweep {
  0%   { opacity: 0; transform: translateY(0); }
  10%  { opacity: 1; }
  85%  { opacity: 1; transform: translateY(100%); }
  100% { opacity: 0; transform: translateY(100%); }
}

/* Detection bounding boxes drop in, scale up, and glow */
.photo__box {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 1.5px solid rgba(98,240,184,.85);
  border-radius: 6px;
  background: rgba(98,240,184,.04);
  box-shadow:
    0 0 0 1px rgba(8,9,10,.4) inset,
    0 0 22px rgba(98,240,184,.25),
    0 0 60px rgba(98,240,184,.15);
  opacity: 0;
  transform: scale(.92);
  transform-origin: center;
  animation: boxDraw .45s cubic-bezier(.34, 1.4, .56, 1) forwards;
  animation-delay: var(--d);
}
.photo__box--accent {
  border-color: var(--accent);
  background: rgba(98,240,184,.08);
  box-shadow:
    0 0 0 1px rgba(8,9,10,.4) inset,
    0 0 28px rgba(98,240,184,.45),
    0 0 90px rgba(98,240,184,.22);
}
/* Corner accents using gradient borders */
.photo__box::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  pointer-events: none;
  background:
    /* TL */ linear-gradient(var(--accent), var(--accent)) left top / 14px 2px no-repeat,
    /* TL */ linear-gradient(var(--accent), var(--accent)) left top / 2px 14px no-repeat,
    /* TR */ linear-gradient(var(--accent), var(--accent)) right top / 14px 2px no-repeat,
    /* TR */ linear-gradient(var(--accent), var(--accent)) right top / 2px 14px no-repeat,
    /* BL */ linear-gradient(var(--accent), var(--accent)) left bottom / 14px 2px no-repeat,
    /* BL */ linear-gradient(var(--accent), var(--accent)) left bottom / 2px 14px no-repeat,
    /* BR */ linear-gradient(var(--accent), var(--accent)) right bottom / 14px 2px no-repeat,
    /* BR */ linear-gradient(var(--accent), var(--accent)) right bottom / 2px 14px no-repeat;
  border-radius: inherit;
}
/* Label pill sits at the top-left of the box */
.photo__box::before {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 6px);
  left: -1.5px;
  padding: 4px 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-zh), var(--font);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 6px 6px 6px 0;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(4px);
  animation: labelIn .3s ease-out forwards;
  animation-delay: calc(var(--d) + .15s);
}
@keyframes boxDraw {
  0%   { opacity: 0; transform: scale(.92); }
  60%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes labelIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .photo__scan, .photo__grid, .photo__box, .photo__box::before { animation: none; opacity: 1; transform: none; }
}

.photo__detect {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.photo__status {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
}
.photo__card[data-photo-state="detected"] .photo__detect { display: none; }
.photo__list { display: none; gap: 8px; }
.photo__card[data-photo-state="detected"] .photo__list {
  display: grid;
  animation: memoIn .35s ease-out;
}
.photo__foot { display: none; gap: 10px; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.photo__card[data-photo-state="detected"] .photo__foot { display: flex; }

.pick--photo {
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 6px 14px;
  cursor: pointer;
}
.pick--photo > .pick__check { align-self: center; }
.pick__hanzi {
  font-family: var(--font-zh);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.1;
}
.pick__detected {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.3;
}
.pick__confidence {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  justify-self: end;
}
.pick[data-included="true"] .pick__confidence {
  color: var(--accent);
  border-color: rgba(98,240,184,.4);
  background: rgba(98,240,184,.08);
}
.pick__fields {
  grid-column: 1 / -1;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  cursor: default;
}
.pick__fields label {
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pick__fields input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.pick__fields input[lang="zh"] { font-family: var(--font-zh); }
.pick__fields input:focus { outline: 2px solid rgba(98,240,184,.4); outline-offset: 1px; border-color: rgba(98,240,184,.5); }
@media (max-width: 640px) {
  .pick--photo {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "check name conf"
      "check detected detected"
      "fields fields fields";
  }
  .pick--photo > .pick__check { grid-area: check; align-self: start; padding-top: 2px; }
  .pick--photo > .pick__hanzi { grid-area: name; }
  .pick--photo > .pick__detected { grid-area: detected; }
  .pick--photo > .pick__confidence { grid-area: conf; }
  .pick--photo > .pick__fields { grid-area: fields; grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/*  03 — Flashcards                                                    */
/* ------------------------------------------------------------------ */
.flashwrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 960px) {
  .flashwrap { grid-template-columns: 1fr; }
  .flashwrap > .flashcard { order: 2; }
  .flashwrap > .faces { order: 1; }
}

.flashcard {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 70% at 100% 0%, rgba(98,240,184,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  padding: clamp(22px, 2.4vw, 28px);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.flashcard__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.flashcard__title {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(98,240,184,.1);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid rgba(98,240,184,.25);
}
.flashcard__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.flashcard__progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.flashcard__progress-fill {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width .4s ease;
}

.flashcard__card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  padding: 28px 24px;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
  position: relative;
}
.flashcard__prompt {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}
.flashcard__big {
  font-family: var(--font-zh);
  font-size: clamp(56px, 7vw, 88px);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1;
  font-weight: 500;
  margin: 0;
}
.flashcard__big.is-latin {
  font-family: var(--font);
  font-size: clamp(40px, 5.6vw, 66px);
  letter-spacing: -0.03em;
}
.flashcard__big.is-audio {
  display: grid;
  place-items: center;
  padding: 12px 0;
}
.flashcard__audio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(98,240,184,.35);
  background: rgba(98,240,184,.1);
  color: var(--accent);
  font-size: 13px;
}
.flashcard__audio:hover { background: rgba(98,240,184,.18); }
.flashcard__audio .play-tri {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 1px;
}

.flashcard__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.flashopt {
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink);
  font-size: 15px;
  text-align: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  min-height: 56px;
}
.flashopt[lang="zh"] { font-family: var(--font-zh); font-size: 18px; }
.flashopt:hover:not(:disabled) { background: rgba(255,255,255,.05); border-color: var(--line-2); }
.flashopt:disabled { cursor: default; opacity: .7; }
.flashopt.is-correct {
  background: rgba(98,240,184,.16);
  color: var(--accent);
  border-color: rgba(98,240,184,.5);
}
.flashopt.is-wrong {
  background: rgba(240,168,168,.12);
  color: var(--warn);
  border-color: rgba(240,168,168,.42);
}
.flashcard__feedback {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
  min-height: 1.2em;
  text-align: center;
}
.flashcard__feedback[data-kind="good"] { color: var(--accent); }
.flashcard__feedback[data-kind="bad"]  { color: var(--warn); }

.faces {
  border-left: 1px solid var(--line);
  padding: 0 0 0 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}
@media (max-width: 960px) {
  .faces { border-left: 0; padding: 0; }
}
.faces__label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.faces__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .faces__row { gap: 8px; }
  .face {
    padding: 10px 8px;
    min-height: 0;
    gap: 4px;
    text-align: center;
    align-content: start;
    justify-items: center;
  }
  .face__top { font-size: 9.5px; }
  .face__big { font-size: 22px; }
  .face__big--audio .wave--lg { height: 22px; }
  .face__hint { font-size: 10.5px; text-align: center; }
}
.face {
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.018);
  color: inherit;
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
  min-height: 142px;
  align-content: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.face:hover,
.face:focus-visible {
  border-color: var(--line-2);
  transform: translateY(-2px);
  outline: none;
}
.face.is-active {
  border-color: rgba(98,240,184,.42);
  background: rgba(98,240,184,.08);
}
.face__top {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.face__big {
  font-family: var(--font-zh);
  font-size: clamp(25px, 2.8vw, 34px);
  color: var(--ink);
  line-height: 1.1;
}
.face__big--audio {
  font-family: var(--font);
  display: grid;
  place-items: center;
}
.face__hint {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.faces__foot {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/*  04 — Story                                                         */
/* ------------------------------------------------------------------ */
.story-tabs {
  max-width: 960px;
  margin: 0 auto 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.story-tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
}
.story-tab.is-active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.story {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  border-top-color: rgba(98,240,184,.26);
  background:
    radial-gradient(80% 70% at 88% 0%, rgba(98,240,184,.07), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.006));
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  position: relative;
  overflow: hidden;
}
.story__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}
.story__tag {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.story__title {
  grid-column: 1;
  font-family: var(--font-zh);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ink);
}
.story__play {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  transition: transform .2s ease, background .2s ease;
}
.story__play:hover { transform: translateY(-1px); background: var(--accent-2); color: var(--accent-ink); }
.play-tri {
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--accent-ink);
  margin-left: 1px;
}
.story__body {
  font-family: var(--font-zh);
  font-size: clamp(22px, 2.45vw, 30px);
  line-height: 1.75;
  color: var(--ink);
  letter-spacing: 0;
  margin: 0;
  max-width: 28em;
}
.w {
  position: relative;
  display: inline-block;
}
.story-blank {
  display: inline-block;
  min-width: 3.7em;
  height: 1.05em;
  margin: 0 .12em;
  border-radius: 10px;
  border: 1px solid rgba(98,240,184,.38);
  border-bottom-color: var(--accent);
  background: rgba(98,240,184,.08);
  vertical-align: -.08em;
}
.story-blank.is-active {
  box-shadow: 0 0 0 4px rgba(98,240,184,.08);
  background: rgba(98,240,184,.14);
}
.story-blank.is-filled {
  min-width: 0;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-zh);
  font-size: 1em;
  color: var(--ink);
  vertical-align: baseline;
}
.story-word {
  position: relative;
  display: inline-block;
  border-radius: 6px;
  cursor: help;
}
.story-word:hover,
.story-word:focus-visible {
  color: var(--accent);
  outline: none;
}
.story-word::after {
  content: attr(data-gloss);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(20,22,24,.98);
  color: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 5;
}
.story-word:hover::after,
.story-word:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.check {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}
.check__q {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.check__opts {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
}
.check.is-live .check__opts,
.check.is-answered .check__opts {
  display: flex;
}
.check__opt {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink);
  font-size: 15px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.check__opt span { font-family: var(--font-zh); font-size: 17px; }
.check__opt:disabled { cursor: not-allowed; opacity: .55; }
.check__opt:hover:not(:disabled) { background: rgba(255,255,255,.05); border-color: var(--line-2); }
.check:not(.is-live) .check__opt:not(.is-correct):not(.is-wrong) { opacity: .45; }
.check__opt.is-correct {
  background: rgba(98,240,184,.18);
  border-color: rgba(98,240,184,.55);
  box-shadow: 0 0 0 1px rgba(98,240,184,.25) inset;
}
.check__opt.is-wrong {
  background: rgba(240,138,138,.12);
  border-color: rgba(240,138,138,.42);
}
.check__feedback {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.check__feedback[data-kind="good"] { color: var(--accent); }
.check__feedback[data-kind="bad"]  { color: var(--warn); }

.story__note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.story__play.is-playing { background: var(--accent-2); }
.story__play.is-playing .play-tri {
  width: 9px;
  height: 12px;
  border-width: 0 3px;
  border-color: var(--accent-ink);
}

/* ------------------------------------------------------------------ */
/*  05 — Smart Add                                                     */
/* ------------------------------------------------------------------ */
.smartadd {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .smartadd { grid-template-columns: 1fr; }
}

.smartcard {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(98,240,184,.07), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.smartcard__head { display: grid; gap: 4px; }
.smartcard__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.smartcard__sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
}

.smartcard__input { display: grid; gap: 14px; }
.smartcard__field {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.smartcard__field input {
  flex: 1;
  min-width: 200px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font-zh), var(--font);
  letter-spacing: 0;
}
.smartcard__field input:focus {
  outline: 2px solid rgba(98,240,184,.4);
  outline-offset: 1px;
  border-color: rgba(98,240,184,.5);
}
.smartcard__field input::placeholder { color: var(--ink-3); }
.smartcard__searchicon { font-size: 16px; line-height: 1; }

.smartcard__fake {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font-zh), var(--font);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  cursor: default;
  user-select: none;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.smartcard__searchicon--inline {
  color: var(--ink-3);
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.smartcard__fake-content {
  display: inline-flex;
  align-items: baseline;
  flex: 1;
  min-width: 0;
}
.smartcard__field[data-active="true"] .smartcard__fake {
  border-color: rgba(98,240,184,.5);
  box-shadow: 0 0 0 2px rgba(98,240,184,.18);
}
.smartcard__fake-text {
  white-space: pre;
}
.smartcard__fake-placeholder {
  color: var(--ink-3);
}
.smartcard__field[data-active="true"] .smartcard__fake-placeholder,
.smartcard__fake[data-filled="true"] .smartcard__fake-placeholder {
  display: none;
}
.smartcard__caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 1px;
  background: var(--accent);
  vertical-align: middle;
  opacity: 0;
  transform: translateY(1px);
}
.smartcard__field[data-active="true"] .smartcard__caret {
  opacity: 1;
  animation: smart-caret-blink 1s steps(2, end) infinite;
}
@keyframes smart-caret-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.smartcard__chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.smartcard__chiplabel {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-right: 4px;
}

.smartcard__fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  opacity: .5;
  transition: opacity .3s ease;
}
.smartcard__fields[data-state="filled"] { opacity: 1; }
@media (max-width: 640px) {
  .smartcard__fields { grid-template-columns: 1fr; }
}
.smartfield { display: grid; gap: 6px; }
.smartfield label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.smartfield__box {
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--ink);
  font-size: 15px;
  display: flex;
  align-items: center;
  letter-spacing: 0;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  cursor: text;
}
.smartfield__box[contenteditable="true"]:hover { border-color: var(--line-2); }
.smartfield__box[contenteditable="true"]:focus {
  border-color: rgba(98, 240, 184, .5);
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 0 0 3px rgba(98, 240, 184, .12);
}
.smartfield__box:empty::before {
  content: "—";
  color: var(--ink-4);
}
.smartcard__fields[data-state="loading"] .smartfield__box::before {
  content: "";
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.12), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.smartcard__fields[data-state="loading"] .smartfield__box {
  color: transparent;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.smartfield__box.is-filled-flash {
  animation: fillFlash .6s ease-out;
}
@keyframes fillFlash {
  0%   { background: rgba(98,240,184,.18); border-color: rgba(98,240,184,.6); }
  100% { background: rgba(255,255,255,.02); border-color: var(--line); }
}

.smartcard__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.smartcard__status {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  flex: 1;
  min-width: 200px;
}
.smartcard__status[data-kind="good"] { color: var(--accent); }
.smartcard__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.smartadd-side {
  display: grid;
  gap: 22px;
  align-content: start;
  padding-top: 8px;
}

/* ------------------------------------------------------------------ */
/*  CTA                                                                */
/* ------------------------------------------------------------------ */
.cta {
  padding: clamp(80px, 14vh, 140px) var(--pad);
  text-align: center;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(98,240,184,.08), transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.cta__inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.cta__lede { margin-top: clamp(20px, 3vw, 32px); }
.cta__form {
  margin: 36px auto 14px;
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: 720px;
}
.cta__form > input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 20px 28px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s ease, background .2s ease;
}
.cta__form > input[type="email"]:focus {
  border-color: rgba(98,240,184,.4);
  background: rgba(255,255,255,.07);
}
.cta__form > input[type="email"]::placeholder { color: var(--ink-3); }
.cta__form > button[type="submit"] { flex: 0 0 auto; white-space: nowrap; }
.cta__fine { color: var(--ink-3); font-size: 13px; margin: 0; }
.cta__status {
  min-height: 1.4em;
  color: var(--ink-3);
  font-size: 14px;
  margin: 10px 0 0;
  transition: color .2s ease;
}
.cta__status[data-state="submitting"] { color: var(--ink-2, var(--ink-3)); }
.cta__status[data-state="success"],
.cta__status[data-state="duplicate"] { color: var(--accent); }
.cta__status[data-state="error"]     { color: #f08a8a; }
.cta__form[data-state="submitting"] button[type="submit"] { opacity: .7; cursor: progress; }
.cta__form[data-state="submitting"] > input[type="email"] { opacity: .8; }
@media (max-width: 640px) {
  .cta__form {
    flex-direction: column;
    gap: 10px;
  }
  .cta__form > input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
  }
  .cta__form > button[type="submit"] { width: 100%; }
}

/* ------------------------------------------------------------------ */
/*  FAQ                                                                */
/* ------------------------------------------------------------------ */
.section--faq { padding-top: clamp(40px, 6vh, 80px); }
.section--faq .section__head { margin-bottom: 32px; }
.faq {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: clamp(16px, 1.8vw, 19px);
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--ink-3);
  transition: transform .25s ease;
  font-weight: 300;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  max-width: 64ch;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/*  Footer                                                             */
/* ------------------------------------------------------------------ */
.foot {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad);
  background: var(--bg-2);
}
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.foot__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.foot__tag { margin: 0; color: var(--ink-3); font-size: 13px; }
.foot__nav { display: flex; gap: 20px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.foot__nav a:hover { color: var(--ink); }
.foot__legal { margin: 0; color: var(--ink-3); font-size: 12px; grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .foot__inner { grid-template-columns: 1fr; text-align: left; }
}

/* ------------------------------------------------------------------ */
/*  Reveal on scroll                                                   */
/* ------------------------------------------------------------------ */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ */
/*  Attract pulse — invites a click on idle action buttons.            */
/*  Stops on hover, when disabled, and when the action has run.        */
/* ------------------------------------------------------------------ */
/* Subtle expanding ring — used on transparent/ghost buttons. */
@keyframes attract-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(98,240,184,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(98,240,184,0); }
  100% { box-shadow: 0 0 0 0 rgba(98,240,184,0); }
}
/* Brighter breathing glow — used on the solid-green primary buttons,
   where a same-color ring blends into the button face. */
@keyframes attract-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(98,240,184,0),
      0 0 14px 1px rgba(98,240,184,.55);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(98,240,184,.32),
      0 0 28px 6px rgba(98,240,184,.85);
  }
}

.playbtn,
.story__play,
[data-photo-detect]:not(:disabled) {
  animation: attract-glow 2.2s ease-in-out infinite;
}
.flashopt.is-attract,
.face[data-mode="audio"]:not(.is-active),
[data-smart-sample] {
  animation: attract-pulse 2.6s ease-out infinite;
}
.playbtn:hover,
.story__play:hover,
[data-photo-detect]:hover,
.flashopt:hover,
.face:hover,
.face:focus-visible,
[data-smart-sample]:hover,
.playbtn.is-playing,
.story__play.is-playing,
.face.is-active,
.flashopt.is-correct,
.flashopt.is-wrong {
  animation: none;
}
/* Stagger chips so they pulse as a gentle wave instead of in lockstep. */
[data-smart-sample]:nth-of-type(2) { animation-delay: .45s; }
[data-smart-sample]:nth-of-type(3) { animation-delay: .9s; }
[data-smart-sample]:nth-of-type(4) { animation-delay: 1.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
