/* ==========================================================================
   郭明轩的英语学习神器 — product UI
   ========================================================================== */

:root {
  --bg: #f2eee4;
  --surface: #fffdf8;
  --surface-2: #f8f4eb;
  --surface-3: #f1ece1;
  --ink: #10231f;
  --ink-2: #2e433d;
  --muted: #7b8984;
  --muted-2: #a2aaa6;
  --line: #e6dfd1;
  --line-strong: #d9d1c0;

  --navy: #0b1b2b;
  --navy-2: #102b3d;
  --navy-3: #163a4e;
  --mint: #5ce0b5;
  --mint-2: #24b98a;
  --mint-soft: #ddf8ee;
  --mint-mist: #effbf6;

  --amber: #ffb84d;
  --amber-2: #e79b22;
  --amber-soft: #fff0d2;

  --coral: #ff776b;
  --coral-soft: #ffe8e3;
  --blue: #5b8cff;
  --blue-soft: #e8eeff;
  --violet: #9a7bff;
  --violet-soft: #f0ebff;

  --shadow-sm: 0 4px 14px rgba(16, 35, 31, 0.045);
  --shadow-md: 0 16px 36px rgba(16, 35, 31, 0.08);
  --shadow-lg: 0 26px 60px rgba(16, 35, 31, 0.14);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;

  --font-ui: "Avenir Next", "SF Pro Display", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Baskerville", "Times New Roman", Georgia, serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 0%, rgba(92, 224, 181, 0.12), transparent 28%),
    radial-gradient(circle at 8% 18%, rgba(255, 184, 77, 0.12), transparent 24%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(36, 185, 138, 0.3);
  outline-offset: 2px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.app-root {
  min-height: 100vh;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.boot-mark,
.brand-mark,
.mobile-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--mint), #b8f5dd);
  box-shadow: 0 10px 22px rgba(36, 185, 138, 0.24);
}

/* ==========================================================================
   Shell / sidebar
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 18px;
  background:
    radial-gradient(circle at 15% 2%, rgba(92, 224, 181, 0.18), transparent 28%),
    radial-gradient(circle at 95% 65%, rgba(91, 140, 255, 0.1), transparent 32%),
    var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 0.55px, transparent 0.55px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.38);
}

.brand-name {
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--mint);
}

.side-nav {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-label {
  margin: 0 10px 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.3);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 43px;
  padding: 0 11px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: 0.18s ease;
}

.side-link .icon {
  width: 18px;
  height: 18px;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

.side-link.active {
  background: rgba(92, 224, 181, 0.12);
  color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(92, 224, 181, 0.16);
}

.side-link .side-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: #3d2a02;
  font-size: 8px;
  font-weight: 800;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 22px;
}

.side-progress-card {
  padding: 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.side-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
}

.side-progress-head strong {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.side-progress-track {
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.side-progress-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #a9f5d9);
  transition: width 0.5s ease;
}

.side-model {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.42);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 184, 77, 0.14);
  flex: none;
}

.status-dot.online {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(92, 224, 181, 0.14);
}

.sidebar-foot small {
  display: block;
  margin-top: 13px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.2);
}

.main {
  min-width: 0;
  padding: 0 32px 56px;
}

.page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(242, 238, 228, 0.86);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.topbar-title {
  min-width: 0;
}

.topbar-title .eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.topbar-title h1 {
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.topbar-spacer {
  flex: 1;
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 10px;
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.top-pill .icon {
  width: 13px;
  height: 13px;
}

.top-pill.flame {
  color: #a76809;
  background: var(--amber-soft);
  border-color: #f4dfb8;
}

.top-pill.flame .icon {
  fill: var(--amber);
  stroke: var(--amber);
}

.top-pill.coins {
  color: #8d6418;
  background: #fff7e4;
  border-color: #f3e1b7;
}

.top-pill.coins .icon {
  color: var(--amber-2);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(145deg, #ffb06b, #e86e4f);
  border: 2px solid var(--surface);
  box-shadow: 0 6px 14px rgba(232, 110, 79, 0.22);
}

.mobile-brand {
  display: none;
}

/* ==========================================================================
   Shared primitives
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: scale(0.975);
}

.btn-primary {
  color: var(--navy);
  background: var(--mint);
  box-shadow: 0 10px 20px rgba(92, 224, 181, 0.25);
}

.btn-primary:hover {
  background: #76e9c5;
}

.btn-dark {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 10px 20px rgba(11, 27, 43, 0.18);
}

.btn-dark:hover {
  background: var(--navy-2);
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.btn-soft {
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.btn-amber {
  color: #3b2904;
  background: var(--amber);
  box-shadow: 0 10px 20px rgba(255, 184, 77, 0.24);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 9.5px;
}

.btn-sm .icon {
  width: 13px;
  height: 13px;
}

.btn[disabled] {
  opacity: 0.42;
  pointer-events: none;
  box-shadow: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: 0.18s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

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

.section-head h2 {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--mint-2);
}

.section-link .icon {
  width: 13px;
  height: 13px;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.progress-track {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-track > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-2), var(--mint));
  transition: width 0.45s ease;
}

.empty-state {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state .icon {
  width: 36px;
  height: 36px;
  color: var(--mint-2);
  opacity: 0.55;
}

.empty-state h4 {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.empty-state p {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.6;
}

/* ==========================================================================
   Home — hero
   ========================================================================== */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 14px;
}

