/* ==========================================================================
   OBGNAUH English Learning Lab — pages.css
   Home sections + inner page layouts
   ========================================================================== */

/* ======================== HOME HERO ======================== */
.hero {
  position: relative;
  padding-block: clamp(36px, 5vw, 72px) clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 16px; }

.hero-copy h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.1vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  font-weight: 720;
}

.hero-copy h1 .grad {
  background: var(--grad-brand);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradShift 9s ease infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-copy .lede {
  margin-top: 18px;
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.1rem);
  color: var(--text-2);
  max-width: 54ch;
  line-height: 1.72;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 0.82rem;
}

.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.hero-meta .avatar-stack { display: flex; }
.hero-meta .avatar-stack span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  background: var(--grad-violet);
}
.hero-meta .avatar-stack span:first-child { margin-left: 0; background: var(--grad-brand); }
.hero-meta .avatar-stack span:nth-child(2) { background: var(--grad-warm); }
.hero-meta .avatar-stack span:nth-child(3) { background: linear-gradient(135deg, #00c9a7, #4f8cff); }

/* Hero visual card */
.hero-visual {
  position: relative;
  perspective: 1400px;
}

.hero-card {
  position: relative;
  padding: 26px;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface-soft));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  transform: rotate3d(0.4, -0.6, 0, 3deg);
  transition: transform 0.7s var(--ease-out);
}

.hero-card:hover { transform: rotate3d(0, 0, 0, 0deg) translateY(-4px); }

.hero-card .hc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-card .hc-date {
  font-size: 0.76rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.hc-main {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hc-main .ring { --size: 118px; --stroke: 10px; }

.hc-metrics {
  display: grid;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.hc-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.hc-metric:last-child { border-bottom: 0; padding-bottom: 0; }
.hc-metric b { font-size: 1.15rem; font-weight: 660; font-variant-numeric: tabular-nums; }
.hc-metric span { font-size: 0.78rem; color: var(--text-3); }

.hc-strip {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 540;
}

.hc-strip svg { width: 17px; height: 17px; flex: none; }

.hc-float {
  position: absolute;
  right: -14px;
  top: -22px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bob 6s ease-in-out infinite;
}

.hc-float .flame {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--grad-warm);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.hc-float .flame svg { width: 18px; height: 18px; }
.hc-float b { display: block; font-size: 0.95rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hc-float span { font-size: 0.68rem; color: var(--text-3); }

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

/* ======================== TODAY TASKS ======================== */
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--s-4);
}

.task-list { display: grid; gap: 8px; }

.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: all 0.24s var(--ease);
  cursor: pointer;
}

.task-row:hover { border-color: var(--line-strong); background: var(--surface-strong); transform: translateX(2px); }

.task-row .check-box { flex: none; }

.task-row.is-done { opacity: 0.58; }
.task-row.is-done .task-name { text-decoration: line-through; }
.task-row.is-done .check-box { background: var(--ok); border-color: var(--ok); color: #fff; }

.task-main { flex: 1; min-width: 0; }
.task-name { font-size: 0.9rem; font-weight: 560; }
.task-sub { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; align-items: center; }

.task-time {
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.today-side {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  height: 100%;
}

.mini-goal {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(43, 107, 255, 0.12), rgba(0, 201, 167, 0.09));
  border: 1px solid var(--accent-line);
}

.mini-goal .ring { --size: 84px; --stroke: 8px; }
.mini-goal h4 { font-size: 0.92rem; margin-bottom: 4px; }
.mini-goal p { font-size: 0.78rem; color: var(--text-2); line-height: 1.55; }

/* ======================== PROGRESS OVERVIEW ======================== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

.stat-card {
  padding: 20px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.stat-card .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-card .sc-val { display: flex; align-items: baseline; gap: 6px; }
.stat-card .sc-val b { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .sc-val span { font-size: 0.8rem; color: var(--text-3); }
.stat-card .sc-foot { font-size: 0.75rem; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.stat-card .sc-foot .up { color: var(--ok); font-weight: 600; }

.spark {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 110px;
  height: 54px;
  opacity: 0.55;
  pointer-events: none;
}

.spark path { stroke-dasharray: 220; stroke-dashoffset: 0; }

/* Week bars */
.week-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(6px, 1.6vw, 18px);
  height: 150px;
  padding-top: 8px;
}

.week-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }

.week-bar .bar-track {
  width: 100%;
  max-width: 42px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  border-radius: 10px;
  background: var(--code-bg);
  overflow: hidden;
}

.week-bar .bar-fill {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, #6f8dff, #2b6bff);
  height: 0;
  transition: height 1s var(--ease-out);
  position: relative;
}

.week-bar.is-today .bar-fill { background: linear-gradient(180deg, #52e0c4, #00bfa5); }
.week-bar .bar-label { font-size: 0.7rem; color: var(--text-3); }
.week-bar .bar-val { font-size: 0.7rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); opacity: 0; transition: opacity 0.4s 0.4s; }
.week-bars.is-in .bar-val { opacity: 1; }

/* ======================== COURSE CATEGORIES ======================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

.course-card {
  padding: 18px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 178px;
}

.course-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -36px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0.55;
  transition: transform 0.5s var(--ease);
}

.course-card:hover::after { transform: scale(1.35); }

.course-card .cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.course-card .cc-title { font-size: 0.98rem; font-weight: 620; letter-spacing: -0.01em; margin-top: 2px; }
.course-card .cc-sub { font-size: 0.76rem; color: var(--text-3); margin-top: 3px; }
.course-card .cc-progress { margin-top: auto; position: relative; z-index: 1; }
.course-card .cc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; color: var(--text-3); margin-bottom: 6px; }
.course-card .cc-meta b { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ======================== WORD PANEL ======================== */
.word-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-4);
}

.flashcard-stage { perspective: 1200px; }

.flashcard {
  position: relative;
  width: 100%;
  min-height: 258px;
  transform-style: preserve-3d;
  transition: transform 0.75s var(--ease-out);
  cursor: pointer;
}

.flashcard.is-flipped { transform: rotateY(180deg); }

.fc-face {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 24px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-strong), var(--surface-soft));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.fc-front::after {
  content: "";
  position: absolute;
  left: -30%;
  bottom: -60%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.fc-back { transform: rotateY(180deg); }

.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-word { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.7rem); font-weight: 700; letter-spacing: -0.035em; margin-top: 16px; }
.fc-phon { font-size: 0.88rem; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.fc-pos { font-size: 0.72rem; color: var(--accent); font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; }
.fc-meaning { font-size: 1.02rem; font-weight: 560; margin-top: 10px; }
.fc-example { margin-top: auto; font-size: 0.86rem; color: var(--text-2); line-height: 1.65; padding-top: 14px; border-top: 1px dashed var(--line); }
.fc-example em { color: var(--accent); font-style: normal; font-weight: 600; }
.fc-hint { font-size: 0.72rem; color: var(--text-3); margin-top: 10px; display: flex; align-items: center; gap: 6px; }

.fc-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.word-list { display: grid; gap: 6px; }

.word-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}

.word-item:hover { background: var(--surface-soft); border-color: var(--line); }
.word-item.is-active { background: var(--accent-soft); border-color: var(--accent-line); }

.word-item .wi-main { flex: 1; min-width: 0; }
.word-item .wi-word { font-size: 0.9rem; font-weight: 600; }
.word-item .wi-mean { font-size: 0.76rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mastery-dots { display: flex; gap: 3px; flex: none; }
.mastery-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mastery-dots i.on { background: var(--ok); }

/* ======================== AI TUTOR CTA ======================== */
.tutor-cta {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(26px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 340px at 8% 0%, rgba(43, 107, 255, 0.24), transparent 66%),
    radial-gradient(600px 320px at 92% 100%, rgba(0, 201, 167, 0.2), transparent 62%),
    var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.tutor-cta h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: -0.03em; }
.tutor-cta .lede { margin-top: 12px; color: var(--text-2); font-size: 0.95rem; max-width: 46ch; line-height: 1.72; }

.scenario-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.scenario-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-size: 0.81rem;
  font-weight: 520;
  transition: all 0.22s var(--ease);
}

