/* =========================================================
   斩词 · CET-4 — UI styles
   Warm paper, deep forest, lime ink, coral accents.
   ========================================================= */

:root {
  --bg: #f3f0e6;
  --bg-deep: #ebe6d8;
  --surface: #fffdf7;
  --surface-2: #faf7ee;
  --ink: #16382d;
  --ink-soft: #315246;
  --muted: #748078;
  --muted-2: #9aa39d;
  --line: #e6e0d2;
  --line-strong: #d6cfbd;
  --deep: #12382d;
  --deep-2: #0c2a21;
  --green: #1e5b46;
  --green-2: #2c7259;
  --lime: #ddf56f;
  --lime-2: #c9e94a;
  --lime-soft: #eef9c5;
  --coral: #f77867;
  --coral-soft: #ffe4de;
  --sky: #cfe9f7;
  --sky-deep: #9dd3ec;
  --yellow: #f6df9a;
  --lilac: #e3d8f5;
  --rose: #f7d6e3;
  --white: #ffffff;
  --shadow-sm: 0 4px 14px -8px rgba(18, 56, 45, .18);
  --shadow-md: 0 18px 45px -28px rgba(18, 56, 45, .38);
  --shadow-lg: 0 38px 90px -48px rgba(18, 56, 45, .5);
  --font-sans: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sidebar-w: 252px;
  --ease: cubic-bezier(.22, .7, .24, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
svg { display: block; }
::selection { background: var(--lime); color: var(--deep); }

:focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 3px;
  border-radius: 8px;
}

[hidden] { display: none !important; }

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

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    radial-gradient(320px 240px at 5% -4%, rgba(221, 245, 111, .16), transparent 70%),
    linear-gradient(175deg, var(--deep) 0%, var(--deep-2) 100%);
  color: #edf3e9;
  overflow: hidden;
  z-index: 20;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: radial-gradient(rgba(255, 255, 255, .45) .6px, transparent .7px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}
.sidebar > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  text-align: left;
  color: inherit;
  border-radius: 16px;
}
.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--lime);
  color: var(--deep);
  box-shadow: inset 0 -3px 0 rgba(18, 56, 45, .12);
  transform: rotate(-2deg);
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 12px; }
.brand-glyph {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-1px);
}
.brand-mark.small .brand-glyph { font-size: 20px; }
.brand-spark {
  position: absolute;
  top: -4px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--deep);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.5px;
}
.brand-copy small {
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(237, 243, 233, .52);
  white-space: nowrap;
}

.nav-eyebrow {
  margin: 10px 12px 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: rgba(237, 243, 233, .38);
}
.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(237, 243, 233, .66);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item:active { transform: scale(.985); }
.nav-item.is-active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--lime);
}
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; opacity: .9; }
.nav-icon svg { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-item.is-active .nav-icon { color: var(--lime); }
.nav-dot {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0;
}
.nav-item.is-active .nav-dot { opacity: 1; }
.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.sidebar-spacer { flex: 1; min-height: 12px; }

.side-streak-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(6px);
}
.side-streak-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(237, 243, 233, .7);
}
.side-streak-head b {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--lime);
  font-weight: 700;
}
.flame-icon { width: 15px; height: 15px; color: var(--coral); }
.flame-icon svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.side-streak-copy {
  margin: 9px 0 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(237, 243, 233, .5);
}
.side-goal-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: rgba(237, 243, 233, .5);
}
.side-goal-line b { color: #fff; font-size: 11.5px; }
.side-progress {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .35);
}
.side-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width .6s var(--ease);
}
.side-goal-edit {
  margin-top: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(237, 243, 233, .72);
  font-size: 11px;
  transition: color .2s;
}
.side-goal-edit:hover { color: var(--lime); }
.side-goal-edit span { color: var(--lime); }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 2px;
}
.mini-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--lime);
  color: var(--deep);
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
}
.sidebar-profile-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar-profile-copy b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-copy small { margin-top: 3px; color: rgba(237, 243, 233, .42); font-size: 10px; }
.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--muted);
  transition: background .18s, color .18s, transform .18s;
}
.icon-button:hover { background: rgba(18, 56, 45, .07); color: var(--ink); }
.icon-button:active { transform: scale(.94); }
.icon-button.ghost-light { margin-left: auto; color: rgba(237, 243, 233, .45); }
.icon-button.ghost-light:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.icon-button svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------
   Main / page foundations
   --------------------------------------------------------- */
.main-column { min-width: 0; display: flex; flex-direction: column; }
.mobile-header, .mobile-nav { display: none; }
.page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 38px 48px 80px;
  animation: page-in .42s var(--ease) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.boot-loading {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}
.boot-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--deep);
  color: var(--lime);
  font-family: var(--font-serif);
  font-size: 30px;
  animation: boot-pulse 1.4s ease-in-out infinite;
}
@keyframes boot-pulse { 50% { transform: translateY(-5px) rotate(-3deg); } }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -1.8px;
  font-weight: 750;
}
.page-heading h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 500; }
.page-heading p.sub {
  max-width: 540px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.streak-pill .icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--coral-soft); color: var(--coral); }
.streak-pill svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}
.section-head h2, .section-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.35px;
}
.section-head .tiny-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  transition: color .2s;
}
.section-head .tiny-link:hover { color: var(--ink); }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -.1px;
  line-height: 1;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { width: 17px; height: 17px; }
.btn-accent {
  background: var(--lime);
  color: var(--deep);
  box-shadow: 0 10px 25px -14px rgba(221, 245, 111, .8);
}
.btn-accent:hover { background: #e7ff85; box-shadow: 0 15px 30px -16px rgba(221, 245, 111, .95); }
.btn-dark { background: var(--deep); color: var(--surface); }
.btn-dark:hover { background: #17483a; box-shadow: 0 12px 25px -16px rgba(18, 56, 45, .7); }
.btn-soft { background: var(--bg-deep); color: var(--ink); }
.btn-soft:hover { background: #e5dfcf; }
.btn-outline { border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); }
.btn-outline:hover { border-color: var(--ink-soft); background: rgba(255, 255, 255, .45); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #ff8877; }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.btn-lg { min-height: 52px; padding: 0 25px; border-radius: 16px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; transform: none; }

.arrow-circle {
  width: 29px;
  height: 29px;
  margin-left: 2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(18, 56, 45, .12);
}
.btn-accent .arrow-circle { background: rgba(18, 56, 45, .11); }
.arrow-circle svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------
   Home hero
   --------------------------------------------------------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: stretch;
}
.hero-card {
  position: relative;
  min-height: 365px;
  padding: 32px 32px 30px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(420px 270px at 100% 0%, rgba(221, 245, 111, .18), transparent 65%),
    radial-gradient(280px 300px at 72% 112%, rgba(247, 120, 103, .15), transparent 65%),
    linear-gradient(145deg, #164334 0%, var(--deep) 55%, #0d2d23 100%);
  color: #f2f5e9;
  box-shadow: 0 35px 70px -45px rgba(12, 42, 33, .9);
  isolation: isolate;
}
.hero-card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -120px;
  border-radius: 50%;
  border: 1px solid rgba(221, 245, 111, .18);
  box-shadow: 0 0 0 40px rgba(221, 245, 111, .035), 0 0 0 80px rgba(221, 245, 111, .025);
  z-index: -1;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .13;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .7) .55px, transparent .65px);
  background-size: 9px 9px;
  mask-image: linear-gradient(110deg, transparent 15%, black 65%, transparent);
  z-index: -1;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 2.1px;
  color: rgba(242, 245, 233, .58);
  text-transform: uppercase;
}
.hero-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime);
}
.hero-card h2 {
  position: relative;
  max-width: 460px;
  margin: 18px 0 0;
  font-size: clamp(38px, 4.1vw, 57px);
  font-weight: 680;
  line-height: 1.03;
  letter-spacing: -2.6px;
}
.hero-card h2 .hero-num {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.18em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -.07em;
  color: var(--lime);
  transform: translateY(2px);
}
.hero-card h2 .hero-line { display: block; }
.hero-copy {
  max-width: 370px;
  margin: 16px 0 0;
  color: rgba(242, 245, 233, .62);
  font-size: 13px;
  line-height: 1.65;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .085);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(242, 245, 233, .72);
  font-size: 10.5px;
}
.hero-chip b { color: var(--lime); font-weight: 650; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-actions .btn-accent { min-width: 176px; }
.hero-card .btn-outline, .review-hero .btn-outline {
  color: rgba(242, 245, 233, .82);
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .035);
}
.hero-card .btn-outline:hover, .review-hero .btn-outline:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08);
}
.hero-orbit {
  position: absolute;
  right: 26px;
  top: 50%;
  width: 208px;
  height: 208px;
  transform: translateY(-52%);
  border-radius: 50%;
  border: 1px dashed rgba(221, 245, 111, .2);
  display: grid;
  place-items: center;
  z-index: 1;
}
.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px solid rgba(221, 245, 111, .12);
}
.orbit-ring {
  --p: 0;
  position: relative;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--p) * 1%), rgba(255, 255, 255, .095) 0);
  display: grid;
  place-items: center;
  transition: background .5s ease;
}
.orbit-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #123a2e;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, .18);
}
.orbit-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.orbit-center strong {
  font-family: var(--font-serif);
  font-size: 47px;
  font-weight: 500;
  letter-spacing: -2px;
  color: #f7f8ed;
}
.orbit-center strong small { font-size: 14px; color: rgba(242, 245, 233, .45); letter-spacing: 0; }
.orbit-center span {
  margin-top: 9px;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(221, 245, 111, .7);
  text-transform: uppercase;
}
.floating-word {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px 8px 8px;
  border-radius: 12px;
  background: #fffdf7;
  color: var(--deep);
  box-shadow: 0 13px 30px -18px rgba(0, 0, 0, .7);
  transform: rotate(-6deg);
}
.floating-word .f-emoji {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lime-soft);
  font-size: 17px;
}
.floating-word b { display: block; font-family: var(--font-serif); font-size: 13.5px; line-height: 1.1; }
.floating-word small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .4px; }
.floating-word.fw-one { top: 42px; right: 217px; }
.floating-word.fw-two { bottom: 40px; right: 58px; transform: rotate(4deg); }
.floating-word.fw-two .f-emoji { background: var(--sky); }