.hero-card {
  position: relative;
  min-height: 318px;
  padding: 30px 32px;
  border-radius: 30px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 90% 12%, rgba(92, 224, 181, 0.2), transparent 28%),
    radial-gradient(circle at 55% 120%, rgba(91, 140, 255, 0.14), transparent 36%),
    linear-gradient(135deg, #102b3d, #071521 72%);
  box-shadow: 0 22px 48px rgba(11, 27, 43, 0.24);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(100deg, #000, transparent 80%);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  right: -90px;
  bottom: -110px;
  border: 1px solid rgba(92, 224, 181, 0.18);
  box-shadow: 0 0 0 30px rgba(92, 224, 181, 0.035), 0 0 0 62px rgba(92, 224, 181, 0.025);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 62%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.46);
}

.hero-eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(92, 224, 181, 0.12);
}

.hero-card h1 {
  margin-top: 13px;
  font-size: 39px;
  line-height: 1.08;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.hero-card h1 em {
  font-style: normal;
  color: var(--mint);
}

.hero-card h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.38);
}

.hero-sub {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.54);
  max-width: 290px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.38);
}

.hero-meta strong {
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--font-mono);
}

.hero-mini-track {
  width: 58px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.hero-mini-track span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--mint);
  border-radius: inherit;
  transition: width 0.5s ease;
}

.hero-art {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 282px;
  height: 282px;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.orbit {
  position: absolute;
  inset: 0;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.orbit-ring.ring-a {
  inset: 22px;
}

.orbit-ring.ring-b {
  inset: 57px;
  border-style: dashed;
  border-color: rgba(92, 224, 181, 0.2);
}

.orbit-ring.ring-c {
  inset: 97px;
  border-color: rgba(255, 255, 255, 0.13);
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  transform: translate(-50%, -50%) rotate(-6deg);
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--mint), #b8f5dd);
  color: var(--navy);
  box-shadow: 0 16px 34px rgba(92, 224, 181, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.orbit-core strong {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.06em;
}

.orbit-core span {
  display: block;
  margin-top: 1px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.62;
}

.orbit-word {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  animation: floatWord 6s ease-in-out infinite;
}

.orbit-word.w1 { left: 3px; top: 62px; animation-delay: 0s; }
.orbit-word.w2 { right: -3px; top: 92px; animation-delay: 0.8s; color: var(--mint); border-color: rgba(92, 224, 181, 0.24); }
.orbit-word.w3 { left: 24px; bottom: 54px; animation-delay: 1.4s; }
.orbit-word.w4 { right: 14px; bottom: 40px; animation-delay: 2s; color: var(--amber); border-color: rgba(255, 184, 77, 0.22); }
.orbit-word.w5 { left: 50%; top: 4px; transform: translateX(-50%); animation-delay: 2.6s; }
.orbit-word.w6 { left: 50%; bottom: 2px; transform: translateX(-50%); animation-delay: 3.2s; opacity: 0.72; }

@keyframes floatWord {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.side-stat-card {
  position: relative;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side-stat-card.dark {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 184, 77, 0.2), transparent 42%),
    linear-gradient(145deg, #172f3b, #0b1b2b);
  border-color: transparent;
  color: #fff;
}

.side-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-stat-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mint-2);
}

.side-stat-card.dark .side-stat-icon {
  background: rgba(255, 184, 77, 0.13);
  color: var(--amber);
}

.side-stat-icon .icon {
  width: 16px;
  height: 16px;
}

.side-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.side-stat-card.dark .side-stat-label {
  color: rgba(255, 255, 255, 0.4);
}

.side-stat-value {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 800;
  color: var(--ink);
}

.side-stat-card.dark .side-stat-value {
  color: #fff;
}

.side-stat-value small {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 600;
}

.side-stat-card.dark .side-stat-value small {
  color: rgba(255, 255, 255, 0.38);
}

.side-stat-foot {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 8.5px;
  color: var(--muted);
}

.side-stat-card.dark .side-stat-foot {
  color: rgba(255, 255, 255, 0.42);
}

.streak-dots {
  display: flex;
  gap: 3px;
}

.streak-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.streak-dots span.on {
  background: var(--mint);
}

/* ==========================================================================
   Home — stats / daily / AI / progress
   ========================================================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  padding: 14px 15px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 11px;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mint-2);
  flex: none;
}

.stat-icon .icon {
  width: 17px;
  height: 17px;
}

.stat-card:nth-child(2) .stat-icon { background: var(--amber-soft); color: var(--amber-2); }
.stat-card:nth-child(3) .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat-card:nth-child(4) .stat-icon { background: var(--coral-soft); color: var(--coral); }

.stat-copy {
  min-width: 0;
}

.stat-copy strong {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.stat-copy strong small {
  font-family: var(--font-ui);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 600;
}

.stat-copy span {
  display: block;
  margin-top: 4px;
  font-size: 8.5px;
  color: var(--muted);
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 14px;
  margin-top: 20px;
}

.daily-card {
  padding: 20px;
}

.daily-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.daily-card-head h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.daily-card-head p {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.daily-count {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--mint-2);
  background: var(--mint-soft);
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: var(--surface-2);
  transition: 0.18s ease;
}

.task-item:hover {
  border-color: var(--line-strong);
  background: #fbf7ef;
}

.task-item.done {
  background: var(--mint-mist);
  border-color: #c9ebdd;
}

.task-check {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted-2);
  border: 1px solid var(--line);
  flex: none;
}

.task-check .icon {
  width: 15px;
  height: 15px;
}

.task-item.done .task-check {
  background: var(--mint-2);
  border-color: var(--mint-2);
  color: #fff;
}

.task-copy {
  min-width: 0;
  flex: 1;
}

.task-copy h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.task-copy p {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

.task-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: var(--amber-2);
  white-space: nowrap;
}

.task-reward .icon {
  width: 11px;
  height: 11px;
}

.task-go {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}

.task-go .icon {
  width: 13px;
  height: 13px;
}

.ai-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--r-lg);
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 224, 181, 0.22), transparent 36%),
    linear-gradient(140deg, #143a48, #0b1b2b);
  box-shadow: 0 18px 38px rgba(11, 27, 43, 0.18);
  display: flex;
  flex-direction: column;
}

.ai-card::after {
  content: "AI";
  position: absolute;
  right: -8px;
  bottom: -26px;
  font-family: var(--font-mono);
  font-size: 100px;
  font-weight: 800;
  letter-spacing: -0.1em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.ai-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.ai-avatar {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  flex: none;
}

.ai-card-head h3 {
  font-size: 13px;
  font-weight: 800;
}

.ai-card-head p {
  margin-top: 2px;
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.42);
}

.ai-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.46);
}

.ai-live .status-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.ai-bubble {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  padding: 13px;
  border-radius: 3px 13px 13px 13px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.ai-bubble strong {
  color: var(--mint);
}

.ai-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.ai-prompt {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.64);
  font-size: 8px;
  font-weight: 600;
  transition: 0.18s ease;
}

.ai-prompt:hover {
  background: rgba(92, 224, 181, 0.13);
  color: var(--mint);
}

.ai-card .btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 12px;
}

.ai-card .btn-soft {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Word progress */

.word-progress-card {
  margin-top: 14px;
  padding: 19px 20px;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 26px;
  align-items: center;
}

.word-progress-main h2 {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.word-progress-main h2 small {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 600;
}

.word-progress-main p {
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--muted);
}

.word-progress-main .progress-track {
  margin-top: 12px;
}

.level-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}

.level-row {
  min-width: 0;
}

.level-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 8.5px;
  color: var(--muted);
}