.scenario-chip svg { width: 15px; height: 15px; color: var(--accent); }
.scenario-chip:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--shadow-md); }

.chat-preview {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.chat-preview .cp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat-preview .cp-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-violet); display: grid; place-items: center; color: #fff; flex: none; }
.chat-preview .cp-avatar svg { width: 17px; height: 17px; }
.chat-preview .cp-name { font-size: 0.86rem; font-weight: 620; line-height: 1.2; }
.chat-preview .cp-status { font-size: 0.7rem; color: var(--ok); display: flex; align-items: center; gap: 4px; }
.chat-preview .cp-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.6;
  max-width: 88%;
}

.bubble.bot { background: var(--code-bg); border-bottom-left-radius: 5px; }
.bubble.user { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; margin-left: auto; }

/* ======================== DAILY CONTENT ======================== */
.daily-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }

.daily-card {
  padding: 22px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.daily-card .dc-quote { font-size: 1.06rem; font-weight: 560; line-height: 1.55; letter-spacing: -0.015em; }
.daily-card .dc-trans { font-size: 0.83rem; color: var(--text-2); line-height: 1.65; }
.daily-card .dc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 560;
  color: var(--accent);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  transition: background 0.22s;
}

.speak-btn:hover { background: var(--accent-line); }
.speak-btn svg { width: 14px; height: 14px; }
.speak-btn.is-playing svg { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse { 50% { transform: scale(1.18); opacity: 0.7; } }

/* ======================== ANALYTICS CHARTS ======================== */
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s-4); }

.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.76rem; color: var(--text-3); margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }

.chart-tooltip {
  position: absolute;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg-elev);
  font-size: 0.74rem;
  font-weight: 560;
  pointer-events: none;
  transform: translate(-50%, -130%);
  opacity: 0;
  transition: opacity 0.18s;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  z-index: 5;
}

.chart-tooltip.is-on { opacity: 1; }

.insight {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-2);
  margin-top: 14px;
}
.insight svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 2px; }
.insight b { color: var(--text); }

.radar-legend { display: grid; gap: 6px; margin-top: 6px; }
.radar-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--text-2); }
.radar-row b { font-variant-numeric: tabular-nums; color: var(--text); }

/* ======================== COURSES PAGE ======================== */
.courses-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}

.cat-rail { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 4px; padding: 10px; }

.cat-rail button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 520;
  color: var(--text-2);
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
}

.cat-rail button:hover { background: var(--surface-soft); color: var(--text); }
.cat-rail button.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 620;
}

.cat-rail .icon-tile { width: 30px; height: 30px; border-radius: 9px; }
.cat-rail .icon-tile svg { width: 15px; height: 15px; }
.cat-rail .rail-count { margin-left: auto; font-size: 0.7rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

.course-detail { display: grid; gap: var(--s-4); }

.detail-hero {
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}

.detail-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.28), transparent 68%);
  pointer-events: none;
}

.detail-hero h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem); margin-top: 10px; }
.detail-hero .dh-sub { color: var(--text-2); margin-top: 10px; max-width: 60ch; line-height: 1.72; font-size: 0.94rem; }
.detail-hero .dh-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.objective-list { display: grid; gap: 9px; }

.objective-list li {
  display: flex;
  gap: 10px;
  font-size: 0.87rem;
  color: var(--text-2);
  line-height: 1.6;
}

.objective-list li svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 2px; }

.chapter-list { display: grid; gap: 8px; }

.chapter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.chapter-row .ch-num {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--code-bg);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-3);
  flex: none;
  font-variant-numeric: tabular-nums;
}

.chapter-row.is-done .ch-num { background: var(--ok-soft); color: var(--ok); }
.chapter-row .ch-main { flex: 1; min-width: 0; }
.chapter-row .ch-title { font-size: 0.88rem; font-weight: 560; }
.chapter-row .ch-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }

.point-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.point-tags span {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--text-2);
}

/* ======================== GENERIC INNER MODULES ======================== */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.module-grid.two { grid-template-columns: repeat(2, 1fr); }

.module-card {
  padding: 20px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-card h3 { font-size: 1rem; font-weight: 620; }
.module-card p { font-size: 0.84rem; color: var(--text-2); line-height: 1.66; }
.module-card .mc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Accordion */
.acc { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); overflow: hidden; }
.acc + .acc { margin-top: 8px; }

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 560;
}

.acc-head .acc-ico { margin-left: auto; transition: transform 0.3s var(--ease); color: var(--text-3); }
.acc-head .acc-ico svg { width: 16px; height: 16px; }
.acc.is-open .acc-head .acc-ico { transform: rotate(180deg); }

.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.38s var(--ease-out); }
.acc.is-open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-body .acc-inner { padding: 0 16px 16px; font-size: 0.86rem; color: var(--text-2); line-height: 1.72; }
.acc-body .acc-inner strong { color: var(--text); font-weight: 620; }
.acc-body .acc-inner code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: 0.84em; }
.acc-body .acc-inner .ex { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--accent-line); background: var(--accent-soft); border-radius: 0 8px 8px 0; }

/* Audio / listening player */
.player-shell {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--surface-strong), var(--surface-soft));
  border: 1px solid var(--line);
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 12px 26px -12px rgba(43, 107, 255, 0.8);
  transition: transform 0.25s var(--ease);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 21px; height: 21px; }

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.waveform i {
  flex: 1;
  min-width: 2px;
  max-width: 5px;
  border-radius: 3px;
  background: var(--accent-line);
  height: calc(22% + (var(--h, 0.5) * 78%));
  transition: background 0.25s, height 0.25s;
}

.waveform.is-playing i { animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 60ms); background: var(--accent); }

@keyframes wave { 50% { transform: scaleY(0.55); } }

.player-time { font-size: 0.78rem; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }

/* Transcript */
.transcript { display: grid; gap: 10px; }
.transcript p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-2);
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.3s, color 0.3s;
}
.transcript p.is-current { background: var(--accent-soft); color: var(--text); }
.transcript mark { background: rgba(245, 158, 11, 0.28); color: inherit; border-radius: 4px; padding: 0 2px; }

/* Reading */
.reading-body { max-width: 74ch; }
.reading-body h2 { font-size: 1.35rem; margin-top: 28px; }
.reading-body p { margin-top: 14px; line-height: 1.9; color: var(--text-2); font-size: 0.98rem; }
.reading-body .first-letter::first-letter { font-size: 2.6em; float: left; line-height: 0.9; padding-right: 8px; font-weight: 700; color: var(--accent); }
.gloss { border-bottom: 1px dashed var(--accent); cursor: help; color: var(--text); font-weight: 540; }

/* Writing */
.wc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.wc-count { font-size: 0.8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.check-list { display: grid; gap: 6px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
}
.check-list li svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.check-list li.is-ok svg { color: var(--ok); }
.check-list li.is-ok { color: var(--text); }

/* Translation */
.trans-card { padding: 20px; border-radius: var(--r-lg); }
.trans-src { font-size: 1.05rem; font-weight: 560; line-height: 1.6; }
.trans-answer {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ok-soft);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  display: none;
}
.trans-answer.is-on { display: block; animation: fadeIn 0.3s var(--ease); }

/* Chat page */
.chat-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--s-4);
  height: calc(100vh - var(--nav-h) - 120px);
  min-height: 520px;
}

.chat-side { padding: 16px; overflow-y: auto; }

.chat-side h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 10px; }

.persona {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.persona:hover { background: var(--surface-soft); }
.persona.is-active { background: var(--accent-soft); border-color: var(--accent-line); }
.persona .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 0.8rem; font-weight: 650; flex: none; }
.persona .p-name { font-size: 0.86rem; font-weight: 560; }
.persona .p-desc { font-size: 0.72rem; color: var(--text-3); }

.chat-main { display: flex; flex-direction: column; overflow: hidden; padding: 0; }

.chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.msg { display: flex; gap: 10px; max-width: 82%; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg .m-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 650;
  background: var(--grad-violet);
  color: #fff;
}
.msg.user .m-avatar { background: var(--grad-brand); }
.msg .m-body {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user .m-body { background: var(--accent); color: #fff; border-color: transparent; }
.msg .m-time { font-size: 0.68rem; color: var(--text-3); margin-top: 4px; }

.chat-input-bar {
  flex: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-bar textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-bar textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }

.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Profile */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-xl);
  flex-wrap: wrap;
}

