/* ==========================================================================
   单词星球 · Word Planet
   面向孩子的轻量、明快、游戏化视觉系统
   ========================================================================== */

:root {
  --purple: #6d4bff;
  --purple-deep: #5433e0;
  --purple-light: #9a82ff;
  --purple-soft: #efeaff;
  --pink: #ff7eb6;
  --pink-soft: #ffe9f3;
  --orange: #ffb84d;
  --orange-deep: #e8941f;
  --orange-soft: #fff3dc;
  --green: #1fc99b;
  --green-deep: #0fa77d;
  --green-soft: #e2faf2;
  --blue: #4aa8ff;
  --blue-soft: #e6f4ff;
  --red: #f26b6b;
  --red-soft: #ffeded;
  --yellow: #ffd45c;
  --ink: #24203b;
  --ink-soft: #6d6885;
  --ink-faint: #9a94ad;
  --paper: #fffcf7;
  --card: rgba(255, 255, 255, 0.92);
  --line: #ece8f6;
  --line-strong: #dcd5ec;
  --shadow: 0 18px 50px rgba(73, 53, 143, 0.09);
  --shadow-soft: 0 8px 24px rgba(73, 53, 143, 0.07);
  --shadow-lift: 0 24px 64px rgba(73, 53, 143, 0.15);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font: "Nunito", "Avenir Next Rounded", "Arial Rounded MT Bold", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Nunito", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 680px at 8% -8%, #f0e8ff 0%, transparent 56%),
    radial-gradient(850px 560px at 100% 2%, #fff0d4 0%, transparent 60%),
    radial-gradient(1000px 700px at 50% 112%, #e4faf3 0%, transparent 60%),
    #fffbf5;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
strong {
  font-weight: 850;
  letter-spacing: -0.015em;
}

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

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

:focus-visible {
  outline: 3px solid rgba(109, 75, 255, 0.48);
  outline-offset: 3px;
}

/* ---------- 环境装饰 ---------- */

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.ambient-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.55;
}

.blob-one {
  width: 260px;
  height: 260px;
  left: -110px;
  top: 24%;
  background: radial-gradient(circle at 30% 30%, #dcd0ff, rgba(220, 208, 255, 0));
}

.blob-two {
  width: 340px;
  height: 340px;
  right: -160px;
  top: 48%;
  background: radial-gradient(circle at 50% 50%, #ffe2ef, rgba(255, 226, 239, 0));
}

.blob-three {
  width: 300px;
  height: 300px;
  left: 36%;
  bottom: -180px;
  background: radial-gradient(circle at 50% 50%, #d8f7eb, rgba(216, 247, 235, 0));
}

.sky-star {
  position: absolute;
  color: rgba(109, 75, 255, 0.22);
  font-size: 20px;
  animation: twinkle 5s ease-in-out infinite;
}

.star-one {
  left: 5%;
  top: 14%;
}

.star-two {
  right: 8%;
  top: 28%;
  color: rgba(255, 184, 77, 0.5);
  animation-delay: 0.9s;
}

.star-three {
  left: 17%;
  bottom: 18%;
  color: rgba(31, 201, 155, 0.3);
  animation-delay: 1.7s;
}

.star-four {
  right: 16%;
  bottom: 10%;
  animation-delay: 2.3s;
}

.star-five {
  left: 47%;
  top: 7%;
  font-size: 13px;
  color: rgba(255, 126, 182, 0.35);
  animation-delay: 1.2s;
}

/* ---------- 顶部导航 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(16px, 3vw, 34px);
  background: rgba(255, 251, 245, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 23px;
  border-radius: 15px;
  background: linear-gradient(145deg, #efe7ff, #fff3d3);
  border: 1px solid #fff;
  box-shadow: 0 7px 16px rgba(109, 75, 255, 0.12);
  transform: rotate(-4deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.desktop-nav a span {
  font-size: 15px;
}

.desktop-nav a:hover {
  color: var(--purple);
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.desktop-nav a.is-active {
  color: var(--purple-deep);
  background: #fff;
  box-shadow: 0 4px 12px rgba(84, 51, 224, 0.1);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
}

.top-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.top-stat b {
  color: var(--ink);
  font-size: 13px;
}

.level-stat {
  color: var(--purple-deep);
  background: var(--purple-soft);
  border-color: transparent;
  font-weight: 900;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.icon-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.icon-btn:active {
  transform: translateY(0);
}

.bottom-nav {
  display: none;
}

/* ---------- 页面骨架 ---------- */

.view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 32px) 80px;
  animation: pageIn 0.4s ease both;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 8px 4px 0;
}

.page-intro h1 {
  margin-top: 7px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.page-intro p {
  max-width: 660px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.5vw, 16px);
}

.page-intro-extra {
  flex-shrink: 0;
  padding-bottom: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--purple-deep);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 201, 155, 0.13);
}

.panel {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head h2 {
  margin-top: 3px;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.panel-desc {
  max-width: 650px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

.panel-badge,
.adaptive-pill,
.grammar-progress-pill,
.atlas-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 7px 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  background: #f7f4ff;
}

.panel-badge.is-complete {
  color: var(--green-deep);
  background: var(--green-soft);
}

.adaptive-pill {
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.grammar-progress-pill {
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
}

.grammar-progress-pill span {
  font-size: 16px;
}

.grammar-progress-pill strong {
  color: var(--purple);
  font-size: 18px;
}

.atlas-count {
  flex-direction: column;
  gap: 0;
  min-width: 88px;
  padding: 10px 16px;
  color: var(--ink-faint);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.atlas-count strong {
  color: var(--purple);
  font-family: var(--font-en);
  font-size: 24px;
  line-height: 1;
}

.atlas-count span {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  border-radius: 999px;
  white-space: nowrap;
}

.stage-chip {
  color: var(--chip-color, var(--purple));
  background: var(--chip-soft, var(--purple-soft));
}

.neutral-chip {
  color: var(--ink-soft);
  background: #f5f2fb;
}

.challenge-chip {
  color: #a05d00;
  background: #fff0c9;
}

.done-chip {
  color: var(--green-deep);
  background: var(--green-soft);
}

.status-chip {
  font-weight: 800;
}

.status-new {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-learning {
  color: var(--orange-deep);
  background: var(--orange-soft);
}

.status-familiar {
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.status-mastered {
  color: var(--green-deep);
  background: var(--green-soft);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 19px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  border-radius: 15px;
  background: #f4f0ff;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.btn-large {
  min-height: 54px;
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 17px;
}

.btn-small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 12px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #8769ff, var(--purple) 58%, #5d3aef);
  box-shadow: 0 5px 0 var(--purple-deep), 0 12px 24px rgba(109, 75, 255, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 7px 0 var(--purple-deep), 0 16px 28px rgba(109, 75, 255, 0.28);
}

.btn-primary:active {
  box-shadow: 0 2px 0 var(--purple-deep);
  transform: translateY(3px);
}

.btn-ghost {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.76);
  border: 1.5px solid var(--line-strong);
}

.btn-ghost:hover {
  color: var(--purple-deep);
  border-color: #cbbdf8;
  background: #fff;
}

.btn-soft {
  color: var(--purple-deep);
  background: #efe9ff;
}

.btn-sun {
  color: #70460c;
  background: linear-gradient(135deg, #ffe58d, #ffc95c);
  box-shadow: 0 4px 0 #e4a52e;
}

.btn-sun:hover {
  box-shadow: 0 6px 0 #e4a52e;
}

.btn-mint {
  color: var(--green-deep);
  background: var(--green-soft);
}

.btn-known {
  color: #fff;
  background: linear-gradient(135deg, #3ddbb0, var(--green));
  box-shadow: 0 5px 0 var(--green-deep);
}

.btn-known:active {
  box-shadow: 0 2px 0 var(--green-deep);
  transform: translateY(3px);
}

.btn-again {
  color: #83510a;
  background: linear-gradient(135deg, #ffe7a6, #ffd073);
  box-shadow: 0 5px 0 #e4a52e;
}

.btn-again:active {
  box-shadow: 0 2px 0 #e4a52e;
  transform: translateY(3px);
}

.btn-text {
  color: var(--ink-soft);
  background: transparent;
}

.btn-text:hover {
  color: var(--purple-deep);
  background: rgba(255, 255, 255, 0.7);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff8c8c, #ef5e5e);
  box-shadow: 0 4px 0 #c63d3d;
}

.btn-danger-ghost {
  color: #c94b4b;
  background: #fff2f2;
  border: 1px solid #ffdada;
}

/* ---------- 进度 ---------- */

.progress-block {
  width: 100%;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #f0ecf8;
}

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mastery-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mastery-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #e4dff0;
}

.mastery-dots i.is-on {
  background: var(--purple);
}

/* ---------- 首页 Hero ---------- */

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 36px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 212, 92, 0.38), transparent 26%),
    radial-gradient(circle at 16% 92%, rgba(31, 201, 155, 0.16), transparent 28%),
    linear-gradient(118deg, #fffefb 0%, #f6f0ff 58%, #efe6ff 100%);
  box-shadow: var(--shadow-lift);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(109, 75, 255, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(100deg, transparent 45%, #000 100%);
  opacity: 0.4;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4.5vw, 52px);
}

.hero-copy h1 {
  margin-top: 12px;
  max-width: 620px;
  font-size: clamp(33px, 4.9vw, 55px);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.name-highlight {
  position: relative;
  color: var(--purple-deep);
}

.name-highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 212, 92, 0.55);
  z-index: -1;
  transform: rotate(-1.5deg);
}

.hero-sub {
  max-width: 580px;
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 750;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 24px;
}

.orbit {
  position: absolute;
  border: 1.5px dashed rgba(109, 75, 255, 0.18);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.orbit-one {
  width: 300px;
  height: 300px;
}

.orbit-two {
  width: 220px;
  height: 220px;
  animation-direction: reverse;
  animation-duration: 22s;
  border-color: rgba(255, 184, 77, 0.24);
}

.orbit::after {
  content: "✦";
  position: absolute;
  top: 6%;
  left: 23%;
  color: var(--orange);
  font-size: 15px;
}

.hero-mascot {
  position: relative;
  z-index: 2;
  width: min(270px, 85%);
  animation: float 4.8s ease-in-out infinite;
}

.hero-mascot .momo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 24px rgba(83, 52, 196, 0.18));
}

.goal-bubble {
  position: absolute;
  right: 4px;
  bottom: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #fff;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(70, 47, 139, 0.14);
  backdrop-filter: blur(8px);
}

.goal-ring {
  --goal: 0%;
  width: 52px;
  height: 52px;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--goal), #ece7fb 0);
}

.goal-ring-inner {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
}

.goal-ring-inner strong {
  font-family: var(--font-en);
  font-size: 16px;
}

.goal-ring-inner small {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.goal-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.goal-copy strong {
  font-size: 12px;
}

.goal-copy small {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
}

.floating-note {
  position: absolute;
  z-index: 3;
  padding: 6px 10px;
  color: var(--purple-deep);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  animation: float 5.4s ease-in-out infinite;
}

.note-one {
  top: 16%;
  left: 4%;
}

.note-two {
  top: 24%;
  right: 11%;
  color: var(--orange-deep);
  animation-delay: 0.8s;
}

/* ---------- 首页数据与面板 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(73, 53, 143, 0.05);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  border-radius: 14px;
  font-size: 19px;
}

.icon-fire {
  background: #fff0e7;
}

.icon-star {
  background: var(--purple-soft);
}

.icon-target {
  background: var(--green-soft);
}

.icon-review {
  background: var(--blue-soft);
}

.stat-card > div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stat-card strong {
  font-family: var(--font-en);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.stat-sub {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
}

.stat-card small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.task-panel {
  min-height: 100%;
}

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

.task-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.task-row:hover {
  border-color: #d9cffb;
  background: #fff;
  transform: translateY(-1px);
}

.task-row.is-done {
  border-color: #c8f3e3;
  background: linear-gradient(100deg, #f6fffb, #fff);
}

.task-check {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 13px;
  background: #f5f1ff;
  font-size: 18px;
}

.task-row.is-done .task-check {
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 20px;
  font-weight: 900;
}

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

.task-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-title-line strong {
  font-size: 14px;
}

.task-title-line small {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.task-main p {
  margin: 2px 0 8px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.done-label {
  min-width: 52px;
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.task-row .btn {
  flex-shrink: 0;
}

.tiny-note {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
}

.quick-panel {
  display: flex;
  flex-direction: column;
}

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

.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 121px;
  padding: 15px;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  right: -24px;
  bottom: -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.quick-card:hover {
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow: var(--shadow-soft);
}

.quick-purple {
  background: linear-gradient(135deg, #f1ebff, #e5dcff);
}

.quick-green {
  background: linear-gradient(135deg, #e8fbf5, #d9f8ed);
}

.quick-orange {
  background: linear-gradient(135deg, #fff6e3, #ffedc7);
}

.quick-pink {
  background: linear-gradient(135deg, #fff0f7, #ffe2ef);
}

.quick-icon {
  font-size: 23px;
}

.quick-card strong {
  margin-top: 8px;
  font-size: 13px;
}

.quick-card small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.4;
}

.tip-card {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin-top: auto;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  border-radius: 17px;
  background: linear-gradient(110deg, #292248, #403378);
  box-shadow: 0 10px 22px rgba(41, 34, 72, 0.18);
}

.tip-card:hover {
  transform: translateY(-2px);
}

.tip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 18px;
}

.tip-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tip-card strong {
  color: #fff;
  font-size: 12px;
}

.tip-card small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.tip-arrow {
  color: #fff;
  font-size: 17px;
}

/* ---------- 学习航线 ---------- */

.route-panel {
  margin-top: 18px;
}

.stage-path {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  padding: 4px 2px;
}

.stage-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 15px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stage-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 1px);
  width: 22px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #d9d1ec 0 4px, transparent 4px 8px);
}

.stage-node:last-child::after {
  display: none;
}

.stage-node:hover {
  transform: translateY(-3px);
  border-color: var(--stage-color);
  box-shadow: var(--shadow-soft);
}

.stage-node.is-active {
  border-color: var(--stage-color);
  background: linear-gradient(150deg, #fff, var(--stage-soft));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--stage-color) 16%, transparent);
}

.stage-orb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 2px;
  border-radius: 14px;
  background: var(--stage-soft);
  font-size: 21px;
}

.stage-node-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stage-node-copy strong {
  font-size: 14px;
}

.stage-node-copy small {
  margin-top: 1px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.stage-meter {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #f0ecf8;
}

.stage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stage-color);
}

.stage-count {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 800;
}

.stage-here,
.stage-recommend {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 3px 8px;
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  border-radius: 99px;
  background: var(--stage-color);
  box-shadow: 0 3px 8px rgba(40, 30, 80, 0.14);
}

.stage-recommend {
  color: #6b4b09;
  background: var(--yellow);
}

.route-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  border-radius: 15px;
  background: #faf7ff;
}

.route-note p {
  line-height: 1.6;
}

.route-note strong {
  color: var(--ink);
}

.page-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  padding: 28px 4px 0;
  color: var(--ink-faint);
  font-size: 10px;
}