.level-row-head strong {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.level-row .progress-track {
  height: 4px;
  margin-top: 5px;
}

.level-row:nth-child(1) .progress-track > span { background: var(--mint-2); }
.level-row:nth-child(2) .progress-track > span { background: var(--amber); }
.level-row:nth-child(3) .progress-track > span { background: var(--blue); }
.level-row:nth-child(4) .progress-track > span { background: var(--violet); }

/* Bottom home grid */

.home-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.mini-card {
  padding: 18px;
}

.badge-row {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.badge-mini {
  flex: 1;
  min-width: 0;
  padding: 11px 9px;
  border-radius: 13px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.badge-mini.unlocked {
  background: var(--amber-soft);
  border-color: #f1dcb1;
}

.badge-mini .badge-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted-2);
}

.badge-mini.unlocked .badge-icon {
  color: var(--amber-2);
}

.badge-mini .badge-icon .icon {
  width: 15px;
  height: 15px;
}

.badge-mini strong {
  display: block;
  margin-top: 6px;
  font-size: 8.5px;
  color: var(--ink-2);
}

.badge-mini span {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: var(--muted);
}

.today-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.today-word {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--mint-mist);
  color: var(--mint-2);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

/* ==========================================================================
   Learn
   ========================================================================== */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 18px;
}

.page-head-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.page-head h1 {
  margin-top: 3px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.page-head p {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.learn-shell {
  max-width: 760px;
  margin: 0 auto;
}

.learn-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0 12px;
}

.learn-top-copy {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}

.learn-top-copy strong {
  color: var(--ink-2);
}

.learn-progress {
  display: flex;
  gap: 4px;
}

.learn-progress span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.learn-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--mint-2);
  transition: transform 0.35s ease;
}

.learn-progress span.done::after,
.learn-progress span.current::after {
  transform: scaleX(1);
}

.learn-progress span.current::after {
  background: var(--coral);
}

.learn-card {
  padding: 28px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.learn-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.learn-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--mint-2);
  background: var(--mint-soft);
}

.learn-tag.review {
  color: var(--amber-2);
  background: var(--amber-soft);
}

.learn-index {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
}

.learn-word {
  margin-top: 18px;
  font-family: var(--font-en, "Avenir Next", "Trebuchet MS", sans-serif);
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--ink);
  word-break: break-word;
}

.learn-phonetic {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.learn-audio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 99px;
  background: var(--mint-soft);
  color: var(--mint-2);
  font-size: 9.5px;
  font-weight: 700;
}

.audio-btn .icon {
  width: 14px;
  height: 14px;
}

.audio-note {
  font-size: 8.5px;
  color: var(--muted-2);
}

.learn-prompt {
  margin-top: 24px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}

.learn-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.learn-option {
  width: 100%;
  min-height: 54px;
  padding: 10px 13px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
  transition: 0.16s ease;
}

.learn-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.learn-option-letter {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  flex: none;
}

.learn-option.selected {
  border-color: var(--mint-2);
  background: var(--mint-mist);
}

.learn-option.selected .learn-option-letter {
  background: var(--mint-2);
  color: #fff;
}

.learn-option.correct {
  border-color: var(--mint-2);
  background: var(--mint-mist);
}

.learn-option.correct .learn-option-letter {
  background: var(--mint-2);
  color: #fff;
}

.learn-option.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.learn-option.wrong .learn-option-letter {
  background: var(--coral);
  color: #fff;
}

.learn-option.dimmed {
  opacity: 0.52;
}

.learn-option-state {
  margin-left: auto;
  display: none;
}

.learn-option.correct .learn-option-state,
.learn-option.wrong .learn-option-state {
  display: block;
}

.learn-option-state .icon {
  width: 16px;
  height: 16px;
}

.learn-feedback {
  margin-top: 13px;
  padding: 12px;
  border-radius: 14px;
  display: flex;
  gap: 9px;
  animation: fadeUp 0.22s ease both;
}

.learn-feedback.good {
  background: var(--mint-mist);
  border: 1px solid #c9ebdd;
}

.learn-feedback.bad {
  background: var(--coral-soft);
  border: 1px solid #f7d4cc;
}

.learn-feedback-icon {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--mint-2);
  color: #fff;
  flex: none;
}