.avatar-xl {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  flex: none;
  box-shadow: 0 16px 32px -14px rgba(43, 107, 255, 0.7);
}

.profile-hero .ph-main { flex: 1; min-width: 200px; }
.profile-hero h2 { font-size: 1.5rem; }
.profile-hero .ph-sub { color: var(--text-2); font-size: 0.88rem; margin-top: 5px; }

.level-track { display: flex; gap: 6px; margin-top: 14px; }
.level-track span {
  height: 6px;
  flex: 1;
  border-radius: 99px;
  background: var(--code-bg);
}
.level-track span.on { background: var(--grad-brand); }

/* Exams */
.exam-list { display: grid; gap: 10px; }

.exam-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: all 0.24s var(--ease);
}

.exam-row:hover { background: var(--surface-strong); border-color: var(--line-strong); }
.exam-row .ex-main { flex: 1; min-width: 0; }
.exam-row .ex-name { font-size: 0.94rem; font-weight: 600; }
.exam-row .ex-desc { font-size: 0.78rem; color: var(--text-3); margin-top: 3px; }
.exam-row .ex-parts { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.exam-row .ex-parts span { font-size: 0.7rem; padding: 2px 8px; border-radius: 6px; background: var(--code-bg); color: var(--text-3); }

/* Speaking */
.timer-ring { --size: 150px; --stroke: 8px; margin-inline: auto; }

.prompt-card {
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.1), transparent 65%), var(--surface);
}

.record-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--grad-warm);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px -12px rgba(244, 63, 127, 0.7);
  transition: transform 0.25s var(--ease);
  margin-inline: auto;
}
.record-btn:hover { transform: scale(1.05); }
.record-btn.is-rec { animation: recPulse 1.6s ease-in-out infinite; }
.record-btn svg { width: 26px; height: 26px; }