/* ---------- 学习页 ---------- */

.learn-smart {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 212, 92, 0.28), transparent 26%),
    linear-gradient(130deg, #fff, #f4eeff);
}

.learn-smart::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: -110px;
  border-radius: 50%;
  border: 28px solid rgba(109, 75, 255, 0.05);
}

.learn-smart-copy {
  position: relative;
  z-index: 2;
  padding: 6px 0;
}

.learn-smart-copy h2 {
  margin-top: 7px;
  font-size: clamp(25px, 3.1vw, 35px);
  letter-spacing: -0.045em;
}

.learn-smart-copy > p {
  max-width: 580px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.smart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
}

.smart-tags span {
  padding: 6px 10px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 750;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
}

.learn-smart-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
}

.mini-mascot {
  width: 180px;
  animation: float 5s ease-in-out infinite;
}

.momo-small {
  width: 100%;
}

.smart-bubble {
  position: relative;
  max-width: 240px;
  margin-top: -2px;
  padding: 11px 14px;
  text-align: center;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.smart-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
}

.smart-bubble strong {
  display: block;
  font-size: 12px;
}

.smart-bubble span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
}

.stage-switch-panel {
  margin-top: 18px;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.mode-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.mode-purple {
  background: linear-gradient(135deg, #f5f0ff, #ebe3ff);
}

.mode-blue {
  background: linear-gradient(135deg, #eef8ff, #dff1ff);
}

.mode-orange {
  background: linear-gradient(135deg, #fff8ea, #ffeccb);
}

.mode-green {
  background: linear-gradient(135deg, #edfdf7, #dcf9ee);
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  flex-shrink: 0;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 25px;
  box-shadow: 0 6px 14px rgba(73, 53, 143, 0.06);
}

.mode-copy h3 {
  font-size: 17px;
}

.mode-copy p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.mode-meta {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.mode-card .btn {
  flex-shrink: 0;
}

.rescue-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  background: linear-gradient(110deg, #fff, #fff6e8);
}

.rescue-panel.has-mistakes {
  border-color: #ffe1ad;
}

.rescue-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  background: #fff1d4;
  font-size: 27px;
}

.rescue-copy {
  flex: 1;
}

.rescue-copy h2 {
  margin-top: 3px;
  font-size: 20px;
}

.rescue-copy p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.adaptive-info {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px dashed #d9d0f3;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.48);
}

.adaptive-info-icon {
  font-size: 20px;
}

.adaptive-info strong {
  font-size: 12.5px;
}

.adaptive-info p {
  max-width: 900px;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

/* ---------- 学习会话 ---------- */

body.session-mode .topbar,
body.session-mode .bottom-nav {
  display: none;
}

body.session-mode .view {
  width: min(920px, 100%);
  padding-top: 18px;
  padding-bottom: 44px;
}

.session-shell {
  max-width: 820px;
  margin: 0 auto;
}

.session-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.session-exit {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.session-progress-wrap {
  flex: 1;
}

.session-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 800;
}

.session-progress-copy strong {
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 11px;
}

.combo-pill {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 38px;
  padding: 0 10px;
  color: var(--ink-faint);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 900;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
}

.combo-pill.is-hot {
  color: #a85a00;
  background: #fff1ce;
  border-color: #ffe0a1;
  animation: pop 0.35s ease;
}

.session-body {
  animation: slideUp 0.32s ease both;
}

.flash-layout {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.flash-stage-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.seen-chip {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.flashcard {
  position: relative;
  min-height: 490px;
  padding: clamp(22px, 4vw, 36px);
  overflow: hidden;
  border: 1.5px solid #fff;
  border-radius: 32px;
  background:
    radial-gradient(circle at 82% 14%, var(--stage-soft), transparent 30%),
    linear-gradient(150deg, #fff, #fbf9ff);
  box-shadow: var(--shadow-lift);
}

.flashcard::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -95px;
  top: 36%;
  border-radius: 50%;
  border: 30px solid var(--stage-soft);
  opacity: 0.55;
}

.flashcard-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flash-theme {
  color: var(--stage-color);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.flash-front {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  animation: fadeIn 0.25s ease both;
}

.flash-hint {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.flash-emoji {
  margin: 13px 0 4px;
  font-size: clamp(62px, 10vw, 88px);
  line-height: 1.15;
  filter: drop-shadow(0 12px 14px rgba(45, 32, 92, 0.11));
}

.flash-word {
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: clamp(42px, 8vw, 66px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.flash-ipa {
  margin-top: 7px;
  color: var(--ink-faint);
  font-family: var(--font-en);
  font-size: 15px;
}

.flip-btn {
  min-width: 190px;
  margin-top: 26px;
}

.keyboard-hint {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 10px;
}

.flash-back {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: 24px auto 0;
  text-align: center;
  animation: slideUp 0.3s ease both;
}

.flash-back-word {
  color: var(--stage-color);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.flash-back-word span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
}

.flash-meaning {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.flash-pos {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 750;
}

.example-card {
  margin-top: 22px;
  padding: 16px 17px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.mini-speak {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 13px;
  border-radius: 9px;
  background: var(--purple-soft);
  vertical-align: middle;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mini-speak:hover {
  transform: scale(1.07);
  background: #e0d6ff;
}

.example-en {
  margin-top: 7px;
  font-family: var(--font-en);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
}

.example-en mark,
.feedback-example mark,
.word-modal-example mark {
  padding: 1px 3px;
  color: var(--purple-deep);
  border-radius: 5px;
  background: #ede7ff;
}

.example-zh {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.word-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 14px;
  text-align: left;
  border-radius: 13px;
  background: var(--stage-soft);
}

.extra-label {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 800;
}

.word-extra strong {
  color: var(--stage-color);
  font-family: var(--font-en);
  font-size: 12px;
}

.word-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 13px;
  text-align: left;
  border-radius: 13px;
  background: #fff8e8;
}

.word-tip p {
  color: #78592a;
  font-size: 11px;
  line-height: 1.6;
}

.flash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.flash-actions .btn {
  min-height: 54px;
  font-size: 15px;
  border-radius: 17px;
}

.session-tip-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--ink-soft);
  font-size: 10.5px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed #ddd6ef;
}

/* ---------- 选择题 ---------- */

.quiz-layout,
.spell-layout {
  position: relative;
  padding: clamp(22px, 4vw, 34px);
  border: 1.5px solid #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 5%, var(--stage-soft), transparent 28%),
    linear-gradient(160deg, #fff, #fbfaff);
  box-shadow: var(--shadow-lift);
}

.quiz-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.quiz-prompt {
  margin-right: auto;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.quiz-stimulus {
  padding: 22px 12px 18px;
  text-align: center;
}

.quiz-emoji {
  font-size: clamp(50px, 8vw, 68px);
  line-height: 1.15;
  filter: drop-shadow(0 10px 12px rgba(45, 32, 92, 0.09));
}

.quiz-word {
  margin-top: 6px;
  font-family: var(--font-en);
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.15;
  word-break: break-word;
}

.quiz-ipa {
  color: var(--ink-faint);
  font-family: var(--font-en);
  font-size: 13px;
}

.quiz-meaning-cn {
  margin-top: 7px;
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.quiz-hint-pos {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 700;
}

.listen-button {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 8px auto 0;
  font-size: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, var(--stage-soft));
  border: 2px solid #fff;
  box-shadow: 0 10px 0 color-mix(in srgb, var(--stage-color) 22%, transparent), 0 16px 28px rgba(73, 53, 143, 0.15);
  transition: transform 0.15s ease;
}

.listen-button:hover {
  transform: scale(1.04);
}

.listen-button:active {
  transform: translateY(4px) scale(0.98);
}

.listen-caption {
  margin-top: 13px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.revealed-word {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 900;
}

.revealed-word span {
  color: var(--ink-faint);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 11px 15px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  background: #fff;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.option-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #c9bcf5;
  box-shadow: var(--shadow-soft);
}

.option-letter {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 900;
  border-radius: 9px;
  background: #f5f1fc;
}

.option-text {
  flex: 1;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.option-btn.is-correct {
  border-color: #7ce7c8;
  background: #effcf7;
}

.option-btn.is-correct .option-letter {
  color: #fff;
  background: var(--green);
}

.option-btn.is-wrong {
  border-color: #ffbcbc;
  background: #fff3f3;
}

.option-btn.is-wrong .option-letter {
  color: #fff;
  background: var(--red);
}

.option-btn.is-muted {
  opacity: 0.55;
}

.option-mark {
  color: var(--green-deep);
  font-size: 17px;
  font-weight: 900;
}

.option-btn.is-wrong .option-mark {
  color: var(--red);
}

.answer-feedback {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  animation: slideUp 0.28s ease both;
}

.feedback-correct {
  background: #eefcf7;
  border: 1px solid #c8f4e5;
}

.feedback-wrong {
  background: #fff7ed;
  border: 1px solid #ffe3bb;
}

.feedback-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feedback-icon {
  font-size: 23px;
}

.feedback-title strong {
  font-size: 14px;
}

.feedback-title p {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11px;
}

.feedback-example {
  margin: 11px 0 13px;
  padding-top: 10px;
  border-top: 1px dashed rgba(109, 75, 255, 0.16);
}

.feedback-example p {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.feedback-example span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.next-card-btn {
  width: 100%;
}

/* ---------- 拼写 ---------- */

.spell-stimulus {
  padding: 24px 10px 12px;
  text-align: center;
}

.spell-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.spell-form {
  display: flex;
  gap: 9px;
  max-width: 530px;
  margin: 5px auto 0;
}

.spell-input {
  flex: 1;
  min-width: 0;
  height: 55px;
  padding: 0 17px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spell-input:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 4px rgba(109, 75, 255, 0.1);
}

.spell-input.is-correct {
  border-color: var(--green);
  background: #f2fdf9;
}

.spell-input.is-wrong {
  border-color: var(--red);
  background: #fff6f6;
}

.spell-form .btn {
  min-width: 112px;
  min-height: 55px;
  border-radius: 16px;
}

.spell-hint b {
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.spell-hint em {
  font-style: normal;
}

/* 点击式拼写：答案槽位 */
.spell-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 540px;
  margin: 6px auto 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.spell-slot {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 42px;
  padding: 0 6px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 900;
  border-radius: 10px;
  background: #f7f4ff;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.spell-slot.is-filled {
  background: #efe7ff;
  box-shadow: inset 0 0 0 2px var(--purple);
}

.spell-slot.is-fixed {
  min-width: 16px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  box-shadow: none;
}

.spell-slot.is-ok {
  color: #0d7a5c;
  background: #e9fbf4;
  box-shadow: inset 0 0 0 1.5px rgba(31, 191, 143, 0.45);
}

.spell-slot.is-bad {
  color: #b3261e;
  background: #fff0ef;
  box-shadow: inset 0 0 0 1.5px rgba(229, 72, 77, 0.45);
}

/* 点击式拼写：字母池 */
.spell-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  max-width: 540px;
  margin: 15px auto 0;
}

.spell-tile {
  min-width: 48px;
  height: 48px;
  padding: 0 11px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 21px;
  font-weight: 900;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line-strong);
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.spell-tile:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--line-strong);
}

.spell-tile.is-used {
  opacity: 0.24;
  transform: translateY(2px);
  box-shadow: none;
}

.spell-tile:disabled {
  cursor: default;
}

/* 已作答：整个字母池退到背景，让反馈成为焦点 */
.spell-pool.is-locked .spell-tile {
  opacity: 0.22;
  box-shadow: none;
}

.spell-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  max-width: 540px;
  margin: 14px auto 0;
}

.spell-back {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 13px;
}

/* 逐字母对比 */
.spell-compare {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #faf8ff;
}

.spell-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.spell-row > span {
  min-width: 56px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
}

.spell-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.spell-letter {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 30px;
  padding: 0 5px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 900;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.spell-letter.is-ok {
  color: #0d7a5c;
  background: #e9fbf4;
  box-shadow: inset 0 0 0 1.5px rgba(31, 191, 143, 0.4);
}

.spell-letter.is-bad {
  color: #b3261e;
  background: #fff0ef;
  box-shadow: inset 0 0 0 1.5px rgba(229, 72, 77, 0.45);
}

.spell-letter.is-space {
  min-width: 10px;
  background: transparent;
  box-shadow: none;
}

.spell-letters.is-guess .spell-letter {
  color: var(--ink-soft);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.spell-ipa {
  padding-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

/* 今日复习入口 */
.review-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-top: 16px;
  border-color: rgba(255, 201, 92, 0.5);
  background: linear-gradient(140deg, #fffdf6, #fff8e8);
}

.review-card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  font-size: 25px;
  border-radius: 17px;
  background: linear-gradient(140deg, #ffe9a8, #ffd977);
}

.review-card-copy {
  flex: 1;
  min-width: 190px;
}

.review-card-copy h2 {
  margin-top: 2px;
  font-size: clamp(17px, 2vw, 21px);
}

.review-card-copy p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.review-start {
  flex-shrink: 0;
}

/* ---------- 会话总结 ---------- */

.summary-layout {
  max-width: 790px;
  margin: 0 auto;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 46px);
  text-align: center;
  border: 1.5px solid #fff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 212, 92, 0.3), transparent 26%),
    radial-gradient(circle at 92% 24%, rgba(31, 201, 155, 0.15), transparent 25%),
    linear-gradient(145deg, #fff, #f6f1ff);
  box-shadow: var(--shadow-lift);
}

.summary-mascot {
  width: 150px;
  margin: 0 auto 6px;
  animation: float 4.5s ease-in-out infinite;
}

.summary-card h1 {
  margin-top: 7px;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.045em;
}

.summary-sub {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.summary-stats {
  display: grid;
  grid-template-columns: 168px 1fr;
  align-items: center;
  gap: 26px;
  max-width: 590px;
  margin: 26px auto 22px;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.summary-ring {
  --summary: 0%;
  width: 142px;
  height: 142px;
  padding: 11px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--summary), #e8e3f3 0);
}

.summary-ring > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
}

.summary-ring strong {
  font-family: var(--font-en);
  font-size: 32px;
  line-height: 1;
}

.summary-ring small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.summary-stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
}

.summary-stat-list > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.summary-stat-list span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.summary-stat-list strong {
  font-family: var(--font-en);
  font-size: 17px;
}

.summary-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 620px;
  margin: 0 auto;
}

.summary-word-chip {
  padding: 6px 10px;
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.summary-word-chip:hover {
  transform: translateY(-2px);
  border-color: var(--purple-light);
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.summary-note {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 13px 16px;
  color: var(--ink-soft);
  font-size: 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--line-strong);
}

.recommend-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--recommend-color) 30%, #fff);
  border-radius: 22px;
  background: linear-gradient(110deg, var(--recommend-soft), #fff);
  box-shadow: var(--shadow-soft);
}

.recommend-orb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 25px;
  border-radius: 16px;
  background: #fff;
}

.recommend-panel h2 {
  margin-top: 2px;
  font-size: 18px;
}

.recommend-panel p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

/* ---------- 语法实验室 ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.filter-chip {
  padding: 8px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: all 0.18s ease;
}

.filter-chip:hover {
  color: var(--purple-deep);
  border-color: #d5c9fa;
  background: #fff;
}

.filter-chip.is-active {
  color: #fff;
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: 0 5px 12px rgba(109, 75, 255, 0.2);
}

.grammar-progress-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  padding: 16px 20px;
  border: 1px solid #e5dcfb;
  border-radius: 20px;
  background: linear-gradient(110deg, #f7f2ff, #fff);
}

.banner-star {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #fff;
  font-size: 23px;
}

.grammar-progress-banner > div:nth-child(2) {
  flex: 1;
}

.grammar-progress-banner strong {
  font-size: 13px;
}

.grammar-progress-banner p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.5;
}

.grammar-progress-banner .progress-block {
  max-width: 160px;
}

.grammar-group {
  margin-bottom: 28px;
}

.grammar-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.group-orb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--group-soft);
  font-size: 20px;
}

.grammar-group-head h2 {
  font-size: 17px;
}

.grammar-group-head p {
  margin-top: 1px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.group-count {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.grammar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.grammar-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.grammar-card:hover {
  transform: translateY(-4px);
  border-color: #d9cefa;
  box-shadow: var(--shadow);
}

.grammar-card.is-done {
  background: linear-gradient(150deg, #fff, #f0fdf8);
}

.grammar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.grammar-category {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.done-stamp,
.grammar-minutes {
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 850;
}

.grammar-minutes {
  color: var(--ink-faint);
}

.grammar-card h3 {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.grammar-hook {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grammar-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.grammar-go {
  color: var(--purple-deep);
  font-weight: 850;
}

/* ---------- 语法详情 ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--ink-faint);
  font-size: 11px;
}

.breadcrumb a {
  color: var(--purple-deep);
  font-weight: 800;
}

.grammar-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  border: 1.5px solid #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 84% 20%, var(--stage-soft), transparent 28%),
    linear-gradient(135deg, #fff, #faf8ff);
  box-shadow: var(--shadow);
}

.grammar-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.grammar-hero h1 {
  margin-top: 12px;
  font-size: clamp(28px, 4.5vw, 43px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.grammar-quote {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.7vw, 17px);
  font-weight: 700;
  line-height: 1.6;
}

.formula-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 680px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed color-mix(in srgb, var(--stage-color) 38%, #fff);
  border-radius: 15px;
  background: var(--stage-soft);
}

.formula-label {
  color: var(--stage-color);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.formula-card code {
  color: var(--ink);
  font-family: var(--font-en);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.grammar-hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 150px;
  min-height: 150px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft);
}

.grammar-symbol {
  font-size: 50px;
  animation: float 5s ease-in-out infinite;
}

.grammar-art-label {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.grammar-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  gap: 16px;
  margin-top: 16px;
}

.grammar-explain h2 {
  font-size: 20px;
}

.grammar-explain > p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.grammar-explain h3 {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-soft);
}

.grammar-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.grammar-example {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.example-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--purple-deep);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 900;
  border-radius: 8px;
  background: var(--purple-soft);
}

.grammar-example > div {
  flex: 1;
}

.grammar-example p {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.grammar-example div span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.grammar-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trap-card {
  padding: 18px;
  border: 1px solid #ffe0b4;
  border-radius: 22px;
  background: linear-gradient(140deg, #fff9ee, #fff);
}

.trap-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trap-head span {
  font-size: 18px;
}

.trap-head h2 {
  font-size: 15px;
}

.trap-card ul {
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.trap-card li {
  position: relative;
  padding-left: 16px;
  margin-top: 8px;
  color: #755426;
  font-size: 11px;
  line-height: 1.65;
}

.trap-card li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  color: #fff;
  font-size: 7px;
  font-weight: 900;
  border-radius: 50%;
  background: var(--orange);
}

.practice-card {
  min-height: 260px;
  padding: 20px;
}

.practice-empty {
  text-align: center;
}

.practice-icon {
  font-size: 30px;
}

.practice-empty h2 {
  margin-top: 5px;
  font-size: 18px;
}

.practice-empty p {
  margin: 7px 0 14px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.practice-history {
  display: block;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

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

.practice-score {
  color: var(--green-deep);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 900;
}

.practice-progress {
  margin: 9px 0 14px;
}

.grammar-practice-live h3 {
  font-size: 15px;
  line-height: 1.6;
}

.grammar-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.grammar-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 11px;
  text-align: left;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all 0.16s ease;
}

.grammar-option:hover:not(:disabled) {
  border-color: #cbbdf5;
  background: #fbf9ff;
}

.grammar-option > span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: var(--ink-faint);
  font-size: 9px;
  border-radius: 6px;
  background: #f5f1fb;
}

.grammar-option b {
  margin-left: auto;
  color: var(--green-deep);
  font-size: 13px;
}

.grammar-option.is-correct {
  border-color: #a9edda;
  background: #f0fdf9;
}

.grammar-option.is-wrong {
  border-color: #ffc5c5;
  background: #fff5f5;
}

.grammar-option.is-muted {
  opacity: 0.5;
}

.grammar-feedback {
  margin-top: 12px;
  padding: 12px;
  border-radius: 13px;
  background: #f8f6ff;
}

.grammar-feedback.is-correct {
  background: #effcf7;
}

.grammar-feedback.is-wrong {
  background: #fff7ed;
}

.grammar-feedback strong {
  font-size: 12px;
}

.grammar-feedback p {
  margin: 3px 0 9px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.practice-finish {
  text-align: center;
}

.practice-finish-icon {
  font-size: 35px;
}

.practice-finish h2 {
  margin-top: 4px;
  font-size: 20px;
}

.practice-finish p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.practice-finish-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

/* ---------- 单词图鉴 ---------- */

.atlas-toolbar {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(109, 75, 255, 0.09);
}

.search-field span {
  font-size: 15px;
}

.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 13px;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-field input::placeholder {
  color: var(--ink-faint);
}

.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--ink-faint);
  font-size: 11px;
  border-radius: 7px;
  background: #f5f1fb;
}

.search-clear[hidden] {
  display: none;
}

.theme-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  flex-shrink: 0;
}

.theme-select-wrap > span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.theme-select-wrap select {
  min-width: 112px;
  border: 0;
  outline: 0;
  font-size: 12px;
  font-weight: 750;
  background: transparent;
}

.atlas-result-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 12px;
  color: var(--ink-faint);
  font-size: 10px;
}

.atlas-result-copy strong {
  color: var(--ink-soft);
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.word-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 15px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: linear-gradient(155deg, #fff, var(--stage-soft));
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.word-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--stage-color) 34%, #fff);
  box-shadow: var(--shadow);
}

.word-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.word-emoji {
  font-size: 26px;
  filter: drop-shadow(0 6px 8px rgba(45, 32, 92, 0.08));
}

.word-status {
  padding: 3px 7px;
  font-size: 8.5px;
  font-weight: 850;
  border-radius: 99px;
}

.word-card-word {
  margin-top: 10px;
  font-family: var(--font-en);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.word-card-ipa {
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--font-en);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.word-card-zh {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.word-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: auto;
  padding-top: 11px;
}

.word-card-foot .stage-chip {
  padding: 3px 6px;
  font-size: 8.5px;
}

.load-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 12px 0 2px;
}

/* ---------- 单词详情弹窗 ---------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 24, 58, 0.42);
  backdrop-filter: blur(7px);
  animation: fadeIn 0.2s ease both;
}

.modal {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  max-height: min(92vh, 850px);
  overflow: auto;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(25, 16, 55, 0.3);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overscroll-behavior: contain;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink-soft);
  font-size: 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.word-modal-hero {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  padding-right: 30px;
}

.word-modal-emoji {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  font-size: 39px;
  border-radius: 22px;
  background: linear-gradient(150deg, #fff, var(--stage-soft));
  box-shadow: var(--shadow-soft);
}

.word-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.word-modal-title h2 {
  margin-top: 7px;
  font-family: var(--font-en);
  font-size: clamp(30px, 5vw, 39px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.word-modal-ipa {
  margin-top: 3px;
  color: var(--ink-faint);
  font-family: var(--font-en);
  font-size: 13px;
}

.word-modal-zh {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 850;
}

.word-modal-zh span {
  margin-left: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
}

.word-modal-mastery {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 13px;
  border-radius: 13px;
  background: #f8f5ff;
}

.word-modal-mastery > span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.word-modal-mastery small {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.word-modal-example {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.word-modal-example p {
  margin-top: 6px;
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}

.word-modal-example > span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.word-modal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--stage-soft);
}

.word-modal-line span {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 800;
}

.word-modal-line strong {
  color: var(--stage-color);
  font-family: var(--font-en);
  font-size: 12px;
}

.word-modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.word-modal-actions .btn {
  flex: 1;
}

.modal-footnote {
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 9.5px;
  text-align: center;
}

/* ---------- 错词 ---------- */

.rescue-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  background: linear-gradient(110deg, #fff, #fff3df);
  border-color: #ffe7c2;
}

.rescue-hero h2 {
  margin-top: 4px;
  font-size: 22px;
}

.rescue-hero p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.mistakes-panel {
  margin-bottom: 16px;
}

.mistake-word-list,
.grammar-mistake-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mistake-word-row,
.grammar-mistake-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mistake-word-row:hover,
.grammar-mistake-row:hover {
  transform: translateY(-1px);
  border-color: #e0c9f5;
  background: #fdfbff;
}

.mistake-emoji {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  font-size: 19px;
  border-radius: 12px;
  background: #f7f3ff;
}

.mistake-word-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.mistake-word-main strong {
  font-family: var(--font-en);
  font-size: 14px;
}

.mistake-word-main small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mistake-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.mistake-arrow {
  color: var(--ink-faint);
  font-size: 14px;
}

.empty-inline {
  padding: 16px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

/* ---------- 成就 ---------- */

.achievement-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: clamp(22px, 3.5vw, 32px);
  border: 1.5px solid #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 212, 92, 0.35), transparent 24%),
    linear-gradient(120deg, #2a234e, #493a85 58%, #684cc3);
  box-shadow: var(--shadow-lift);
  color: #fff;
}

.level-orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.09);
}

.level-orb span {
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
}

.level-orb strong {
  font-family: var(--font-en);
  font-size: 38px;
  line-height: 1;
}

.level-copy .eyebrow {
  color: #ffd45c;
}

.level-copy h2 {
  margin-top: 5px;
  font-size: clamp(21px, 3vw, 28px);
}

.level-copy > p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.level-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  margin-top: 12px;
}

.level-progress .progress-block {
  flex: 1;
}

.level-progress .progress-track {
  background: rgba(255, 255, 255, 0.14);
}

.level-progress > span {
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-en);
  font-size: 9.5px;
  white-space: nowrap;
}

.achievement-quick-stats {
  display: flex;
  gap: 18px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.achievement-quick-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.achievement-quick-stats strong {
  font-family: var(--font-en);
  font-size: 22px;
}

.achievement-quick-stats span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  white-space: nowrap;
}

.streak-panel {
  margin-top: 16px;
}

.week-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbf9ff;
}

.day-stamp.is-active {
  border-color: #ffe3a9;
  background: linear-gradient(160deg, #fffdf6, #fff3d5);
}

.day-stamp.is-today {
  box-shadow: inset 0 0 0 2px var(--purple);
}

.day-weekday {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 750;
}

.day-dot {
  color: var(--line-strong);
  font-size: 17px;
  line-height: 1.2;
}

.day-stamp.is-active .day-dot {
  color: var(--orange);
}

.day-number {
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 800;
}

.badge-section {
  margin-top: 24px;
}

.section-heading {
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-heading h2 {
  margin-top: 3px;
  font-size: 23px;
}

.badge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.badge-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.badge-card.is-unlocked {
  border-color: #ecd9a5;
  background: linear-gradient(140deg, #fff, #fff9e9);
  box-shadow: var(--shadow-soft);
}

.badge-card.is-locked {
  opacity: 0.68;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  flex-shrink: 0;
  font-size: 22px;
  border-radius: 15px;
  background: #f5f1fb;
}

.badge-card.is-unlocked .badge-icon {
  background: #fff1c8;
}

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

.badge-copy h3 {
  font-size: 14px;
}

.badge-copy p {
  margin: 2px 0 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.badge-copy small {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
}

.badge-card.is-unlocked .badge-copy small {
  color: var(--green-deep);
  font-weight: 850;
}

.badge-shine {
  position: absolute;
  top: 10px;
  right: 11px;
  font-size: 10px;
}

/* ---------- 设置弹窗 ---------- */

.settings-modal {
  width: min(660px, 100%);
}

.settings-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 28px;
}

.settings-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  font-size: 25px;
  border-radius: 16px;
  background: linear-gradient(140deg, #f0e8ff, #fff2d6);
}

.settings-head h2 {
  margin-top: 1px;
  font-size: 25px;
}

.settings-head p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.settings-form {
  margin-top: 18px;
}

.form-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-line > span,
.stage-chooser legend {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 850;
}

.form-line input,
.form-line select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  outline: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.form-line input:focus,
.form-line select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(109, 75, 255, 0.08);
}

/* 宠物命名 */
.name-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.name-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.name-chip {
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.name-chip:hover {
  border-color: var(--purple);
  background: #f6f2ff;
  color: var(--purple);
  transform: translateY(-1px);
}

.name-chip:active {
  transform: translateY(0);
}

.rename-form {
  display: grid;
  gap: 12px;
}

.pet-rename-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(109, 75, 255, 0.1);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.pet-rename-btn:hover {
  background: rgba(109, 75, 255, 0.2);
  transform: scale(1.12);
}

.pet-rename-btn:active {
  transform: scale(0.96);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.toggle-line > span {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.toggle-line strong {
  font-size: 11.5px;
}

.toggle-line small {
  color: var(--ink-faint);
  font-size: 9.5px;
}

.toggle-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-line i {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 99px;
  background: #ded8ec;
  transition: background 0.2s ease;
}

.toggle-line i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(31, 24, 58, 0.16);
  transition: transform 0.2s ease;
}

.toggle-line input:checked + i {
  background: var(--green);
}

.toggle-line input:checked + i::after {
  transform: translateX(16px);
}

.parent-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.parent-summary > div {
  padding: 10px;
  border-radius: 12px;
  background: #f8f5ff;
}

.parent-summary span {
  display: block;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.parent-summary strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-en);
  font-size: 14px;
}

.settings-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

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

.parent-guide {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #fffdf8;
}

.parent-guide summary {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.parent-guide > div {
  margin-top: 10px;
}

.parent-guide p {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.7;
}

.parent-guide strong {
  color: var(--ink);
}

.parent-guide a {
  color: var(--purple-deep);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* ---------- 星球切换 / 确认弹窗 ---------- */

.stage-modal {
  width: min(480px, 100%);
  text-align: center;
}

.stage-modal-orb {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 13px;
  font-size: 38px;
  border-radius: 24px;
  background: var(--stage-soft);
  box-shadow: inset 0 0 0 1px #fff, var(--shadow-soft);
}

.stage-modal h2 {
  margin-top: 5px;
  font-size: 26px;
}

.stage-modal > p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.stage-modal-progress {
  margin-top: 16px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 13px;
  background: #f9f7ff;
}

.stage-modal-progress > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.stage-challenge-note {
  padding: 10px 12px;
  margin-top: 10px;
  color: #7c5c1b;
  font-size: 10.5px;
  text-align: left;
  border-radius: 12px;
  background: #fff8e6;
}

.stage-modal-actions,
.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.stage-modal-actions .btn,
.confirm-actions .btn {
  flex: 1;
}

.confirm-modal {
  width: min(430px, 100%);
  text-align: center;
}

.confirm-icon {
  font-size: 42px;
}

.confirm-modal h2 {
  margin-top: 5px;
  font-size: 23px;
}

.confirm-modal p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- 首次引导 ---------- */

#onboarding-root[hidden] {
  display: none;
}

.onboarding-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 212, 92, 0.18), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(31, 201, 155, 0.17), transparent 28%),
    linear-gradient(140deg, #241d46, #3d2e72 56%, #5a3fae);
}

.onboarding-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.onboarding-stars span {
  position: absolute;
  color: rgba(255, 255, 255, 0.35);
  animation: twinkle 4s ease-in-out infinite;
}

.onboarding-stars span:nth-child(1) {
  left: 8%;
  top: 12%;
  font-size: 22px;
}

.onboarding-stars span:nth-child(2) {
  right: 10%;
  top: 20%;
  font-size: 16px;
  animation-delay: 0.8s;
}

.onboarding-stars span:nth-child(3) {
  left: 17%;
  bottom: 16%;
  font-size: 13px;
  animation-delay: 1.5s;
}

.onboarding-stars span:nth-child(4) {
  right: 21%;
  bottom: 10%;
  font-size: 25px;
  animation-delay: 2.2s;
}

.onboarding-stars span:nth-child(5) {
  left: 48%;
  top: 6%;
  color: rgba(255, 212, 92, 0.5);
  font-size: 14px;
  animation-delay: 1s;
}

.onboarding-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  width: min(960px, 100%);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: 0 40px 100px rgba(10, 5, 30, 0.4);
  animation: modalIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.onboarding-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  overflow: hidden;
  padding: 28px 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(160deg, #7d5cff, #5738da 58%, #3d278f);
}

.onboarding-art::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: 14%;
  border: 1.5px dashed rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.onboarding-art::after {
  content: "✦";
  position: absolute;
  right: 17%;
  top: 16%;
  color: #ffd45c;
  font-size: 26px;
}

.onboarding-orbit {
  position: absolute;
  width: 250px;
  height: 250px;
  bottom: 18%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.onboarding-mascot {
  position: relative;
  z-index: 2;
  width: min(280px, 85%);
  animation: float 5s ease-in-out infinite;
}

.onboarding-mascot .momo {
  width: 100%;
  filter: drop-shadow(0 24px 30px rgba(22, 12, 58, 0.3));
}

.onboarding-bubble {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  padding: 10px 16px;
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 850;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(24, 12, 54, 0.2);
}

.onboarding-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.onboarding-copy {
  overflow: auto;
  padding: clamp(28px, 4.5vw, 48px);
}

.onboarding-copy h1 {
  margin-top: 8px;
  font-size: clamp(29px, 4.4vw, 43px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.onboarding-copy h1 span {
  color: var(--purple-deep);
}

.onboarding-sub {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}

.onboarding-form {
  margin-top: 20px;
}

.stage-chooser {
  margin: 15px 0 0;
  padding: 0;
  border: 0;
}

.stage-chooser legend {
  margin-bottom: 7px;
}

.stage-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.stage-choice {
  position: relative;
  cursor: pointer;
}

.stage-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stage-choice-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 76px;
  padding: 8px 4px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.stage-choice:hover .stage-choice-inner {
  border-color: var(--choice-color);
  transform: translateY(-2px);
}

.stage-choice input:checked + .stage-choice-inner {
  border-color: var(--choice-color);
  background: var(--choice-soft);
  box-shadow: inset 0 0 0 1px var(--choice-color);
}

.stage-choice-emoji {
  font-size: 20px;
}

.stage-choice-inner strong {
  font-size: 10.5px;
}

.stage-choice-inner small {
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.3;
}

.field-help {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 9px;
}

.goal-line {
  margin-top: 13px;
}

.onboarding-submit {
  width: 100%;
  margin-top: 18px;
}

.onboarding-footnote {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
}

/* ---------- 空状态 ---------- */

.empty-state {
  max-width: 610px;
  margin: 30px auto;
  padding: 42px 30px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
}

.empty-state h2 {
  margin-top: 8px;
  font-size: 24px;
}

.empty-state p {
  max-width: 400px;
  margin: 8px auto 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------- 轻提示 / 彩带 ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 10px 17px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  border-radius: 13px;
  background: #312a52;
  box-shadow: 0 12px 30px rgba(31, 24, 58, 0.22);
  animation: toastIn 0.28s ease both;
}

.toast-success {
  background: linear-gradient(135deg, #27c79b, #14a67f);
}

.toast-warn {
  background: linear-gradient(135deg, #e7a62f, #c8881a);
}

.toast-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.confetti-root {
  position: fixed;
  inset: 0;
  z-index: 1100;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: 27%;
  border-radius: 3px;
  animation: confettiBurst 1.9s cubic-bezier(0.15, 0.6, 0.3, 1) var(--delay) both;
}

.noscript-note {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 2000;
  padding: 14px;
  color: #fff;
  font-size: 13px;
  text-align: center;
  border-radius: 12px;
  background: #c34a4a;
}

/* ---------- 动画 ---------- */

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.12);
  }
}

@keyframes blink {
  0%,
  45%,
  49%,
  100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(0.08);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.9);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
  }
}

.momo .momo-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 6.8s ease-in-out infinite;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .desktop-nav a {
    padding: 8px 10px;
    font-size: 13px;
  }

  .hero-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

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

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

  .mode-card {
    grid-template-columns: auto 1fr;
  }

  .mode-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 10px 16px;
    gap: 10px;
  }

  .desktop-nav {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .view {
    padding-top: 20px;
    padding-bottom: 110px;
  }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 440px;
    margin: 0 auto;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    background: rgba(255, 253, 249, 0.9);
    box-shadow: 0 14px 40px rgba(48, 34, 95, 0.17);
    backdrop-filter: blur(18px);
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 49px;
    color: var(--ink-faint);
    font-size: 9px;
    font-weight: 800;
    border-radius: 14px;
    transition: color 0.18s ease, background 0.18s ease;
  }

  .bottom-nav a.is-active {
    color: var(--purple-deep);
    background: var(--purple-soft);
  }

  .bottom-icon {
    font-size: 17px;
    line-height: 1.2;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding: 30px 28px 10px;
  }

  .hero-visual {
    min-height: 290px;
    margin-top: -12px;
  }

  .hero-mascot {
    width: 220px;
  }

  .goal-bubble {
    right: auto;
    left: 13%;
    bottom: 0;
  }

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

  .quick-panel {
    display: block;
  }

  .tip-card {
    margin-top: 11px;
  }

  .stage-path {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 2px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .stage-path::-webkit-scrollbar {
    display: none;
  }

  .stage-node {
    flex: 0 0 160px;
    scroll-snap-align: start;
  }

  .stage-node::after {
    display: none;
  }

  .learn-smart {
    grid-template-columns: 1fr;
  }

  .learn-smart-visual {
    display: none;
  }

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

  .mode-card {
    grid-template-columns: auto 1fr auto;
  }

  .mode-card .btn {
    grid-column: auto;
    width: auto;
  }

  .grammar-content-grid {
    grid-template-columns: 1fr;
  }

  .grammar-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .achievement-hero {
    grid-template-columns: auto 1fr;
  }

  .achievement-quick-stats {
    grid-column: 1 / -1;
    justify-content: space-around;
    padding: 13px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
  }

  .onboarding-card {
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  }

  body.session-mode .view {
    padding-bottom: 28px;
  }
}

@media (max-width: 720px) {
  .brand-copy small {
    display: none;
  }

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

  .hero-copy h1 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 160px;
  }

  .hero-visual {
    padding-bottom: 26px;
  }

  .goal-bubble {
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
  }

  .floating-note.note-one {
    left: 15%;
  }

  .floating-note.note-two {
    right: 15%;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-intro-extra {
    align-self: flex-start;
  }

  .panel-head {
    flex-wrap: wrap;
  }

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

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

  .grammar-card {
    min-height: 155px;
  }

  .grammar-hero {
    grid-template-columns: 1fr;
  }

  .grammar-hero-art {
    display: none;
  }

  .grammar-side {
    grid-template-columns: 1fr;
  }

  .atlas-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .theme-select-wrap {
    justify-content: space-between;
  }

  .theme-select-wrap select {
    flex: 1;
  }

  .rescue-panel {
    flex-wrap: wrap;
  }

  .rescue-panel .btn {
    width: 100%;
  }

  .summary-stats {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    text-align: center;
  }

  .summary-stat-list {
    width: 100%;
    text-align: left;
  }

  .recommend-panel {
    grid-template-columns: auto 1fr;
  }

  .recommend-panel .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .achievement-hero {
    gap: 15px;
  }

  .level-orb {
    width: 88px;
    height: 88px;
  }

  .level-orb strong {
    font-size: 31px;
  }

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

  .rescue-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .rescue-hero .btn {
    width: 100%;
  }

  .onboarding-layer {
    align-items: start;
    padding: 12px;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
    max-height: none;
    border-radius: 26px;
  }

  .onboarding-art {
    min-height: 190px;
    padding: 18px;
  }

  .onboarding-art::before {
    width: 240px;
    height: 240px;
    top: -34%;
  }

  .onboarding-orbit {
    width: 160px;
    height: 160px;
    bottom: 0;
  }

  .onboarding-mascot {
    width: 145px;
  }

  .onboarding-bubble {
    margin-top: 2px;
    padding: 7px 12px;
    font-size: 10px;
  }

  .onboarding-copy {
    padding: 22px;
  }

  .onboarding-copy h1 {
    font-size: 28px;
  }

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

  .modal {
    max-height: 94vh;
    border-radius: 23px;
  }

  .word-modal-hero {
    flex-direction: column;
  }

  .word-modal-emoji {
    width: 64px;
    height: 64px;
    font-size: 33px;
  }

  .word-modal-actions {
    flex-direction: column;
  }

  .modal-layer {
    padding: 10px;
  }

  .flashcard {
    min-height: 430px;
  }

  .flash-front {
    min-height: 345px;
  }

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

  .option-btn {
    min-height: 55px;
  }

  .quiz-layout,
  .spell-layout {
    padding: 20px 16px;
    border-radius: 24px;
  }

  .quiz-stimulus {
    padding-top: 14px;
  }

  .spell-form {
    flex-direction: column;
  }

  .spell-form .btn {
    width: 100%;
  }

  .spell-slot {
    min-width: 30px;
    height: 38px;
    font-size: 18px;
  }

  .spell-tile {
    min-width: 44px;
    height: 44px;
    font-size: 19px;
  }

  .summary-card {
    padding: 24px 18px;
  }

  .summary-actions {
    flex-direction: column;
  }

  .summary-actions .btn {
    width: 100%;
  }

  .parent-summary {
    grid-template-columns: 1fr 1fr;
  }

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

  .settings-actions {
    flex-direction: column;
  }

  .settings-actions .btn {
    width: 100%;
  }

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

  body.session-mode .toast-root {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .week-row {
    gap: 5px;
  }

  .day-stamp {
    padding: 9px 3px;
    border-radius: 12px;
  }

  .day-weekday {
    font-size: 8px;
  }

  .day-number {
    font-size: 9px;
  }

  .mode-card {
    grid-template-columns: auto 1fr;
  }

  .mode-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .session-top {
    gap: 9px;
  }

  .combo-pill {
    min-width: 44px;
  }

  .grammar-progress-banner .progress-block {
    display: none;
  }

  .atlas-result-copy {
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .top-stats .level-stat {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    font-size: 20px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .view {
    padding-left: 13px;
    padding-right: 13px;
  }

  .hero-card {
    border-radius: 27px;
  }

  .hero-copy {
    padding: 24px 20px 8px;
  }

  .hero-sub {
    font-size: 13px;
  }

  .hero-actions {
    flex-direction: row;
    gap: 8px;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 0;
    padding: 12px 10px;
    font-size: 14px;
  }

  .hero-visual {
    min-height: 210px;
    padding-bottom: 10px;
  }

  .hero-mascot {
    width: 165px;
  }

  .goal-bubble {
    bottom: -3px;
    transform: translateX(-50%) scale(0.86);
    transform-origin: center bottom;
  }

  .floating-note.note-one {
    top: 2%;
    left: 8%;
  }

  .floating-note.note-two {
    top: 10%;
    right: 8%;
  }

  .stat-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-icon {
    width: 37px;
    height: 37px;
    font-size: 17px;
    border-radius: 12px;
  }

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

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

  .task-row {
    flex-wrap: wrap;
  }

  .task-row .btn,
  .done-label {
    width: 100%;
    margin-top: 2px;
  }

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

  .word-card {
    min-height: 166px;
  }

  .flashcard {
    padding: 20px 16px;
    border-radius: 25px;
  }

  .flash-word {
    font-size: 39px;
  }

  .summary-stat-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .summary-ring {
    width: 124px;
    height: 124px;
  }

  .onboarding-copy {
    padding: 18px;
  }

  .onboarding-copy h1 {
    font-size: 25px;
  }

  .onboarding-art {
    min-height: 160px;
  }

  .onboarding-mascot {
    width: 115px;
  }

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

  .stage-choice-inner {
    min-height: 67px;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
  }

  .grammar-example {
    flex-wrap: wrap;
  }

  .grammar-example .mini-speak {
    margin-left: auto;
  }

  .parent-summary {
    grid-template-columns: 1fr 1fr;
  }

  .achievement-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .level-orb {
    margin: 0 auto;
  }

  .level-progress {
    margin-left: auto;
    margin-right: auto;
  }

  .achievement-quick-stats {
    justify-content: space-around;
  }

  .week-row {
    grid-template-columns: repeat(7, 1fr);
  }

  .day-weekday {
    display: none;
  }

  .session-shell {
    padding-bottom: 10px;
  }

  .quiz-prompt {
    width: 100%;
  }
}

/* ---------- 减少动效 ---------- */

@media (max-width: 370px) {
  .top-stat:nth-child(2) {
    display: none;
  }

  .brand-copy strong {
    font-size: 14px;
  }

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

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

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

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ==========================================================================
   简约版首页 · 宠物养成
   ========================================================================== */

.home-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 4px 0;
  margin-bottom: 20px;
}

.home-greeting h1 {
  margin-top: 7px;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.home-greeting p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.5vw, 15px);
}

.streak-badge {
  flex-shrink: 0;
  padding: 9px 14px;
  color: #8a4d06;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  border-radius: 999px;
  background: #fff2d8;
  border: 1px solid #ffe4b3;
}

/* ---------- 宠物主卡 ---------- */

.pet-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
}

.pet-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  overflow: hidden;
  padding: 26px 22px 22px;
  border: 1.5px solid #fff;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 68%, rgba(255, 255, 255, 0.9), transparent 42%),
    radial-gradient(circle at 22% 18%, rgba(255, 212, 92, 0.34), transparent 26%),
    radial-gradient(circle at 82% 26%, rgba(255, 126, 182, 0.18), transparent 24%),
    linear-gradient(160deg, #f4edff, #e8ddff 58%, #efe9ff);
  box-shadow: var(--shadow-lift);
}

.pet-scene::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  left: 50%;
  top: 52%;
  border: 1.5px dashed rgba(109, 75, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 36s linear infinite;
}

.pet-scene::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 74px;
  left: 50%;
  bottom: 62px;
  border-radius: 50%;
  background: rgba(109, 75, 255, 0.12);
  filter: blur(2px);
  transform: translateX(-50%);
}

.pet-speech {
  position: relative;
  z-index: 4;
  max-width: 290px;
  padding: 10px 15px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  border: 1px solid #fff;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(70, 47, 139, 0.12);
  animation: float 5.5s ease-in-out infinite;
}

.pet-speech::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

.pet-tap {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: min(300px, 92%);
  margin: 2px 0;
  padding: 0;
  background: transparent;
  border-radius: 30px;
  transition: transform 0.2s ease;
}

.pet-tap:hover {
  transform: translateY(-3px) scale(1.01);
}

.pet-tap:active {
  transform: scale(0.985);
}

.pet-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pet-tap .pet-art {
  position: relative;
  z-index: 2;
  width: 86%;
  height: auto;
  filter: drop-shadow(0 22px 26px rgba(83, 52, 196, 0.2));
  animation: float 4.4s ease-in-out infinite;
  transform-origin: center bottom;
}

.pet-tap .pet-art.is-eating {
  animation: petEat 0.85s ease both;
}

.pet-tap .pet-art.is-loved {
  animation: petLove 1.25s ease both;
}

.pet-tap-hint {
  position: relative;
  z-index: 3;
  margin-top: -6px;
  padding: 5px 11px;
  color: var(--purple-deep);
  font-size: 9.5px;
  font-weight: 850;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pet-tap:hover .pet-tap-hint,
.pet-tap:focus-visible .pet-tap-hint {
  opacity: 1;
  transform: none;
}

.pet-nameplate {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 94%;
  margin-top: 4px;
  padding: 7px 13px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(70, 47, 139, 0.1);
}

.pet-nameplate strong {
  font-size: 13px;
}

.pet-nameplate > span {
  padding: 2px 7px;
  color: #fff;
  font-family: var(--font-en);
  font-size: 9.5px;
  font-weight: 900;
  border-radius: 99px;
  background: var(--purple);
}

.pet-nameplate em {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 750;
}

.pet-heart {
  position: absolute;
  z-index: 6;
  bottom: 38%;
  font-size: 23px;
  pointer-events: none;
  animation: petHeart 1.7s ease-out both;
}

.pet-card {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.pet-card-head h2 {
  margin-top: 4px;
  font-size: clamp(25px, 3.2vw, 33px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.pet-card-head p {
  max-width: 340px;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.fruit-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  min-width: 76px;
  padding: 10px 13px;
  border: 1px solid #ffe2ad;
  border-radius: 17px;
  background: #fff6e3;
}

.fruit-pill strong {
  font-family: var(--font-en);
  font-size: 21px;
  line-height: 1;
}

.fruit-pill small {
  color: #9a6a1c;
  font-size: 9px;
  font-weight: 800;
}

.pet-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 22px;
}

.pet-bar-row {
  display: grid;
  grid-template-columns: 76px 1fr 46px;
  align-items: center;
  gap: 10px;
}

.pet-bar-row > span {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.pet-bar-row > b {
  color: var(--ink-soft);
  font-family: var(--font-en);
  font-size: 10px;
  text-align: right;
}

.stat-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #f0ecf7;
}

.stat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd36a, #ffb84d);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stat-bar i.stat-bar-love {
  background: linear-gradient(90deg, #ffa5ca, #ff7eb6);
}

.stat-bar i.stat-bar-exp {
  background: linear-gradient(90deg, #a58cff, #6d4bff);
}

.stat-bar i.is-low {
  background: linear-gradient(90deg, #ff9a9a, #f26b6b);
}

.pet-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.pet-actions .btn {
  flex: 1;
  min-height: 50px;
  border-radius: 16px;
}

.pet-feed-btn {
  font-size: 15px;
}

.pet-feed-btn small {
  font-size: 10px;
  font-weight: 850;
  opacity: 0.72;
}

.pet-hint {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.pet-unlocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px dashed var(--line);
}

.pet-unlock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 750;
  border-radius: 999px;
  background: #f7f4fb;
}

.pet-unlock.is-unlocked {
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.pet-stage-chip {
  padding: 2px 7px;
  color: var(--purple-deep) !important;
  border-radius: 999px;
  background: var(--purple-soft);
}

.pet-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
}

.pet-switch-row > span {
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 700;
  text-align: right;
}

.pet-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 7px 12px;
  color: var(--purple-deep);
  font-size: 10px;
  font-weight: 850;
  border: 1px solid #e5dbff;
  border-radius: 999px;
  background: var(--purple-soft);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pet-switch-link:hover {
  background: #ece4ff;
  transform: translateY(-1px);
}

/* ---------- 选择小伙伴 ---------- */

.pet-chooser-field {
  margin-top: 15px;
}

.pet-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pet-choice {
  position: relative;
  cursor: pointer;
}

.pet-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pet-choice-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 70px;
  padding: 6px 10px 6px 5px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.pet-choice:hover .pet-choice-inner {
  border-color: var(--pet-color);
  transform: translateY(-2px);
}

.pet-choice input:checked + .pet-choice-inner {
  border-color: var(--pet-color);
  background: var(--pet-soft);
  box-shadow: inset 0 0 0 1px var(--pet-color);
}

.pet-choice input:focus-visible + .pet-choice-inner {
  outline: 3px solid rgba(109, 75, 255, 0.22);
  outline-offset: 2px;
}

.pet-choice input:checked + .pet-choice-inner::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  border-radius: 50%;
  background: var(--pet-color);
}

.pet-choice-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.pet-choice-art .pet-art {
  display: block;
  width: 100%;
  height: auto;
}

.pet-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pet-choice-copy strong {
  font-size: 11.5px;
}

.pet-choice-copy small {
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.3;
}

.pet-choice-grid-large {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pet-choice-grid-large .pet-choice-inner {
  flex-direction: column;
  min-height: 142px;
  padding: 8px 6px 10px;
  text-align: center;
}

.pet-choice-grid-large .pet-choice-art {
  width: 90px;
  height: 90px;
}

.pet-choice-grid-large .pet-choice-copy strong {
  font-size: 12px;
}

.pet-picker-modal {
  width: min(720px, 100%);
}

.pet-picker-note {
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.65;
}

/* ---------- 今日任务与简版统计 ---------- */

.home-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
}

.today-card {
  display: flex;
  flex-direction: column;
}

.today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.today-head h2 {
  margin-top: 4px;
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.035em;
}

.today-ring {
  --goal: 0%;
  width: 66px;
  height: 66px;
  padding: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--goal), #ece7fb 0);
}

.today-ring > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
}

.today-ring strong {
  font-family: var(--font-en);
  font-size: 20px;
  line-height: 1.6;
}

.today-ring small {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.today-copy {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 17px;
}

.today-actions .btn-primary {
  flex: 1;
  min-width: 170px;
}

.home-side {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mini-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 22px rgba(73, 53, 143, 0.05);
}

.mini-stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 18px;
  border-radius: 13px;
  background: #f6f1ff;
}

.mini-stat-card > div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mini-stat-card strong {
  font-family: var(--font-en);
  font-size: 18px;
}

.mini-stat-card strong span {
  color: var(--ink-faint);
  font-size: 11px;
}

.mini-stat-card small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
}

.current-stage-note {
  margin-top: auto;
  padding: 9px 4px 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  text-align: center;
}

.current-stage-note strong {
  color: var(--ink-soft);
}

/* ---------- 学习页 ---------- */

.stage-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.stage-select-wrap label {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
}

.stage-select-wrap select {
  border: 0;
  outline: 0;
  font-size: 11.5px;
  font-weight: 750;
  background: transparent;
}

.learn-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 212, 92, 0.24), transparent 27%),
    linear-gradient(130deg, #fff, #f5efff);
}

.learn-main-copy {
  display: flex;
  align-items: center;
  gap: 15px;
}

.learn-mascot {
  width: 92px;
  flex-shrink: 0;
  animation: float 5s ease-in-out infinite;
}

.learn-mascot .pet-art {
  width: 100%;
  height: auto;
}

.learn-main-copy h2 {
  margin-top: 4px;
  font-size: clamp(21px, 2.6vw, 27px);
  letter-spacing: -0.035em;
}

.learn-main-copy p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.learn-start {
  min-width: 176px;
}

.learn-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.learn-tags span {
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 750;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
}

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

.grammar-entry-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 14px;
  background: linear-gradient(110deg, #fff, #eefcf7);
  border-color: #d8f5ea;
}

.grammar-entry-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  font-size: 26px;
  border-radius: 17px;
  background: var(--green-soft);
}

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

.grammar-entry-copy h2 {
  margin-top: 2px;
  font-size: 19px;
}

.grammar-entry-copy p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.pet-nudge {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 11px 15px;
  color: var(--ink-soft);
  font-size: 10.5px;
  border: 1px dashed #e3d8f8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.pet-nudge p {
  line-height: 1.6;
}

/* ---------- 会话与结算 ---------- */

.session-fruit {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 52px;
  height: 38px;
  padding: 0 10px;
  color: #8a5a10;
  font-size: 12px;
  border: 1px solid #ffe0a5;
  border-radius: 13px;
  background: #fff7e4;
}

.session-fruit b {
  font-family: var(--font-en);
  font-size: 12px;
}

.summary-pet {
  width: 132px;
  margin: 0 auto 4px;
  animation: float 4.5s ease-in-out infinite;
}

.summary-pet .pet-art {
  width: 100%;
  height: auto;
}

/* ---------- 设置与引导补充 ---------- */

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

.settings-stats > div {
  padding: 10px;
  border-radius: 12px;
  background: #f8f5ff;
}

.settings-stats span {
  display: block;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.settings-stats strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-en);
  font-size: 13px;
}

.settings-footnote {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
}

.settings-footnote a {
  color: var(--purple-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.onboarding-pet {
  position: relative;
  z-index: 2;
  width: min(250px, 82%);
  animation: float 5s ease-in-out infinite;
}

.onboarding-pet .pet-art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(22, 12, 58, 0.3));
}

/* ---------- 宠物动画 ---------- */

@keyframes petHeart {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  18% {
    opacity: 1;
    transform: translateY(-14px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(1.15);
  }
}

@keyframes petEat {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(6px) scale(1.05, 0.95); }
  60% { transform: translateY(-4px) scale(0.98, 1.03); }
}

@keyframes petLove {
  0%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-7px) rotate(-3deg); }
  45% { transform: translateY(-2px) rotate(3deg); }
  70% { transform: translateY(-6px) rotate(-2deg); }
  88% { transform: translateY(-1px) rotate(1deg); }
}

/* ---------- 多宠物动作 ---------- */

.pet-art {
  overflow: visible;
}

.pet-art .pet-head {
  transform-box: fill-box;
  transform-origin: 50% 92%;
}

.pet-art .pet-body-group {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: petBreathe 3.8s ease-in-out infinite;
}

.pet-art .pet-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: petBlink 5.6s ease-in-out infinite;
}