.learn-feedback.bad .learn-feedback-icon {
  background: var(--coral);
}

.learn-feedback-icon .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}

.learn-feedback h4 {
  font-size: 10.5px;
  font-weight: 800;
}

.learn-feedback p {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.65;
  color: #62736d;
}

.learn-feedback.bad p {
  color: #9a624f;
}

.learn-feedback em {
  font-style: normal;
  font-weight: 800;
  color: var(--mint-2);
}

.learn-feedback.bad em {
  color: var(--coral);
}

.learn-example {
  margin-top: 13px;
  padding: 12px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.learn-example .eyebrow {
  color: var(--muted-2);
}

.learn-example p {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.learn-example small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

.learn-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}

.learn-footer .btn {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
}

.learn-footer-note {
  margin-top: 8px;
  text-align: center;
  font-size: 8px;
  color: var(--muted-2);
}

.learn-side {
  margin-top: 14px;
  padding: 15px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.grammar-mini {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.grammar-mini-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--amber-soft);
  color: var(--amber-2);
  flex: none;
}

.grammar-mini-icon .icon {
  width: 15px;
  height: 15px;
}

.grammar-mini h4 {
  font-size: 10.5px;
  font-weight: 800;
}

.grammar-mini p {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.55;
  color: var(--muted);
}

.grammar-mini em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 10.5px;
  color: var(--ink-2);
}

.learn-result {
  padding: 30px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 184, 77, 0.16), transparent 36%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.result-medal {
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffd47e, var(--amber));
  color: #fff;
  box-shadow: 0 16px 30px rgba(231, 155, 34, 0.24), inset 0 0 0 7px rgba(255, 255, 255, 0.26);
}

.result-medal .icon {
  width: 38px;
  height: 38px;
}

.learn-result h2 {
  margin-top: 15px;
  font-size: 25px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.learn-result > p {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 19px;
}

.result-stat {
  padding: 13px 7px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.result-stat strong {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.result-stat span {
  display: block;
  margin-top: 5px;
  font-size: 8px;
  color: var(--muted);
}

.result-reward {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px solid #f2ddb5;
  font-size: 10px;
  color: #8a661e;
}

.result-actions {
  display: flex;
  gap: 8px;
  margin-top: 17px;
}

.result-actions .btn {
  flex: 1;
}

/* ==========================================================================
   Tutor
   ========================================================================== */

.tutor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.chat-card {
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  height: calc(100vh - 160px);
  max-height: 820px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  flex: none;
}

.chat-head-info {
  flex: 1;
}

.chat-head h2 {
  font-size: 13px;
  font-weight: 800;
}

.chat-head p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted);
}

.chat-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  color: var(--mint-2);
  background: var(--mint-soft);
}

.chat-mode.local {
  color: var(--amber-2);
  background: var(--amber-soft);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 17px 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 224, 181, 0.045), transparent 30%),
    var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.chat-message {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  animation: fadeUp 0.25s ease both;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  flex: none;
}

.chat-message.user .chat-avatar {
  background: linear-gradient(145deg, #ffb06b, #e86e4f);
  color: #fff;
}

.chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 3px 13px 13px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message.user .chat-bubble {
  border-radius: 13px 3px 13px 13px;
  background: var(--navy);
  border-color: var(--navy);
  color: rgba(255, 255, 255, 0.9);
}

.chat-bubble .chat-strong {
  color: var(--mint-2);
  font-weight: 800;
}

.chat-message.user .chat-bubble .chat-strong {
  color: var(--mint);
}

.chat-time {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--muted-2);
}

.typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 16px;
}

.typing span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1s ease-in-out infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.quick-prompts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 9px 17px 0;
  border-top: 1px solid var(--line);
  flex: none;
}

.quick-prompt {
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  transition: 0.18s ease;
}

.quick-prompt:hover {
  border-color: var(--mint-2);
  color: var(--mint-2);
  background: var(--mint-mist);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 17px 14px;
  background: var(--surface);
  flex: none;
}

.chat-input {
  flex: 1;
  min-height: 42px;
  max-height: 110px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  resize: none;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.chat-input:focus {
  outline: none;
  border-color: var(--mint-2);
  background: #fff;
}

.chat-send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--navy);
  flex: none;
}

.chat-send .icon {
  width: 17px;
  height: 17px;
}

.chat-send:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.chat-safety {
  padding: 0 17px 10px;
  font-size: 7.5px;
  color: var(--muted-2);
  background: var(--surface);
  flex: none;
}

.tutor-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-panel {
  padding: 15px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.side-panel h3 {
  font-size: 11px;
  font-weight: 800;
}

.side-panel p {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
}

.side-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.side-word {
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--mint-mist);
  color: var(--mint-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
}

.side-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.side-tip .icon {
  width: 15px;
  height: 15px;
  color: var(--amber-2);
  margin-top: 1px;
}

.side-tip p {
  margin: 0;
}

/* ==========================================================================
   Words
   ========================================================================== */

.words-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 9px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
}

.search-box:focus-within {
  border-color: var(--mint-2);
  background: #fff;
}

.search-box .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 10.5px;
  color: var(--ink-2);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.filter-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.filter-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
}

.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.words-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0 10px;
  font-size: 9.5px;
  color: var(--muted);
}

.words-summary strong {
  color: var(--ink-2);
  font-family: var(--font-mono);
}

.word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.word-row {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: 0.16s ease;
}