@keyframes recPulse {
  0%, 100% { box-shadow: 0 14px 30px -12px rgba(244, 63, 127, 0.7), 0 0 0 0 rgba(244, 63, 127, 0.35); }
  50% { box-shadow: 0 14px 30px -12px rgba(244, 63, 127, 0.7), 0 0 0 14px rgba(244, 63, 127, 0); }
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1180px) {
  .nav-links { gap: 0; }
  .nav-link { padding: 8px 8px; font-size: 0.83rem; }
  .search-trigger span { display: none; }
  .search-trigger kbd { display: none; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; }
  .brand-text span { display: none; }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { display: none; }
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-text span { display: block; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { max-width: 520px; }
  .hero-card { transform: none; }
  .today-grid,
  .word-grid,
  .analytics-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-grid > :last-child { grid-column: span 2; }
  .tutor-cta { grid-template-columns: 1fr; }
  .courses-layout { grid-template-columns: 1fr; }
  .cat-rail { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .cat-rail button { flex: none; }
  .cat-rail .rail-count { display: none; }
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-side { display: none; }
  .chat-main { min-height: 520px; height: calc(100vh - var(--nav-h) - 100px); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-cols { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 32px, var(--maxw)); }
  .brand-text { display: none; }
  .brand-text span { display: none; }
  .section { padding-block: 34px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .course-card { min-height: 164px; padding: 15px; }
  .daily-grid { grid-template-columns: 1fr; }
  .daily-grid > :last-child { grid-column: auto; }
  .module-grid, .module-grid.two { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-brand { grid-column: span 2; }
  .footer-col:last-child { display: block; }
  .hero-copy h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }
  .hero-cta .btn { flex: 1; }
  .hc-main { gap: 16px; }
  .hc-main .ring { --size: 96px; }
  .hc-float { right: 4px; top: -18px; padding: 9px 12px; }
  .lang-switch { display: none; }
  .search-dialog { border-radius: var(--r-lg); }
  .search-overlay { padding-top: 8vh; }
  .chat-shell { min-height: 0; }
  .chat-main { height: calc(100vh - var(--nav-h) - 56px); }
  .msg { max-width: 92%; }
  .trans-src { font-size: 0.98rem; }
  .page-head { padding-top: 14px; }
  .breadcrumbs { padding-top: 12px; }
}

@media (max-width: 460px) {
  .course-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .course-card .cc-sub { display: none; }
  .overview-grid { gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card .sc-val b { font-size: 1.6rem; }
  .daily-grid { gap: 10px; }
  .flashcard { min-height: 272px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hc-metrics { gap: 8px; }
  .btn { height: 42px; padding: 0 16px; }
  .task-time { display: none; }
}

/* ======================== SHARED LIST / DETAIL MODULES ======================== */
.split-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}

.split-side {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding: 10px;
  display: grid;
  gap: 6px;
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow-y: auto;
}

.split-side .side-title {
  padding: 6px 10px 2px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.split-main { min-width: 0; display: grid; gap: var(--s-4); }

.stack { display: grid; gap: var(--s-4); }

@media (max-width: 1024px) {
  .split-layout { grid-template-columns: 1fr; }
  .split-side {
    position: static;
    display: flex;
    overflow-x: auto;
    max-height: none;
    gap: 4px;
    padding: 8px;
  }
  .split-side .side-title { display: none; }
  .split-side .word-item { flex: none; width: auto !important; min-width: 160px; }
}

/* ======================== QUOTE OF THE DAY ======================== */
.quote-band {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(16px, 2.6vw, 32px);
  padding: clamp(24px, 3.6vw, 42px);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.quote-band::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.qmark {
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  line-height: 0.72;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.32;
  user-select: none;
}

.quote-main { min-width: 0; }

.quote-en {
  margin: 0;
  max-width: 54ch;
  font-size: clamp(1.12rem, 0.9rem + 0.85vw, 1.6rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
  font-weight: 560;
}

.quote-zh {
  margin: 12px 0 0;
  max-width: 56ch;
  color: var(--text-2);
  font-size: clamp(0.88rem, 0.84rem + 0.2vw, 0.98rem);
  line-height: 1.8;
}

.quote-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-3);
}

.quote-meta .qa {
  color: var(--text);
  font-weight: 620;
  letter-spacing: -0.01em;
}

.quote-meta .qs { color: var(--text-3); }

.quote-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.quote-actions .btn { white-space: nowrap; }

@media (max-width: 760px) {
  .quote-band { grid-template-columns: minmax(0, 1fr); }
  .qmark { display: none; }
  .quote-actions { flex-direction: row; align-items: center; justify-content: flex-start; }
}

/* 约束分栏主区的隐式网格轨道，避免长内容把卡片撑出视口 */
.split-main { grid-template-columns: minmax(0, 1fr); }
.player-shell { flex-wrap: wrap; }
.transcript p { overflow-wrap: anywhere; }

/* ======================== PHASE 2 · SHARED MODULE UI ======================== */
.seg-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }

.seg-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 560;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.seg-tab svg { width: 16px; height: 16px; opacity: 0.8; }
.seg-tab:hover { color: var(--text); background: var(--surface-strong); }
.seg-tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.seg-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lib-tools { padding: 16px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text-3);
}
.search-box svg { width: 18px; height: 18px; flex: none; }
.search-box .search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0;
}
.lib-layout { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }

.mini-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  color: var(--text-3);
  background: var(--code-bg);
  white-space: nowrap;
}
.mini-badge.ok { color: var(--ok); background: var(--ok-soft); }
.mini-fav { flex: none; color: var(--accent); display: inline-flex; }
.mini-fav svg { width: 14px; height: 14px; }

.wd-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.wd-word {
  margin: 10px 0 4px;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.wd-phon {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.wd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.wd-block { margin-top: 18px; }
.wd-block h4 {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 650;
}
.wd-block p { margin: 0 0 6px; line-height: 1.7; font-size: 0.92rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pair {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--code-bg);
  font-size: 0.78rem;
  color: var(--text-2);
}
.tag-pair b { color: var(--text); }
.tag-link {
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: 0.78rem;
  cursor: pointer;
}
.tag-link:hover { color: var(--accent); border-color: var(--accent-line); }
.colloc-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.colloc-list li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
}
.colloc-list .en { font-size: 0.88rem; font-weight: 540; }
.colloc-list .zh { font-size: 0.76rem; color: var(--text-3); }
.wd-example {
  padding: 10px 12px;
  border-left: 2px solid var(--accent-line);
  border-radius: 0 10px 10px 0;
  background: var(--surface-soft);
  margin-bottom: 8px;
}
.wd-example .en { font-size: 0.9rem; line-height: 1.65; margin: 0; }
.wd-example .zh { font-size: 0.78rem; color: var(--text-3); margin: 4px 0 0; }
.srs-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.srs-strip > div { display: grid; gap: 2px; min-width: 0; }
.srs-strip b { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.review-note { padding: 16px 18px; }
.review-note p { margin: 6px 0 0; color: var(--text-2); font-size: 0.86rem; line-height: 1.7; }
.review-flash { min-height: 240px; }
.upcoming { margin-top: 22px; }
.upcoming h4 { margin: 0 0 8px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.up-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.84rem;
}
.up-row b { color: var(--text-3); font-weight: 540; white-space: nowrap; }

.quiz-intro, .result-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
}
.quiz-intro h3, .result-card h3 { margin: 0 0 6px; }
.quiz-intro p, .result-card p { margin: 0 0 14px; line-height: 1.7; }
.quiz-card, .spell-card, .ear-card { padding: 22px; }
.quiz-prompt {
  margin-top: 18px;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.quiz-option {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  min-width: 0;
}
.quiz-option:hover:not([disabled]) { border-color: var(--accent-line); background: var(--accent-soft); }
.quiz-option b { font-size: 0.9rem; overflow-wrap: anywhere; }
.quiz-option span { font-size: 0.72rem; color: var(--text-3); }
.quiz-option.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.quiz-option.is-wrong { border-color: var(--danger); background: var(--warn-soft); }
.quiz-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.quiz-feedback.ok { border-color: var(--ok); background: var(--ok-soft); }
.quiz-feedback.wrong { border-color: var(--warn); background: var(--warn-soft); }
.quiz-feedback p { margin: 5px 0 0; color: var(--text-2); }
.quiz-feedback .btn { margin-top: 10px; }
.result-ring { flex: none; }
.wrong-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wrong-list > b { width: 100%; font-size: 0.78rem; color: var(--text-3); }

.spell-meaning {
  margin-top: 18px;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 620;
  letter-spacing: -0.02em;
}
.spell-input-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.spell-input {
  flex: 1;
  min-width: 180px;
  height: 46px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.ear-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ear-options .quiz-option b { font-family: var(--font-mono); font-size: 1rem; }

.col-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  margin-bottom: 8px;
}
.cr-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cr-main b { font-size: 0.92rem; }
.cr-main span { font-size: 0.76rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .lib-layout { grid-template-columns: 1fr; }
  .srs-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-options, .ear-options { grid-template-columns: 1fr; }
  .wd-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .seg-tabs { flex-wrap: wrap; overflow-x: visible; }
  .seg-tab { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 0.82rem; }
  .chip-row { flex-wrap: wrap; overflow-x: visible; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-card, .quiz-intro { flex-direction: column; }
  .wd-hero { flex-direction: column; }
}

/* ======================== GRAMMAR MODULE ======================== */
.grammar-article { padding: 24px; }
.grammar-title {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.gr-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--text-3);
}
.grammar-rule {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.grammar-rule p { margin: 0; line-height: 1.7; font-size: 0.92rem; }
.formula-box {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  overflow-x: auto;
}
.formula-box code {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--accent);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .formula-box { overflow-x: visible; }
  .formula-box code { white-space: normal; overflow-wrap: anywhere; }
}
.grammar-explain {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.grammar-explain p { margin: 0; line-height: 1.8; font-size: 0.9rem; }
.grammar-section { margin-top: 24px; }
.grammar-section h4 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 650;
}
.error-row {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  margin-bottom: 8px;
}
.er-line { display: flex; gap: 8px; align-items: baseline; font-size: 0.86rem; flex-wrap: wrap; }
.er-line > span {
  flex: none;
  min-width: 34px;
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--text-3);
}
.er-line.bad s { color: var(--danger, #c0392b); text-decoration-thickness: 1px; }
.er-line.good b { color: var(--ok); font-weight: 600; }
.error-row p { margin: 6px 0 0; }

.gq {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.gq:last-child { border-bottom: 0; }
.gq-q { font-size: 0.9rem; line-height: 1.65; margin-bottom: 10px; }
.gq-q b { color: var(--accent); margin-right: 4px; }
.gq-options { display: grid; gap: 6px; }
.gq-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.55;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.gq-option:hover:not([disabled]) { border-color: var(--accent-line); background: var(--accent-soft); }
.gq-option.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.gq-option.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.gq-option.is-wrong { border-color: var(--danger, #c0392b); background: var(--warn-soft); }
.gq-key {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.grammar-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.grammar-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ok-soft);
  border: 1px solid var(--ok);
}
.grammar-result > div:first-child { display: grid; gap: 2px; }
.grammar-result b { font-size: 1.05rem; }
.grammar-result span { font-size: 0.76rem; color: var(--text-3); }

/* ======================== LISTENING MODULE ======================== */
.listen-audio-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-color: var(--warn);
  background: var(--warn-soft);
}
.listen-audio-note .icon-tile { flex: none; }
.listen-audio-note b { display: block; margin-bottom: 4px; }
.listen-audio-note p { margin: 0; font-size: 0.82rem; line-height: 1.65; color: var(--text-2); }

.listen-article { padding: 24px; }
.listen-title {
  margin: 10px 0 4px;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.listen-player { flex-wrap: wrap; }
.listen-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}
.listen-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.listen-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.listen-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-3);
  font-weight: 560;
}
.select-sm { height: 34px; padding: 0 26px 0 10px; font-size: 0.8rem; }
.sub-tabs { padding: 3px; margin-left: auto; }
.sub-tabs .seg-tab { height: 30px; padding: 0 10px; font-size: 0.74rem; }

.listen-current {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.listen-current .en { margin: 0; font-size: 1.02rem; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; }
.listen-current .zh { margin: 6px 0 0; font-size: 0.84rem; line-height: 1.65; color: var(--text-2); }

.listen-transcript { display: grid; gap: 6px; }
.line-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.line-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.line-row.is-active { border-color: var(--accent); background: var(--accent-soft); }
.lr-num {
  flex: none;
  width: 20px;
  font-size: 0.7rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.lr-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lr-text .en { font-size: 0.88rem; line-height: 1.6; overflow-wrap: anywhere; }
.lr-text .zh { font-size: 0.76rem; line-height: 1.55; color: var(--text-3); overflow-wrap: anywhere; }
.lr-icon { flex: none; color: var(--text-3); display: inline-flex; }
.lr-icon svg { width: 14px; height: 14px; }
.listen-hidden {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-3);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.listen-hidden svg { width: 28px; height: 28px; margin-bottom: 8px; opacity: 0.6; }
.listen-hidden p { margin: 0; font-size: 0.84rem; line-height: 1.7; }

.dict-box {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.dict-input {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
}
.dict-answer {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
  overflow-wrap: anywhere;
}
.listen-test { display: grid; gap: 4px; }

/* ======================== READING MODULE ======================== */
.split-side-wrap { min-width: 0; }
.read-recommend { padding: 14px 16px; }
.rr-head { display: flex; align-items: center; gap: 10px; }
.rr-head > div { display: grid; gap: 1px; }
.rr-head b { font-size: 0.88rem; }
.read-recommend p { margin: 10px 0 10px; font-size: 0.84rem; line-height: 1.55; color: var(--text-2); }

.read-article { padding: 24px; }
.read-clock { display: grid; gap: 2px; text-align: right; }
.read-clock b {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.read-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.read-toolbar .tiny { flex: 1; min-width: 200px; line-height: 1.5; }

.read-body { margin-top: 18px; }
.read-para {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.read-para + .read-para { margin-top: 8px; }
.read-para:hover { background: var(--surface-soft); }
.read-para.is-playing { background: var(--accent-soft); border-color: var(--accent-line); }
.para-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.para-num { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-3); }
.para-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text);
  overflow-wrap: anywhere;
}
.sent { cursor: pointer; border-radius: 4px; }
.sent:hover { background: var(--accent-soft); }
.sent-zh {
  display: none;
  margin: 4px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-line);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-3);
}
.sent.is-open .sent-zh, .bi-on .sent-zh { display: block; }
.sent-tr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0 4px 0 2px;
  vertical-align: 1px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.sent-tr:hover { background: var(--accent); color: #fff; }

.rw {
  display: inline;
  padding: 0 1px;
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.rw:hover { background: var(--accent-soft); color: var(--accent); }

.read-pop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  width: min(350px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--accent-line);
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, 0.22));
}
.read-pop[hidden] { display: none; }
.pop-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pop-close:hover { background: var(--surface-soft); color: var(--text); }
.pop-close svg { width: 14px; height: 14px; }
.pop-word {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 28px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.read-pop p { margin: 8px 0 0; font-size: 0.88rem; line-height: 1.65; }

.gloss-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.gloss-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
}
.gloss-term {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.gloss-term b { font-size: 0.88rem; color: var(--accent); }
.gloss-term span { font-size: 0.8rem; color: var(--text-2); }
.gloss-note { font-size: 0.74rem; color: var(--text-3); }

@media (max-width: 900px) {
  .read-clock { text-align: left; }
  .read-pop { right: 12px; bottom: 12px; }
}

/* ======================== WRITING MODULE ======================== */
.write-article { padding: 24px; }
.write-task {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.write-task p { margin: 0; line-height: 1.75; font-size: 0.92rem; }
.write-template {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.write-template summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
  list-style: none;
}
.write-template summary::-webkit-details-marker { display: none; }
.write-template summary svg { width: 15px; height: 15px; }
.write-template pre {
  margin: 12px 0;
  padding: 12px;
  border-radius: 9px;
  background: var(--code-bg);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.write-frames {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed var(--line);
}
.write-frames .objective-list { margin: 0; }

.write-editor { margin-top: 18px; }
.wc-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 10px;
}
.wc-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s var(--ease), background 0.25s var(--ease);
}
.wc-track i.is-over { background: var(--warn); }
.write-text {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
}

.write-checks {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  font-size: 0.86rem;
  line-height: 1.55;
  cursor: pointer;
}
.check-item input { margin-top: 3px; accent-color: var(--accent); }

.check-empty {
  padding: 22px 18px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.7;
}
.check-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--warn);
  background: var(--warn-soft);
}
.check-summary.ok { border-color: var(--ok); background: var(--ok-soft); }
.check-summary > div:first-child { display: grid; gap: 3px; min-width: 0; }
.check-summary b { font-size: 0.92rem; }
.check-summary span { font-size: 0.76rem; color: var(--text-3); line-height: 1.5; }
.check-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-3); }
.check-stats b { font-size: 0.95rem; color: var(--text); font-variant-numeric: tabular-nums; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.check-row {
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  min-width: 0;
}
.check-row.ok { border-color: var(--line); }
.check-row.warn { border-color: var(--warn); background: var(--warn-soft); }
.cr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.cr-head b { font-size: 0.84rem; }
.check-row p { margin: 0; }
.check-row ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.check-row li { font-size: 0.78rem; line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }

.ai-pending {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed var(--accent-line);
  background: var(--surface-soft);
}
.ai-pending b { display: block; margin-top: 8px; font-size: 0.92rem; }
.ai-pending p { margin: 5px 0 0; font-size: 0.82rem; line-height: 1.7; color: var(--text-2); }

@media (max-width: 900px) {
  .check-grid { grid-template-columns: 1fr; }
}

/* ======================== PHASE 3 · SPEAKING ======================== */
.speak-support { margin: var(--s-4) 0 var(--s-3); padding: 16px 18px; }
.speak-support-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.speak-support-head svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.speak-support-head b { font-size: 0.92rem; }
.speak-support p { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.7; color: var(--text-2); }
.speak-support p.tiny { font-size: 0.74rem; color: var(--text-3); }

.speak-card {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 26px);
}
.speak-title { font-size: 1.24rem; margin: 2px 0 0; letter-spacing: -0.02em; }
.speak-big {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.speak-phon { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-3); }
.speak-sentence {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 560;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.speak-focus {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 0.82rem;
  line-height: 1.65;
}
.speak-focus svg { width: 15px; height: 15px; flex: none; color: var(--accent); margin-top: 2px; }
.speak-example {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.speak-example b {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.speak-example p { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.65; overflow-wrap: anywhere; }
.speak-example-list { display: grid; gap: 8px; }
.speak-example-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.ser-main { flex: 1; min-width: 150px; font-size: 0.88rem; }
.ser-zh { margin-left: 8px; font-size: 0.78rem; color: var(--text-3); }
.speak-actions { gap: 8px; }
.speak-target-box {
  display: grid;
  gap: 2px;
  padding: 10px 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-soft);
  font-size: 0.7rem;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.speak-target-box b { font-size: 0.9rem; color: var(--text); line-height: 1.55; }
.speak-manual {
  padding: 10px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}
.speak-manual summary { cursor: pointer; font-size: 0.82rem; color: var(--text-2); }
.speak-manual summary:hover { color: var(--accent); }
.speak-textarea { width: 100%; min-height: 64px; margin: 10px 0 8px; resize: vertical; font-size: 0.88rem; line-height: 1.65; }
.speak-manual .tiny { margin: 8px 0 0; line-height: 1.6; }
.speak-live {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--code-bg);
}
.speak-live b { font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.speak-live p {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.2em;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.rec-dot.is-on { background: var(--danger); animation: pulse 1s ease-in-out infinite; }
.speak-warn {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--warn-soft);
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.65;
}
.speak-warn svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }
.speak-rec-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--warn);
  background: var(--warn-soft);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-2);
}
.speak-rec-error svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }
.speak-rec-error p { margin: 0; }
.speak-rating { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.speak-rating .chip { font-size: 0.74rem; }
.speak-points { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.speak-points li { font-size: 0.84rem; line-height: 1.7; color: var(--text-2); }
.speak-timer-wrap {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.speak-recent { padding: 16px 18px; }
.recent-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.8rem;
}
.recent-row:last-child { border-bottom: 0; padding-bottom: 0; }
.rr-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-meta { flex: none; font-size: 0.74rem; color: var(--text-3); }
.speak-layout .wi-word { white-space: normal; line-height: 1.45; }
.speak-layout .wi-mean { white-space: normal; line-height: 1.45; margin-top: 2px; }

.intonation-marked {
  font-size: 1.02rem;
  line-height: 2;
  letter-spacing: 0.01em;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  overflow-wrap: anywhere;
}
.intonation-marked .stress { font-style: normal; font-weight: 700; color: var(--accent); }
.link-list { display: grid; gap: 8px; }
.link-row {
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.link-row b { font-size: 0.88rem; }
.link-say { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.link-row p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.6; color: var(--text-3); }
.dialogue-list { display: grid; gap: 2px; }
.dialogue-turn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.dialogue-turn:last-child { border-bottom: 0; }
.dialogue-turn.mine {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border-bottom: 0;
  margin: 4px 0;
}
.dt-role {
  flex: none;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
}
.dt-main { min-width: 0; }
.dt-en { margin: 0; font-size: 0.88rem; line-height: 1.6; overflow-wrap: anywhere; }
.dt-zh { margin: 2px 0 0; font-size: 0.78rem; line-height: 1.55; color: var(--text-3); }
.dt-actions { display: flex; gap: 5px; flex: none; }
.dt-actions .btn { padding: 0 10px; }

/* ---------- speaking comparison ---------- */
.speak-compare {
  margin-top: 4px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  gap: 12px;
}
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cmp-head b { font-size: 0.92rem; }
.cmp-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cmp-ring { flex: none; }
.cmp-metrics { flex: 1; min-width: 170px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cmp-metrics > div { display: grid; gap: 2px; min-width: 0; }
.cmp-metrics b { font-size: 1.18rem; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cmp-metrics span { font-size: 0.72rem; color: var(--text-3); }
.cmp-line { display: grid; gap: 3px; }
.cmp-label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.cmp-line p { margin: 0; font-size: 0.86rem; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
.cmp-diff {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  max-height: 220px;
  overflow-y: auto;
}
.cmp-tok {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--code-bg);
}
.cmp-tok small { font-size: 0.66rem; opacity: 0.85; }
.cmp-tok.ok { background: var(--ok-soft); color: var(--ok); }
.cmp-tok.bad { background: var(--warn-soft); color: var(--warn); }
.cmp-tok.miss { background: var(--warn-soft); color: var(--warn); text-decoration: line-through; }
.cmp-tok.extra { border: 1px dashed var(--warn); background: transparent; color: var(--warn); }
.cmp-summary { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.74rem; color: var(--text-3); }
.cmp-legend { display: inline-flex; align-items: center; gap: 5px; }
.cmp-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--code-bg); }
.cmp-legend i.ok { background: var(--ok); }
.cmp-legend i.bad { background: var(--warn); }
.cmp-legend i.miss { background: var(--warn); opacity: 0.55; }
.cmp-legend i.extra { background: transparent; border: 1px dashed var(--warn); }
.cmp-note {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--code-bg);
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--text-3);
}
.cmp-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* ======================== PHASE 3 · TRANSLATION ======================== */
.trans-query { padding: clamp(18px, 2.4vw, 26px); display: grid; gap: 10px; }
.trans-textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
}
.trans-result {
  margin-top: 16px;
  padding: clamp(18px, 2.4vw, 24px);
  display: grid;
  gap: 8px;
}
.trans-idle {
  justify-items: center;
  text-align: center;
  padding: 36px 20px;
  color: var(--text-3);
}
.trans-idle svg { width: 34px; height: 34px; opacity: 0.6; }
.trans-idle p { margin: 0; max-width: 540px; font-size: 0.84rem; line-height: 1.7; }
.trans-target {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.trans-note { font-size: 0.82rem; line-height: 1.7; color: var(--text-2); overflow-wrap: anywhere; }
.trans-note b { color: var(--text); }
.trans-warn {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--warn-soft);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-2);
}
.trans-warn svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }
.trans-pending {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed var(--accent-line);
  background: var(--surface-soft);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.trans-pending svg { width: 16px; height: 16px; flex: none; color: var(--accent); margin-top: 2px; }
.trans-pending p { margin: 5px 0 0; }
.trans-alt { padding: 10px 12px; border-radius: 10px; background: var(--code-bg); font-size: 0.82rem; line-height: 1.65; }
.trans-alt b { display: block; font-size: 0.74rem; color: var(--text-3); margin-bottom: 3px; }
.trans-alt p { margin: 2px 0 0; overflow-wrap: anywhere; }
.trans-more { margin-top: 4px; }
.trans-more summary { cursor: pointer; font-size: 0.8rem; color: var(--accent); }
.trans-mini { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); }
.trans-mini p { margin: 0; font-size: 0.82rem; line-height: 1.6; overflow-wrap: anywhere; }
.trans-near {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 8px;
}
.trans-near > b { font-size: 0.76rem; font-weight: 600; color: var(--text-3); }
.trans-near-row {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.trans-near-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.trans-near-row b { font-size: 0.86rem; overflow-wrap: anywhere; }
.trans-near-row span { font-size: 0.78rem; color: var(--text-3); overflow-wrap: anywhere; }
.trans-hits { margin-top: 6px; display: grid; gap: 6px; }
.trans-hits > b { font-size: 0.76rem; font-weight: 600; color: var(--text-3); }
.trans-hit { display: flex; gap: 8px; align-items: baseline; font-size: 0.84rem; }
.trans-hit span { color: var(--text-3); }
.trans-bank { margin-top: 18px; padding: 16px 18px; }
.trans-bank summary { cursor: pointer; font-size: 0.86rem; font-weight: 600; }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.bank-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  min-width: 0;
}
.bank-row p { margin: 0 0 3px; font-size: 0.82rem; line-height: 1.6; overflow-wrap: anywhere; }
.bank-row .btn { margin-top: 6px; }
.bank-word {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.bank-word:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.bank-word b { font-size: 0.88rem; }
.bank-word span { font-size: 0.8rem; font-weight: 400; color: var(--text-3); overflow-wrap: anywhere; }
.bank-word em { grid-column: 1 / -1; font-style: normal; font-size: 0.66rem; font-weight: 400; color: var(--text-3); }
.register-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.register-row:last-child { border-bottom: 0; }
.rr-side { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.rr-text {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.rr-text:hover { color: var(--accent); }
.rr-arrow { color: var(--text-3); padding-top: 4px; }
.rr-arrow svg { width: 16px; height: 16px; }
.rr-zh { grid-column: 1 / -1; margin: 0; font-size: 0.76rem; line-height: 1.6; color: var(--text-3); }
.trans-history-card { padding: 18px 20px; }
.trans-subtabs { margin-bottom: 12px; }
.trans-hist {
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.th-input { margin: 8px 0 0; font-size: 0.9rem; font-weight: 560; line-height: 1.6; overflow-wrap: anywhere; }
.th-output { margin: 4px 0 0; font-size: 0.84rem; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.tw-word { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: anywhere; }
.tw-zh { font-size: 1.02rem; color: var(--text-2); line-height: 1.6; overflow-wrap: anywhere; }

/* ======================== PHASE 3 · EXAMS ======================== */
.exam-disclaimer {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--warn);
  background: var(--warn-soft);
}
.exam-disclaimer p { margin: 8px 0 0; font-size: 0.8rem; line-height: 1.7; color: var(--text-2); }
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.exam-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.exam-card.is-active { border-color: var(--accent-line); }
.exam-card-top { display: flex; align-items: center; gap: 11px; }
.ec-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ec-name b { font-size: 0.95rem; }
.ec-name span { font-size: 0.72rem; overflow-wrap: anywhere; }
.ec-desc { margin: 0; font-size: 0.78rem; line-height: 1.65; }
.exam-parts { display: flex; flex-wrap: wrap; gap: 5px; }
.exam-parts span {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--text-3);
}
.ec-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.72rem;
  color: var(--text-3);
}
.ec-source { margin: 0; font-size: 0.7rem; }
.exam-detail { padding: clamp(18px, 2.4vw, 26px); margin-top: 4px; }
.exam-detail-note {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--warn-soft);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-2);
}
.exam-detail-note svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }
.exam-set {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.exam-set:last-of-type { border-bottom: 0; }
.es-set-main { flex: 1; min-width: 220px; display: grid; gap: 3px; }
.es-set-main b { font-size: 0.9rem; }
.exam-session { padding: clamp(16px, 2.2vw, 24px); display: grid; gap: 14px; }
.es-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.es-title { min-width: 0; }
.es-title h2 { margin: 4px 0 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.es-title p { margin: 4px 0 0; font-size: 0.74rem; line-height: 1.6; }
.es-timer {
  flex: none;
  display: grid;
  justify-items: end;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.15;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--code-bg);
  font-variant-numeric: tabular-nums;
}
.es-timer b { font-size: 1.05rem; }
.es-timer span { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.es-timer.is-low { color: var(--danger); background: var(--warn-soft); }
.es-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.76rem; color: var(--text-3); }
.es-body { display: grid; grid-template-columns: minmax(0, 1fr) 238px; gap: 18px; align-items: start; }
.es-question { min-width: 0; display: grid; gap: 10px; }
.es-passage {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-line);
  border-radius: 0 10px 10px 0;
  background: var(--surface-soft);
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.es-q { margin: 0; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.es-options { display: grid; gap: 8px; }
.es-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.es-option:hover { border-color: var(--accent-line); }
.es-option.is-selected { border-color: var(--accent-line); background: var(--accent-soft); }
.eo-letter {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--code-bg);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-2);
}
.es-option.is-selected .eo-letter { background: var(--accent); color: #fff; }
.es-sheet {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.es-sheet > b { font-size: 0.8rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sheet-dot {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.sheet-dot.is-answered { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.sheet-dot.is-current { outline: 2px solid var(--accent); outline-offset: 1px; }
.sheet-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.68rem; color: var(--text-3); }
.sheet-legend span { display: inline-flex; align-items: center; gap: 4px; }
.sheet-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.sheet-legend i.cur { background: var(--accent); }
.es-nav { display: flex; justify-content: space-between; gap: 8px; }
.exam-result { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 18px; }
.result-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.result-main { flex: 1; min-width: 210px; }
.result-main h2 { margin: 4px 0 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.result-score { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.result-score b { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.result-score span { font-size: 0.76rem; color: var(--text-3); }
.result-parts { display: grid; gap: 8px; }
.rp-row {
  display: grid;
  grid-template-columns: minmax(84px, 140px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
.rp-row > span { color: var(--text-2); overflow-wrap: anywhere; }
.rp-row > b { font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--text-3); }
.rp-bar { height: 7px; border-radius: 999px; background: var(--code-bg); overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s var(--ease); }
.review-list { display: grid; gap: 10px; margin-top: 12px; }
.review-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  display: grid;
  gap: 7px;
  min-width: 0;
}
.review-q { margin: 0; font-size: 0.9rem; font-weight: 560; line-height: 1.65; overflow-wrap: anywhere; }
.review-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.review-option.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.review-option.is-wrong { border-color: var(--danger); }
.review-explain {
  margin-top: 2px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--code-bg);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.review-explain b { color: var(--text); }
.exam-analysis { display: grid; gap: 16px; }
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.analysis-block { padding: 16px 18px; }
.analysis-trend { padding: 16px 18px; }
.trend-spark { margin-top: 10px; }
.analysis-block .panel-title { margin-bottom: 10px; }
.exam-drill { padding: clamp(18px, 2.4vw, 26px); display: grid; gap: 12px; }
.drill-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-2); }
.exam-list-card { padding: 18px 20px; }
.history-item, .wrong-item {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  min-width: 0;
}
.builder-group { display: grid; gap: 8px; margin-top: 6px; }
.builder-group > b { font-size: 0.8rem; color: var(--text-2); }
.builder-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.field-inline { display: grid; gap: 5px; font-size: 0.76rem; color: var(--text-3); }
.field-inline .input { width: auto; min-width: 104px; }
.exam-drill .check-grid, .exam-detail .check-grid { margin-top: 0; }

@media (max-width: 1024px) {
  .es-body { grid-template-columns: 1fr; }
  .es-sheet { position: static; }
  .sheet-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .bank-grid { grid-template-columns: 1fr; }
  .register-row { grid-template-columns: 1fr; gap: 8px; }
  .rr-arrow { display: none; }
  .rr-zh { grid-column: auto; }
  .exam-grid { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cmp-top { gap: 12px; }
  .cmp-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dialogue-turn { grid-template-columns: auto minmax(0, 1fr); }
  .dt-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .recent-row { flex-direction: column; gap: 2px; }
  .rr-meta { flex: none; }
  .rp-row { grid-template-columns: 88px minmax(0, 1fr) auto; }
  .trans-query, .trans-result { padding: 16px; }
  .speak-card { padding: 16px; }
}

/* ========================================================================
   Phase 5 — 账号 / 同步 / 个人中心 / 分析中心 / 推荐
   ======================================================================== */

/* ---------- 导航账号入口 ---------- */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  max-width: 160px;
  padding: 0 11px 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.22s, background 0.22s, color 0.22s;
  flex: none;
}
.account-chip:hover { border-color: var(--accent-line); background: var(--surface-strong); color: var(--text); }
.ac-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.ac-avatar svg { width: 15px; height: 15px; }
.ac-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-links a.drawer-account { color: var(--text); font-weight: 640; }
.drawer-links a.drawer-account .icon-tile { background: var(--accent-soft); color: var(--accent); }

/* ---------- 登录 / 注册 ---------- */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--s-4);
  align-items: start;
  margin-top: var(--s-5);
}
.auth-card { padding: clamp(22px, 3vw, 34px); min-width: 0; }
.auth-head h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.auth-head p { margin-top: 8px; font-size: 0.86rem; line-height: 1.7; color: var(--text-2); }
.auth-form { display: grid; gap: 14px; margin-top: 20px; }
.field > span { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.auth-form .field > span { display: block; margin-bottom: 6px; }
.auth-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.auth-switch { margin-top: 16px; font-size: 0.84rem; color: var(--text-3); }
.auth-hint { margin-top: 12px; font-size: 0.75rem; line-height: 1.65; color: var(--text-3); }
.form-msg { margin-top: 12px; font-size: 0.8rem; line-height: 1.6; min-height: 0; }
.form-msg.is-error { color: var(--danger); }
.form-msg.is-ok { color: var(--ok); }
.auth-side { padding: clamp(20px, 2.6vw, 28px); position: sticky; top: 96px; }
.auth-side-title { font-size: 1rem; margin-bottom: 14px; }
.auth-side-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.auth-side-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-2);
}
.auth-side-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.auth-side-note { margin-top: 16px; font-size: 0.75rem; line-height: 1.65; color: var(--text-3); }

/* ---------- 个人中心补充 ---------- */
.account-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.account-dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.collection-grid h4 { display: flex; align-items: center; gap: 7px; font-size: 0.86rem; margin-bottom: 8px; }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; }
.history-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.history-list li:last-child { border-bottom: 0; }
.hl-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-meta { flex: none; font-size: 0.72rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.achv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.achv {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 0.72rem;
  color: var(--text-3);
  min-width: 0;
}
.achv b { font-size: 0.8rem; color: var(--text-2); }
.achv-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--code-bg);
  color: var(--text-3);
}
.achv-icon svg { width: 16px; height: 16px; }
.achv.is-on { border-color: var(--accent-line); background: var(--accent-soft); }
.achv.is-on b { color: var(--text); }
.achv.is-on .achv-icon { background: var(--grad-brand); color: #fff; }
.pw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }

/* ---------- 分析中心 ---------- */
.an-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.an-stats .stat-card { padding: 16px 18px; gap: 5px; }
.an-stats .stat-card b {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.an-stats .stat-card span { font-size: 0.76rem; color: var(--text-3); }
.an-stats .stat-card em { font-size: 0.68rem; font-style: normal; color: var(--text-3); opacity: 0.85; }
.an-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: var(--s-4);
  padding: 15px 18px;
  border: 1px solid var(--warn);
  border-radius: var(--r-lg);
  background: var(--warn-soft);
}
.an-banner svg { width: 20px; height: 20px; flex: none; color: var(--warn); margin-top: 1px; }
.an-banner b { font-size: 0.86rem; }
.an-banner p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.65; color: var(--text-2); }
.an-panel { padding: clamp(18px, 2.4vw, 26px); }
.an-panel .panel-title { flex-wrap: wrap; gap: 10px; }
.an-range { margin-left: auto; }
.an-chart { margin-top: 14px; min-height: 200px; }
.an-chart svg { display: block; width: 100%; height: auto; }
.an-chart-note { margin-top: 8px; font-size: 0.73rem; color: var(--text-3); }
.an-empty {
  margin: 10px 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-3);
  text-align: center;
}
.an-goal { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 22px; padding: 8px 0; }
.goal-block { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.weak-row {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.weak-row:last-child { border-bottom: 0; }
.weak-row b { font-size: 0.85rem; overflow-wrap: anywhere; }
.weak-row span { font-size: 0.76rem; color: var(--text-3); line-height: 1.6; }

/* ---------- 推荐 ---------- */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.rec-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  min-width: 0;
  transition: border-color 0.22s, background 0.22s, transform 0.22s;
}
.rec-card:hover { border-color: var(--line-strong); background: var(--surface); transform: translateY(-2px); }
.rec-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rec-top b { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.rec-ico svg { width: 16px; height: 16px; }
.rec-tag {
  margin-left: auto;
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--text-3);
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rec-main { flex: 1; min-width: 0; }
.rec-line { margin: 0; font-size: 0.87rem; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev);
  font-size: 0.75rem;
}
.rec-chip b { font-weight: 600; }
.rec-chip em { font-style: normal; font-size: 0.65rem; color: var(--text-3); }
.rec-reason { margin: 0; font-size: 0.72rem; line-height: 1.65; color: var(--text-3); }
.rec-reason span { display: inline-block; margin-right: 5px; font-weight: 700; color: var(--text-2); }
.rec-go { align-self: flex-start; margin-top: auto; gap: 5px; }
.rec-go svg { width: 14px; height: 14px; }
.rec-card.tone-warn .rec-ico { background: var(--warn-soft); color: var(--warn); }
.rec-card.tone-danger .rec-ico { background: var(--danger-soft, var(--warn-soft)); color: var(--danger, var(--warn)); }

@media (max-width: 1080px) {
  .an-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .account-chip { padding: 0; border: 0; background: none; height: auto; max-width: none; }
  .account-chip .ac-label { display: none; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { position: static; }
  .an-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  .pw-grid { grid-template-columns: 1fr; }
  .achv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-range { width: 100%; }
  .an-range button { flex: 1; }
  .rec-grid { grid-template-columns: 1fr; }
  .an-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .an-stats .stat-card { padding: 13px 14px; }
  .an-stats .stat-card b { font-size: 1.2rem; }
}

/* ==========================================================================
   Phase 4 — AI 英语老师（对话 / 情景模拟 / 批改 / 翻译 / 计划）
   ========================================================================== */
.ai-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--s-4);
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.84rem;
  line-height: 1.7;
}
.ai-status > svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.ai-status b { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.ai-status span { color: var(--text-2); }
.ai-status.is-warn { border-color: rgba(214, 158, 46, 0.45); background: rgba(214, 158, 46, 0.09); }
.ai-status.is-warn > svg { color: #b9821f; }
.ai-status.is-ok { border-color: rgba(56, 168, 112, 0.42); background: rgba(56, 168, 112, 0.09); }
.ai-status.is-ok > svg { color: #2f8f61; }
.ai-status.is-checking { color: var(--text-3); }

.badge-warn { background: rgba(214, 158, 46, 0.14); border-color: rgba(214, 158, 46, 0.4); color: #9a6a12; }
.badge-ok { background: rgba(56, 168, 112, 0.14); border-color: rgba(56, 168, 112, 0.4); color: #2f8f61; }

.tutor-shell { height: calc(100vh - var(--nav-h) - 230px); min-height: 560px; }

.session-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.session-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.session-item:hover { background: var(--surface-soft); }
.session-item.is-active { background: var(--accent-soft); border-color: var(--accent-line); }
.session-item .si-title {
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.session-item .si-meta { font-size: 0.68rem; color: var(--text-3); }

.ai-quick { padding: 0 16px 10px; gap: 6px; flex-wrap: wrap; }
.ai-quick:empty { display: none; }

.m-body.is-error {
  color: var(--danger, #c0392b);
  background: rgba(192, 57, 43, 0.07);
  border-color: rgba(192, 57, 43, 0.28);
  white-space: pre-wrap;
}

.ai-review {
  margin-top: 24px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--accent-line);
  background: var(--accent-soft);
}
.ai-review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-review-head b { font-size: 0.95rem; }
.ai-review p { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.7; color: var(--text-2); }
.ai-review-result { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-review-result:empty { display: none; }

.ai-sec {
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ai-sec h4 {
  margin: 0 0 8px;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.ai-sec-body { font-size: 0.86rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ai-sec-body ol, .ai-sec-body ul { margin: 0; padding-left: 20px; }

.ai-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-col {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.84rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow: auto;
}
.ai-col b { display: block; font-size: 0.76rem; color: var(--text-3); margin-bottom: 6px; letter-spacing: 0.06em; }
.ai-col.is-new { border-color: var(--accent-line); background: var(--accent-soft); }

.ai-loading { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-3); }
.ai-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.07);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: var(--danger, #c0392b);
  font-size: 0.82rem;
  line-height: 1.7;
}

.trans-ai-card { display: flex; flex-direction: column; gap: 10px; }
.trans-ai-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.trans-ai-out {
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 1080px) {
  .tutor-shell { height: auto; min-height: 0; }
  .tutor-shell .chat-side { display: block; overflow: visible; }
  .tutor-shell .chat-main { height: auto; min-height: 560px; }
  .tutor-shell .chat-log { min-height: 320px; max-height: 60vh; }
}

@media (max-width: 760px) {
  .tutor-shell .chat-side { padding: 14px; }
  .ai-compare { grid-template-columns: 1fr; }
  .ai-col { max-height: 260px; }
}

@media (max-width: 460px) {
  .ai-status { font-size: 0.8rem; padding: 10px 12px; }
  .session-list { max-height: 160px; }
}

/* ==========================================================================
   首屏占位：异步渲染的内容页预留高度，避免页脚被顶动造成的 CLS
   ========================================================================== */
body[data-page="courses"] main#main,
body[data-page="vocabulary"] main#main,
body[data-page="grammar"] main#main,
body[data-page="listening"] main#main,
body[data-page="speaking"] main#main,
body[data-page="reading"] main#main,
body[data-page="writing"] main#main,
body[data-page="translation"] main#main,
body[data-page="exams"] main#main {
  min-height: 78vh;
}

@media (max-width: 760px) {
  body[data-page="courses"] main#main,
  body[data-page="vocabulary"] main#main,
  body[data-page="grammar"] main#main,
  body[data-page="listening"] main#main,
  body[data-page="speaking"] main#main,
  body[data-page="reading"] main#main,
  body[data-page="writing"] main#main,
  body[data-page="translation"] main#main,
  body[data-page="exams"] main#main {
    min-height: 66vh;
  }
}

/* 页脚在首屏渲染完成前不参与布局：避免异步内容把页脚顶下去造成的整页跳动 */
body:not(.is-ready) .site-footer { display: none; }
body:not(.is-ready) .subscribe { display: none; }

/* ==========================================================================
   Phase 6 — 分析页 / 个人中心稳定占位
   数据就绪前按首屏最终尺寸预留空间，避免渲染后整页跳动。
   数值来自 1360×900 与 390×844 的实测渲染高度。
   ========================================================================== */
body[data-page="analytics"]:not(.is-ready) #anBanner { min-height: 83px; }
body[data-page="analytics"]:not(.is-ready) #anStats { min-height: 349px; }
body[data-page="analytics"]:not(.is-ready) #anTrend {
  min-height: 200px;
  aspect-ratio: 8 / 3;
}
body[data-page="analytics"]:not(.is-ready) #anRadar { aspect-ratio: 320 / 268; }
body[data-page="analytics"]:not(.is-ready) #anGoal { min-height: 140px; }
body[data-page="analytics"]:not(.is-ready) #anWeak,
body[data-page="analytics"]:not(.is-ready) #anSuggest { min-height: 60px; }

body[data-page="profile"]:not(.is-ready) .profile-hero { min-height: 148px; }
body[data-page="profile"]:not(.is-ready) #profileAccount { min-height: 73px; }
body[data-page="profile"]:not(.is-ready) #profilePlan { min-height: 192px; }
body[data-page="profile"]:not(.is-ready) #profileForm { min-height: 431px; }
body[data-page="profile"]:not(.is-ready) #profileCollections { min-height: 50px; }
body[data-page="profile"]:not(.is-ready) #profileAchievements { min-height: 451px; }
body[data-page="profile"]:not(.is-ready) #profileData { min-height: 108px; }

@media (max-width: 900px) {
  body[data-page="analytics"]:not(.is-ready) #anStats { min-height: 509px; }
}

@media (max-width: 640px) {
  body[data-page="analytics"]:not(.is-ready) #anBanner { min-height: 103px; }
  body[data-page="analytics"]:not(.is-ready) #anSuggest { min-height: 83px; }
  body[data-page="profile"]:not(.is-ready) .profile-hero { min-height: 202px; }
  body[data-page="profile"]:not(.is-ready) #profileAccount { min-height: 79px; }
  body[data-page="profile"]:not(.is-ready) #profileForm { min-height: 430px; }
  body[data-page="profile"]:not(.is-ready) #profileCollections { min-height: 177px; }
  body[data-page="profile"]:not(.is-ready) #profileData { min-height: 234px; }
}