.pet-art .pet-tail {
  transform-box: fill-box;
  transform-origin: 6% 94%;
  animation: petSway 3.8s ease-in-out infinite;
}

.pet-art.pet-kind-dog .pet-tail {
  animation: petWag 2.3s ease-in-out infinite;
}

.pet-art .pet-ear-l,
.pet-art .pet-ear-r {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.pet-art .pet-face-love {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.pet-art.is-loved .pet-face-normal {
  opacity: 0;
}

.pet-art.is-loved .pet-face-love {
  opacity: 1;
}

.pet-art .pet-love-heart {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.pet-art.is-loved .pet-love-heart {
  animation: petLoveHeart 1.3s ease-out both;
}

.pet-art .pet-food {
  opacity: 0;
}

.pet-art.is-eating .pet-food {
  opacity: 1;
  animation: petFoodDrop 0.95s ease-out both;
}

.pet-art.is-loved .pet-tail {
  animation: petWagFast 0.46s ease-in-out infinite;
}

.pet-art.is-loved .pet-body-group {
  animation: petCuddleBody 1.3s ease-in-out;
}

.pet-art.is-loved .pet-head {
  animation: petCuddleHead 1.3s ease-in-out;
}

.pet-art.idle-hop {
  animation: petHop 0.95s ease both;
}

.pet-art.idle-look .pet-head {
  animation: petLook 1.5s ease;
}

.pet-art.idle-ear .pet-ear-l {
  animation: petEarL 1.1s ease;
}

.pet-art.idle-ear .pet-ear-r {
  animation: petEarR 1.1s ease;
}

.pet-art.idle-stretch .pet-body-group {
  animation: petStretch 1.4s ease;
}

/* ---------- 追尾巴 / 玩毛线球 / 睡觉 ---------- */

.pet-art .pet-chase,
.pet-art .pet-yarn,
.pet-art .pet-sleep {
  opacity: 0;
  pointer-events: none;
}

.pet-art.idle-chase .pet-chase { opacity: 1; }
.pet-art.idle-yarn .pet-yarn { opacity: 1; }
.pet-art.is-sleeping .pet-sleep { opacity: 1; }
.pet-art.is-sleeping .pet-face-normal,
.pet-art.is-sleeping .pet-face-love { opacity: 0; }

/* 狗狗：绕着小圈扑自己的尾巴 */
.pet-art.idle-chase {
  animation: petChaseOrbit 2.5s cubic-bezier(0.4, 0.1, 0.5, 1) both;
}

.pet-art.idle-chase .pet-head {
  animation: petChaseHead 2.5s ease-in-out;
}

.pet-art.idle-chase .pet-tail {
  animation: petWagFast 0.34s ease-in-out infinite;
}

.pet-art.idle-chase .pet-chase-swirl {
  animation: petChaseSwirl 1.1s linear infinite;
}

.pet-art.idle-chase .pet-chase-dust {
  transform-box: fill-box;
  transform-origin: center;
  animation: petChaseDust 1.1s ease-out infinite;
}

/* 猫咪：用爪子拨毛线球 */
.pet-art.idle-yarn .pet-head {
  animation: petYarnWatch 2.5s ease-in-out;
}

.pet-art.idle-yarn .pet-yarn-ball {
  transform-box: fill-box;
  transform-origin: center;
  animation: petYarnRoll 2.5s ease-in-out both;
}

/* 睡觉：慢慢呼吸、点头、飘 zzz */
.pet-tap .pet-art.is-sleeping {
  animation: float 7s ease-in-out infinite;
}

.pet-art.is-sleeping .pet-body-group {
  animation: petSleepBreathe 3.4s ease-in-out infinite;
}

.pet-art.is-sleeping .pet-head {
  animation: petSleepNod 3.4s ease-in-out infinite;
}

.pet-art.is-sleeping .pet-tail {
  animation: petSleepTail 3.4s ease-in-out infinite;
}

.pet-art .pet-z {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.pet-art.is-sleeping .pet-z {
  animation: petZzz 2.4s ease-in-out infinite;
}

.pet-art.is-sleeping .pet-z2 { animation-delay: 0.55s; }
.pet-art.is-sleeping .pet-z3 { animation-delay: 1.1s; }

@keyframes petChaseOrbit {
  0% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(7px, -7px) rotate(7deg); }
  30% { transform: translate(12px, 1px) rotate(3deg); }
  45% { transform: translate(6px, 7px) rotate(-4deg); }
  62% { transform: translate(-6px, 6px) rotate(-6deg); }
  78% { transform: translate(-12px, -3px) rotate(0deg); }
  92% { transform: translate(-4px, -8px) rotate(4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes petChaseHead {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(14deg); }
  65% { transform: rotate(-14deg); }
}

@keyframes petChaseSwirl {
  0% { stroke-dashoffset: 0; opacity: 0.3; }
  50% { opacity: 0.9; }
  100% { stroke-dashoffset: -46; opacity: 0.3; }
}

@keyframes petChaseDust {
  0% { transform: translate(0, 0) scale(0.55); opacity: 0; }
  40% { opacity: 0.8; }
  100% { transform: translate(-5px, -12px) scale(1.2); opacity: 0; }
}

@keyframes petYarnWatch {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-10deg) translateY(2px); }
  55% { transform: rotate(9deg) translateY(1px); }
  80% { transform: rotate(-4deg) translateY(0); }
}

@keyframes petYarnRoll {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(1px, -16px) rotate(80deg); }
  40% { transform: translate(22px, -5px) rotate(190deg); }
  60% { transform: translate(15px, -18px) rotate(285deg); }
  80% { transform: translate(2px, -8px) rotate(345deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes petSleepBreathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.025, 0.972); }
}

@keyframes petSleepNod {
  0%, 100% { transform: rotate(-3deg) translateY(1px); }
  50% { transform: rotate(1deg) translateY(3px); }
}

@keyframes petSleepTail {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-5deg); }
}

