:root {
  /* 绿色体系 — 以管理端深绿为主 */
  --green-900: #06281a;
  --green-800: #08331f;
  --green-700: #0c4b33;
  --green-600: #10583b;
  --green-500: #2e7d32;
  --green-400: #43a047;
  --green-100: #c8e6c9;
  --green-50: #e8f5e9;

  --primary: var(--green-700);
  --primary-dark: var(--green-800);
  --primary-hover: var(--green-600);
  --primary-soft: var(--green-500);
  --accent: var(--green-500);
  --accent-dark: #1b5e20;

  --bad: #c62828;
  --bad-dark: #8e1c1c;

  --bg: #f3f9f5;
  --surface: #ffffff;
  --text: #0f2a1e;
  --muted: #4f5f56;
  --border: #dcebe1;
  --ok-soft: var(--green-50);
  --bad-soft: #ffebee;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(6, 40, 26, 0.06);
  --shadow: 0 2px 0 rgba(6, 40, 26, 0.04), 0 14px 34px -14px rgba(12, 75, 51, 0.32);
}

* { box-sizing: border-box; }

::selection { background: var(--green-600); color: #fff; }
::-moz-selection { background: var(--green-600); color: #fff; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: "Baloo 2", "Nunito", sans-serif;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 26px; font-weight: 700; margin: 4px 0 16px; }
h2 { font-size: 20px; font-weight: 600; margin: 26px 0 12px; }

a { color: var(--primary); }

:focus-visible {
  outline: 3px solid rgba(12, 75, 51, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* -------------------- Nav -------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(220, 235, 225, 0.9);
}

.nav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 3px 8px -2px rgba(12, 75, 51, 0.45);
}

.nav nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
  margin-left: 6px;
}
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav nav a:hover { background: #e8f5e9; color: var(--primary); }
.nav nav a.active { background: #e8f5e9; color: var(--primary); }
.nav-menu { position: relative; }
.nav-menu > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "▾"; font-size: 11px; }
.nav-menu > summary:hover, .nav-menu > summary.active, .nav-menu[open] > summary {
  background: #e8f5e9;
  color: var(--primary);
}
.nav-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 160px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav nav .nav-menu-panel a { width: 100%; white-space: nowrap; }
.nav-sep { width: 1px; height: 22px; background: var(--border); align-self: center; margin: 0 4px; flex: 0 0 auto; }
.nav nav.nav-actions { flex: 0 0 auto; margin-left: auto; justify-content: flex-end; gap: 8px; }
.nav nav a.nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  box-shadow: 0 3px 0 var(--primary-dark);
}
.nav nav a.nav-cta:hover { background: var(--primary-hover); color: #fff; }
.nav nav a.nav-login {
  background: #e3efe6;
  color: var(--text);
  padding: 8px 16px;
  box-shadow: 0 3px 0 #c3ddca;
}
.nav nav a.nav-login:hover { background: #d6e8db; color: var(--text); }

/* -------------------- Layout -------------------- */
main { max-width: 920px; margin: 0 auto; padding: 20px 18px 56px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; grid-auto-rows: 1fr; }

/* -------------------- Cards -------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
main > .card + .card { margin-top: 14px; }

a.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-soft);
}
a.card > p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
a.card img { width: 100%; height: 140px; object-fit: cover; }
.card img { max-width: 100%; border-radius: var(--radius-sm); display: block; }

.hero {
  background: linear-gradient(135deg, var(--primary), #197340 55%, var(--primary-soft));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.hero h1 { color: #fff; margin: 0 0 4px; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.9); }
.hero-flex { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-mascot {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex: 0 0 auto;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.muted { color: var(--muted); font-size: 14px; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8f5e9;
  color: var(--primary);
  border: 1px solid #c8e6c9;
  margin: 0 6px 6px 0;
  text-decoration: none;
}
a.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* -------------------- Buttons -------------------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--primary-dark);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.18s ease;
}
button:hover, .btn:hover { background: var(--primary-hover); }
button:active, .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--primary-dark); }

button.secondary, .btn.secondary {
  background: #e3efe6;
  color: var(--text);
  box-shadow: 0 3px 0 #c3ddca;
}
button.secondary:hover, .btn.secondary:hover { background: #d6e8db; }

button.ok, .btn.ok { background: var(--accent); box-shadow: 0 3px 0 var(--accent-dark); }
button.ok:hover, .btn.ok:hover { background: var(--accent-dark); }
button.bad, .btn.bad { background: var(--bad); box-shadow: 0 3px 0 var(--bad-dark); }
button.bad:hover, .btn.bad:hover { background: var(--bad-dark); }

/* -------------------- Forms -------------------- */
label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  margin: 4px 0 14px;
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-soft); outline: none; }

form p { margin: 0; }
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: 0 0 8px; font-size: 14px; font-weight: 600; }

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  min-height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--primary-soft); background: #f3f9f5; }
.option:has(input:checked) { border-color: var(--primary); background: #e8f5e9; }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex: 0 0 auto; }

/* -------------------- Feedback -------------------- */
.feedback { margin-top: 12px; padding: 12px 15px; border-radius: var(--radius-sm); font-weight: 600; }
.feedback.ok { background: var(--ok-soft); color: #1b5e20; border-left: 4px solid var(--accent); }
.feedback.bad { background: var(--bad-soft); color: #8e1c1c; border-left: 4px solid var(--bad); }
.feedback .muted { color: inherit; opacity: 0.85; font-weight: 500; }

/* -------------------- Progress -------------------- */
.progress-bar {
  height: 10px;
  background: #e3efe6;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #4caf50);
  transition: width 0.4s ease;
}

/* -------------------- Dialogue -------------------- */
.dialogue-line { display: flex; gap: 12px; }
.dialogue-line .avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
}
.dialogue-line .who { font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.dialogue-line .en { font-size: 17px; }
.dialogue-line .zh { color: var(--muted); font-size: 15px; }

details summary { cursor: pointer; color: var(--primary); font-weight: 600; }
details summary::marker { color: var(--primary-soft); }

audio { width: 100%; margin: 8px 0; }

/* -------------------- Pagination -------------------- */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.pagination a, .pagination span {
  padding: 9px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.pagination a:hover { border-color: var(--primary-soft); background: #f3f9f5; }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.btn-block { width: 100%; }
.center { text-align: center; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.filters label { margin-bottom: 0; }
.filters input, .filters select { width: auto; min-width: 140px; margin: 0; }
.filters .grow { flex: 1 1 180px; }
.filters .grow input { width: 100%; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.section-head h2 { margin: 0; }

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

.auth-wrap { max-width: 420px; margin: 24px auto; }
.auth-wrap .card { padding: 26px; }
.auth-wrap h1 { text-align: center; }

/* -------------------- Landing (marketing) -------------------- */
.lp { max-width: 1040px; margin: 0 auto; }

.lp-section { margin: 58px 0; }
.lp-section-head { margin-bottom: 22px; }
.lp-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.lp-section-head h2 { font-size: 26px; margin: 0; letter-spacing: -0.01em; }

.lp-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 44px;
  border-radius: 26px;
  padding: 56px 48px;
  color: #fff;
  background:
    radial-gradient(900px 360px at 85% -20%, rgba(46, 125, 50, 0.5), transparent 65%),
    radial-gradient(600px 300px at 8% 120%, rgba(76, 175, 80, 0.28), transparent 60%),
    linear-gradient(140deg, #0a3a27 0%, #0c4b33 55%, #156641 100%);
  box-shadow: 0 40px 70px -34px rgba(10, 58, 39, 0.55);
}
.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 80%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 80%);
  pointer-events: none;
}
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}
.lp-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.22);
}
.lp-title {
  position: relative;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 20px 0 16px;
  max-width: 16em;
}
.lp-sub {
  position: relative;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34em;
  margin: 0 0 28px;
}
.lp-cta { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }
.lp-hero-text { position: relative; flex: 1 1 auto; min-width: 0; }
.lp-hero-art { position: relative; flex: 0 0 auto; }
.lp-hero-art img {
  width: 236px;
  height: 236px;
  border-radius: 28px;
  display: block;
  box-shadow: 0 26px 55px -20px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.btn.on-dark { background: #fff; color: var(--primary); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22); }
.btn.on-dark:hover { background: #e8f5e9; }
.btn.ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
}
.btn.ghost-dark:hover { background: rgba(255, 255, 255, 0.16); }

.lp-sub-dark {
  max-width: 62ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0 0 8px;
}

.lp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.lp-panel { border: 1px solid var(--border); border-radius: 18px; padding: 22px; background: var(--surface); }
.lp-panel h3 { margin: 0 0 14px; font-size: 16px; }
.lp-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.lp-panel li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.lp-panel li strong { color: var(--text); }
.lp-panel .li-ico { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }
.lp-panel .li-ico svg { width: 20px; height: 20px; display: block; }
.lp-panel--muted { background: #f7f8f7; }
.lp-panel--muted .li-ico { color: #c62828; }
.lp-panel--muted h3 { color: var(--muted); }
.lp-panel--good { background: var(--green-50); border-color: var(--green-100); }
.lp-panel--good .li-ico { color: var(--green-700); }

.lp-quote {
  margin: 22px 0 0;
  padding: 18px 22px;
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: "Baloo 2", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}

.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lp-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-soft);
  box-shadow: 0 18px 40px -22px rgba(12, 75, 51, 0.45);
}
.lp-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 1px solid #c8e6c9;
}
.lp-icon svg { width: 20px; height: 20px; }
.lp-card h3 { font-size: 17px; margin: 16px 0 6px; letter-spacing: -0.01em; }
.lp-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

.loop-wrap { display: flex; justify-content: center; }
.loop-svg { width: 100%; max-width: 460px; height: auto; }

.lp-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-radius: 22px;
  padding: 34px 36px;
  color: #fff;
  background: linear-gradient(120deg, #0c4b33, #156641 70%, #197340);
  box-shadow: 0 30px 60px -34px rgba(12, 75, 51, 0.55);
}
.lp-band h2 { color: #fff; margin: 0 0 6px; font-size: 23px; }
.lp-band p { margin: 0; color: rgba(255, 255, 255, 0.82); }

.lp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* -------------------- Motion / Responsive -------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-hero { flex-direction: column; align-items: flex-start; gap: 28px; }
  .lp-hero-art img { width: 180px; height: 180px; }
  .lp-compare { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 22px; }
  main { padding: 16px 14px 48px; }
  .nav-inner { padding: 8px 14px; gap: 6px; flex-wrap: wrap; }
  .nav nav { gap: 2px; }
  .nav nav a { padding: 8px 10px; font-size: 13px; }
  .brand { order: 1; flex: 0 0 auto; }
  .nav nav.nav-actions { order: 2; margin-left: auto; }
  .nav-inner > nav:not(.nav-actions) {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-inner > nav:not(.nav-actions)::-webkit-scrollbar { display: none; }
  .nav-inner > nav:not(.nav-actions) a { flex: 0 0 auto; white-space: nowrap; }
  .grid { grid-template-columns: 1fr; }
  button, .btn { width: auto; }
  .btn-block { width: 100%; }
  .lp-hero { padding: 40px 22px; border-radius: 22px; }
  .lp-section { margin: 40px 0; }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-band { padding: 26px 22px; }
  .hero-mascot { width: 72px; height: 72px; border-radius: 18px; }
}

/* 六步学习闭环 */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

.study-shell { max-width: 720px; margin: 0 auto; }
.study-loading {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 600;
}

.study-stats {
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.study-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 20px;
}
.study-stat + .study-stat { border-top: 1px solid var(--border); }
.study-stat strong { font-family: "Baloo 2", sans-serif; font-size: 24px; line-height: 1.1; }

.study-cta { display: block; margin-top: 18px; }

.study-demo {
  margin-top: 14px;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--green-50);
  border-radius: var(--radius-sm);
}

.study-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.study-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  counter-reset: step;
}
.study-step {
  padding: 6px 4px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.study-step.done { background: var(--green-50); color: var(--green-700); }
.study-step.active { background: var(--green-700); color: #fff; font-weight: 700; }

.study-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.study-word { font-family: "Baloo 2", sans-serif; font-size: 30px; letter-spacing: 0.5px; }
.study-wordline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.study-kicker {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 700;
}
.study-question { font-size: 18px; font-weight: 600; margin: 10px 0 14px; }
.study-hook { font-size: 17px; font-weight: 600; margin: 14px 0; }
.study-def { font-size: 24px; font-weight: 700; margin: 10px 0 4px; }
.study-hint { font-family: monospace; font-size: 20px; letter-spacing: 3px; color: var(--muted); }

.study-options { display: grid; gap: 10px; margin-top: 8px; }
.study-option {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
.study-option:hover { border-color: var(--green-400); background: var(--green-50); }

.study-image { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
.study-block { margin: 16px 0; }
.study-block h3 { margin: 0 0 6px; font-size: 15px; color: var(--green-700); }
.study-block p { margin: 4px 0; }
.study-warn { padding: 12px 14px; border-radius: var(--radius-sm); background: #fff8e1; }
.study-warn h3 { color: #8d6e00; }

.study-feedback {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.study-feedback.ok { background: var(--ok-soft); color: var(--green-700); }
.study-feedback.bad { background: var(--bad-soft); color: var(--bad-dark); }

.study-meter { margin: 16px 0; display: grid; gap: 6px; }

.study-card form { margin-top: 16px; }
.study-card input[type="text"], .study-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font: inherit;
  margin-bottom: 10px;
}
.study-card audio { width: 100%; margin: 8px 0; }

@media (max-width: 620px) {
  .study-card { padding: 16px; }
  .study-step { font-size: 11px; }
}

.ai-chat-log { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.ai-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 1.5;
}
.ai-bubble .who { font-weight: 700; color: var(--primary); margin-bottom: 2px; font-size: 13px; }
.ai-assistant { align-self: flex-start; }
.ai-user { align-self: flex-end; background: var(--ok-soft); }
.ai-chat-form { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.ai-chat-form textarea { width: 100%; resize: vertical; }
.ai-chat-form button { align-self: flex-end; }
.ai-chat-error { color: var(--bad); }