.word-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.word-row-main {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.word-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.word-row-word {
  font-family: var(--font-en, "Avenir Next", "Trebuchet MS", sans-serif);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.word-row-phonetic {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-2);
}

.word-row-meaning {
  margin-top: 3px;
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.word-level {
  flex: none;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 4px;
}

.word-row.mastered .word-row-word {
  color: var(--mint-2);
}

.word-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.word-row.mastered .word-status { background: var(--mint-2); }
.word-row.learning .word-status { background: var(--amber); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination button {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
}

.pagination button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ==========================================================================
   Rewards
   ========================================================================== */

.reward-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 14px;
}

.balance-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 184, 77, 0.25), transparent 34%),
    linear-gradient(140deg, #173a43, #0b1b2b);
  box-shadow: 0 20px 42px rgba(11, 27, 43, 0.2);
}

.balance-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -50px;
  bottom: -80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.025);
}

.balance-card h2 {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.balance-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.balance-row strong {
  font-family: var(--font-mono);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.balance-row span {
  padding-bottom: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.balance-sub {
  display: flex;
  gap: 16px;
  margin-top: 17px;
  position: relative;
  z-index: 1;
}

.balance-sub div {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
}

.balance-sub strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
}

.reward-side {
  padding: 19px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.reward-side h3 {
  font-size: 11px;
  font-weight: 800;
}

.reward-side p {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
}

.reward-side .progress-track {
  margin-top: 12px;
}

.reward-side .progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 8px;
  color: var(--muted-2);
}

.reward-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reward-item {
  padding: 15px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 146px;
}

.reward-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.reward-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--violet-soft);
  color: var(--violet);
}

.reward-item:nth-child(2) .reward-icon { background: var(--blue-soft); color: var(--blue); }
.reward-item:nth-child(3) .reward-icon { background: var(--amber-soft); color: var(--amber-2); }
.reward-item:nth-child(4) .reward-icon { background: var(--coral-soft); color: var(--coral); }

.reward-icon .icon {
  width: 17px;
  height: 17px;
}

.reward-cost {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: var(--amber-2);
}

.reward-item h4 {
  margin-top: 11px;
  font-size: 11px;
  font-weight: 800;
}

.reward-item p {
  margin-top: 4px;
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--muted);
}

.reward-item .btn {
  margin-top: auto;
  width: 100%;
  min-height: 33px;
}

.reward-item.redeemed {
  opacity: 0.58;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.badge-card {
  padding: 13px 9px;
  border-radius: 15px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
}

.badge-card.locked {
  opacity: 0.5;
}

.badge-card .badge-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--amber-soft);
  color: var(--amber-2);
}

.badge-card.locked .badge-icon {
  background: var(--surface-2);
  color: var(--muted-2);
}

.badge-card .badge-icon .icon {
  width: 16px;
  height: 16px;
}

.badge-card strong {
  display: block;
  margin-top: 7px;
  font-size: 8.5px;
  color: var(--ink-2);
}

.badge-card span {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: var(--muted);
}

.task-reward-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reward-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.reward-task.done {
  background: var(--mint-mist);
  border-color: #c9ebdd;
}

.reward-task-check {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted-2);
  border: 1px solid var(--line);
  flex: none;
}

.reward-task.done .reward-task-check {
  background: var(--mint-2);
  border-color: var(--mint-2);
  color: #fff;
}

.reward-task-check .icon {
  width: 13px;
  height: 13px;
}

.reward-task-copy {
  flex: 1;
  min-width: 0;
}

.reward-task-copy h4 {
  font-size: 10.5px;
  font-weight: 700;
}

.reward-task-copy p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted);
}

.reward-task-prize {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--amber-2);
  white-space: nowrap;
}

/* ==========================================================================
   Report
   ========================================================================== */

.report-hero {
  padding: 23px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 0%, rgba(92, 224, 181, 0.18), transparent 34%),
    linear-gradient(140deg, #123446, #0b1b2b);
  color: #fff;
  box-shadow: 0 20px 42px rgba(11, 27, 43, 0.18);
}

.report-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-hero h2 {
  margin-top: 5px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.report-hero h2 span {
  color: var(--mint);
}

.report-hero-date {
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
}

.report-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 19px;
}

.report-kpi {
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.report-kpi:last-child {
  border-right: 0;
}

.report-kpi strong {
  font-family: var(--font-mono);
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.report-kpi span {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.45);
}

.report-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.report-card {
  padding: 18px;
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-card-head h3 {
  font-size: 12px;
  font-weight: 800;
}

.report-card-head span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted-2);
}

.week-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 150px;
  margin-top: 16px;
  padding: 0 4px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.chart-bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 18px;
  max-width: 100%;
  height: var(--h);
  min-height: 3px;
  border-radius: 99px;
  background: #dcefe6;
  position: relative;
  transition: height 0.5s ease;
}

.chart-col.today .chart-bar {
  background: linear-gradient(180deg, #2f8e73, var(--mint-2));
  box-shadow: 0 4px 10px rgba(36, 185, 138, 0.2);
}

.chart-value {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--muted);
}

.chart-day {
  font-size: 8px;
  color: var(--muted-2);
}

.chart-col.today .chart-day {
  color: var(--ink-2);
  font-weight: 800;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 13px;
}

.skill-row {
  display: grid;
  grid-template-columns: 42px 1fr 28px;
  align-items: center;
  gap: 8px;
}

.skill-name {
  font-size: 9px;
  color: var(--ink-2);
  font-weight: 600;
}

.skill-track {
  height: 5px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.skill-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint-2);
}

.skill-row:nth-child(2) .skill-track span { background: var(--amber); }
.skill-row:nth-child(3) .skill-track span { background: var(--blue); }
.skill-row:nth-child(4) .skill-track span { background: var(--coral); }

.skill-value {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-2);
}

.weak-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
}

.weak-word {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.weak-word-main {
  flex: 1;
  min-width: 0;
}

.weak-word-main strong {
  font-family: var(--font-mono);
  font-size: 11px;
}

.weak-word-main p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weak-word-count {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--coral);
}