@keyframes petZzz {
  0% { opacity: 0; transform: translateY(6px) scale(0.85); }
  30% { opacity: 0.95; }
  70% { opacity: 0; transform: translateY(-10px) scale(1.12); }
  100% { opacity: 0; }
}

@keyframes petBreathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.012, 0.986); }
}

@keyframes petBlink {
  0%, 91%, 96%, 100% { transform: scaleY(1); }
  93.5% { transform: scaleY(0.08); }
}

@keyframes petSway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(7deg); }
}

@keyframes petWag {
  0%, 100% { transform: rotate(-8deg); }
  30% { transform: rotate(15deg); }
  60% { transform: rotate(4deg); }
  80% { transform: rotate(12deg); }
}

@keyframes petWagFast {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(24deg); }
}

@keyframes petCuddleBody {
  0%, 100% { transform: scale(1, 1); }
  28% { transform: scale(1.045, 0.955); }
  62% { transform: scale(0.975, 1.03); }
  84% { transform: scale(1.01, 0.99); }
}

@keyframes petCuddleHead {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  55% { transform: rotate(3.5deg); }
  80% { transform: rotate(-1.5deg); }
}

@keyframes petHop {
  0%, 100% { transform: translateY(0) scale(1); }
  28% { transform: translateY(2px) scale(1.03, 0.94); }
  58% { transform: translateY(-14px) scale(0.98, 1.03); }
  80% { transform: translateY(0) scale(1.02, 0.98); }
}