.daily-word-card {
  min-height: 365px;
  padding: 26px 25px 23px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(320px 220px at 100% 0%, rgba(221, 245, 111, .18), transparent 65%),
    var(--surface);
}
.daily-word-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.daily-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.daily-label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--coral); transform: rotate(45deg); }
.date-chip { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; }
.daily-art {
  position: relative;
  flex: 1;
  min-height: 140px;
  margin-top: 16px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--dw-a, #f7edb9), var(--dw-b, #e9d77f));
  isolation: isolate;
}
.daily-art::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .26);
  right: -60px;
  bottom: -90px;
}
.daily-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: radial-gradient(var(--dw-ink, #4c3c10) .7px, transparent .8px);
  background-size: 11px 11px;
  mask-image: linear-gradient(140deg, black, transparent 70%);
}
.daily-emoji {
  position: relative;
  z-index: 1;
  font-size: 78px;
  line-height: 1;
  filter: drop-shadow(0 18px 18px rgba(38, 36, 15, .18));
  transform: translateY(-2px) rotate(-4deg);
}
.daily-letter {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 106px;
  font-weight: 500;
  line-height: 1;
  color: var(--dw-ink, #4c3c10);
  opacity: .78;
}
.daily-word-info { padding-top: 17px; }
.daily-word-line { display: flex; align-items: baseline; gap: 10px; }
.daily-word-info h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -1.3px;
  line-height: 1.1;
}
.daily-phon { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.daily-meaning { margin: 7px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.daily-word-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}
.audio-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
}
.audio-link .icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--lime-soft); color: var(--green); transition: transform .2s; }
.audio-link:hover .icon { transform: scale(1.08); }
.audio-link svg { width: 14px; height: 14px; }
.daily-open {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: background .2s, transform .2s;
}
.daily-open:hover { background: var(--bg-deep); transform: translate(1px, -1px); }
.daily-open svg { width: 14px; height: 14px; }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.stat-card {
  position: relative;
  min-height: 116px;
  padding: 18px 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  right: -25px;
  bottom: -31px;
  border-radius: 50%;
  background: var(--stat-tint, var(--lime-soft));
  opacity: .8;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--stat-tint, var(--lime-soft));
  color: var(--stat-ink, var(--green));
}
.stat-icon svg { width: 16px; height: 16px; }
.stat-label { color: var(--muted); font-size: 10.5px; font-weight: 550; }
.stat-value { margin-top: 14px; display: flex; align-items: baseline; gap: 5px; line-height: 1; }
.stat-value strong {
  font-family: var(--font-serif);
  font-size: 33px;
  font-weight: 500;
  letter-spacing: -1.3px;
}
.stat-value span { color: var(--muted); font-size: 10.5px; }
.stat-note { margin-top: 7px; color: var(--muted-2); font-size: 10px; }

/* Weekly + shortcuts */
.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(290px, .78fr);
  gap: 18px;
  margin-top: 18px;
}
.week-card { padding: 23px 24px 20px; }
.week-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.week-card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.35px; }
.week-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.week-total { text-align: right; line-height: 1; }
.week-total strong { display: block; font-family: var(--font-serif); font-size: 29px; font-weight: 500; letter-spacing: -1px; }
.week-total span { color: var(--muted); font-size: 9.5px; }
.week-chart {
  position: relative;
  height: 154px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: end;
  padding: 0 4px;
}
.week-chart::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 42%;
  border-top: 1px dashed var(--line);
  z-index: 0;
}
.week-empty-note {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 90%;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 253, 247, .8);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .1px;
  pointer-events: none;
}
.chart-col { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.chart-value { font-size: 9px; color: var(--muted); font-family: var(--font-mono); opacity: 0; transition: opacity .2s; }
.chart-col:hover .chart-value { opacity: 1; }
.chart-bar-wrap { width: 100%; height: 108px; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
  width: min(23px, 62%);
  min-height: 6px;
  border-radius: 7px 7px 4px 4px;
  background: #e7e2d4;
  transition: height .7s var(--ease), background .2s;
}
.chart-col.is-today .chart-bar { background: var(--green); box-shadow: 0 5px 12px -8px rgba(18, 56, 45, .65); }
.chart-col.is-today .chart-val-label { color: var(--ink); font-weight: 700; }
.chart-val-label { font-size: 9.5px; color: var(--muted-2); }
.chart-col.is-today .chart-val-label::after { content: " · 今天"; color: var(--green); }

.quick-card { padding: 20px 12px 12px; }
.quick-card .section-head { padding: 0 11px; margin-bottom: 3px; }
.quick-list { display: flex; flex-direction: column; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 11px;
  border-radius: 14px;
  text-align: left;
  transition: background .2s, transform .2s;
}
.quick-item:hover { background: var(--surface-2); transform: translateX(2px); }
.quick-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex: 0 0 auto;
}
.quick-icon svg { width: 18px; height: 18px; }
.quick-icon.tint-lime { background: var(--lime-soft); color: var(--green); }
.quick-icon.tint-sky { background: var(--sky); color: #1d5b77; }
.quick-icon.tint-rose { background: var(--rose); color: #8c3555; }
.quick-copy { min-width: 0; flex: 1; }
.quick-copy b { display: block; font-size: 12px; font-weight: 650; }
.quick-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-arrow { color: var(--muted-2); transition: transform .2s, color .2s; }
.quick-item:hover .quick-arrow { transform: translate(2px, -2px); color: var(--ink); }
.quick-arrow svg { width: 15px; height: 15px; }

.recent-strip {
  margin-top: 18px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  background: rgba(255, 253, 247, .55);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}
.recent-strip > span { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .3px; }
.recent-words { display: flex; gap: 7px; flex-wrap: wrap; }
.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--ink-soft);
  transition: border-color .18s, transform .18s;
}
.recent-chip:hover { border-color: var(--green-2); transform: translateY(-1px); }
.recent-chip .dot { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-deep); font-size: 9px; }

/* ---------------------------------------------------------
   Exam plan
   --------------------------------------------------------- */
.exam-strip {
  width: 100%;
  margin: -6px 0 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ddd3a9;
  border-radius: 17px;
  background:
    radial-gradient(220px 90px at 100% 0%, rgba(255, 255, 255, .55), transparent 70%),
    linear-gradient(115deg, #fbf4cf, #f0e8c5);
  text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s;
}
.exam-strip:hover { transform: translateY(-1px); border-color: #cfc18a; box-shadow: var(--shadow-sm); }
.exam-strip.is-cta { background: linear-gradient(115deg, #eaf7cd, #dff0ae); border-color: #cadb9a; }
.exam-strip-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--deep);
  color: var(--lime);
}
.exam-strip-icon svg { width: 18px; height: 18px; }
.exam-strip-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exam-strip-copy b { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.exam-strip-copy small { font-size: 10px; color: #7f744e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-strip-go { display: inline-flex; align-items: center; gap: 5px; color: #8b7b45; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.exam-strip-go svg { width: 13px; height: 13px; }

.plan-hero {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 30px;
  border-radius: 28px;
  background:
    radial-gradient(420px 250px at 96% -10%, rgba(221, 245, 111, .18), transparent 65%),
    linear-gradient(145deg, #174438, var(--deep));
  color: #f2f5ea;
  box-shadow: var(--shadow-lg);
}
.plan-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image: radial-gradient(rgba(255, 255, 255, .8) .6px, transparent .7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(110deg, transparent, black 65%);
  pointer-events: none;
}
.plan-hero-copy { position: relative; z-index: 1; }
.plan-hero .hero-kicker { color: rgba(242, 245, 233, .52); }
.plan-countdown { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; line-height: .9; }
.plan-countdown strong {
  font-family: var(--font-serif);
  font-size: clamp(65px, 8vw, 94px);
  font-weight: 500;
  letter-spacing: -5px;
  color: var(--lime);
}
.plan-countdown span { font-size: 15px; color: rgba(242, 245, 233, .55); }
.plan-hero-copy > p { margin: 9px 0 20px; color: rgba(242, 245, 233, .52); font-size: 10.5px; }
.plan-progress-meta { display: flex; justify-content: space-between; max-width: 430px; color: rgba(242, 245, 233, .48); font-size: 9px; }
.plan-progress-meta b { color: rgba(242, 245, 233, .8); font-family: var(--font-mono); font-weight: 500; }
.plan-progress { max-width: 430px; height: 6px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.plan-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime); transition: width .7s var(--ease); }
.plan-ring {
  --p: 0;
  position: relative;
  z-index: 1;
  width: 164px;
  height: 164px;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0);
  display: grid;
  place-items: center;
}
.plan-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #143b2f; }
.plan-ring > div { position: relative; z-index: 1; text-align: center; line-height: 1; }
.plan-ring strong { display: block; font-family: var(--font-serif); font-size: 45px; font-weight: 500; letter-spacing: -2px; }
.plan-ring span { display: block; margin-top: 7px; color: rgba(242, 245, 233, .48); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }

.plan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.plan-stat { display: flex; align-items: center; gap: 12px; padding: 15px 17px; }
.plan-stat-icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: var(--lime-soft); color: var(--green); }
.plan-stat-icon svg { width: 17px; height: 17px; }
.plan-stat > div { display: flex; flex-direction: column; gap: 2px; }
.plan-stat b { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1; letter-spacing: -.6px; }
.plan-stat span { color: var(--muted); font-size: 9px; }

.today-task {
  position: relative;
  margin-top: 16px;
  padding: 22px 24px;
  overflow: hidden;
  border-color: #dcd9c1;
  background:
    radial-gradient(280px 150px at 100% 0%, rgba(221, 245, 111, .15), transparent 70%),
    var(--surface);
}
.today-task::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: var(--coral); }
.today-task-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.today-label { color: var(--coral); font-family: var(--font-mono); font-size: 9px; font-weight: 650; letter-spacing: .7px; }
.today-kind { padding: 4px 7px; border-radius: 5px; background: var(--bg); color: var(--muted); font-size: 8.5px; }
.today-task-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 11px; }
.today-task h2 { margin: 0; font-size: clamp(22px, 2.4vw, 29px); font-weight: 700; letter-spacing: -1px; }
.today-task-main p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; }
.today-count { flex: 0 0 auto; font-family: var(--font-mono); color: var(--muted); }
.today-count strong { font-family: var(--font-serif); font-size: 26px; font-weight: 500; color: var(--ink); }
.today-count span { font-size: 9px; }
.task-progress { height: 6px; margin-top: 15px; overflow: hidden; border-radius: 99px; background: var(--bg-deep); }
.task-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-2)); transition: width .6s var(--ease); }
.today-task-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.task-complete { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; color: var(--green); font-size: 11px; font-weight: 650; }
.task-complete svg { width: 14px; height: 14px; }