.ai-analysis-card {
  margin-top: 14px;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 224, 181, 0.1), transparent 32%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.ai-analysis-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-analysis-head .ai-avatar {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 11px;
}

.ai-analysis-head h3 {
  font-size: 12px;
  font-weight: 800;
}

.ai-analysis-head p {
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--muted);
}

.ai-analysis-head .btn {
  margin-left: auto;
}

.ai-analysis-body {
  margin-top: 14px;
}

.analysis-summary {
  padding: 13px;
  border-radius: 13px;
  background: var(--mint-mist);
  border: 1px solid #c9ebdd;
  font-size: 10px;
  line-height: 1.75;
  color: #45665b;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.analysis-block {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.analysis-block h4 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
}

.analysis-block h4 .icon {
  width: 13px;
  height: 13px;
  color: var(--mint-2);
}

.analysis-block:nth-child(2) h4 .icon { color: var(--coral); }
.analysis-block:nth-child(3) h4 .icon { color: var(--amber-2); }

.analysis-block ul {
  margin: 7px 0 0;
  padding-left: 13px;
}

.analysis-block li {
  margin: 4px 0;
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--muted);
}

.story-text {
  padding: 15px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

.story-translation {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.75;
  color: var(--muted);
}

.story-questions {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  background: var(--mint-mist);
  border: 1px solid #c9ebdd;
}

.story-questions p {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-2);
}


/* ==========================================================================
   Phonetics + voice
   ========================================================================== */

.inline-audio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 27px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  vertical-align: middle;
  transition: 0.16s ease;
}

.inline-audio .icon {
  width: 12px;
  height: 12px;
}

.inline-audio:hover {
  color: var(--mint-2);
  border-color: #bfe7d9;
  background: var(--mint-mist);
}

.inline-audio.practice {
  color: var(--mint-2);
  border-color: #bfe7d9;
  background: var(--mint-mist);
}

.learn-example-actions,
.grammar-audio,
.example-audio,
.story-audio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.phonetics-strip {
  margin-top: 14px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.phonetics-strip-symbol {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  flex: none;
}

.phonetics-strip-copy {
  flex: 1;
  min-width: 0;
}

.phonetics-strip-copy h3 {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 800;
}

.phonetics-strip-copy p {
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

.phonetics-strip-stats {
  text-align: right;
  flex: none;
}

.phonetics-strip-stats strong {
  font-family: var(--font-mono);
  font-size: 15px;
  display: block;
}

.phonetics-strip-stats span {
  font-size: 8px;
  color: var(--muted);
}

.phonetics-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 240px;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 2% 0%, rgba(92, 224, 181, 0.18), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(255, 184, 77, 0.12), transparent 32%),
    linear-gradient(135deg, #112d40, #081725);
  box-shadow: 0 18px 38px rgba(11, 27, 43, 0.18);
}

.phonetics-hero-symbol {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(92, 224, 181, 0.24);
  background: rgba(92, 224, 181, 0.09);
  color: var(--mint);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
}

.phonetics-hero-copy h2 {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.phonetics-hero-copy p {
  margin-top: 7px;
  max-width: 500px;
  font-size: 9.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.48);
}

.phonetics-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.phonetics-hero-stats div {
  text-align: center;
}

.phonetics-hero-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 19px;
  line-height: 1;
}

.phonetics-hero-stats span {
  display: block;
  margin-top: 5px;
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.42);
}

.phoneme-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.phoneme-card {
  position: relative;
  min-height: 116px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: 0.16s ease;
}

.phoneme-card:hover {
  border-color: var(--mint-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.phoneme-card.vowel {
  background: linear-gradient(150deg, #fffdf8, #f3fbf7);
}

.phoneme-card.consonant {
  background: linear-gradient(150deg, #fffdf8, #f5f7ff);
}

.phoneme-card.mastered {
  border-color: #bfe7d9;
  background: var(--mint-mist);
}

.phoneme-symbol {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.phoneme-category {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--muted-2);
}

.phoneme-example {
  margin-top: auto;
  font-family: var(--font-en, "Avenir Next", "Trebuchet MS", sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}

.phoneme-score {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--muted-2);
}

.phoneme-card.mastered .phoneme-score {
  color: var(--mint-2);
  font-weight: 700;
}

.phoneme-modal .phoneme-modal-symbol {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: -0.04em;
}

.phoneme-detail-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.phoneme-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 13px;
}

.phoneme-example-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.phoneme-example-row > div:first-child {
  flex: 1;
  min-width: 0;
}

.phoneme-example-row strong {
  font-family: var(--font-en, "Avenir Next", "Trebuchet MS", sans-serif);
  font-size: 12px;
}

.phoneme-example-row span {
  margin-left: 6px;
  font-size: 8.5px;
  color: var(--muted);
}

.phoneme-example-actions {
  display: flex;
  gap: 4px;
  flex: none;
}

.chat-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-message:not(.user) .chat-actions {
  border-top-color: var(--line);
}

.chat-speak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 7.5px;
  color: var(--muted-2);
}

.chat-speak .icon {
  width: 11px;
  height: 11px;
}

.chat-speak:hover {
  color: var(--mint-2);
}

.chat-auto-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  font-size: 7.5px;
  font-weight: 700;
  flex: none;
}

.chat-auto-read.on {
  color: var(--mint-2);
  border-color: #bfe7d9;
  background: var(--mint-mist);
}

.chat-auto-read .icon {
  width: 11px;
  height: 11px;
}

.chat-mic {
  width: 40px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mint-2);
  flex: none;
  border: 1px solid #c9ebdd;
}

.chat-mic .icon {
  width: 17px;
  height: 17px;
}

.chat-mic.listening {
  background: var(--coral-soft);
  border-color: #f6d2ca;
  color: var(--coral);
  animation: micPulse 1.2s ease-in-out infinite;
}