@keyframes petLook {
  0%, 100% { transform: rotate(0deg); }
  24% { transform: rotate(-7deg); }
  56% { transform: rotate(6deg); }
  78% { transform: rotate(-2deg); }
}

@keyframes petEarL {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-10deg); }
  58% { transform: rotate(4deg); }
}

@keyframes petEarR {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(10deg); }
  58% { transform: rotate(-4deg); }
}

@keyframes petStretch {
  0%, 100% { transform: scale(1, 1); }
  32% { transform: scale(1.04, 0.9) translateY(2px); }
  66% { transform: scale(0.98, 1.035); }
}

@keyframes petFoodDrop {
  0% { opacity: 0; transform: translateY(-10px) scale(0.6); }
  25% { opacity: 1; transform: translateY(0) scale(1); }
  68% { opacity: 1; transform: translateY(2px) scale(0.92); }
  100% { opacity: 0; transform: translateY(6px) scale(0.5); }
}

@keyframes petLoveHeart {
  0% { opacity: 0; transform: translateY(4px) scale(0.6); }
  30% { opacity: 1; transform: translateY(-2px) scale(1.05); }
  100% { opacity: 0; transform: translateY(-15px) scale(0.9); }
}

/* ---------- 简约版响应式 ---------- */

@media (max-width: 900px) {
  .home-greeting {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pet-hero {
    grid-template-columns: 1fr;
  }

  .pet-scene {
    min-height: 360px;
    padding: 20px 16px 18px;
  }

  .pet-tap {
    width: min(260px, 88%);
  }

  .pet-scene::before {
    width: 270px;
    height: 270px;
  }

  .pet-card {
    border-radius: 26px;
  }

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

  .home-side {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .current-stage-note {
    grid-column: 1 / -1;
    padding-top: 2px;
  }

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

  .mini-stat-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .learn-main {
    grid-template-columns: 1fr;
  }

  .learn-start {
    width: 100%;
  }

  .grammar-entry-card {
    flex-wrap: wrap;
  }

  .grammar-entry-card .btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .home-greeting h1 {
    font-size: 30px;
  }

  .pet-speech {
    font-size: 11px;
    padding: 8px 12px;
  }

  .pet-card-head {
    flex-wrap: wrap;
  }

  .fruit-pill {
    flex-direction: row;
    gap: 5px;
    min-width: 0;
    padding: 8px 11px;
  }

  .fruit-pill small {
    font-size: 8px;
  }

  .pet-bar-row {
    grid-template-columns: 66px 1fr 40px;
    gap: 8px;
  }

  .pet-unlocks {
    padding-top: 14px;
  }

  .learn-main-copy {
    align-items: flex-start;
  }

  .learn-mascot {
    width: 72px;
  }

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

  .learn-stats .mini-stat-card {
    padding: 12px 14px;
  }

  .today-actions {
    flex-direction: column;
  }

  .today-actions .btn {
    width: 100%;
  }

  .summary-pet {
    width: 110px;
  }

  .onboarding-pet {
    width: 130px;
  }

  .onboarding-copy {
    max-height: none;
  }

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

@media (max-width: 480px) {
  .home-side {
    grid-template-columns: 1fr;
  }

  .current-stage-note {
    grid-column: auto;
  }

  .pet-scene {
    min-height: 330px;
  }

  .pet-tap {
    width: min(230px, 90%);
  }

  .pet-nameplate {
    gap: 5px;
    padding: 6px 10px;
  }

  .pet-actions {
    flex-direction: column;
  }

  .pet-actions .btn {
    width: 100%;
  }

  .fruit-pill {
    margin-left: auto;
  }

  .learn-main-copy {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .learn-tags {
    justify-content: center;
  }

  .home-greeting {
    align-items: flex-start;
  }

  .streak-badge {
    padding: 7px 11px;
    font-size: 10.5px;
  }
}

@media (max-width: 370px) {
  .brand-copy strong {
    font-size: 14px;
  }

  .pet-scene {
    min-height: 300px;
  }

  .pet-tap {
    width: 200px;
  }
}

/* 移动端：场景内的名字牌与下方宠物卡重复，隐藏以留出空间 */
@media (max-width: 900px) {
  .pet-nameplate {
    display: none;
  }

  .pet-scene {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .pet-scene {
    min-height: 300px;
  }
}

/* 标题字重修正：中文大字号避免过度合成加粗 */
.pet-card-head h2 {
  font-weight: 750;
  font-size: clamp(24px, 3vw, 30px);
}

@media (max-width: 900px) {
  .home-greeting {
    margin-bottom: 14px;
  }

  .home-greeting h1 {
    font-size: 27px;
  }

  .home-greeting p {
    margin-top: 5px;
    font-size: 12px;
  }

  .pet-scene {
    min-height: 292px;
    padding: 16px 14px 14px;
  }

  .pet-tap {
    width: min(238px, 86%);
  }

  .pet-speech {
    max-width: 260px;
  }

  .pet-scene::before {
    width: 240px;
    height: 240px;
  }

  .pet-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .pet-scene {
    min-height: 278px;
  }

  .pet-tap {
    width: 220px;
  }
}

/* 中文标题不使用负字距，避免笔画重叠 */
.home-greeting h1,
.pet-card-head h2,
.today-head h2,
.learn-main-copy h2,
.page-intro h1 {
  letter-spacing: 0;
}

/* 宠物名字标题：使用系统中文字体，保证复杂汉字清晰 */
.pet-card-head h2 {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 30px);
  letter-spacing: 0.02em;
}

/* 输入框中的中文名使用较轻字重，避免笔画粘连 */
.form-line input,
.form-line select {
  font-weight: 600;
}

/* 宠物名字：28px 以上、适度字距，复杂汉字更清晰 */
.pet-card-head h2 {
  font-size: 28px;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .pet-card-head h2 {
    font-size: 28px;
  }
}

/* 宠物名字最终字重：28px / 600，笔画清爽 */
.pet-card-head h2 {
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.04em;
}

/* 宠物卡标题改为固定短语，宠物名单独一行展示 */
.pet-card-head h2 {
  font-family: inherit;
  font-weight: 750;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.pet-name-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 11px;
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--purple-soft);
}

.pet-name-line strong {
  font-weight: 850;
}

/* 移动端首屏更紧凑：优先露出宠物状态与喂食按钮 */
@media (max-width: 720px) {
  .pet-scene {
    min-height: 252px;
    padding: 13px 12px 11px;
  }

  .pet-tap {
    width: 205px;
  }

  .pet-speech {
    max-width: 242px;
    padding: 7px 11px;
    font-size: 10.5px;
  }

  .pet-card-head {
    align-items: center;
  }

  .pet-card-head > div > p:not(.pet-name-line) {
    display: none;
  }

  .pet-bars {
    margin-top: 16px;
  }

  .pet-actions {
    margin-top: 16px;
  }
}

@media (max-width: 480px) {
  .pet-scene {
    min-height: 240px;
  }

  .pet-tap {
    width: 195px;
  }
}

/* 引导页宠物预览在窄屏上收小，给表单留空间 */
@media (max-width: 720px) {
  .onboarding-pet {
    width: min(170px, 56%);
  }

  .onboarding-bubble {
    margin-top: 4px;
    padding: 7px 12px;
    font-size: 10.5px;
  }
}

/* 多宠物选择：窄屏更紧凑 */
@media (max-width: 640px) {
  .pet-choice-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-choice-grid-large .pet-choice-inner {
    min-height: 130px;
  }

  .pet-choice-grid-large .pet-choice-art {
    width: 82px;
    height: 82px;
  }
}

@media (max-width: 480px) {
  .pet-choice-inner {
    min-height: 62px;
    padding: 4px 8px 4px 3px;
  }

  .pet-choice-art {
    width: 50px;
    height: 50px;
  }

  .pet-choice-copy small {
    font-size: 8px;
  }

  .pet-switch-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .pet-switch-row > span {
    text-align: left;
  }
}

/* ---------- 课文跟读 ---------- */

.text-book {
  margin-bottom: 24px;
}

.text-unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}

.text-unit-card {
  display: block;
  padding: 16px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(90, 70, 160, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.text-unit-card:hover {
  transform: translateY(-2px);
  border-color: var(--unit-color);
  box-shadow: 0 12px 26px rgba(90, 70, 160, 0.12);
}

.text-unit-no {
  display: inline-block;
  padding: 3px 9px;
  color: var(--unit-color);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: var(--unit-soft);
}

.text-unit-card h3 {
  margin-top: 9px;
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.25;
}

.text-unit-zh {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
}

.text-unit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 700;
}

.text-unit-go {
  color: var(--unit-color);
}

.back-link {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.back-link:hover {
  color: var(--purple);
}

.text-unit-head {
  padding: 22px;
}

.text-unit-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-unit-badge {
  padding: 4px 11px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  border-radius: 999px;
  background: #efe9ff;
}

.text-unit-page {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

.text-unit-head h1 {
  margin-top: 10px;
  font-family: var(--font-en);
  font-size: 26px;
  line-height: 1.2;
}

.text-unit-sub {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.text-unit-task {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.text-rule {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #faf8ff;
}

.text-rule-label {
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.text-rule b {
  font-family: var(--font-en);
  font-size: 15px;
}

.text-rule small {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.text-word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.word-chip {
  padding: 6px 10px;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.word-chip:hover {
  color: var(--purple);
  border-color: var(--purple);
}

.text-audio-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.text-audio-note {
  color: var(--ink-soft);
  font-size: 12px;
}

.texts-zh-toggle {
  margin-top: 14px;
}

.text-part {
  margin-top: 16px;
  padding: 20px 22px;
}

.text-part-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.text-part-label {
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.text-part-head h2 {
  margin-top: 3px;
  font-family: var(--font-en);
  font-size: 20px;
}

.text-part-head p {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.text-part-head .btn {
  flex-shrink: 0;
}

.text-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  list-style: none;
}

.text-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.text-line:hover {
  background: #faf8ff;
}

.text-who {
  flex-shrink: 0;
  width: 74px;
  padding-top: 2px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 900;
}

.text-line-body {
  flex: 1;
  min-width: 0;
}

.text-en {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.text-zh {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.text-line-speak {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .text-unit-head {
    padding: 18px 16px;
  }

  .text-unit-head h1 {
    font-size: 22px;
  }

  .text-part {
    padding: 16px 14px;
  }

  .text-part-head {
    flex-direction: column;
  }

  .text-part-head .btn {
    width: 100%;
  }

  .text-line {
    padding: 8px 4px;
  }

  .text-who {
    width: 58px;
    font-size: 9.5px;
  }

  .text-en {
    font-size: 15px;
  }
}