.plan-list { margin-top: 16px; padding: 21px 22px 8px; }
.plan-list .section-head { margin-bottom: 12px; }
.plan-list-sub { margin: 4px 0 0; color: var(--muted); font-size: 9.5px; }
.plan-list .tiny-link svg { width: 13px; height: 13px; }
.plan-rows { display: flex; flex-direction: column; }
.plan-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 9px 2px;
  border-top: 1px solid var(--line);
}
.plan-day { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--muted-2); }
.plan-day span { font-size: 7px; letter-spacing: 1px; }
.plan-day b { margin-top: 4px; font-family: var(--font-serif); font-size: 20px; font-weight: 500; letter-spacing: -.5px; color: var(--ink-soft); }
.plan-row-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-row-copy b { font-size: 11.5px; font-weight: 600; }
.plan-row-copy small { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-status { padding: 4px 7px; border-radius: 5px; background: var(--bg); color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.plan-row.done .plan-status { background: var(--lime-soft); color: var(--green); }
.plan-row.done .plan-row-copy b { color: var(--muted); }
.plan-row.today { margin: 2px -10px; padding: 10px 12px; border: 1px solid #dce6b8; border-radius: 12px; background: #fcfdf3; }
.plan-row.today .plan-status { background: var(--yellow); color: #6f5b23; }
.plan-row.missed .plan-status { background: var(--coral-soft); color: #a34b3c; }
.plan-row-btn { padding: 6px 10px; border-radius: 8px; background: var(--deep); color: var(--surface); font-size: 9px; font-weight: 600; }
.plan-row-btn:hover { background: var(--green); }

.plan-empty {
  max-width: 640px;
  margin: 30px auto;
  padding: 40px 34px;
  text-align: center;
  background:
    radial-gradient(360px 220px at 100% 0%, rgba(221, 245, 111, .18), transparent 70%),
    var(--surface);
}
.plan-empty-icon { width: 66px; height: 66px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 20px; background: var(--deep); color: var(--lime); transform: rotate(-3deg); }
.plan-empty-icon svg { width: 30px; height: 30px; }
.plan-empty h2 { margin: 7px 0 8px; font-size: 28px; letter-spacing: -1px; }
.plan-empty > p:not(.eyebrow) { max-width: 410px; margin: 0 auto 18px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.plan-empty-chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 23px; }
.plan-empty-chips span { padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 9px; }
.plan-empty small { display: block; margin-top: 13px; color: var(--muted-2); font-size: 9px; }

/* Exam modal */
.exam-modal { width: min(440px, 100%); padding-bottom: 23px; }
.exam-modal-head { padding: 27px 27px 0; text-align: center; }
.exam-modal-icon { width: 54px; height: 54px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 16px; background: var(--deep); color: var(--lime); transform: rotate(-3deg); }
.exam-modal-icon svg { width: 25px; height: 25px; }
.exam-modal-head .eyebrow { margin-bottom: 7px; color: var(--green-2); }
.exam-modal-head h3 { margin: 0; font-size: 23px; letter-spacing: -.8px; font-weight: 720; }
.exam-modal-head > p:last-child { margin: 7px auto 0; max-width: 300px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.exam-input-row { display: flex; align-items: baseline; justify-content: center; gap: 7px; margin: 20px 27px 13px; }
.exam-input { width: 125px; height: 66px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface-2); text-align: center; font-family: var(--font-serif); font-size: 36px; color: var(--ink); outline: none; }
.exam-input:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(44, 114, 89, .1); }
.exam-input-row > span { color: var(--muted); font-size: 12px; }
.exam-presets { display: flex; justify-content: center; gap: 6px; padding: 0 27px; flex-wrap: wrap; }
.exam-modal-hint { margin: 15px 27px 17px; text-align: center; color: var(--muted); font-size: 9.5px; }
.exam-actions { padding: 0 27px; }
.exam-actions .btn { flex: 1; }
.exam-actions svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------
   Study / session
   --------------------------------------------------------- */
body.is-study { background: var(--bg); }
body.is-study .app-shell { display: block; }
body.is-study .sidebar,
body.is-study .mobile-header,
body.is-study .mobile-nav { display: none; }
body.is-study .main-column { display: block; }
body.is-study .page {
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  animation: none;
  display: flex;
  flex-direction: column;
}

.study-page {
  width: 100%;
  flex: 1;
  min-height: 0;
  padding: 20px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(700px 420px at 10% -10%, rgba(221, 245, 111, .16), transparent 65%),
    radial-gradient(600px 420px at 100% 100%, rgba(207, 233, 247, .28), transparent 66%),
    var(--bg);
}
.study-topbar {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.study-exit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  transition: background .2s, color .2s;
}
.study-exit:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.study-exit .icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.study-exit svg { width: 14px; height: 14px; }
.study-progress-wrap { flex: 1; display: flex; align-items: center; gap: 13px; max-width: 520px; margin: 0 auto; }
.study-progress-track { flex: 1; height: 7px; border-radius: 99px; background: rgba(18, 56, 45, .1); overflow: hidden; }
.study-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2));
  transition: width .5s var(--ease);
}
.study-progress-count { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.study-progress-count b { color: var(--ink); font-size: 11.5px; }
.study-xp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, .76);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.study-xp svg { width: 13px; height: 13px; color: var(--coral); fill: var(--coral); stroke: none; }

.study-card {
  width: 100%;
  max-width: 1240px;
  flex: 0 1 830px;
  min-height: 0;
  max-height: 830px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(350px, .82fr) minmax(480px, 1.18fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: study-card-in .45s var(--ease) both;
}
@keyframes study-card-in { from { opacity: 0; transform: translateY(10px) scale(.992); } }

.study-art {
  position: relative;
  min-height: 560px;
  padding: 25px 25px 23px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: linear-gradient(150deg, var(--art-a, #f7edb9), var(--art-b, #e9d77f));
  isolation: isolate;
}
.study-art::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--art-ink, #4c3c10) 15%, transparent);
  right: -130px;
  top: 22%;
  box-shadow: 0 0 0 45px color-mix(in srgb, var(--art-ink, #4c3c10) 2.8%, transparent), 0 0 0 90px color-mix(in srgb, var(--art-ink, #4c3c10) 2%, transparent);
  z-index: -1;
}
.study-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--art-ink, #4c3c10) 48%, transparent) .7px, transparent .8px);
  background-size: 12px 12px;
  mask-image: linear-gradient(145deg, black 5%, transparent 70%);
  z-index: -1;
}
.art-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.art-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  color: color-mix(in srgb, var(--art-ink, #4c3c10) 78%, #000 22%);
  backdrop-filter: blur(5px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}
.art-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .65; }
.art-category { color: color-mix(in srgb, var(--art-ink, #4c3c10) 55%, transparent); font-size: 9px; letter-spacing: 1.25px; text-transform: uppercase; }

.art-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 10px;
}
.art-emoji {
  font-size: clamp(120px, 13vw, 178px);
  line-height: .95;
  filter: drop-shadow(0 24px 28px rgba(49, 45, 15, .19));
  transform: rotate(-4deg);
  animation: emoji-float 6s ease-in-out infinite;
}
@keyframes emoji-float { 50% { transform: translateY(-7px) rotate(-1deg); } }
.art-letter {
  font-family: var(--font-serif);
  font-size: clamp(150px, 17vw, 210px);
  font-weight: 500;
  line-height: .8;
  letter-spacing: -.08em;
  color: color-mix(in srgb, var(--art-ink, #4c3c10) 72%, transparent);
  text-shadow: 0 22px 35px rgba(49, 45, 15, .1);
  animation: emoji-float 7s ease-in-out infinite;
}
.art-caption { max-width: 250px; color: color-mix(in srgb, var(--art-ink, #4c3c10) 60%, transparent); font-size: 10.5px; line-height: 1.55; letter-spacing: .2px; }
.art-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.art-cue-label { display: flex; flex-direction: column; gap: 5px; color: color-mix(in srgb, var(--art-ink, #4c3c10) 56%, transparent); font-size: 8.5px; letter-spacing: 1.55px; text-transform: uppercase; }
.art-cue-label b { color: color-mix(in srgb, var(--art-ink, #4c3c10) 78%, #000 22%); font-size: 10px; letter-spacing: .1px; font-weight: 550; text-transform: none; }
.art-audio {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--art-ink, #4c3c10) 88%, #000 12%);
  color: var(--surface);
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .6);
  transition: transform .18s var(--ease), background .18s;
}
.art-audio:hover { transform: scale(1.06); }
.art-audio:active { transform: scale(.96); }
.art-audio svg { width: 19px; height: 19px; }
.art-audio.is-speaking svg { animation: audio-bounce .6s ease-in-out infinite; }
@keyframes audio-bounce { 50% { transform: scale(1.18); } }

.listen-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
}
.listen-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 185px;
  height: 185px;
  transform: translate(-50%, -54%);
  border: 1px dashed color-mix(in srgb, var(--art-ink, #4c3c10) 28%, transparent);
  border-radius: 50%;
}
.listen-rings::before, .listen-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--art-ink, #4c3c10) 12%, transparent);
}
.listen-rings::before { inset: 22px; }
.listen-rings::after { inset: 44px; }
.listen-big {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--art-ink, #4c3c10) 88%, #000 12%);
  color: var(--surface);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .7), 0 0 0 9px rgba(255, 255, 255, .2);
  transition: transform .2s var(--ease);
}
.listen-big:hover { transform: scale(1.05); }
.listen-big:active { transform: scale(.96); }
.listen-big svg { width: 35px; height: 35px; }
.listen-big.is-speaking svg { animation: audio-bounce .6s ease-in-out infinite; }
.listen-wave {
  position: relative;
  z-index: 1;
  height: 23px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.listen-wave i { display: block; width: 3px; height: 9px; border-radius: 3px; background: color-mix(in srgb, var(--art-ink, #4c3c10) 45%, transparent); }
.listen-wave i:nth-child(2), .listen-wave i:nth-child(6) { height: 16px; }
.listen-wave i:nth-child(3), .listen-wave i:nth-child(5) { height: 22px; }
.listen-wave i:nth-child(4) { height: 12px; }
.listen-label {
  position: relative;
  z-index: 1;
  color: color-mix(in srgb, var(--art-ink, #4c3c10) 55%, transparent);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 2.1px;
}
.listening-hint {
  margin-top: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 11px;
}
.recent-empty { color: var(--muted-2); font-size: 10.5px; }

.study-body {
  padding: 30px 38px 28px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - 112px);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.study-body-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.study-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--lime-soft);
  color: var(--green);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.study-tag.review { background: var(--sky); color: #1e617f; }
.study-tag.retry { background: var(--coral-soft); color: #a13e30; }
.study-tag.hf { background: #fff0c2; color: #89601b; }
.study-tag.foundation { background: #e2f0ff; color: #316686; }
.study-card-no { color: var(--muted-2); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .5px; }
.study-word-block { padding-top: 24px; }
.study-word {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(43px, 4.8vw, 63px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -2.2px;
  overflow-wrap: anywhere;
}
.study-word.is-hidden { filter: blur(11px); opacity: .36; user-select: none; }
.study-phon-row { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.study-phon { color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1px; }
.study-pos { padding: 3px 6px; border-radius: 5px; background: var(--bg-deep); color: var(--muted); font-size: 8.5px; font-weight: 600; }
.study-small-audio {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--ink-soft);
  transition: background .2s, transform .2s;
}
.study-small-audio:hover { background: var(--lime-soft); transform: scale(1.05); }
.study-small-audio svg { width: 13px; height: 13px; }
.study-meaning-display {
  margin: 2px 0 0;
  font-size: clamp(27px, 3.1vw, 39px);
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: -1px;
}
.study-meaning-small { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.study-question-title {
  margin: 27px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}
.study-question-title::before { content: ""; width: 15px; height: 1px; background: var(--line-strong); }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option {
  position: relative;
  width: 100%;
  min-height: 54px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fffef9;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.option:hover:not(:disabled) {
  border-color: #a8bfa9;
  background: #fffdf5;
  transform: translateX(2px);
  box-shadow: 0 8px 18px -16px rgba(18, 56, 45, .4);
}
.option-key {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  transition: background .16s, color .16s, border-color .16s;
}
.option:hover:not(:disabled) .option-key { background: var(--lime-soft); border-color: var(--lime); color: var(--green); }
.option-text { flex: 1; min-width: 0; }
.option-mark { width: 19px; height: 19px; display: none; place-items: center; border-radius: 50%; color: #fff; flex: 0 0 auto; }
.option-mark svg { width: 11px; height: 11px; stroke-width: 3; }
.option.correct { border-color: #75b85e; background: #eef8e7; color: #245335; }
.option.correct .option-key { border-color: #75b85e; background: #75b85e; color: #fff; }
.option.correct .option-mark { display: grid; background: #5eaa48; }
.option.wrong { border-color: #e88574; background: #fff0eb; color: #8c382c; }
.option.wrong .option-key { border-color: #e88574; background: #e88574; color: #fff; }
.option.wrong .option-mark { display: grid; background: #d96451; }
.option.is-dim { opacity: .5; }
.option:disabled { cursor: default; }

.answer-summary { display: flex; flex-direction: column; gap: 6px; }
.answer-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 11.5px;
}
.answer-line.wrong { background: #fff0eb; border: 1px solid #f2c5bb; color: #8c382c; }
.answer-line.correct { background: #eef8e7; border: 1px solid #c4dfb5; color: #245335; }
.answer-mark { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 auto; color: #fff; }
.answer-line.wrong .answer-mark { background: #d96451; }
.answer-line.correct .answer-mark { background: #5eaa48; }
.answer-mark svg { width: 10px; height: 10px; stroke-width: 3; }
.answer-label { color: inherit; opacity: .68; }
.answer-line b { margin-left: auto; text-align: right; font-weight: 650; font-size: 12px; }

.spell-area { margin-top: 2px; }
.spell-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 17px;
  border: 1.5px solid var(--line-strong);
  border-radius: 15px;
  background: #fffef9;
  transition: border-color .2s, box-shadow .2s;
}
.spell-input-wrap:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(44, 114, 89, .1); }
.spell-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 27px;
  letter-spacing: .5px;
  color: var(--ink);
}
.spell-input::placeholder { color: var(--muted-2); font-family: var(--font-sans); font-size: 12px; letter-spacing: 0; }
.spell-submit { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--deep); color: var(--surface); font-size: 12px; font-weight: 600; }
.spell-hint { margin-top: 9px; color: var(--muted); font-size: 10.5px; display: flex; align-items: center; gap: 7px; }
.spell-hint b { font-family: var(--font-mono); color: var(--ink-soft); letter-spacing: 1px; }
.spell-row { display: flex; gap: 8px; }
.spell-correct-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; background: #eef8e7; color: #357344; font-size: 9px; }

.answer-panel {
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  animation: answer-in .32s var(--ease) both;
}
@keyframes answer-in { from { opacity: 0; transform: translateY(8px); } }
.feedback-line { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.feedback-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 auto; }
.feedback-icon svg { width: 14px; height: 14px; stroke-width: 2.4; }
.answer-panel.ok .feedback-icon { background: #e2f3d5; color: #3d8433; }
.answer-panel.no .feedback-icon { background: var(--coral-soft); color: #bd4c3b; }
.feedback-line b { font-size: 13px; font-weight: 700; }
.feedback-line span { margin-left: auto; color: var(--muted); font-size: 10px; }
.reveal-word-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.reveal-word { font-family: var(--font-serif); font-size: 25px; font-weight: 500; letter-spacing: -.6px; }
.reveal-phon { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; }
.reveal-meaning { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.detail-grid { display: flex; flex-direction: column; gap: 9px; margin-top: 13px; }
.detail-example {
  position: relative;
  width: 100%;
  display: block;
  padding: 12px 52px 12px 13px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.detail-example:hover {
  background: #fffdf3;
  border-color: #d8c792;
  transform: translateY(-1px);
}
.detail-example .en { display: block; margin: 0; font-family: var(--font-serif); font-size: 13px; line-height: 1.5; color: var(--ink); }
.detail-example .zh { display: block; margin: 3px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.example-audio {
  position: absolute;
  top: 11px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-size: 8.5px;
  font-weight: 600;
  opacity: .72;
  transition: opacity .18s;
}
.example-audio svg { width: 12px; height: 12px; }
.detail-example:hover .example-audio, .modal-example:hover .example-audio { opacity: 1; }
.detail-example.is-speaking .example-audio svg, .modal-example.is-speaking .example-audio svg { animation: audio-bounce .6s ease-in-out infinite; }
.detail-tip {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fcf6dd;
  border: 1px solid #efe4bb;
  color: #6d5c2f;
  font-size: 10.5px;
  line-height: 1.55;
}
.detail-tip .tip-icon { flex: 0 0 auto; width: 17px; height: 17px; color: #a8872b; }
.detail-tip .tip-icon svg { width: 17px; height: 17px; }
.phrase-list { display: flex; flex-wrap: wrap; gap: 5px; }
.phrase-chip {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
}
.answer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding-top: 4px;
}
.answer-actions .btn-next { flex: 1; }
.answer-actions .icon-button { border: 1px solid var(--line); background: var(--surface); }
.answer-actions .icon-button.is-favorite { color: #d77c22; background: #fff6e3; border-color: #efd8ad; }
.answer-actions .icon-button.is-favorite svg { fill: currentColor; }
.keyboard-hint { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; display: flex; gap: 12px; flex-wrap: wrap; }
.study-body-foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: .35px;
}
.study-body-foot span { display: inline-flex; align-items: center; gap: 5px; }
.study-body-foot svg { width: 11px; height: 11px; color: var(--green-2); }
.keyboard-hint kbd {
  display: inline-block;
  min-width: 17px;
  margin-right: 3px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: center;
}

/* Session summary */
.summary-page {
  width: 100%;
  max-width: 760px;
  margin: auto;
  padding: 40px 20px 50px;
  flex: 0 0 auto;
  text-align: center;
  animation: summary-in .5s var(--ease) both;
}
@keyframes summary-in { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.summary-badge {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--deep);
  box-shadow: 0 0 0 13px rgba(221, 245, 111, .22), 0 26px 50px -30px rgba(18, 56, 45, .55);
  transform: rotate(-4deg);
}
.summary-badge::before, .summary-badge::after {
  content: "✦";
  position: absolute;
  color: var(--coral);
  font-size: 22px;
}
.summary-badge::before { top: -17px; left: 12px; transform: rotate(10deg); }
.summary-badge::after { bottom: -12px; right: 3px; color: var(--sky-deep); font-size: 16px; }
.summary-badge .glyph { font-family: var(--font-serif); font-size: 61px; font-weight: 800; line-height: 1; }
.summary-eyebrow { margin: 0; color: var(--muted); font-size: 9.5px; font-weight: 750; letter-spacing: 2.3px; text-transform: uppercase; }
.summary-page h1 {
  margin: 10px 0 8px;
  font-size: clamp(35px, 5.3vw, 53px);
  letter-spacing: -2.5px;
  line-height: 1.06;
  font-weight: 720;
}
.summary-page h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 500; }
.summary-subtitle { margin: 0 auto; max-width: 440px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
}
.summary-stat {
  padding: 18px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.summary-stat strong { display: block; font-family: var(--font-serif); font-size: 35px; font-weight: 500; letter-spacing: -1.4px; line-height: 1; }
.summary-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.summary-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.summary-note { margin-top: 18px; color: var(--muted-2); font-size: 9.5px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i {
  position: absolute;
  top: -18px;
  width: 7px;
  height: 13px;
  border-radius: 2px;
  opacity: .9;
  animation: confetti-fall var(--dur, 3s) linear var(--delay, 0s) both;
}
@keyframes confetti-fall {
  to { transform: translate3d(var(--drift, 0px), 110vh, 0) rotate(760deg); opacity: .1; }
}

/* ---------------------------------------------------------
   Review page
   --------------------------------------------------------- */
.review-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: 24px;
  padding: 32px 34px;
  border-radius: 28px;
  background:
    radial-gradient(420px 250px at 100% 0%, rgba(207, 233, 247, .22), transparent 65%),
    linear-gradient(140deg, #173f34, var(--deep));
  color: #f3f5eb;
  box-shadow: var(--shadow-lg);
}
.review-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(rgba(255, 255, 255, .7) .6px, transparent .7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(120deg, transparent, black);
  pointer-events: none;
}
.review-hero-copy { position: relative; z-index: 1; }
.review-hero .hero-kicker { color: rgba(243, 245, 235, .55); }
.review-hero h2 { margin: 16px 0 0; font-size: clamp(32px, 4vw, 49px); line-height: 1.04; letter-spacing: -2px; font-weight: 650; }
.review-hero h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--lime); }
.review-hero p { max-width: 340px; margin: 14px 0 0; color: rgba(243, 245, 235, .6); font-size: 12px; line-height: 1.65; }
.review-hero .hero-actions { margin-top: 22px; }
.review-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.due-dial {
  position: relative;
  width: 198px;
  height: 198px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed rgba(221, 245, 111, .22);
}
.due-dial::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #1e5945, #11362b);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, .25);
}
.due-dial-inner { position: relative; z-index: 1; text-align: center; line-height: 1; }
.due-dial-inner strong { display: block; font-family: var(--font-serif); font-size: 67px; font-weight: 500; letter-spacing: -3px; color: var(--lime); }
.due-dial-inner span { display: block; margin-top: 8px; color: rgba(243, 245, 235, .5); font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; }
.due-orbit-dot {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(247, 120, 103, .12);
}
.due-orbit-dot.two { top: auto; left: 19px; bottom: 42px; background: var(--lime); width: 5px; height: 5px; }

.review-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.review-stat { padding: 19px 20px; display: flex; align-items: center; gap: 14px; }
.review-stat-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 13px; flex: 0 0 auto; }
.review-stat-icon svg { width: 19px; height: 19px; }
.review-stat-copy { min-width: 0; }
.review-stat-copy b { display: block; font-family: var(--font-serif); font-size: 27px; font-weight: 500; line-height: 1; letter-spacing: -.8px; }
.review-stat-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.review-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 18px;
  margin-top: 18px;
}
.curve-card { padding: 24px; }
.curve-card .section-head { margin-bottom: 21px; }
.memory-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  padding-top: 17px;
}
.memory-stages::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 9%;
  right: 9%;
  border-top: 1px dashed var(--line-strong);
}
.memory-stage { position: relative; z-index: 1; text-align: center; }
.memory-dot { width: 17px; height: 17px; margin: 0 auto 9px; border-radius: 50%; border: 4px solid var(--surface); background: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong); }
.memory-stage.is-done .memory-dot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.memory-stage.is-today .memory-dot { background: var(--coral); box-shadow: 0 0 0 1px var(--coral), 0 0 0 6px var(--coral-soft); }
.memory-stage b { display: block; font-size: 11px; font-weight: 650; }
.memory-stage span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.memory-caption { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.memory-caption b { color: var(--ink-soft); }
.review-side { padding: 22px 20px; display: flex; flex-direction: column; }
.review-side h3 { margin: 0; font-size: 15px; letter-spacing: -.3px; }
.review-side p { margin: 5px 0 16px; color: var(--muted); font-size: 10.5px; }
.weak-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 13px; }
.weak-item { display: flex; align-items: center; gap: 9px; padding: 8px 7px; border-radius: 10px; text-align: left; transition: background .18s; }
.weak-item:hover { background: var(--surface-2); }
.weak-emoji { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-deep); font-size: 15px; flex: 0 0 auto; }
.weak-copy { flex: 1; min-width: 0; }
.weak-copy b { display: block; font-family: var(--font-serif); font-size: 13px; font-weight: 500; }
.weak-copy small { display: block; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak-wrong { color: var(--coral); font-family: var(--font-mono); font-size: 9px; }
.empty-mini { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 10.5px; border: 1px dashed var(--line); border-radius: 12px; }
.review-side .btn { margin-top: auto; }

/* ---------------------------------------------------------
   Library
   --------------------------------------------------------- */
.library-toolbar { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.search-row { display: flex; align-items: center; gap: 10px; }
.search-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--green-2); background: var(--surface); box-shadow: 0 0 0 4px rgba(44, 114, 89, .08); }
.search-box .search-icon { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-box input::placeholder { color: var(--muted-2); }
.clear-search { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.clear-search:hover { background: var(--bg); }
.clear-search svg { width: 13px; height: 13px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { color: var(--muted-2); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; margin-right: 2px; }
.filter-chip {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 550;
  transition: background .18s, color .18s, border-color .18s;
}
.filter-chip:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.filter-chip.is-active { background: var(--deep); border-color: var(--deep); color: var(--surface); }
.letter-strip { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.letter-chip {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  transition: background .15s, color .15s;
}
.letter-chip:hover { background: var(--bg-deep); color: var(--ink); }
.letter-chip.is-active { background: var(--lime); color: var(--deep); font-weight: 700; }
.letter-chip:disabled { opacity: .28; }

.library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 10px;
  color: var(--muted);
  font-size: 10.5px;
}
.library-meta b { color: var(--ink); font-weight: 650; }
.library-meta .meta-right { display: flex; gap: 7px; align-items: center; }
.library-meta .mini-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

.word-table { overflow: hidden; }
.word-table-head {
  display: grid;
  grid-template-columns: minmax(185px, 1.05fr) minmax(280px, 1.9fr) 92px 42px;
  align-items: center;
  gap: 14px;
  padding: 12px 19px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.word-rows { display: flex; flex-direction: column; }
.word-row {
  display: grid;
  grid-template-columns: minmax(185px, 1.05fr) minmax(280px, 1.9fr) 92px 42px;
  align-items: center;
  gap: 14px;
  padding: 10px 19px;
  border-bottom: 1px solid rgba(230, 224, 210, .65);
  cursor: pointer;
  text-align: left;
  transition: background .16s;
}
.word-row:last-child { border-bottom: 0; }
.word-row:hover { background: #fffdf6; }
.word-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.word-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 20px;
  overflow: hidden;
}
.word-thumb.letter { font-family: var(--font-serif); font-size: 21px; color: var(--thumb-ink, var(--deep)); }
.word-id-copy { min-width: 0; }
.word-id-copy b { display: block; font-family: var(--font-serif); font-size: 17px; font-weight: 500; letter-spacing: -.3px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-mini {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff0c2;
  color: #89601b;
  font-family: var(--font-sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .2px;
  vertical-align: 2px;
}
.hf-mini.found { background: #e2f0ff; color: #316686; }
.word-id-copy small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-def { min-width: 0; color: var(--ink-soft); font-size: 11.5px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.word-status { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-size: 8.5px; font-weight: 600; white-space: nowrap; }
.word-status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.word-status.new { background: var(--bg); color: var(--muted); }
.word-status.learning { background: var(--sky); color: #235d76; }
.word-status.mastered { background: var(--lime-soft); color: var(--green); }
.star-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--line-strong);
  transition: background .18s, color .18s, transform .18s;
}
.star-button:hover { background: #fff6e3; color: #d77c22; transform: scale(1.05); }
.star-button.is-favorite { color: #d77c22; }
.star-button.is-favorite svg { fill: currentColor; }
.star-button svg { width: 15px; height: 15px; }
.empty-state { padding: 55px 22px; text-align: center; }
.empty-state .empty-emoji { font-size: 40px; margin-bottom: 8px; }
.empty-state h4 { margin: 0 0 5px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); }
.pagination-info { color: var(--muted); font-size: 10px; }
.pagination-buttons { display: flex; gap: 5px; }
.page-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color .18s, background .18s, color .18s;
}
.page-btn:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.page-btn:disabled { opacity: .35; }
.page-btn svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------
   Profile
   --------------------------------------------------------- */
.profile-cover {
  position: relative;
  overflow: hidden;
  padding: 31px 33px;
  border-radius: 28px;
  background:
    radial-gradient(420px 260px at 90% -20%, rgba(221, 245, 111, .19), transparent 65%),
    linear-gradient(140deg, #184638, var(--deep));
  color: #f2f5ea;
  box-shadow: var(--shadow-lg);
}
.profile-cover::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(221, 245, 111, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(221, 245, 111, .03), 0 0 0 70px rgba(221, 245, 111, .025);
  pointer-events: none;
}
.profile-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.profile-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--lime);
  color: var(--deep);
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  transform: rotate(-2deg);
  box-shadow: inset 0 -4px 0 rgba(18, 56, 45, .12);
}
.profile-copy { flex: 1; min-width: 0; }
.profile-copy h2 { margin: 0; font-size: 27px; letter-spacing: -1px; font-weight: 680; }
.profile-copy p { margin: 3px 0 0; color: rgba(242, 245, 234, .52); font-size: 11px; }
.level-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 8px; border-radius: 5px; background: rgba(221, 245, 111, .14); color: var(--lime); font-size: 9px; font-weight: 650; letter-spacing: .35px; white-space: nowrap; }
.level-badge svg { width: 11px; height: 11px; flex: 0 0 auto; }
.xp-week { position: relative; z-index: 1; margin-top: 24px; max-width: 480px; }
.xp-week-line { display: flex; justify-content: space-between; color: rgba(242, 245, 234, .53); font-size: 9.5px; }
.xp-week-line b { color: var(--lime); font-weight: 650; }
.xp-track { height: 7px; margin-top: 7px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.xp-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lime), #efffa7); transition: width .7s var(--ease); }
.hf-track { position: relative; z-index: 1; margin-top: 10px; max-width: 480px; }
.hf-track-line { display: flex; justify-content: space-between; color: rgba(242, 245, 234, .48); font-size: 9px; }
.hf-track-line b { color: var(--lime); font-family: var(--font-mono); font-size: 9px; font-weight: 600; }
.hf-track-bar { height: 4px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.hf-track-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime); transition: width .7s var(--ease); }
.hf-track-bar.high i { background: var(--coral); }

.profile-quick { position: absolute; right: 30px; top: 31px; z-index: 1; display: flex; gap: 7px; }
.profile-quick .btn { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 10.5px; background: rgba(255, 255, 255, .09); color: #f2f5ea; border: 1px solid rgba(255, 255, 255, .12); }
.profile-quick .btn:hover { background: rgba(255, 255, 255, .16); }

.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.profile-stat { padding: 17px 18px; }
.profile-stat span { display: block; color: var(--muted); font-size: 9.5px; }
.profile-stat b { display: block; margin-top: 7px; font-family: var(--font-serif); font-size: 30px; line-height: 1; font-weight: 500; letter-spacing: -1px; }
.profile-stat small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }

.install-banner {
  margin-top: 16px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #cce46e;
  border-radius: 18px;
  background:
    radial-gradient(260px 130px at 100% 0%, rgba(255, 255, 255, .55), transparent 70%),
    linear-gradient(115deg, #f0f9c9, #ddf56f);
  box-shadow: 0 14px 30px -26px rgba(44, 78, 32, .5);
}
.install-art {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--deep);
  color: var(--lime);
}
.install-art svg { width: 20px; height: 20px; }
.install-copy { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.install-copy b { font-size: 12px; font-weight: 700; }
.install-copy span { color: #5b6e37; font-size: 10px; line-height: 1.5; }
.install-button { flex: 0 0 auto; }
.install-button svg { width: 13px; height: 13px; }

.profile-lower { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; margin-top: 18px; }
.profile-panel { padding: 23px; }
.profile-panel h3 { margin: 0; font-size: 15px; letter-spacing: -.3px; }
.profile-panel .panel-sub { margin: 4px 0 19px; color: var(--muted); font-size: 10.5px; }
.mastery-wrap { display: flex; align-items: center; gap: 25px; }
.mastery-donut {
  --p: 0;
  position: relative;
  width: 136px;
  height: 136px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--lime) 0 64%, var(--sky-deep) 0 82%, var(--line) 0);
  display: grid;
  place-items: center;
}
.mastery-donut::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); }
.mastery-center { position: relative; z-index: 1; text-align: center; line-height: 1; }
.mastery-center strong { display: block; font-family: var(--font-serif); font-size: 32px; font-weight: 500; letter-spacing: -1px; }
.mastery-center span { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; letter-spacing: .8px; text-transform: uppercase; }
.legend { display: flex; flex-direction: column; gap: 11px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.legend-item i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.legend-item b { margin-left: auto; color: var(--ink); font-family: var(--font-mono); font-size: 10px; }
.legend-item:nth-child(1) i { background: var(--green); }
.legend-item:nth-child(2) i { background: var(--lime); }
.legend-item:nth-child(3) i { background: var(--sky-deep); }
.legend-item:nth-child(4) i { background: var(--line); }

.settings-list { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--bg); color: var(--muted); }
.setting-icon svg { width: 16px; height: 16px; }
.setting-copy { flex: 1; min-width: 0; }
.setting-copy b { display: block; font-size: 11.5px; font-weight: 600; }
.setting-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg); }
.segmented button { min-width: 29px; height: 25px; padding: 0 7px; border-radius: 6px; color: var(--muted); font-size: 9.5px; font-weight: 600; transition: background .18s, color .18s, box-shadow .18s; }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; padding: 0; border-radius: 99px; background: var(--line-strong); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: transform .2s var(--ease); }
.switch.is-on { background: var(--green); }
.switch.is-on::after { transform: translateX(16px); }
.danger-link { display: inline-flex; align-items: center; gap: 5px; color: #b3493b; font-size: 10px; font-weight: 600; }
.danger-link:hover { text-decoration: underline; }
.danger-link svg { width: 12px; height: 12px; }

/* Achievements */
.achievement-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 18px; }
.achievement {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
  opacity: .55;
  transition: opacity .2s, transform .2s, border-color .2s;
}
.achievement.is-unlocked { opacity: 1; border-color: #d9d3a7; background: linear-gradient(160deg, #fffdf1, var(--surface)); }
.achievement:hover { transform: translateY(-2px); }
.achievement .a-icon { width: 34px; height: 34px; margin: 0 auto 7px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); font-size: 17px; }
.achievement.is-unlocked .a-icon { background: var(--lime-soft); }
.achievement b { display: block; font-size: 9.5px; font-weight: 650; }
.achievement small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }

.settings-note { margin: 15px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.55; }
.settings-note b { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 33, 26, .48);
  backdrop-filter: blur(8px);
  animation: fade-in .2s ease both;
}
@keyframes fade-in { from { opacity: 0; } }
.modal-card {
  position: relative;
  width: min(690px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 27px;
  box-shadow: 0 50px 100px -45px rgba(0, 0, 0, .55);
  animation: modal-in .3s var(--ease) both;
  scrollbar-width: thin;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.975); } }
.modal-card.confirm { width: min(390px, 100%); padding: 27px; overflow: visible; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 247, .8);
  border: 1px solid var(--line);
  color: var(--muted);
  backdrop-filter: blur(4px);
  transition: background .18s, color .18s, transform .18s;
}
.modal-close:hover { background: #fff; color: var(--ink); transform: rotate(90deg); }
.modal-close svg { width: 14px; height: 14px; }
.word-modal-head {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 25px 62px 21px 27px;
  background: linear-gradient(160deg, #fbf8ed, var(--surface));
  border-bottom: 1px solid var(--line);
}
.modal-art {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--ma-a, #f7edb9), var(--ma-b, #e9d77f));
  overflow: hidden;
  font-size: 42px;
  position: relative;
}
.modal-art::after { content: ""; position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(var(--ma-ink, #4c3c10) .7px, transparent .8px); background-size: 9px 9px; }
.modal-art span { position: relative; z-index: 1; }
.modal-art.letter { font-family: var(--font-serif); font-size: 45px; color: var(--ma-ink, var(--deep)); }
.word-modal-title { flex: 1; min-width: 0; }
.word-modal-title h2 { margin: 0; font-family: var(--font-serif); font-size: 35px; font-weight: 500; letter-spacing: -1.3px; line-height: 1.05; }
.word-modal-title .word-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.word-modal-title .phon { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.word-modal-actions { display: flex; gap: 5px; align-self: flex-start; }
.word-modal-body { padding: 22px 27px 26px; }
.detail-status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 17px; }
.detail-status-pill { padding: 4px 8px; border-radius: 5px; background: var(--bg); color: var(--muted); font-size: 8.5px; font-weight: 600; }
.detail-status-pill.learning { background: var(--sky); color: #1e617f; }
.detail-status-pill.mastered { background: var(--lime-soft); color: var(--green); }
.due-text { color: var(--muted); font-size: 9.5px; }
.hf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #fff0c2;
  color: #89601b;
  font-size: 8.5px;
  font-weight: 700;
}
.hf-pill.found { background: #e2f0ff; color: #316686; }
.meaning-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.meaning-list li { display: flex; gap: 10px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; }
.meaning-list .num { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; display: grid; place-items: center; border-radius: 5px; background: var(--bg); color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.modal-section { margin-top: 18px; }
.modal-section h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.modal-section h4::before { content: ""; width: 12px; height: 1px; background: var(--line-strong); }
.modal-example {
  position: relative;
  width: 100%;
  display: block;
  padding: 14px 52px 14px 15px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.modal-example:hover { background: #fffdf3; border-color: #d8c792; transform: translateY(-1px); }
.modal-example .example-en { display: block; margin: 0; font-family: var(--font-serif); font-size: 14px; line-height: 1.5; color: var(--ink); }
.modal-example .example-zh { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.modal-tip { display: flex; gap: 9px; padding: 13px 14px; border-radius: 12px; background: #fcf6dd; border: 1px solid #efe4bb; color: #6d5c2f; font-size: 10.5px; line-height: 1.6; }
.modal-tip .tip-icon { flex: 0 0 auto; width: 17px; height: 17px; color: #a8872b; }
.modal-tip .tip-icon svg { width: 17px; height: 17px; }
.modal-phrases { display: flex; flex-wrap: wrap; gap: 5px; }
.modal-phrases span { padding: 5px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 9.5px; }
.modal-footer { display: flex; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-footer .btn-primary { flex: 1; }
.modal-footer .btn { flex: 1; }
.modal-empty-note { padding: 13px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 10.5px; line-height: 1.6; }

.install-modal {
  width: min(520px, 100%);
  padding-bottom: 24px;
}
.install-modal-head { padding: 28px 28px 0; text-align: center; }
.install-modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--deep);
  color: var(--lime);
  transform: rotate(-3deg);
  box-shadow: 0 12px 24px -18px rgba(18, 56, 45, .7);
}
.install-modal-icon svg { width: 27px; height: 27px; }
.install-modal-head .eyebrow { margin-bottom: 7px; color: var(--green-2); }
.install-modal-head h3 { margin: 0; font-size: 25px; letter-spacing: -.9px; font-weight: 720; }
.install-modal-head > p:last-child { margin: 7px auto 0; max-width: 330px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.install-steps { margin: 21px 28px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.step-num {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--deep);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}
.install-steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.install-steps b { font-size: 11.5px; font-weight: 650; }
.install-steps small { color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.install-note {
  margin: 0 28px 17px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-radius: 9px;
  background: var(--lime-soft);
  color: #5d6e34;
  font-size: 9.5px;
  line-height: 1.55;
}
.install-note svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }
.install-modal > .btn { width: calc(100% - 56px); margin: 0 28px; }

.confirm-card { text-align: center; }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; background: var(--coral-soft); color: var(--coral); }
.confirm-icon svg { width: 23px; height: 23px; }
.confirm-card h3 { margin: 0; font-size: 18px; letter-spacing: -.4px; }
.confirm-card p { margin: 7px 0 22px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn { flex: 1; }

/* ---------------------------------------------------------
   Toast
   --------------------------------------------------------- */
.toast-layer {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--deep);
  color: #f5f7ed;
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .7);
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  animation: toast-in .28s var(--ease) both;
}
.toast svg { width: 14px; height: 14px; color: var(--lime); }
.toast.out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --sidebar-w: 224px; }
  .page { padding: 32px 34px 62px; }
  .hero-orbit { right: 10px; width: 185px; height: 185px; }
  .orbit-ring { width: 142px; height: 142px; }
  .floating-word.fw-one { right: 187px; }
  .floating-word.fw-two { right: 43px; }
  .hero-card h2 { font-size: 50px; }
  .study-card { grid-template-columns: minmax(320px, .8fr) minmax(430px, 1.2fr); }
  .study-body { padding: 28px 31px 25px; }
}

@media (max-width: 1020px) {
  :root { --sidebar-w: 82px; }
  .sidebar { padding: 22px 11px 14px; align-items: center; gap: 16px; }
  .brand { padding: 3px; }
  .brand-copy, .nav-eyebrow, .nav-item > span:not(.nav-icon):not(.nav-badge), .nav-dot,
  .side-streak-card, .sidebar-profile-copy, .sidebar-profile .icon-button { display: none; }
  .brand-mark { width: 46px; height: 46px; }
  .nav-list { width: 100%; gap: 8px; }
  .nav-item { justify-content: center; padding: 13px 0; border-radius: 14px; }
  .nav-item.is-active::before { left: -11px; height: 19px; width: 3px; }
  .nav-badge { position: absolute; top: 6px; right: 8px; min-width: 17px; height: 17px; font-size: 8px; padding: 0 4px; }
  .sidebar-profile { margin-top: auto; padding: 4px 0 0; }
  .mini-avatar { width: 38px; height: 38px; }
  .page { padding: 30px 28px 58px; }
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(270px, .85fr); }
  .hero-card { padding: 28px 26px 26px; min-height: 345px; }
  .daily-word-card { min-height: 345px; }
  .hero-orbit { transform: translateY(-46%) scale(.9); right: -2px; }
  .floating-word.fw-one { right: 158px; top: 34px; }
  .floating-word.fw-two { right: 25px; bottom: 34px; }
  .hero-card h2 { font-size: 43px; }
  .hero-copy { max-width: 300px; }
  .home-lower { grid-template-columns: 1fr; }
  .quick-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quick-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .quick-arrow { display: none; }
  .review-hero { grid-template-columns: 1fr; }
  .review-visual { position: absolute; right: 20px; top: 50%; transform: translateY(-50%) scale(.82); opacity: .55; }
  .review-hero-copy { max-width: 66%; }
  .review-lower { grid-template-columns: 1fr; }
  .word-table-head, .word-row { grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.8fr) 86px 36px; gap: 10px; padding-left: 16px; padding-right: 16px; }
  .profile-lower { grid-template-columns: 1fr; }
  .study-page { padding: 14px 16px 16px; }
  .study-card { grid-template-columns: minmax(290px, .75fr) minmax(410px, 1.25fr); }
  .study-art { min-height: 500px; }
  .study-body { padding: 25px 26px 23px; }
  .study-word { font-size: 48px; }
}

@media (max-width: 800px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .app-shell { display: block; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(243, 240, 230, .86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(230, 224, 210, .7);
  }
  .mobile-brand { display: flex; align-items: center; gap: 9px; }
  .mobile-brand strong { font-size: 18px; letter-spacing: -.5px; }
  .mobile-streak { display: flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 10px; color: var(--muted); }
  .mobile-streak svg { width: 13px; height: 13px; color: var(--coral); fill: var(--coral); stroke: none; }
  .mobile-streak b { color: var(--ink); font-size: 11px; }
  .page { padding: 22px 17px 96px; }
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    border: 1px solid rgba(230, 224, 210, .9);
    border-radius: 20px;
    background: rgba(255, 253, 247, .92);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 45px -18px rgba(18, 56, 45, .35);
  }
  .mobile-nav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 550;
  }
  .mobile-nav-item svg { width: 19px; height: 19px; }
  .mobile-nav-item.is-active { color: var(--deep); }
  .mobile-nav-item.is-active::before { content: ""; position: absolute; top: 2px; width: 18px; height: 2px; border-radius: 2px; background: var(--green); }
  .mobile-dot { position: absolute; top: 4px; right: 26%; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  .page-heading h1 { font-size: 33px; letter-spacing: -1.3px; }
  .page-heading p.sub { font-size: 12px; }
  .streak-pill { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 13px; }
  .hero-card { min-height: 385px; padding: 27px 24px 25px; border-radius: 25px; }
  .hero-card h2 { font-size: clamp(40px, 11vw, 52px); margin-top: 17px; }
  .hero-copy { max-width: 280px; font-size: 12px; }
  .hero-orbit { transform: none; right: -23px; top: auto; bottom: -18px; width: 175px; height: 175px; opacity: .92; }
  .orbit-ring { width: 132px; height: 132px; }
  .orbit-center strong { font-size: 40px; }
  .floating-word { display: none; }
  .hero-actions { margin-top: 22px; }
  .daily-word-card { min-height: 0; border-radius: 22px; padding: 19px; }
  .daily-art { min-height: 150px; margin-top: 13px; }
  .daily-emoji { font-size: 70px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
  .stat-card { min-height: 105px; padding: 14px 13px; border-radius: 16px; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-label { font-size: 9px; }
  .stat-value strong { font-size: 27px; }
  .stat-note { font-size: 8.5px; }
  .home-lower { gap: 13px; margin-top: 13px; }
  .week-card, .quick-card { border-radius: 20px; }
  .week-card { padding: 19px 18px 16px; }
  .week-chart { gap: 7px; height: 140px; }
  .quick-list { grid-template-columns: 1fr; }
  .quick-item { flex-direction: row; align-items: center; }
  .quick-arrow { display: block; }
  .recent-strip { padding: 14px 16px; border-radius: 15px; }
  .review-hero { padding: 25px 22px; border-radius: 22px; min-height: 330px; }
  .review-hero-copy { max-width: 100%; }
  .review-hero h2 { font-size: 38px; }
  .review-hero p { max-width: 200px; font-size: 11px; }
  .review-visual { right: -30px; bottom: -73px; top: auto; transform: scale(.58); transform-origin: center; opacity: .32; }
  .review-stats { grid-template-columns: 1fr; gap: 8px; }
  .review-lower { gap: 13px; }
  .curve-card { padding: 20px 17px; }
  .memory-stages { gap: 2px; }
  .memory-stage b { font-size: 9.5px; }
  .memory-stage span { font-size: 8px; }
  .library-toolbar { padding: 12px; border-radius: 19px; }
  .search-box { height: 44px; }
  .letter-strip { margin-top: 1px; }
  .library-meta { margin-top: 15px; }
  .word-table { border-radius: 19px; }
  .word-table-head { display: none; }
  .word-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 14px;
    align-items: center;
  }
  .word-id { grid-column: 1; }
  .word-def { grid-column: 1; padding-left: 49px; margin-top: -2px; font-size: 10.5px; -webkit-line-clamp: 1; }
  .word-status { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .star-button { grid-column: 2; grid-row: 2; justify-self: end; width: 26px; height: 26px; }
  .word-thumb { width: 36px; height: 36px; border-radius: 10px; }
  .word-id-copy b { font-size: 17px; }
  .pagination { padding: 11px 14px; }
  .profile-cover { padding: 24px 22px; border-radius: 23px; }
  .profile-avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 27px; }
  .profile-copy h2 { font-size: 23px; }
  .profile-quick { position: static; margin-top: 17px; }
  .profile-quick .btn { background: rgba(255, 255, 255, .1); }
  .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .install-banner { flex-wrap: wrap; padding: 14px; }
  .install-copy { min-width: 0; }
  .install-button { width: 100%; margin-top: 2px; }
  .install-modal-head { padding: 24px 20px 0; }
  .install-steps { margin: 18px 18px; }
  .install-note { margin: 0 18px 15px; }
  .install-modal > .btn { width: calc(100% - 36px); margin: 0 18px; }
  .profile-stat { padding: 14px 15px; border-radius: 17px; }
  .profile-stat b { font-size: 27px; }
  .profile-lower { gap: 13px; margin-top: 13px; }
  .profile-panel { padding: 19px 17px; }
  .mastery-wrap { gap: 17px; }
  .mastery-donut { width: 116px; height: 116px; }
  .mastery-donut::before { inset: 12px; }
  .mastery-center strong { font-size: 28px; }
  .achievement-strip { grid-template-columns: repeat(2, 1fr); }
  .modal-layer { padding: 10px; align-items: end; }
  .modal-card { border-radius: 24px 24px 18px 18px; max-height: 92vh; }
  .word-modal-head { padding: 20px 55px 17px 19px; gap: 13px; align-items: flex-start; }
  .modal-art { width: 64px; height: 64px; border-radius: 17px; font-size: 35px; }
  .word-modal-title h2 { font-size: 30px; }
  .word-modal-body { padding: 18px 19px 22px; }
  .modal-close { top: 11px; right: 11px; }
  .study-page { flex: 0 0 auto; min-height: 100dvh; padding: 11px 10px calc(86px + env(safe-area-inset-bottom)); gap: 9px; }
  .study-topbar { gap: 8px; }
  .study-exit { padding: 7px 9px 7px 7px; }
  .study-xp { display: none; }
  .study-progress-wrap { max-width: none; gap: 8px; }
  .study-progress-count { font-size: 9px; }
  .study-card { grid-template-columns: 1fr; flex: 0 0 auto; max-height: none; margin: 0; border-radius: 22px; overflow: visible; }
  .study-art { min-height: 238px; padding: 16px 17px; border-radius: 22px 22px 0 0; }
  .art-emoji { font-size: 94px; }
  .art-letter { font-size: 120px; }
  .art-center { gap: 10px; padding: 5px; }
  .art-caption { display: none; }
  .art-bottom { align-items: center; }
  .art-audio { width: 40px; height: 40px; }
  .art-audio svg { width: 16px; height: 16px; }
  .study-body { padding: 19px 18px 22px; max-height: none; overflow: visible; }
  .study-word-block { padding-top: 18px; }
  .study-word { font-size: 43px; letter-spacing: -1.6px; }
  .study-question-title { margin-top: 21px; }
  .option { min-height: 51px; font-size: 12.5px; padding: 10px 12px; }
  .answer-panel { margin-top: 17px; padding-top: 15px; }
  .answer-actions {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 6;
    margin-top: 15px;
    padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(255, 253, 247, .92), var(--surface) 34%);
    scroll-margin-block: 120px;
  }
  .keyboard-hint { display: none; }
  .study-body-foot { display: none; }
  .summary-page { padding: 25px 15px 40px; }
  .summary-badge { width: 106px; height: 106px; }
  .summary-badge .glyph { font-size: 49px; }
  .summary-stats { gap: 8px; margin: 24px 0; }
  .summary-stat { padding: 14px 8px; border-radius: 14px; }
  .summary-stat strong { font-size: 29px; }
  .summary-actions { flex-direction: column-reverse; }
  .summary-actions .btn { width: 100%; }
}

@media (max-width: 430px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .hero-card { min-height: 365px; }
  .hero-card h2 { font-size: 40px; letter-spacing: -2px; }
  .hero-orbit { bottom: -30px; right: -34px; transform: scale(.9); }
  .stat-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stat-note { display: none; }
  .week-card-head { flex-direction: column; gap: 8px; }
  .week-total { text-align: left; }
  .week-total strong { display: inline; font-size: 23px; }
  .review-hero h2 { font-size: 33px; }
  .review-hero .hero-actions .btn { min-width: 100%; }
  .study-art { min-height: 215px; }
  .art-emoji { font-size: 82px; }
  .study-word { font-size: 39px; }
  .study-phon-row { gap: 8px; }
  .profile-stat b { font-size: 24px; }
  .mastery-wrap { flex-direction: column; align-items: stretch; }
  .mastery-donut { margin: 0 auto; }
  .modal-footer .btn { flex-basis: 100%; }
}

@media (max-width: 800px) {
  .exam-strip { margin: -3px 0 13px; padding: 11px 12px; gap: 9px; border-radius: 14px; }
  .exam-strip-icon { width: 34px; height: 34px; border-radius: 10px; }
  .exam-strip-copy b { font-size: 10.5px; }
  .exam-strip-copy small { font-size: 9px; }
  .exam-strip-go { font-size: 0; gap: 0; }
  .exam-strip-go svg { width: 16px; height: 16px; }
  .plan-hero { display: block; min-height: 250px; padding: 20px 19px; border-radius: 22px; }
  .plan-countdown strong { font-size: 62px; }
  .plan-hero-copy > p { max-width: 200px; margin-bottom: 14px; }
  .plan-progress-meta, .plan-progress { max-width: 195px; }
  .plan-ring { position: absolute; right: 14px; bottom: 16px; width: 108px; height: 108px; z-index: 2; }
  .plan-ring::before { inset: 6px; }
  .plan-ring strong { font-size: 29px; }
  .plan-ring span { font-size: 7px; }
  .plan-stats { gap: 7px; margin-top: 11px; }
  .plan-stat { flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 10px; border-radius: 15px; }
  .plan-stat-icon { width: 29px; height: 29px; border-radius: 9px; }
  .plan-stat-icon svg { width: 14px; height: 14px; }
  .plan-stat b { font-size: 18px; }
  .plan-stat span { font-size: 8px; }
  .today-task { margin-top: 11px; padding: 18px 16px; border-radius: 19px; }
  .today-task::before { top: 18px; bottom: 18px; }
  .today-task-main { align-items: flex-start; gap: 8px; }
  .today-task h2 { font-size: 21px; }
  .today-task-main p { font-size: 9.5px; }
  .today-count strong { font-size: 22px; }
  .today-task-actions { margin-top: 13px; }
  .today-task-actions .btn { flex: 1; min-height: 42px; }
  .task-complete { width: 100%; }
  .plan-list { padding: 17px 13px 5px; margin-top: 11px; border-radius: 19px; }
  .plan-list .section-head { align-items: flex-start; }
  .plan-row { grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 7px; min-height: 60px; }
  .plan-day b { font-size: 18px; }
  .plan-row-copy b { font-size: 10.5px; }
  .plan-row-copy small { font-size: 8.5px; }
  .plan-status { padding: 3px 5px; font-size: 7.5px; }
  .plan-row-btn { padding: 5px 8px; font-size: 8px; }
  .plan-row.today { margin-left: -6px; margin-right: -6px; padding-left: 7px; padding-right: 7px; }
  .plan-empty { margin: 16px 0; padding: 30px 20px; border-radius: 22px; }
  .plan-empty h2 { font-size: 24px; }
  .plan-empty > p:not(.eyebrow) { font-size: 10.5px; }
  .exam-modal-head { padding: 24px 20px 0; }
  .exam-input-row { margin: 17px 20px 12px; }
  .exam-input { height: 58px; width: 110px; font-size: 31px; }
  .exam-presets { padding: 0 20px; }
  .exam-modal-hint { margin: 13px 20px 15px; }
  .exam-actions { padding: 0 20px; }
}

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

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