.voice-target {
  padding: 14px;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
}

.voice-target-actions {
  display: flex;
  justify-content: center;
  margin-top: 9px;
}

.voice-mic-area {
  margin-top: 20px;
  text-align: center;
}

.voice-mic-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: var(--mint);
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(92, 224, 181, 0.24);
}

.voice-mic-btn .icon {
  width: 29px;
  height: 29px;
}

.voice-mic-btn.listening {
  background: var(--coral);
  color: #fff;
  animation: micPulse 1.2s ease-in-out infinite;
}

.voice-mic-area p {
  margin-top: 11px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-2);
}

.voice-mic-area small {
  display: block;
  margin-top: 5px;
  font-size: 8px;
  line-height: 1.5;
  color: var(--muted-2);
}

.voice-wave {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 10px;
}

.voice-wave span {
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: var(--coral);
  animation: wave 0.7s ease-in-out infinite alternate;
}

.voice-wave span:nth-child(2n) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3n) { animation-delay: 0.2s; }
.voice-wave span:nth-child(4n) { animation-delay: 0.3s; }
.voice-wave span:nth-child(5n) { animation-delay: 0.15s; }

.voice-result {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 17px;
  padding: 14px;
  border-radius: 14px;
  background: var(--mint-mist);
  border: 1px solid #c9ebdd;
}

.voice-score-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  position: relative;
  flex: none;
}

.voice-score-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--mint-mist);
}

.voice-score-ring strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1;
}

.voice-score-ring span {
  position: relative;
  z-index: 1;
  font-size: 8px;
  color: var(--muted);
}

.voice-result-copy {
  min-width: 0;
}

.voice-result-copy h4 {
  font-size: 11px;
  font-weight: 800;
}

.voice-result-copy p {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}

.voice-words {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 11px;
}

.voice-word {
  padding: 4px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.voice-word.good {
  background: var(--mint-soft);
  color: var(--mint-2);
}

.voice-word.bad {
  background: var(--coral-soft);
  color: var(--coral);
}

.voice-reward {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--amber-soft);
  border: 1px solid #f2ddb5;
  font-size: 9px;
  font-weight: 700;
  color: #8a661e;
}

.voice-actions {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}

.voice-actions .btn {
  flex: 1;
}

.voice-error {
  margin-top: 15px;
  padding: 12px;
  border-radius: 11px;
  background: var(--coral-soft);
  border: 1px solid #f6d2ca;
  color: #9a624f;
  font-size: 9.5px;
  line-height: 1.5;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.voice-error .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

/* ==========================================================================
   Modal / login / toast
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 21, 33, 0.42);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease both;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 30px 80px rgba(7, 21, 33, 0.3);
  padding: 22px;
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  scrollbar-width: thin;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}

.modal-head h2 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.modal-head p {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--muted);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.modal-body {
  margin-top: 15px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  margin-top: 17px;
}

.modal-footer .btn {
  flex: 1;
}

.word-detail {
  text-align: center;
  padding: 8px 0 3px;
}

.word-detail h3 {
  font-family: var(--font-en, "Avenir Next", "Trebuchet MS", sans-serif);
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.word-detail .phonetic {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.word-detail .meaning {
  margin-top: 11px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.word-detail .example {
  margin-top: 13px;
  padding: 11px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.word-detail .example small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 9px;
  color: var(--muted);
}

.detail-meta {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.detail-pill {
  padding: 4px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.reward-content {
  padding: 15px;
  border-radius: 14px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(92, 224, 181, 0.18), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(91, 140, 255, 0.12), transparent 34%),
    var(--navy);
}

.login-card {
  width: 100%;
  max-width: 390px;
  padding: 28px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.login-card .brand-mark {
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.login-card p {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted);
}

.login-input {
  width: 100%;
  height: 44px;
  margin-top: 17px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
}

.login-input:focus {
  outline: none;
  border-color: var(--mint-2);
  background: #fff;
}

.login-error {
  margin-top: 8px;
  font-size: 9px;
  color: var(--coral);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: calc(100vw - 40px);
  padding: 10px 15px;
  border-radius: 99px;
  background: rgba(11, 27, 43, 0.94);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 0.25s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Mobile bottom nav
   ========================================================================== */

.mobile-nav {
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .main {
    padding: 0 22px 48px;
  }

  .hero-card h1 {
    font-size: 34px;
  }

  .hero-art {
    width: 250px;
    height: 250px;
    right: 4px;
  }

  .orbit-word.w1,
  .orbit-word.w6 {
    display: none;
  }

  .tutor-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 0 18px calc(94px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 62px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 10px;
  }

  .mobile-brand-name {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .mobile-brand-name span {
    color: var(--mint-2);
  }

  .topbar-title {
    display: none;
  }

  .top-stats .top-pill.flame {
    display: none;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .hero-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }

  .hero-side .side-stat-card {
    min-height: 122px;
  }

  .hero-card {
    min-height: 300px;
    padding: 25px;
  }

  .hero-copy {
    max-width: 73%;
  }

  .hero-art {
    width: 230px;
    height: 230px;
    right: -58px;
    opacity: 0.56;
  }

  .hero-card h1 {
    font-size: 33px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .home-columns,
  .home-bottom,
  .word-progress-card,
  .report-columns,
  .reward-hero {
    grid-template-columns: 1fr;
  }

  .word-progress-card {
    gap: 18px;
  }

  .tutor-layout {
    grid-template-columns: 1fr;
  }

  .tutor-side {
    display: none;
  }

  .tutor-page-head {
    display: none;
  }

  .chat-card {
    height: calc(100vh - 154px);
    min-height: 0;
    max-height: none;
  }

  .app-shell.focus-mode .main {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .word-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .badge-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
    height: 62px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    border-radius: 19px;
    background: rgba(11, 27, 43, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(11, 27, 43, 0.3);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 7.5px;
    font-weight: 600;
  }

  .mobile-nav button .icon {
    width: 17px;
    height: 17px;
  }

  .mobile-nav button.active {
    color: var(--mint);
    background: rgba(92, 224, 181, 0.1);
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  .main {
    padding-left: 13px;
    padding-right: 13px;
  }

  .top-stats {
    gap: 4px;
  }

  .top-pill {
    height: 29px;
    padding: 0 8px;
    font-size: 8.5px;
  }

  .top-pill .icon {
    width: 12px;
    height: 12px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 11px;
  }

  .mobile-brand-name {
    max-width: 138px;
    line-height: 1.2;
  }

  .hero-card {
    min-height: 310px;
    padding: 22px;
    border-radius: 24px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-card h1 {
    font-size: 34px;
    max-width: 280px;
  }

  .hero-sub {
    max-width: 250px;
  }

  .hero-art {
    display: none;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    min-height: 38px;
    padding: 0 13px;
    font-size: 10.5px;
  }

  .hero-side {
    gap: 8px;
  }

  .side-stat-card {
    padding: 13px;
    border-radius: 18px;
  }

  .side-stat-value {
    font-size: 24px;
  }

  .stats-row {
    gap: 7px;
  }

  .stat-card {
    padding: 11px;
    gap: 8px;
  }

  .stat-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .stat-copy strong {
    font-size: 17px;
  }

  .daily-card,
  .ai-card,
  .mini-card {
    padding: 15px;
    border-radius: 20px;
  }

  .task-item {
    gap: 8px;
    padding: 8px;
  }

  .task-reward {
    display: none;
  }

  .word-progress-card {
    padding: 15px;
    border-radius: 20px;
  }

  .word-progress-main h2 {
    font-size: 29px;
  }

  .level-bars {
    gap: 8px 12px;
  }

  .learn-card {
    padding: 19px;
    border-radius: 20px;
  }

  .learn-word {
    font-size: 43px;
  }

  .learn-option {
    min-height: 50px;
    font-size: 11px;
  }

  .page-head h1 {
    font-size: 21px;
  }

  .chat-card {
    border-radius: 20px;
    height: calc(100vh - 148px);
  }

  .chat-messages {
    padding: 14px 12px 8px;
  }

  .chat-bubble {
    max-width: 84%;
    font-size: 10px;
  }

  .quick-prompts {
    padding: 8px 12px 0;
  }

  .chat-input-row {
    padding: 9px 12px 12px;
  }

  .reward-grid {
    grid-template-columns: 1fr;
  }

  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-hero {
    padding: 18px;
    border-radius: 21px;
  }

  .report-hero h2 {
    font-size: 20px;
  }

  .report-hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .report-kpi:nth-child(2) {
    border-right: 0;
  }

  .report-kpi:nth-child(3),
  .report-kpi:nth-child(4) {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .analysis-grid {
    gap: 6px;
  }

  .modal {
    padding: 18px;
    border-radius: 20px;
  }

  .login-card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Misc animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.screen-enter {
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ==========================================================================
   Phonetics responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .phoneme-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .phonetics-hero {
    grid-template-columns: 86px minmax(0, 1fr) 200px;
    gap: 15px;
    padding: 20px;
  }

  .phonetics-hero-symbol {
    width: 86px;
    height: 86px;
    border-radius: 23px;
    font-size: 29px;
  }
}

@media (max-width: 900px) {
  .phoneme-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .phonetics-hero {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .phonetics-hero-symbol {
    width: 78px;
    height: 78px;
    font-size: 25px;
  }

  .phonetics-hero-stats {
    grid-column: 1 / -1;
  }

  .phonetics-strip {
    flex-wrap: wrap;
  }

  .phonetics-strip-copy {
    min-width: 140px;
  }

  .phonetics-strip .btn {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  .phoneme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .phoneme-card {
    min-height: 102px;
    padding: 9px;
    border-radius: 12px;
  }

  .phoneme-symbol {
    font-size: 20px;
  }

  .phoneme-example {
    font-size: 9.5px;
  }

  .phonetics-hero {
    padding: 16px;
    border-radius: 21px;
    gap: 10px;
  }

  .phonetics-hero-symbol {
    width: 64px;
    height: 64px;
    border-radius: 19px;
    font-size: 21px;
  }

  .phonetics-hero-copy h2 {
    font-size: 18px;
  }

  .phonetics-hero-copy p {
    font-size: 8.5px;
  }

  .phonetics-hero-stats {
    padding: 9px;
  }

  .phonetics-hero-stats strong {
    font-size: 16px;
  }

  .phonetics-strip {
    padding: 12px;
    gap: 9px;
  }

  .phonetics-strip-symbol {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 14px;
  }

  .phonetics-strip-copy h3 {
    font-size: 11.5px;
  }

  .phonetics-strip-stats {
    display: none;
  }

  .phonetics-strip .btn {
    width: 100%;
    margin-left: 0;
  }

  .phoneme-example-row {
    flex-wrap: wrap;
  }

  .phoneme-example-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .chat-auto-read {
    padding: 0 6px;
    font-size: 7px;
  }

  .chat-auto-read .icon {
    width: 10px;
    height: 10px;
  }

  .chat-input-row {
    gap: 5px;
    padding: 8px 10px 11px;
  }

  .chat-mic,
  .chat-send {
    width: 36px;
    height: 40px;
    border-radius: 10px;
  }

  .chat-input {
    padding: 10px;
  }

  .voice-target {
    font-size: 17px;
    padding: 12px;
  }

  .voice-score-ring {
    width: 58px;
    height: 58px;
  }

  .voice-score-ring strong {
    font-size: 19px;
  }
}
