:root {
  /* Clean Minimal Palette */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --phone-bg: rgba(255, 255, 255, 0.7);
  --card: rgba(255, 255, 255, 1);
  --card-hover: rgba(248, 250, 252, 1);
  
  /* Text (Slate / Dark) */
  --ink: #0f172a;
  --muted: #64748b;
  --text: #0f172a;
  --text-2: #64748b;
  
  /* Borders & Shadows */
  --line: rgba(15, 23, 42, 0.08);
  --border: rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.08);
  
  /* Brand (Modern Electric Blue) */
  --brand: #3b82f6;
  --brand-d: #2563eb;
  --brand-primary: #2563eb;
  --brand-gradient: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  
  /* Semantic */
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --success: #10b981;
  
  /* Semantic Backgrounds (Soft, low opacity) */
  --info-bg: rgba(14, 165, 233, 0.1);
  --ok-bg: rgba(16, 185, 129, 0.1);
  --warn-bg: rgba(245, 158, 11, 0.1);
}

/* Learning assistant: organizes existing courses without replacing their flows. */
.learning-priority-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.learning-priority-actions button {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.learning-assistant-conversation {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbeafe;
}
.learning-assistant-reply,
.course-assistant-reply {
  min-height: 34px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
}
.learning-assistant-conversation label {
  margin: 10px 0 6px;
  font-size: 12px;
}
.learning-assistant-conversation > div:last-of-type,
.course-assistant-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.learning-assistant-conversation input,
.course-assistant-input-row input {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 13px;
}
.learning-assistant-conversation button,
.course-assistant-input-row button {
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* First-run goal negotiation keeps the existing steps but presents them as one conversation. */
.onboarding-conversation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.onboarding-conversation-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.onboarding-conversation-heading > div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.onboarding-conversation-heading strong {
  color: #0f172a;
  font-size: 14px;
}
.onboarding-conversation-heading small {
  color: #64748b;
  font-size: 12px;
}
.onboarding-tutor-avatar,
.onboarding-message.assistant > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.onboarding-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.onboarding-message p {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.onboarding-message.assistant p {
  border-bottom-left-radius: 4px;
  background: #eef4ff;
  color: #1e3a5f;
}
.onboarding-message.learner {
  justify-content: flex-end;
}
.onboarding-message.learner p {
  border-bottom-right-radius: 4px;
  background: #2563eb;
  color: #fff;
}
.onboarding-reply {
  margin: 0 0 18px 42px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}
.onboarding-reply-label,
.onboarding-choice-label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.onboarding-score,
.onboarding-time-value {
  margin: 4px 0 10px;
  color: #1d4ed8;
  font-size: 34px;
  font-weight: 750;
  line-height: 1.15;
}
.onboarding-reply input[type="range"] {
  width: 100%;
  accent-color: #2563eb;
}
.onboarding-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}
.onboarding-choice-label {
  margin: 2px 0 9px 42px;
}
.onboarding-time-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px 42px;
}
.onboarding-time-options .opt {
  min-height: 44px;
  padding: 8px 6px;
  text-align: center;
}
.onboarding-assurance {
  margin: 0 0 18px 42px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}
.onboarding-level-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px 42px;
}
.onboarding-level-options .opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.onboarding-level-options .opt strong {
  font-size: 14px;
}
.onboarding-level-options .opt small {
  color: #64748b;
  font-size: 12px;
}
@media (max-width: 430px) {
  .onboarding-reply,
  .onboarding-choice-label,
  .onboarding-time-options,
  .onboarding-assurance,
  .onboarding-level-options {
    margin-left: 0;
  }
}
.course-learning-assistant {
  position: absolute;
  right: 18px;
  bottom: 84px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 6px 8px rgba(37, 99, 235, 0.22);
  cursor: pointer;
}
.course-learning-assistant-panel {
  position: absolute;
  right: 14px;
  bottom: 82px;
  left: 14px;
  z-index: 40;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 8px rgba(15, 23, 42, 0.14);
}
.course-learning-assistant-panel header,
.course-learning-assistant-panel header > div {
  display: flex;
  align-items: center;
}
.course-learning-assistant-panel header {
  justify-content: space-between;
}
.course-learning-assistant-panel header > div {
  gap: 8px;
}
.course-learning-assistant-panel header span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.course-learning-assistant-panel header button {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.course-learning-assistant-panel > p {
  margin: 10px 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}
.course-assistant-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.course-assistant-quick-actions button {
  padding: 7px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  background: #eff6ff;
  color: #1e40af;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.course-assistant-reply {
  margin-top: 10px;
}
.course-learning-assistant-panel label {
  margin: 10px 0 6px;
  font-size: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-gradient); 
  color: var(--ink); 
  line-height: 1.6;
  display: flex; justify-content: center; min-height: 100vh; padding: 16px;
  background-attachment: fixed;
}

/* Phone Container: Glassmorphism */
.phone {
  width: 100%; max-width: 420px; 
  background: var(--phone-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px; 
  overflow: hidden; 
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; min-height: 760px;
  position: relative;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; 
  border-bottom: 1px solid var(--line); 
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo { font-weight: 700; color: var(--brand-d); letter-spacing: 0.5px; font-size: 17px; }
.bar-right { display: flex; align-items: center; gap: 12px; }
.progress { font-size: 13px; font-weight: 500; color: var(--muted); }
.lang { border: none; background: transparent; color: var(--brand); font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.lang:hover { opacity: 0.7; }

main { padding: 26px 22px 34px; animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
@keyframes slideUp { 
  from { opacity: 0; transform: translateY(12px); } 
  to { opacity: 1; transform: none; } 
}

h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; line-height: 1.25; color: var(--brand-d); letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--ink); }
.sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; line-height: 1.5; }
.hero-spot { font-size: 52px; text-align: center; margin: 12px 0 8px; filter: drop-shadow(0 4px 12px rgba(224, 122, 95, 0.3)); animation: float 3s ease-in-out infinite; }

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

.trust { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 500; color: var(--brand-d); background: var(--ok-bg); padding: 8px 14px; border-radius: 99px; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,0.6); }

label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin: 18px 0 8px; }
input, textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; font-family: inherit; 
  background: var(--card); color: var(--ink);
  transition: all 0.2s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
input:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ok-bg);
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

/* Buttons */
.btn {
  width: 100%; padding: 16px; border: none; border-radius: 16px; margin-top: 24px;
  background: var(--brand-gradient); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(224, 122, 95, 0.25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(224, 122, 95, 0.35); }
.btn:active { transform: scale(0.97); box-shadow: 0 4px 12px rgba(224, 122, 95, 0.2); }
.btn.secondary { 
  background: var(--card); color: var(--brand-d); border: 1px solid rgba(224, 122, 95, 0.3); 
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { background: #fff; border-color: var(--brand); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }

/* Options / Cards */
.opt {
  display: block; width: 100%; text-align: left; padding: 16px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: 16px; 
  background: var(--card);
  font-size: 16px; font-weight: 500; color: var(--ink);
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.opt:hover { background: var(--card-hover); transform: translateY(-1px); border-color: rgba(224, 122, 95, 0.4); }
.opt.sel { 
  border-color: var(--brand); 
  box-shadow: 0 0 0 2px rgba(224, 122, 95, 0.2); 
  background: #fff; color: var(--brand-d);
}
.opt small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 4px; line-height: 1.4; }

.card { 
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; 
  padding: 20px; margin-top: 16px; 
  box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.plan-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.plan-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.plan-card.active {
  border-color: var(--brand);
  background: #fff;
}
.plan-card.highlight {
  background: rgba(224, 122, 95, 0.08);
}
.plan-name {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.plan-card strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.3;
}
.plan-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.plan-card button {
  display: none;
}
.policy-list {
  margin: 8px 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}
.policy-list li + li { margin-top: 6px; }
.big-score { font-size: 52px; font-weight: 700; line-height: 1; color: var(--brand-d); letter-spacing: -1px; }
.cefr { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand-d); background: var(--ok-bg); padding: 4px 12px; border-radius: 99px; }

/* Words Grid */
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.word {
  padding: 14px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  text-align: center; font-size: 15px; cursor: pointer; user-select: none; transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.word:hover { background: #fff; border-color: rgba(224, 122, 95, 0.3); }
.word.on { border-color: var(--brand); background: var(--ok-bg); color: var(--brand-d); font-weight: 600; box-shadow: 0 0 0 2px rgba(224, 122, 95, 0.1); }
.mini-q { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.45; }

/* Rungs / Ladder */
.rung { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rung:last-child { border: none; }
.rung .b { font-size: 22px; font-weight: 700; width: 48px; color: var(--brand-d); text-align: right; }
.rung .u { font-size: 14px; color: var(--ink); line-height: 1.4; flex: 1; }
.rung.locked .b { color: var(--muted); }
.rung.locked .u { color: var(--muted); }
.rung.you { background: var(--ok-bg); border-radius: 14px; padding: 16px; margin: 8px -12px; border: none; }

/* Skills Bars */
.sk { margin: 12px 0; }
.sk-h { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.sk-track { position: relative; height: 10px; background: rgba(74, 59, 50, 0.06); border-radius: 99px; overflow: hidden; }
.sk-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.sk-mark { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); border-radius: 2px; }
.crit { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.crit:last-child { border: none; }
.crit .r { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* Scorecard */
.scorecard { background: #fff; border: none; border-radius: 24px; padding: 24px; text-align: center; box-shadow: var(--shadow-lg); }
.scorecard .hook { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand-d); background: var(--ok-bg); padding: 6px 16px; border-radius: 99px; margin-top: 10px; }
.row4 { display: flex; justify-content: space-around; font-size: 14px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.qr { width: 44px; height: 44px; background: rgba(74, 59, 50, 0.04); border-radius: 10px; display: grid; place-items: center; font-size: 24px; }

/* Starter diagnostic result */
.result-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.result-overview {
  gap: 4px;
  padding-bottom: 4px;
}
.result-overview h1 {
  margin: 0;
  text-wrap: balance;
}
.result-kicker {
  color: var(--brand-d);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.score-strip div {
  min-width: 0;
  padding: 10px 8px;
  background: rgba(224, 122, 95, 0.08);
  border-radius: 12px;
  text-align: center;
}
.score-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}
.score-strip strong {
  display: block;
  color: var(--brand-d);
  font-size: 24px;
  line-height: 1.15;
  margin-top: 4px;
}
.result-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.result-panel h2 {
  margin: 4px 0 6px;
  font-size: 18px;
  color: var(--ink);
}
.result-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.panel-label {
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 700;
}
.weak-panel {
  border-color: rgba(214, 140, 69, 0.28);
  background: rgba(255, 249, 240, 0.82);
}
.task-panel {
  border-color: rgba(74, 111, 130, 0.18);
  background: rgba(245, 251, 253, 0.82);
}
.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.task-meta span {
  color: var(--info);
  background: var(--info-bg);
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.criteria-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.criteria-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.criteria-row:last-child { border-bottom: none; }
.criteria-row strong {
  color: var(--ink);
  font-size: 15px;
}
.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.result-actions .btn {
  margin-top: 0;
}

/* AI coach handoff */
.coach-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.coach-summary div {
  min-width: 0;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.coach-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.coach-summary strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  margin-top: 4px;
}
.coach-hero {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  background: rgba(245, 251, 253, 0.82);
  box-shadow: var(--shadow-sm);
}
.coach-hero h2 {
  margin: 4px 0 6px;
  font-size: 18px;
}
.coach-hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.coach-hero .recommend-reason {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-d);
  font-size: 13px;
  font-weight: 700;
}
.coach-hero .btn {
  margin-top: 14px;
}
.starter-hero {
  display: grid;
  gap: 12px;
}
.starter-hero .btn {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  font-size: 17px;
}
.starter-duration {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.language-ladder,
.skill-gateway,
.foundation-entry {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.locale-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 26, 36, .42);
}

.locale-picker {
  position: relative;
  width: min(100%, 440px);
  max-height: min(680px, 92vh);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(20, 26, 36, .2);
}

.locale-picker h2 { margin: 8px 0; }
.locale-picker p { color: var(--text-2); line-height: 1.55; }
.locale-picker label { display: block; margin: 20px 0 8px; font-weight: 600; }
.locale-picker select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: inherit; }
.locale-picker .btn { width: 100%; margin-top: 18px; }
.locale-picker-close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: var(--text-2); font-size: 28px; line-height: 1; cursor: pointer; }
.primary-learning-mode {
  margin-top: 10px;
  border-color: rgba(224, 122, 95, 0.26);
  background: rgba(255, 250, 244, 0.92);
}
.primary-learning-mode p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.ladder-head {
  display: grid;
  gap: 3px;
}
.ladder-head span,
.task-orientation span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.ladder-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.ladder-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.ladder-step {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 251, 253, 0.7);
}
.ladder-step span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(74, 111, 130, 0.12);
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 800;
}
.ladder-step strong {
  font-size: 13px;
  line-height: 1.2;
}
.ladder-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.ladder-step.active {
  border-color: rgba(224, 122, 95, 0.42);
  background: rgba(255, 239, 220, 0.85);
}
.language-ladder p {
  margin: 0;
  color: var(--brand-d);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.foundation-entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.foundation-entry-card,
.foundation-sentence-card,
.sentence-study-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.foundation-entry-card.primary {
  border-color: rgba(224, 122, 95, 0.34);
  background: rgba(255, 245, 235, 0.92);
}
.foundation-entry-card span,
.foundation-sentence-card span,
.sentence-study-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.foundation-entry-card strong,
.foundation-sentence-card strong,
.sentence-study-card strong {
  font-size: 16px;
  line-height: 1.3;
}
.foundation-entry-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.study-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.study-status div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}
.study-status span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.study-status strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}
/* Legacy tabs removed */

/* Vocabulary Learning Styles */
.vocab-fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - 120px);
  padding: 24px 0;
}
.vocab-progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}
.vocab-progress-dot {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}
.vocab-progress-dot.active {
  background: var(--brand-d);
}
.vocab-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  padding: 40px 24px;
  margin-bottom: 32px;
}
.vocab-word {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.vocab-phonetic {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 24px;
  font-family: monospace;
}
.vocab-meaning {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 32px;
}
.vocab-example {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  width: 100%;
}
.vocab-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.vocab-btn-unknown {
  background: var(--surface-2);
  color: var(--text);
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}
.vocab-btn-known {
  background: var(--brand-d);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}

.mode-title {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(224, 122, 95, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: var(--shadow-sm);
}
.mode-title span {
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 800;
}
.mode-title strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}
.word-process,
.sentence-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}
.sentence-process {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.word-process li,
.sentence-process li {
  min-width: 0;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.word-process li.active,
.sentence-process li.active {
  border-color: rgba(224, 122, 95, 0.42);
  color: var(--brand-d);
  background: rgba(255, 250, 244, 0.96);
}
.word-process li.done,
.sentence-process li.done {
  border-color: rgba(74, 111, 130, 0.22);
  color: var(--ink);
  background: rgba(232, 244, 241, 0.86);
}
.word-study-list,
.sentence-study-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.word-study-card {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}
.word-study-action {
  align-self: start;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-d);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.word-study-action.selected {
  border-color: rgba(224, 122, 95, 0.42);
  background: rgba(255, 239, 220, 0.9);
}
.word-study-card.learned.known {
  border-color: rgba(74, 111, 130, 0.28);
  background: rgba(232, 244, 241, 0.86);
}
.word-study-card.learned.review {
  border-color: rgba(224, 122, 95, 0.3);
  background: rgba(255, 250, 244, 0.94);
}
.word-study-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.word-study-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}
.word-study-card small,
.word-study-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.word-study-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.word-recall-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.word-recall-actions .tiny-link {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.word-recall-actions .tiny-link.selected {
  border-color: rgba(224, 122, 95, 0.42);
  color: var(--brand-d);
  background: rgba(255, 239, 220, 0.9);
}
.word-use-card {
  border-color: rgba(74, 111, 130, 0.22);
  background: rgba(232, 244, 241, 0.5);
}
.sentence-study-card {
  width: 100%;
}
.sentence-study-card.selected {
  border-color: rgba(224, 122, 95, 0.42);
  background: rgba(255, 239, 220, 0.9);
}
.sentence-study-card span {
  display: block;
  margin-bottom: 2px;
}
.sentence-structure-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(74, 111, 130, 0.22);
  border-radius: 8px;
  background: rgba(232, 244, 241, 0.66);
}
.sentence-structure-card span {
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 800;
}
.sentence-structure-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.sentence-structure-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.sentence-swap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.sentence-swap-word {
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.sentence-swap-word.selected {
  border-color: rgba(224, 122, 95, 0.42);
  color: var(--brand-d);
  background: rgba(255, 239, 220, 0.9);
}
.sentence-draft-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}
.sentence-draft-card label {
  margin: 0;
}
.sentence-draft-card textarea {
  min-height: 110px;
}
.review-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}
.review-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.review-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}
.review-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(74, 111, 130, 0.08);
}
.learning-mode-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.segmented-control button.active {
  background: #fff;
  color: var(--brand-d);
  box-shadow: var(--shadow-sm);
}
.task-orientation {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}
.task-orientation strong {
  color: var(--ink);
  font-size: 18px;
}
.task-orientation small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.skill-gateway-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.skill-gateway-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.skill-gateway-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.skill-gateway-card strong {
  font-size: 15px;
  line-height: 1.25;
}
.skill-gateway-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.skill-gateway-card.active {
  border-color: rgba(224, 122, 95, 0.42);
  background: rgba(255, 239, 220, 0.9);
}
.lesson-outline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.lesson-outline li {
  min-width: 0;
  padding-top: 8px;
  border-top: 3px solid rgba(74, 111, 130, 0.2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}
.quick-choice {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.quick-choice span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.choice-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.choice-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 8px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.choice-chip.active {
  border-color: rgba(224, 122, 95, 0.45);
  background: rgba(255, 239, 220, 0.92);
  color: var(--brand-d);
}
.secondary-plan {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.secondary-plan summary {
  cursor: pointer;
  font-weight: 700;
}
.secondary-plan p {
  margin: 8px 0 0;
  line-height: 1.5;
}
.coach-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.coach-section-head h2 {
  margin: 0;
  font-size: 17px;
}
.coach-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}
.practice-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.practice-card:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(224, 122, 95, 0.24);
}
.practice-card.rec {
  border-color: rgba(224, 122, 95, 0.38);
  background: rgba(255, 249, 240, 0.88);
}
.practice-card.done {
  border-color: rgba(74, 111, 130, 0.28);
  background: rgba(245, 251, 253, 0.92);
}
.practice-card.done .practice-state {
  color: var(--info);
  background: var(--info-bg);
}
.practice-type {
  flex: none;
  min-width: 44px;
  color: var(--brand-d);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.practice-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.practice-main strong {
  font-size: 15px;
  line-height: 1.35;
}
.practice-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.practice-state {
  flex: none;
  align-self: center;
  color: var(--brand-d);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.coach-done {
  margin-top: 14px;
  padding: 14px 2px 0;
  border-top: 1px solid var(--line);
}
.coach-done span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.coach-done strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-top: 2px;
}
.weekly-plan {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.weekly-plan-head {
  display: grid;
  gap: 3px;
}
.weekly-plan-head span,
.weekly-plan small {
  color: var(--muted);
  font-size: 12px;
}
.weekly-plan-head strong {
  font-size: 16px;
  line-height: 1.4;
}
.weekly-plan p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}
.weekly-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}
.weekly-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.weekly-plan .btn {
  margin-top: 2px;
}
.weekly-schedule {
  margin-top: 2px;
}
.weekly-schedule summary {
  color: var(--info);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.weekly-schedule-list {
  display: grid;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.weekly-schedule-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.weekly-schedule-row span,
.weekly-schedule-row small {
  color: var(--muted);
  font-size: 11px;
}
.weekly-schedule-row strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}
.weekly-schedule-row.current strong,
.weekly-schedule-row.current small {
  color: var(--brand-d);
}
.weekly-schedule-row.completed {
  opacity: 0.68;
}
.speaking-exam-part {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.speaking-exam-part:last-child { border-bottom: 0; }
.speaking-exam-part p { margin: 0; }
.stage-speaking-recorder { margin: 14px 0; }
.exam-skill-results p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
}
.content-head {
  margin-top: 26px;
}
.content-plan {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.module-card {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.module-card:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(74, 111, 130, 0.22);
}
.module-week,
.module-count {
  color: var(--info);
  background: var(--info-bg);
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}
.module-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.module-main strong {
  font-size: 15px;
  line-height: 1.35;
}
.module-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.module-detail {
  display: grid;
  gap: 14px;
}
.lesson-row {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.lesson-row:last-of-type {
  border-bottom: none;
}
.lesson-row > span {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--brand-d);
  background: var(--ok-bg);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.lesson-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.lesson-row strong {
  font-size: 15px;
  line-height: 1.35;
}
.lesson-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.back-link {
  position: sticky;
  top: 10px;
  z-index: 20;
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(224, 122, 95, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-d);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  touch-action: manipulation;
}
.back-link::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
}
.back-link:hover {
  background: #fff;
  border-color: rgba(224, 122, 95, 0.34);
}
.back-link + section,
.back-link + p {
  margin-top: 0;
}
.practice-flow {
  display: grid;
  gap: 14px;
}
.lesson-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lesson-progress li {
  min-width: 0;
  padding: 7px 2px;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.lesson-progress li.done {
  border-color: rgba(74, 111, 130, 0.45);
  color: var(--info);
}
.lesson-progress li.active {
  border-color: var(--brand);
  color: var(--brand-d);
}
.foundation-flow {
  gap: 16px;
}
.foundation-library {
  display: grid;
  gap: 15px;
  padding-bottom: 90px;
}
.foundation-word-list,
.foundation-sentence-list {
  display: grid;
  gap: 10px;
}
.foundation-word-card {
  display: grid;
  grid-template-columns: minmax(86px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}
.foundation-word-card div {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.foundation-word-card strong {
  font-size: 15px;
  line-height: 1.35;
}
.foundation-word-card small,
.foundation-word-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.foundation-sentence-card.selected {
  border-color: rgba(224, 122, 95, 0.42);
  background: rgba(255, 239, 220, 0.9);
}
.foundation-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foundation-progress li {
  min-width: 0;
  padding: 7px 2px;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.foundation-progress li.done {
  border-color: rgba(74, 111, 130, 0.45);
  color: var(--info);
}
.foundation-progress li.active {
  border-color: var(--brand);
  color: var(--brand-d);
}
.foundation-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}
.foundation-card.final {
  border-color: rgba(224, 122, 95, 0.32);
  background: rgba(255, 239, 220, 0.78);
}
.foundation-card span,
.foundation-card label {
  color: var(--brand-d);
  font-size: 13px;
  font-weight: 800;
}
.foundation-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.foundation-card textarea {
  min-height: 118px;
  resize: vertical;
}
.simulation-section-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.simulation-section-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 3px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.simulation-section-row strong {
  grid-row: 1 / 3;
  color: var(--brand-d);
  font-size: 15px;
}
.simulation-section-row span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.simulation-section-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.simulation-readiness-note {
  margin-top: 2px;
}
.practice-step {
  width: max-content;
  color: var(--brand-d);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.practice-score-badge {
  display: inline-block;
  padding: 4px 10px;
  margin: -4px 0 12px;
  background: rgba(224, 122, 95, 0.12);
  color: var(--brand-d);
  border: 1px solid rgba(224, 122, 95, 0.3);
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}
.practice-prompt,
.practice-answer {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  background: rgba(245, 251, 253, 0.82);
}
.practice-prompt span,
.practice-answer span {
  display: block;
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.practice-prompt strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
.tap-input {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}
.tap-input h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.practice-material {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  border-radius: 8px;
  background: #fff;
}
.practice-material > span {
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
}
.practice-material p,
.practice-material ul {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}
.practice-material audio {
  width: 100%;
}
.practice-material small,
.spoken-answer-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.recording-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.recording-controls .btn {
  width: auto;
  min-width: 96px;
  margin: 0;
}
.recording-controls > span {
  flex: 1 1 150px;
  color: var(--muted);
  font-size: 13px;
}
.recording-delete {
  color: #9f3f2d;
}
.recording-delete[hidden] {
  display: none;
}
#dailyRecordingPreview {
  width: 100%;
}
.practice-method {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.practice-method span {
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
}
.practice-method p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
.question-group {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.question-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.question-group > strong {
  font-size: 14px;
  line-height: 1.5;
}
.text-question input,
.question-group > input {
  width: 100%;
}
.practice-limits {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.practice-timer {
  color: var(--info);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.exam-timer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}
.exam-timer span,
.exam-timer small {
  color: var(--muted);
  font-size: 12px;
}
.exam-timer strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.exam-timer small {
  grid-column: 1 / -1;
}
.question-feedback-list {
  display: grid;
  gap: 10px;
}
.question-feedback-list h2 {
  margin: 0;
  font-size: 16px;
}
.question-feedback {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.question-feedback > span {
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 700;
}
.question-feedback.incorrect > span {
  color: #9f3f2d;
}
.question-feedback p,
.question-feedback small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.order-bank {
  display: grid;
  gap: 8px;
}
.order-chip {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.order-chip:disabled {
  background: rgba(255, 239, 220, 0.95);
  color: var(--brand-d);
  cursor: default;
}
.order-answer {
  align-items: flex-start;
}
.practice-table-wrap {
  overflow-x: auto;
}
.practice-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  font-size: 14px;
}
.practice-table th,
.practice-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.route-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 54px);
  gap: 8px;
  min-height: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 251, 253, 0.82);
}
.map-place,
.map-candidate {
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(74, 111, 130, 0.22);
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.map-candidate {
  width: 30px;
  height: 30px;
  justify-self: center;
  align-self: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}
.map-entrance { grid-area: 4 / 2; }
.map-cafe { grid-area: 3 / 1; }
.map-lift { grid-area: 2 / 1; }
.map-bookshop { grid-area: 2 / 3; }
.map-doors { grid-area: 1 / 2; }
.map-near-cafe { grid-area: 4 / 1; }
.map-opposite-bookshop { grid-area: 2 / 2; }
.map-beyond-doors { grid-area: 1 / 3; }
.map-path {
  grid-area: 1 / 2 / 5 / 3;
  justify-self: center;
  width: 4px;
  background: rgba(74, 111, 130, 0.18);
}
.process-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.process-stage {
  min-width: 128px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 251, 253, 0.82);
}
.process-stage strong { font-size: 13px; }
.process-stage small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.process-arrow { align-self: center; color: var(--brand-d); font-weight: 700; }
.built-answer {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(74, 111, 130, 0.28);
  background: rgba(245, 251, 253, 0.82);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.word-bank,
.choice-grid,
.letter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.word-chip,
.letter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.letter-chip {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  text-transform: uppercase;
}
.word-chip.selected,
.word-chip:disabled,
.letter-chip:disabled {
  border-color: rgba(224, 122, 95, 0.4);
  background: rgba(255, 239, 220, 0.95);
  color: var(--brand-d);
}
.word-chip:disabled,
.letter-chip:disabled {
  cursor: default;
}
.tap-actions {
  display: flex;
  gap: 10px;
}
.base-check-panel {
  display: grid;
  gap: 12px;
}
.base-check-row {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.base-check-row span {
  color: var(--brand-d);
  font-size: 13px;
  font-weight: 800;
}
.base-check-row strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.tiny-link {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--brand-d);
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.service-notice,
.empty-state,
.recovery-state {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 111, 130, 0.16);
  background: rgba(245, 251, 253, 0.84);
}
.service-notice p,
.empty-state p,
.recovery-state p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.service-notice {
  margin-top: 12px;
}
.recovery-state {
  margin-top: 24px;
}
.spelling-box {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}
.spelling-box > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.optional-write {
  color: var(--muted);
  font-size: 13px;
}
.optional-write summary {
  cursor: pointer;
  font-weight: 700;
}
.optional-write textarea {
  margin-top: 10px;
  min-height: 92px;
}
.practice-answer p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.practice-answer.improved {
  border-color: rgba(74, 111, 130, 0.26);
  background: rgba(235, 247, 241, 0.86);
}
.writing-upgrade {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(224, 122, 95, 0.2);
  background: rgba(255, 249, 240, 0.9);
  box-shadow: var(--shadow-sm);
}
.writing-upgrade h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.writing-upgrade p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}
.writing-upgrade summary {
  cursor: pointer;
  color: var(--brand-d);
  font-size: 14px;
  font-weight: 700;
}
.writing-upgrade ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.writing-upgrade li {
  margin: 6px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.history-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.history-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}
.history-row > span {
  flex: none;
  color: var(--brand-d);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.history-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.history-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.profile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.profile-summary div {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.profile-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.profile-summary strong {
  display: block;
  color: var(--brand-d);
  font-size: 19px;
  line-height: 1.2;
  margin-top: 4px;
}
.profile-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  background: rgba(245, 251, 253, 0.82);
}
.setting-list {
  background: #ffffff;
  border-radius: 12px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
  transition: background 0.2s;
}
.setting-item:last-child {
  border-bottom: none;
}
.setting-item:active {
  background: #f9f9f9;
}
.setting-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
.setting-item-right {
  color: var(--muted);
  font-size: 18px;
}
.vip-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  color: #0f172a;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}
.vip-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.vip-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.vip-info h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #0f172a;
  font-weight: 700;
}
.vip-badge {
  display: inline-block;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.vip-badge.free {
  background: #f1f5f9;
  color: #64748b;
}
.vip-btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.vip-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Standard Fixed Bottom Navigation */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 16px));
  z-index: 100;
  justify-content: space-around;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.tabbar .tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.tabbar .tab .tab-icon {
  font-size: 22px;
  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.tabbar .tab.on {
  color: #2563eb;
}
.tabbar .tab.on .tab-icon {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* High-Converting PRO Subscription & Plan Tier Selection */
.pro-hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 20px;
  padding: 24px 20px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  position: relative;
  overflow: hidden;
}
.pro-hero-card .pro-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
}
.pro-hero-card h1 {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 8px;
  font-weight: 800;
}
.pro-hero-card p {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 0;
}

.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.pricing-tier-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pricing-tier-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}
.pricing-tier-card.selected {
  border-color: #2563eb;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}
.pricing-tier-card.highlight {
  border-color: #2563eb;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}
.pricing-tier-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 99px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.pricing-tier-info h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.pricing-tier-info .daily-subtext {
  font-size: 13px;
  color: #2563eb;
  font-weight: 600;
}
.pricing-tier-price {
  text-align: right;
}
.pricing-tier-price .amount {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}
.pricing-tier-price .old-price {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
  display: block;
}

.pro-features-container {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.pro-features-container h2 {
  font-size: 16px;
  margin: 0 0 14px;
  color: #0f172a;
  font-weight: 700;
}
.pro-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #f1f5f9;
}
.pro-feature-item:last-child {
  border-bottom: none;
}
.pro-feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.pro-feature-text strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}
.pro-feature-text span {
  font-size: 12px;
  color: #64748b;
}

.btn-pro-glow {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-pro-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}
.btn-pro-glow:active {
  transform: scale(0.98);
}

.trust-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
.trust-guarantee span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.profile-card h2 {
  margin: 4px 0 6px;
  font-size: 18px;
}
.profile-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.value-proof-card {
  background: rgba(255, 255, 255, 0.86);
}
.proof-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.proof-stats div {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(245, 251, 253, 0.84);
}
.proof-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.proof-stats strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.proof-list,
.value-reason-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.proof-item,
.value-reason {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(245, 251, 253, 0.72);
}
.proof-item span,
.proof-item small,
.value-reason span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.proof-item strong,
.value-reason strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}
.proof-item p {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.proof-item p.better {
  background: var(--ok-bg);
}
.proof-item b {
  color: var(--brand-d);
  font-size: 12px;
}
.progress-chart-container {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 16px;
  margin-top: 8px;
  overflow: hidden;
}
.progress-chart-svg {
  width: 100%;
  height: 140px;
  overflow: visible;
}
.progress-chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(46,155,255,0.25));
  animation: drawLine 1.5s ease-out forwards;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
.progress-chart-point {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 2.5;
}
.progress-chart-point.latest {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 2;
}
.progress-chart-label {
  fill: var(--brand-d);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
}
.progress-chart-date {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: middle;
}
.progress-chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.score-history {
  display: grid;
  gap: 10px;
}
.score-history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}
.score-history-row span,
.score-history-row small {
  color: var(--muted);
  font-size: 13px;
}
.score-history-row strong {
  color: var(--brand-d);
  font-size: 20px;
}
.skill-trend {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}
.skill-line {
  display: grid;
  grid-template-columns: 68px 1fr 36px;
  align-items: center;
  gap: 10px;
}
.skill-line span {
  color: var(--muted);
  font-size: 13px;
}
.skill-line div {
  height: 8px;
  border-radius: 999px;
  background: rgba(74, 59, 50, 0.06);
  overflow: hidden;
}
.skill-line i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-gradient);
}
.skill-line strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}
.v2-archive-skills {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.v2-archive-additional {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}
.v2-profile-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--info-bg);
}
.v2-profile-weeks {
  margin: 4px 0 16px;
}
.v2-profile-weeks h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.v2-profile-week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.v2-profile-week-grid article {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.v2-profile-week-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}
.v2-profile-week-grid p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}
.v2-profile-evidence {
  margin: 0 0 16px;
}
.v2-profile-next-copy span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 12px;
}
.v2-profile-next-copy strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.v2-profile-next-copy p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 430px) {
  .v2-profile-week-grid {
    grid-template-columns: 1fr;
  }
  .v2-profile-next {
    grid-template-columns: 1fr;
  }
  .v2-profile-next .btn {
    width: 100%;
  }
}
.v2-evidence-timeline {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.v2-evidence-timeline h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
.v2-evidence-entry {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.v2-evidence-entry:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.v2-evidence-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.v2-evidence-heading span {
  color: var(--muted);
  white-space: nowrap;
}
.v2-evidence-entry dl,
.v2-evidence-entry dl div {
  margin: 0;
}
.v2-evidence-entry dl {
  display: grid;
  gap: 6px;
}
.v2-evidence-entry dl div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}
.v2-evidence-entry dt {
  color: var(--muted);
  font-size: 12px;
}
.v2-evidence-entry dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}
.v2-learning-focus {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.v2-learning-focus h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.v2-learning-focus-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.v2-learning-focus-row:first-of-type {
  border-top: 0;
}
.v2-learning-focus-row strong,
.v2-learning-focus-row p {
  font-size: 12px;
}
.v2-learning-focus-row p {
  margin: 4px 0 0;
  color: var(--text-2);
  line-height: 1.45;
}
@media (max-width: 430px) {
  .v2-learning-focus-row {
    grid-template-columns: 1fr;
  }
  .v2-learning-focus-row .tiny-link {
    justify-self: start;
  }
}
.v2-archive-skill {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.v2-archive-skill span {
  color: var(--muted);
}
.v2-archive-skill div {
  color: var(--text-2);
  line-height: 1.45;
}
.v2-archive-skill strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 430px) {
  .v2-archive-skill {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .v2-archive-skill strong {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }
}
.writing-flow,
.writing-result,
.speaking-flow {
  display: grid;
  gap: 14px;
}
.writing-prompt,
.speaking-prompt {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 111, 130, 0.18);
  background: rgba(245, 251, 253, 0.82);
}
.writing-prompt span,
.speaking-prompt span {
  display: block;
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.writing-prompt strong,
.speaking-prompt strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.essay-box {
  min-height: 220px;
}
.writing-score-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.writing-score-card span {
  color: var(--muted);
  font-size: 13px;
}
.writing-score-card strong {
  color: var(--brand-d);
  font-size: 44px;
  line-height: 1;
}
.writing-score-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.writing-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.writing-criteria div {
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}
.writing-criteria span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.writing-criteria strong {
  display: block;
  color: var(--brand-d);
  font-size: 24px;
  margin-top: 4px;
}
.writing-criteria small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
}
.correction-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}
.correction-card span {
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 700;
}
.correction-card p,
.correction-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.correction-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Section Cards */
.sec { border-radius: 16px; padding: 16px; margin-top: 14px; border: 1px solid rgba(255, 255, 255, 0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sec h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.sec p { font-size: 14px; line-height: 1.6; margin-top: 4px; }
.sec.ok { background: var(--ok-bg); color: var(--brand-d); box-shadow: inset 0 2px 8px rgba(255,255,255,0.5); }
.sec.warn { background: var(--warn-bg); color: var(--ink); }
.sec.warn h3 { color: var(--warn); }
.sec.up { background: var(--info-bg); color: var(--ink); }
.sec.up h3 { color: var(--info); }

/* Bottom Tab Bar */
.tabc { min-height: 540px; }
.tabbar { 
  position: sticky; bottom: 0; display: grid;
  width: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line); margin: 24px -22px 0; 
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}
.tab { 
  min-width: 0;
  min-height: 58px;
  border: none; background: none; padding: 13px 2px 11px; 
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0; 
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.tab:hover { background: rgba(74, 59, 50, 0.03); }
.tab .ic { display: none; }
.tab span:last-child { font-size: 12px; font-weight: 800; line-height: 1.2; }
.tab.on { color: var(--brand-d); }
.tab.on span:last-child { color: var(--brand-d); }

/* Modules / Courses */
.mod { 
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; 
  padding: 18px; margin-top: 14px; cursor: pointer; transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.mod:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(123, 80, 67, 0.08); background: #fff; }
.mod.rec { border: 2px solid var(--brand); box-shadow: 0 4px 16px rgba(224, 122, 95, 0.15); }
.mod-h { display: flex; justify-content: space-between; align-items: center; }
.mod-t { font-size: 16px; font-weight: 600; color: var(--ink); }
.mod-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pbar { height: 6px; background: rgba(74, 59, 50, 0.06); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.pbar > div { height: 6px; background: var(--brand-gradient); border-radius: 99px; transition: width 0.6s ease-out; }

.lesson { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.2s; margin: 0 -10px; padding: 16px 10px; border-radius: 12px; }
.lesson:hover { background: rgba(74, 59, 50, 0.03); }
.lesson:last-child { border: none; }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(74, 59, 50, 0.15); display: grid; place-items: center; font-size: 12px; color: var(--muted); flex: none; transition: all 0.2s; }
.dot.done { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(224, 122, 95, 0.3); }
.lesson .lt { flex: 1; font-size: 15px; font-weight: 500; color: var(--ink); }
.lesson .lm { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* My Profile */
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--ok-bg); color: var(--brand-d); display: grid; place-items: center; font-size: 24px; font-weight: 600; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.account-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.account-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.account-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  margin-top: 2px;
}
.btn.compact {
  margin-top: 0;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.baseline-negotiation,
.tutor-agent-mission {
  margin-top: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tutor-agent-mission:empty { display: none; }
.baseline-negotiation-loading {
  color: var(--muted);
  font-size: 14px;
}
.baseline-negotiation-copy span {
  display: block;
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 700;
}
.baseline-negotiation-copy h2 {
  margin: 6px 0 8px;
  font-size: 19px;
  line-height: 1.4;
}
.baseline-negotiation-copy p,
.baseline-confirm-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.baseline-message-label {
  margin-top: 20px;
  font-weight: 700;
}
.baseline-message {
  min-height: 96px;
  border-radius: 8px;
}
.baseline-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.baseline-quick-actions .btn,
.baseline-negotiation > .btn,
.tutor-agent-mission .btn {
  margin-top: 0;
}
.baseline-send {
  margin-top: 14px;
}
.baseline-action-note {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.baseline-goal-summary,
.agent-mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 14px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.baseline-decision-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.baseline-decision-actions .btn {
  margin-top: 0;
}
.agent-mission-meta {
  justify-content: space-between;
}

@media (max-width: 360px) {
  .baseline-quick-actions { grid-template-columns: 1fr; }
}
.menu-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 16px; font-weight: 500; transition: background 0.2s; margin: 0 -10px; border-radius: 12px; }
.menu-row:hover { background: rgba(74, 59, 50, 0.03); }
.menu-row:last-child { border: none; }
.menu-row .v { color: var(--muted); font-size: 14px; font-weight: 400; }

.center { text-align: center; }
.spin { width: 40px; height: 40px; border: 3px solid rgba(224, 122, 95, 0.15); border-top-color: var(--brand); border-radius: 50%; animation: r 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite; margin: 50px auto; }
@keyframes r { to { transform: rotate(360deg); } }

/* Paywall Styles */
.paywall-container {
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-top: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.paywall-card {
  background: var(--bg-sub);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.paywall-features li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.paywall-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

.paywall-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .ladder-steps,
  .skill-gateway-grid {
    grid-template-columns: 1fr;
  }
  .ladder-step,
  .skill-gateway-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
  .ladder-step small,
  .skill-gateway-card small {
    grid-column: 1 / -1;
  }
}

/* Trap Log + Squad v3: dense, outcome-first product surface. */
.classmates-v3 { max-width: 760px; padding-top: 28px; color: #17221d; }
.classmates-v3 h1, .classmates-v3 h2, .classmates-v3 h3, .classmates-v3 p { letter-spacing: 0; }
.classmates-eyebrow, .classmates-kicker { color: #52715f; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.classmates-v3-hero { margin: 8px 0 16px; padding: 22px; border: 1px solid #d8e1d8; border-radius: 12px; background: #f2f7f1; }
.classmates-v3-hero h1 { margin: 8px 0 6px; font-size: 28px; line-height: 1.15; }
.classmates-v3-hero p, .classmates-muted { color: #637066; line-height: 1.55; }
.squad-header-row, .classmates-v3-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.squad-header-row p { margin: 0; font-size: 13px; }
.classmates-seat-count, .classmates-data-note { white-space: nowrap; color: #52715f; font-size: 12px; font-weight: 700; }
.classmates-v3-panel, .classmates-v3-today { margin: 14px 0; padding: 18px; border: 1px solid #e1e7e0; border-radius: 10px; background: #fff; }
.classmates-v3-panel h2, .classmates-v3-today h2 { margin: 5px 0 6px; font-size: 20px; }
.classmates-v3-panel-heading { margin-bottom: 12px; }
.trap-card { padding: 16px; border: 1px solid #eadcc2; border-radius: 9px; background: #fffaf1; }
.trap-card + .trap-card { margin-top: 10px; }
.trap-card-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.trap-skill { color: #9b6b22; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.trap-count { color: #796c5a; }
.trap-card h3 { margin: 10px 0 4px; font-size: 17px; }
.trap-card p { margin: 0 0 12px; color: #5f594f; line-height: 1.5; }
.trap-meta { display: grid; gap: 4px; margin-bottom: 14px; font-size: 13px; }
.trap-meta strong { color: #3d6848; }
.trap-meta span { color: #6b6b61; line-height: 1.45; }
.trap-action { width: auto; min-height: 38px; }
.classmates-v3-footnote { margin: 12px 0 0; color: #7b847c; font-size: 12px; }
.squad-member-list { display: grid; gap: 8px; }
.squad-member, .squad-signal { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0eb; }
.squad-member:first-child, .squad-signal:first-child { border-top: 0; }
.squad-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #edf3ec; color: #3d6848; font-weight: 800; }
.squad-member div, .squad-signal div:first-child { display: grid; gap: 2px; flex: 1; }
.squad-member strong, .squad-signal strong { font-size: 14px; }
.squad-member span, .squad-signal span { color: #6a756c; font-size: 12px; }
.squad-check { color: #3d6848 !important; font-weight: 700; }
.squad-signal { align-items: flex-start; }
.classmates-reaction-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.classmates-reaction-row .btn { min-height: 32px !important; padding: 5px 9px !important; font-size: 12px; }
.classmates-v3-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.classmates-v3-actions .btn { width: auto; }
.classmates-v3-note { min-height: 20px; margin: 10px 0 0; color: #52715f; font-size: 13px; line-height: 1.45; }
.classmates-v3-today { background: #f7faf6; }
.classmates-v3-today p { margin: 4px 0 14px; color: #637066; }
.classmates-v3-rules { margin: 14px 0; padding: 14px 16px; border: 1px solid #e1e7e0; border-radius: 10px; background: #fff; }
.classmates-v3-rules summary { cursor: pointer; color: #425148; font-weight: 700; }
.classmates-v3-rules p { margin: 10px 0 0; color: #637066; font-size: 13px; line-height: 1.55; }
.classmates-v3-footer { text-align: center; }
.design-demo-label { margin-bottom: 10px; color: #8a642b; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
@media (max-width: 640px) {
  .classmates-v3 { padding: 18px 14px 100px; }
  .classmates-v3-hero { padding: 18px; }
  .classmates-v3-hero h1 { font-size: 24px; }
  .classmates-v3-panel, .classmates-v3-today { padding: 15px; }
  .squad-header-row, .classmates-v3-panel-heading { display: block; }
  .classmates-seat-count, .classmates-data-note { display: inline-block; margin-top: 7px; }
  .classmates-reaction-row { justify-content: flex-start; margin-top: 8px; }
}

/* Learning Map */
.learning-map-container {
  margin-top: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}
.learning-map-container::-webkit-scrollbar {
  height: 4px;
}
.learning-map-container::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 4px;
}
.learning-map {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: max-content;
  padding: 0 4px;
}
.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 50px;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.map-node.active {
  opacity: 1;
}
.map-node.completed {
  opacity: 0.8;
}
.node-circle {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--card);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.map-node.active .node-circle {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 12px rgba(224, 122, 95, 0.4);
}
.map-node.completed .node-circle {
  border-color: var(--brand-d);
  color: var(--brand-d);
  background: var(--ok-bg);
}
.map-node.test .node-circle {
  border-radius: 8px; /* Square for tests */
}
.node-label {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.map-node.active .node-label {
  color: var(--brand-d);
}
.map-line {
  position: absolute;
  top: 16px;
  left: 38px;
  width: 28px;
  height: 2px;
  background: var(--line);
  z-index: 1;
}
.map-node:last-child .map-line {
  display: none;
}
.map-node.completed .map-line {
  background: var(--brand);
}

/* Daily Checklist */
.daily-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.checklist-item.done {
  opacity: 0.6;
  background: transparent;
  border-color: transparent;
}
.checklist-item.current {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(224, 122, 95, 0.15);
  background: #fff;
}
.check-icon {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 2px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  font-size: 14px;
}
.checklist-item.done .check-icon {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.checklist-item.current .check-icon {
  border-color: var(--brand);
}
.check-content {
  flex: 1;
}
.check-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}
.check-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.check-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.check-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--info-bg);
  color: var(--info);
  border-radius: 4px;
  font-weight: 600;
}

/* Task Card Styles for Learning Dashboard */
.learning-home {
  display: grid;
  gap: 14px;
}
.learning-scoreboard {
  padding: 16px 18px;
  border-radius: 16px;
  background: #172554;
  color: #fff;
}
.learning-scoreboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.learning-scoreboard-head span,
.learning-scoreboard-head strong {
  display: block;
}
.learning-scoreboard-head span {
  color: #bfdbfe;
  font-size: 12px;
}
.learning-scoreboard-head strong {
  margin-top: 3px;
  font-size: 17px;
  line-height: 1.35;
}
.learning-scoreboard-count {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800;
}
.learning-scoreboard-track {
  height: 7px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}
.learning-scoreboard-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #60a5fa;
  transition: width 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.learning-scoreboard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.learning-scoreboard-summary span {
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  font-size: 11px;
  font-weight: 700;
}
.learning-scoreboard-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.4;
}
.learning-scoreboard-plan-note {
  margin: 9px 0 0;
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.45;
}
.learning-week-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(191, 219, 254, 0.24);
}
.learning-week-summary > div:first-child {
  display: grid;
  gap: 3px;
}
.learning-week-summary span {
  color: #bfdbfe;
  font-size: 11px;
}
.learning-week-summary strong {
  max-width: 68ch;
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
}
.learning-week-track {
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}
.learning-week-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #93c5fd;
  transition: width 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.learning-week-summary p {
  margin: 7px 0 0;
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.4;
}
.learning-path {
  padding: 15px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
}
.learning-path-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.learning-path-head > div {
  display: grid;
  gap: 3px;
}
.learning-path-head span,
.learning-path-head small {
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.learning-path-head strong {
  color: #172554;
  font-size: 15px;
}
.learning-path-head small {
  color: #64748b;
  font-weight: 600;
  text-align: right;
}
.learning-path-steps {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.learning-path-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}
.learning-path-step.current {
  background: #fff;
  box-shadow: 0 0 0 1px #93c5fd;
}
.learning-path-step.up_next {
  opacity: 0.72;
}
.learning-path-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}
.learning-path-step.current .learning-path-number {
  background: #2563eb;
  color: #fff;
}
.learning-path-step strong {
  color: #172554;
  font-size: 13px;
}
.learning-path-step p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.learning-path-status {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.learning-path-step.current .learning-path-status {
  color: #1d4ed8;
}
.learning-assistant-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.learning-priority-assistant > button,
.learning-assistant-discuss {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.learning-priority-assistant > button:focus-visible,
.learning-assistant-discuss:focus-visible,
.learning-assistant-options button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}
.learning-assistant-panel {
  padding: 12px 0 2px;
  border-top: 1px solid #dbeafe;
}
.learning-assistant-panel > p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}
.learning-assistant-options {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.learning-assistant-options button {
  padding: 7px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  background: #fff;
  color: #1e3a8a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.learning-assistant-options button.selected {
  border-color: #2563eb;
  background: #dbeafe;
}
.learning-assistant-note {
  margin-top: 8px !important;
  color: #1e3a8a !important;
}
.learning-assistant-discuss {
  margin-top: 10px;
  padding: 0;
}
.learning-priority {
  padding: 16px;
  border: 2px solid #c7d2fe;
  border-radius: 16px;
  background: #eef2ff;
}
.learning-priority-assistant {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.learning-priority-assistant strong {
  font-size: 13px;
  color: #1e3a8a;
}
.learning-priority-copy > span {
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}
.learning-priority-copy h2 {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}
.learning-priority-copy p {
  margin: 0;
  color: #52627a;
  font-size: 13px;
  line-height: 1.5;
}
.learning-priority .learning-priority-main {
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  border: 0;
  border-radius: 16px;
  background: #ef1234;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.learning-entry-list {
  display: grid;
  gap: 16px;
}
.learning-entry-card {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}
.learning-entry-card:hover {
  background: #f8fafc;
}
.learning-entry-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}
.learning-entry-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 23px;
}
.learning-entry-icon.vocabulary { background: #fff1ed; }
.learning-entry-icon.phrases { background: #f1f2f4; }
.learning-entry-icon.mistakes { background: #fff0f2; }
.learning-entry-copy {
  min-width: 0;
}
.learning-entry-copy strong,
.learning-entry-copy small {
  display: block;
}
.learning-entry-copy strong {
  font-size: 19px;
  line-height: 1.3;
}
.learning-entry-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.learning-entry-arrow {
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}
.learning-entry-state {
  padding: 5px 8px;
  border-radius: 99px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.learning-entry-state.done {
  background: #ecfdf5;
  color: #047857;
}
.learning-entry-state.neutral {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 380px) {
  .learning-entry-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .learning-entry-state {
    grid-column: 2;
    justify-self: start;
  }
  .learning-entry-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learning-scoreboard-track span,
  .learning-week-track span {
    transition: none;
  }
}

.task-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.task-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--line);
}
.task-card:active {
  transform: scale(0.98);
}
.task-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 16px;
  flex-shrink: 0;
}
.task-card-content {
  flex: 1;
}
.task-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.task-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}
.task-card-arrow {
  font-size: 24px;
  color: var(--muted);
  margin-left: 12px;
}

/* Duolingo Style Vocabulary Learning */
.duo-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
}
.duo-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.duo-progress-container {
  flex: 1;
  height: 16px;
  background-color: #E5E5E5;
  border-radius: 8px;
  overflow: hidden;
}
.duo-progress-bar {
  height: 100%;
  background-color: #E31837;
  border-radius: 8px;
  transition: width 0.3s ease;
}
.duo-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.duo-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}
.duo-card {
  background: #fff;
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}
.duo-word {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.duo-phonetic {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 16px;
}
.duo-meaning {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 24px;
}
.duo-example {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.5;
  text-align: left;
  background: #F7F7F7;
  padding: 16px;
  border-radius: 12px;
}
.duo-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.duo-option {
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.1s ease;
  background: #fff;
}
.duo-option:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #E5E5E5;
}
.duo-option.correct {
  border-color: #10B981;
  background-color: #D1FAE5;
  color: #047857;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.duo-option.wrong {
  border-color: #FF4B4B;
  background-color: #FFDFE0;
  color: #EA2B2B;
  box-shadow: 0 4px 0 #FF4B4B;
}
.duo-footer {
  padding: 20px;
  border-top: 2px solid #E5E5E5;
}
.duo-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.1s ease;
}
.duo-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent !important;
}
.duo-btn-primary {
  background-color: #E31837;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.duo-btn-success {
  background-color: #10B981;
  color: #fff;
  box-shadow: 0 4px 0 #059669;
}
.duo-btn-danger {
  background-color: #FF4B4B;
  color: #fff;
  box-shadow: 0 4px 0 #EA2B2B;
}
.duo-btn-disabled {
  background-color: #E5E5E5;
  color: #A3A3A3;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
.duo-feedback {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.duo-feedback.hidden {
  transform: translateY(100%);
}
.duo-feedback.correct {
  background-color: #D1FAE5;
  color: #047857;
}
.duo-feedback.wrong {
  background-color: #FFDFE0;
  color: #EA2B2B;
}
.duo-feedback-msg h2 {
  font-size: 24px;
  margin: 0 0 8px 0;
}
.duo-feedback-msg p {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}
.duo-sentence-context {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
}
.duo-blank {
  display: inline-block;
  min-width: 100px;
  border-bottom: 2px solid var(--text-2);
  padding: 0 8px;
  color: transparent;
  text-align: center;
}
.duo-blank.filled {
  border-bottom: none;
  font-weight: 700;
}
.duo-meaning-hint {
  font-size: 16px;
  color: var(--text-2);
  background: #F7F7F7;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

/* Spelling Game Styles */
.duo-spell-slots-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  min-height: 50px;
}
.duo-spell-slot {
  width: 40px;
  height: 50px;
  border-bottom: 3px solid #E5E5E5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-transform: lowercase;
}
.duo-spell-slot.filled {
  border-bottom-color: var(--brand);
}
.duo-spell-letters-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.duo-spell-letter {
  width: 48px;
  height: 48px;
  border: 2px solid #E5E5E5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 0 #E5E5E5;
  background: #fff;
  transition: transform 0.1s;
  text-transform: lowercase;
}
.duo-spell-letter:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #E5E5E5;
}
.duo-spell-letter.used {
  opacity: 0;
  pointer-events: none;
}

/* 语块拼装 (Chunk Assembly) 样式 */
.chunk-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
  padding-bottom: 8px;
  border-bottom: 2px solid #E5E5E5;
  margin-bottom: 24px;
}
.chunk-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.chunk-tile {
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #E5E5E5;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 0 #E5E5E5;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.2s;
}
.chunk-tile:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #E5E5E5;
}
.chunk-tile.used {
  opacity: 0;
  pointer-events: none;
}
.practice-card-premium {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.practice-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(0,0,0,0.08) !important;
}
.practice-card-premium:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
}
.v2-today-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1.5px solid #c7d2fe;
  border-radius: 16px;
  background: #eef2ff;
}
.v2-today-recommendation-copy {
  min-width: 0;
}
.v2-today-recommendation-copy > span {
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
}
.v2-today-recommendation-copy h3 {
  margin: 4px 0;
  color: #1e1b4b;
  font-size: 17px;
  line-height: 1.35;
}
.v2-today-recommendation-copy p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}
.v2-today-recommendation .duo-btn {
  width: auto;
  min-width: 132px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .v2-today-recommendation {
    grid-template-columns: 1fr;
  }
  .v2-today-recommendation .duo-btn {
    width: 100%;
  }
}
.v2-weekly-content {
  padding-bottom: 104px;
  gap: 16px;
}
.v2-weekly-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}
.v2-weekly-topline strong {
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #1e293b;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  text-align: center;
}
.v2-weekly-instructions,
.v2-weekly-note {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}
.v2-weekly-audio,
.v2-weekly-passage,
.v2-weekly-question,
.v2-weekly-report-section {
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}
.v2-weekly-audio {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.v2-weekly-audio .duo-btn {
  width: 100%;
}
.v2-weekly-audio small {
  color: var(--text-2);
  text-align: center;
}
.v2-weekly-plan {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.v2-weekly-plan-title {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.v2-weekly-plan-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 88;
  overflow: hidden;
  border: 2px solid #64748b;
  border-radius: 6px;
  background: #fff;
}
.v2-weekly-plan-canvas::before,
.v2-weekly-plan-canvas::after {
  position: absolute;
  content: "";
  background: #cbd5e1;
}
.v2-weekly-plan-canvas::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
}
.v2-weekly-plan-canvas::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
}
.v2-weekly-plan-node {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 24%;
  min-height: 46px;
  padding: 5px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid #94a3b8;
  border-radius: 5px;
  box-sizing: border-box;
  background: #ecfdf5;
  color: #134e4a;
  text-align: center;
}
.v2-weekly-plan-node strong {
  font-size: 13px;
}
.v2-weekly-plan-node span {
  font-size: 10px;
  line-height: 1.2;
}
.v2-weekly-passage {
  padding: 18px;
  color: #334155;
  font-size: 15px;
  line-height: 1.75;
}
.v2-weekly-questions {
  display: grid;
  gap: 12px;
}
.v2-weekly-question {
  position: relative;
  padding: 18px;
}
.v2-weekly-question > label {
  display: block;
  padding-left: 30px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}
.v2-weekly-number {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}
.v2-weekly-input {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--text);
  font: inherit;
}
.v2-weekly-input:focus {
  border-color: #4f46e5;
  outline: 3px solid #e0e7ff;
}
.v2-weekly-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.v2-weekly-option input {
  position: absolute;
  opacity: 0;
}
.v2-weekly-option span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.v2-weekly-option input:checked + span {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #3730a3;
}
.v2-weekly-option input:focus-visible + span {
  outline: 3px solid #c7d2fe;
}
.v2-weekly-footer {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}
.v2-weekly-summary {
  padding: 22px;
  border-radius: 20px;
  background: #065f46;
  color: #fff;
}
.v2-weekly-summary > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.v2-weekly-summary > strong {
  display: block;
  margin-top: 8px;
  font-size: 42px;
  line-height: 1;
}
.v2-weekly-summary p {
  margin: 8px 0 16px;
}
.v2-weekly-summary div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.v2-weekly-summary div span {
  padding: 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.v2-weekly-report-section {
  padding: 18px;
}
.v2-weekly-report-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
.v2-weekly-dimension {
  margin-top: 12px;
}
.v2-weekly-dimension > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
}
.v2-weekly-dimension > div:last-child {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e2e8f0;
}
.v2-weekly-dimension > div:last-child span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4f46e5;
}
.v2-weekly-conclusion {
  display: grid;
  gap: 8px;
}
.v2-weekly-conclusion p {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}
.v2-weekly-evidence {
  border-top: 1px solid #e2e8f0;
  padding: 12px 0;
}
.v2-weekly-evidence:first-of-type {
  border-top: 0;
}
.v2-weekly-evidence summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.v2-weekly-evidence summary strong.correct { color: #047857; }
.v2-weekly-evidence summary strong.incorrect { color: #b91c1c; }
.v2-weekly-evidence p,
.v2-weekly-evidence blockquote {
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}
.v2-weekly-evidence blockquote {
  padding: 10px 12px;
  border-left: 3px solid #4f46e5;
  background: #f8fafc;
}
@media (max-width: 420px) {
  .v2-weekly-options { grid-template-columns: 1fr; }
  .v2-weekly-option span { min-height: 40px; }
}
.chunk-tile.error-shake {
  animation: shake 0.4s;
  border-color: var(--error);
  color: var(--error);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.v2-listening-audio-shell {
  background: #f0fdf4;
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 14px;
}

.v2-listening-audio-shell > div {
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.v2-listening-group-instructions {
  white-space: pre-line;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 14px;
}

.v2-reading-group-instructions {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  color: #0c4a6e;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 14px;
  white-space: pre-line;
}

.v2-reading-group-passage {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 16px;
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
  white-space: pre-line;
}

.v2-reading-diagram-shell {
  margin: 0 auto 18px;
  max-width: 680px;
  width: 100%;
}

.v2-reading-diagram-shell > h3 {
  color: #1e293b;
  font-size: 15px;
  margin: 0 0 10px;
  text-align: center;
}

.v2-reading-diagram-canvas {
  aspect-ratio: 5 / 3;
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  min-height: 300px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.v2-reading-diagram-connector {
  background: #64748b;
  height: 2px;
  position: absolute;
  transform-origin: left center;
  z-index: 0;
}

.v2-reading-diagram-connector::after {
  border-bottom: 5px solid transparent;
  border-left: 8px solid #64748b;
  border-top: 5px solid transparent;
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
}

.v2-reading-diagram-component {
  align-items: center;
  background: #fff;
  border: 1.5px solid #64748b;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 42px;
  padding: 7px 10px;
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  width: min(132px, 25%);
  z-index: 1;
}

.v2-reading-diagram-component span {
  color: #334155;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.v2-reading-diagram-callout {
  align-items: center;
  display: flex;
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.v2-reading-diagram-callout strong {
  align-items: center;
  background: #0369a1;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  color: #fff;
  display: flex;
  font-size: 11px;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.v2-reading-diagram-callout span {
  border-bottom: 2px solid #0369a1;
  display: block;
  height: 1px;
  width: 42px;
}

.v2-reading-diagram-answers {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.v2-reading-diagram-answer {
  background: #fff;
  border: 1.5px solid #dbe4ea;
  border-radius: 8px;
  min-width: 0;
  padding: 11px;
}

.v2-reading-diagram-answer.is-correct {
  background: #f0fdf4;
  border-color: #86efac;
}

.v2-reading-diagram-answer label {
  align-items: flex-start;
  color: #334155;
  display: flex;
  font-size: 12px;
  gap: 7px;
  line-height: 1.35;
  margin-bottom: 7px;
}

.v2-reading-diagram-answer label strong {
  color: #0369a1;
  flex: 0 0 auto;
}

.v2-reading-diagram-answer small {
  color: #64748b;
  display: block;
  font-size: 9px;
  font-weight: 800;
  margin: -2px 0 7px;
  text-transform: uppercase;
}

.v2-structured-shell {
  background: #fff;
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  margin: 0 auto 18px;
  max-width: 720px;
  overflow: hidden;
  width: 100%;
}

.v2-structured-shell > header {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 13px 15px;
}

.v2-structured-shell > header h3 {
  color: #1e293b;
  font-size: 15px;
  margin: 0 0 4px;
}

.v2-structured-shell > header p {
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

.v2-structured-answer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.55;
  min-width: 0;
}

.v2-structured-answer > span:not(.v2-structured-number) {
  color: #334155;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.v2-structured-number {
  align-items: center;
  background: #0369a1;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 11px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
}

.v2-structured-input {
  flex: 1 1 120px;
  min-height: 44px;
  min-width: 96px;
  width: auto;
}

.v2-structured-answer small {
  color: #64748b;
  flex-basis: 100%;
  font-size: 9px;
  font-weight: 800;
  margin-left: 30px;
  text-transform: uppercase;
}

.v2-structured-locked {
  border-bottom: 2px solid #16a34a;
  color: #166534;
  font-size: 13px;
  padding: 3px 5px;
}

.v2-structured-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v2-structured-form-row {
  border-bottom: 1px solid #e2e8f0;
  min-width: 0;
  padding: 13px;
}

.v2-structured-form-row:nth-child(odd) {
  border-right: 1px solid #e2e8f0;
}

.v2-structured-notes {
  padding: 8px 15px 14px 34px;
}

.v2-structured-notes section {
  border-left: 2px solid #94a3b8;
  padding: 8px 0 8px 14px;
  position: relative;
}

.v2-structured-notes section::before {
  background: #0369a1;
  border-radius: 50%;
  content: "";
  height: 7px;
  left: -5px;
  position: absolute;
  top: 17px;
  width: 7px;
}

.v2-structured-notes h4 {
  color: #334155;
  font-size: 12px;
  margin: 0 0 6px;
}

.v2-structured-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.v2-structured-table {
  border-collapse: collapse;
  min-width: 600px;
  table-layout: fixed;
  width: 100%;
}

.v2-structured-table th,
.v2-structured-table td {
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12px;
  padding: 11px;
  text-align: left;
  vertical-align: top;
}

.v2-structured-table th {
  background: #e2e8f0;
  font-weight: 800;
}

.v2-structured-table th:first-child,
.v2-structured-table td:first-child {
  background: #f8fafc;
  left: 0;
  position: sticky;
  width: 38%;
  z-index: 1;
}

.v2-structured-summary {
  padding: 16px;
}

.v2-structured-summary p {
  border-bottom: 1px solid #e2e8f0;
  margin: 0;
  padding: 10px 0;
}

.v2-structured-flow {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.v2-structured-flow-step {
  background: #f8fafc;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  box-sizing: border-box;
  max-width: 520px;
  padding: 12px;
  width: 100%;
}

.v2-structured-flow-arrow {
  color: #0369a1;
  font-size: 22px;
  font-weight: 800;
  height: 28px;
  line-height: 28px;
}

.v2-listening-plan {
  aspect-ratio: 100 / 88;
  background: #f8fafc;
  border: 2px solid #94a3b8;
  border-radius: 8px;
  margin: 0 auto 18px;
  max-width: 560px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.v2-listening-plan::before {
  background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(148, 163, 184, 0.14) 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(148, 163, 184, 0.14) 40px);
  content: "";
  inset: 0;
  position: absolute;
}

.v2-listening-plan-path {
  background: #cbd5e1;
  height: 10px;
  left: 8%;
  position: absolute;
  transform-origin: left center;
  width: 82%;
}

.v2-listening-plan-path.path-one {
  top: 38%;
  transform: rotate(8deg);
}

.v2-listening-plan-path.path-two {
  top: 66%;
  transform: rotate(-11deg);
}

.v2-listening-plan-node {
  align-items: center;
  display: flex;
  flex-direction: column;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 92px;
  z-index: 1;
}

.v2-listening-plan-node strong {
  align-items: center;
  background: #0f766e;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  color: #fff;
  display: flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.v2-listening-plan-node span {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #1e293b;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 3px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 5px;
  text-align: center;
}

.v2-listening-option-key {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.v2-listening-option-key > div {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 9px;
}

.v2-listening-option-key strong {
  color: #047857;
}

.v2-listening-option-key span {
  color: #334155;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.v2-listening-question-group,
.v2-listening-feedback-list {
  display: grid;
  gap: 12px;
}

.v2-listening-group-question {
  background: #fff;
  border: 1.5px solid #dbe4ea;
  border-radius: 8px;
  padding: 14px;
}

.v2-listening-group-question.is-correct {
  background: #f0fdf4;
  border-color: #86efac;
}

.v2-listening-group-prompt {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.v2-listening-group-prompt > span {
  align-items: center;
  background: #047857;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
}

.v2-listening-group-prompt p {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.45;
  margin: 2px 0 10px;
}

.v2-listening-group-options {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
}

.v2-listening-group-options .word-chip {
  min-width: 0;
  padding: 9px 4px;
}

.v2-listening-group-options .word-chip.selected {
  background: #047857;
  border-color: #047857;
  color: #fff;
}

.v2-listening-group-options.is-question-specific {
  grid-template-columns: 1fr;
}

.v2-listening-group-options.is-question-specific .word-chip {
  line-height: 1.4;
  padding: 11px 12px;
  text-align: left;
  white-space: normal;
}

.v2-group-word-limit {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  margin: -4px 0 9px 36px;
  text-transform: uppercase;
}

.v2-group-text-answer {
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  color: #1e293b;
  font-size: 14px;
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

.v2-group-text-answer:focus {
  border-color: #0284c7;
}

.v2-sentence-completion-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.v2-sentence-completion-number {
  align-items: center;
  background: #047857;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
}

.v2-sentence-completion-row p {
  color: #1e293b;
  font-size: 14px;
  line-height: 2.65;
  margin: -5px 0 0;
}

.v2-sentence-completion-input {
  display: inline-block;
  margin: 0 7px;
  min-width: 132px;
  padding: 7px 9px;
  vertical-align: middle;
  width: min(220px, 52vw);
}

.v2-sentence-completion-answer {
  border-bottom: 2px solid #16a34a;
  color: #166534;
  display: inline-block;
  line-height: 1.5;
  margin: 0 7px;
  padding: 2px 5px;
}

.v2-listening-locked-answer {
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}

.v2-listening-feedback-list {
  margin-top: 16px;
}

.v2-listening-feedback-list > section {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
}

.v2-listening-feedback-list > section.is-correct {
  border-color: #86efac;
}

.v2-listening-feedback-list > section.is-wrong {
  border-color: #fca5a5;
}

.v2-listening-feedback-title {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.v2-listening-feedback-title strong {
  color: #1e293b;
  font-size: 13px;
  line-height: 1.4;
}

.v2-listening-feedback-title span {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.v2-listening-feedback-list p,
.v2-listening-feedback-list small {
  color: #475569;
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin: 7px 0 0;
}

.v2-listening-evidence {
  align-items: center;
  background: #f0fdf4;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 9px;
  padding: 8px;
}

.v2-listening-evidence span {
  color: #14532d;
  font-size: 11px;
  line-height: 1.4;
}

.v2-listening-repair-title {
  color: #1e293b;
  font-size: 15px;
  margin: 0 0 10px;
}

@media (max-width: 520px) {
  .v2-reading-diagram-canvas {
    aspect-ratio: 4 / 3;
    min-height: 270px;
  }

  .v2-reading-diagram-component {
    min-height: 36px;
    padding: 5px 6px;
    width: min(92px, 27%);
  }

  .v2-reading-diagram-component span {
    font-size: 9px;
  }

  .v2-reading-diagram-callout span {
    width: 25px;
  }

  .v2-reading-diagram-answers {
    grid-template-columns: 1fr;
  }

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

  .v2-structured-form-row:nth-child(odd) {
    border-right: 0;
  }

  .v2-structured-shell > header,
  .v2-structured-summary,
  .v2-structured-flow {
    padding-left: 12px;
    padding-right: 12px;
  }
  .v2-listening-plan {
    aspect-ratio: 1 / 1;
  }

  .v2-listening-plan-node {
    width: 62px;
  }

  .v2-listening-plan-node span {
    font-size: 8px;
    padding: 2px 3px;
  }

  .v2-listening-option-key {
    grid-template-columns: 1fr;
  }

  .v2-listening-group-options {
    grid-template-columns: repeat(4, minmax(38px, 1fr));
  }

  .v2-listening-evidence {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Global floating one-to-one tutor conversation. */
.app-shell {
  width: min(100%, 420px);
  display: flex;
  justify-content: center;
}
.phone {
  flex: 0 1 420px;
}
.persistent-learning-assistant {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 70;
  width: min(360px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 124px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.97);
  transform-origin: right bottom;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms;
}
.persistent-learning-assistant.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.persistent-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}
.persistent-assistant-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.persistent-assistant-identity > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.persistent-assistant-identity strong,
.persistent-assistant-identity small {
  display: block;
}
.persistent-assistant-identity strong {
  color: #0f172a;
  font-size: 15px;
}
.persistent-assistant-identity small {
  margin-top: 1px;
  color: #64748b;
  font-size: 11px;
}
.persistent-assistant-header > button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.persistent-assistant-context {
  padding: 9px 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  border-bottom: 1px solid #e2e8f0;
}
.persistent-assistant-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 14px;
  background: #f8fafc;
}
.persistent-assistant-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-bottom: 14px;
}
.persistent-assistant-message.user {
  justify-content: flex-end;
}
.persistent-assistant-message-content {
  width: fit-content;
  max-width: 82%;
}
.persistent-assistant-message-content > p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}
.persistent-assistant-message.user .persistent-assistant-message-content > p {
  border-radius: 14px 14px 4px 14px;
  background: #2563eb;
  color: #fff;
}
.persistent-assistant-proposal {
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}
.persistent-assistant-proposal strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.4;
}
.persistent-assistant-proposal ul {
  margin: 7px 0 10px;
  padding-left: 18px;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
}
.persistent-assistant-proposal > div {
  display: flex;
  gap: 7px;
}
.persistent-assistant-proposal button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #2563eb;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.persistent-assistant-proposal button.secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #475569;
}
.persistent-assistant-proposal button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.persistent-assistant-proposal small {
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}
.persistent-assistant-prompt-actions {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}
.persistent-assistant-prompt-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.course-learning-assistant.needs-attention::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}
.persistent-assistant-message-avatar {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
}
.persistent-assistant-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.persistent-assistant-suggestions button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  background: #eff6ff;
  color: #1e40af;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.persistent-assistant-composer {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.persistent-assistant-composer label {
  margin: 0 0 6px;
  color: #475569;
  font-size: 11px;
}
.persistent-assistant-composer > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.persistent-assistant-composer textarea {
  min-height: 44px;
  max-height: 96px;
  padding: 10px 11px;
  border-radius: 12px;
  resize: none;
  font-size: 13px;
  line-height: 1.45;
}
.persistent-assistant-composer button {
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.persistent-assistant-backdrop {
  display: none;
}
.course-learning-assistant {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 72;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.course-learning-assistant:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.4);
}
.course-learning-assistant[aria-expanded="true"] {
  transform: scale(0.92);
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.24);
}
.course-learning-assistant.dragging {
  cursor: grabbing;
  transform: scale(1.04);
  transition: none;
}
.assistant-robot {
  position: relative;
  width: 32px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 10px;
}
.assistant-robot::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 2px;
  height: 6px;
  background: #fff;
  transform: translateX(-50%);
}
.assistant-robot::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}
.assistant-robot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.classmate-closeout-heading {
  padding: 8px 0 18px;
}
.classmates-page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 20px 120px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
}
.classmates-page h1,
.classmates-page h2,
.classmates-page h3,
.classmates-page p {
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------
   Hero Header Section (Empty, Active & 81-Member Guild)
   ---------------------------------------------------- */
.classmates-hero-card,
.classmates-active-hero,
.classmates-guild-hero,
.classmate-closeout-hero {
  position: relative;
  margin-bottom: 24px;
  padding: 28px 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.95) 100%);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(12px);
}
.guild-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}
.guild-count-badge {
  padding: 3px 10px;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.classmates-guild-hero h1 {
  margin: 10px 0 6px;
  font-size: 25px;
  font-weight: 800;
  color: #0f172a;
}
.guild-lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* 81/100 Guild Progress Bar */
.guild-progress-wrap {
  margin-top: 14px;
}
.guild-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: #e2e8f0;
  overflow: hidden;
}
.guild-progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
  transition: width 0.5s ease;
}
.guild-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

/* ----------------------------------------------------
   Guild Community Signals (全社 81 人共同积累)
   ---------------------------------------------------- */
.classmates-community-signals {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}
.community-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.community-icon {
  font-size: 24px;
}
.community-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.community-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #64748b;
}
.community-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.community-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.feed-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}
.community-feed-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

/* ----------------------------------------------------
   Secondary Directory Entry Card (一级目录上的二级入口)
   ---------------------------------------------------- */
.classmates-signals-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.classmates-signals-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}
.signals-entry-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.signals-entry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  font-size: 18px;
}
.signals-entry-left strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.signals-entry-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}
.signals-entry-arrow-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 20px;
  background: #2563eb;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.signals-entry-arrow-btn:hover {
  background: #1d4ed8;
}

/* ----------------------------------------------------
   Secondary Directory Slide-Up Drawer / Modal (二级目录弹窗/抽屉)
   ---------------------------------------------------- */
.classmates-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
.classmates-drawer-overlay[hidden] {
  display: none !important;
}
.classmates-drawer-content {
  width: min(100%, 720px);
  max-height: 85vh;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  background: #ffffff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drawerSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-icon {
  font-size: 22px;
}
.drawer-title-group h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.drawer-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.drawer-close-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}
.drawer-body {
  padding: 20px 24px 40px;
  overflow-y: auto;
}
.drawer-section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.classmates-pill-tag,
.practice-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.classmates-hero-card h1,
.classmates-active-hero h1,
.classmate-closeout-hero h1 {
  margin: 12px 0 8px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.classmates-lead,
.active-subtitle,
.closeout-desc,
.classmates-heading p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

/* Day Dots Timeline for Active State */
.classmates-day-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.day-progress-dots {
  display: flex;
  gap: 6px;
}
.day-progress-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.3s ease;
}
.day-progress-dots .dot.active {
  width: 18px;
  border-radius: 6px;
  background: #2563eb;
}

/* ----------------------------------------------------
   Squad Visual Preview / Slot Cards
   ---------------------------------------------------- */
.classmates-squad-preview {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.preview-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}
.preview-badge {
  padding: 3px 10px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.preview-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.slot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border-radius: 14px;
  text-align: center;
  transition: all 0.2s ease;
}
.slot-card.filled {
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}
.slot-card.empty {
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
}
.slot-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 20px;
}
.slot-card.empty .slot-avatar {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 18px;
  font-weight: 700;
}
.slot-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1.3;
}
.slot-tag {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.classmates-empty-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
}
.status-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.status-desc {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #64748b;
}

/* ----------------------------------------------------
   3-Pillar Experience Grid (Value Cards)
   ---------------------------------------------------- */
.classmates-value-grid,
.classmates-value-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.value-card,
.classmates-value-list > div,
.value-item {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.value-card:hover,
.value-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
.value-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.value-icon,
.value-item-icon {
  font-size: 22px;
}
.value-card h3,
.value-item strong {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.value-card p,
.value-item span {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

/* ----------------------------------------------------
   Action Center & Buttons
   ---------------------------------------------------- */
.classmates-action-center {
  margin-bottom: 24px;
}
.classmates-empty-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.classmates-btn-primary,
.classmates-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.classmates-btn-primary {
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.classmates-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}
.classmates-btn-secondary {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}
.classmates-btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* Drawers & Link Entry */
.classmates-invite-entry,
.classmates-join-ways {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  animation: fadeIn 0.3s ease;
}
.classmates-invite-entry label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.classmates-input-group,
.classmates-invite-entry > div {
  display: flex;
  gap: 10px;
}
.classmates-invite-entry input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}
.classmates-invite-entry input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.classmates-invite-entry button {
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.classmates-invite-entry button:hover {
  background: #1d4ed8;
}
.classmates-invite-entry p {
  min-height: 20px;
  margin: 10px 0 0;
  color: #dc2626;
  font-size: 13px;
}

.classmates-join-ways h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.classmates-join-ways p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

/* Bottom Anchor */
.classmates-footer-anchor {
  text-align: center;
}
.classmates-text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 16px auto 0;
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: rgba(241, 245, 249, 0.8);
  color: #475569;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.classmates-text-action:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ----------------------------------------------------
   Active Squad & Member Cards
   ---------------------------------------------------- */
.classmates-members-section,
.classmates-signals-section {
  margin-bottom: 24px;
}
.classmates-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.classmates-section-heading h2,
.section-title-wrap h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.classmates-capacity-badge,
.classmates-count-pill {
  padding: 4px 10px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}
.classmates-member-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.classmate-member-card,
.classmate-member-row {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.classmate-member-card.is-me {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.member-card-main,
.classmate-member-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.member-avatar-wrap,
.member-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 18px;
}
.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #cbd5e1;
}
.status-dot.online {
  background: #22c55e;
}
.member-name,
.classmate-member-row strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.member-status-text,
.member-status-pill,
.classmate-member-row span {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
  color: #64748b;
}
.member-status-text.learned,
.member-status-pill.active {
  color: #16a34a;
  font-weight: 600;
}

/* Safety Controls Dropdown */
.classmate-safety {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.classmate-safety summary {
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}
.classmate-safety-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
}
.classmate-safety-actions select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}
.classmate-safety-actions button,
.classmate-unblock {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

/* ----------------------------------------------------
   Signals Timeline & Reactions
   ---------------------------------------------------- */
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.classmate-signals-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.classmate-signal-card,
.classmate-signal-row {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.signal-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.signal-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 10px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}
.signal-summary,
.classmate-signal-row p {
  margin: 4px 0 12px;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}
.classmate-reactions {
  display: flex;
  gap: 8px;
}
.classmate-reactions button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.classmate-reactions button:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
}
.classmate-reactions button.active,
.classmate-reactions button[aria-pressed="true"] {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

/* Cards for Seat & Priority Learning */
.classmates-open-seat-card,
.classmates-open-seat {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}
.seat-card-icon {
  font-size: 24px;
}
.seat-card-body strong,
.classmates-open-seat strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a8a;
}
.seat-card-body span,
.classmates-open-seat span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #3b82f6;
}

.classmates-rules-card,
.classmates-rules {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}
.classmates-rules-card summary,
.classmates-rules summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.classmates-rules-card p,
.classmates-rules p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

.classmates-my-today-card,
.classmates-my-today,
.classmate-learning-priority {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.today-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
}
.classmates-my-today-card strong,
.classmates-my-today strong,
.classmate-learning-priority strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.classmates-my-today-card p,
.classmates-my-today p,
.classmate-learning-priority p {
  margin: 6px 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}
.classmates-primary-btn {
  width: 100%;
}

.classmates-leave-area {
  text-align: center;
}

/* ----------------------------------------------------
   Closeout Choices Grid
   ---------------------------------------------------- */
.classmate-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.classmate-choice {
  display: flex;
  flex-direction: column;
  min-height: 110px;
  padding: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.classmate-choice strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.classmate-choice span {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}
.classmate-choice:hover,
.classmate-choice.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

/* ----------------------------------------------------
   Mobile Screen Responsiveness
   ---------------------------------------------------- */
@media (max-width: 640px) {
  .classmates-page {
    padding: 16px 14px 100px;
  }
  .classmates-hero-card {
    padding: 20px 16px;
  }
  .classmates-hero-card h1 {
    font-size: 22px;
  }
  .classmates-value-grid,
  .classmates-value-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .classmates-empty-actions {
    grid-template-columns: 1fr;
  }
  .classmate-choice-grid {
    grid-template-columns: 1fr;
  }
}
.classmate-choice:focus-visible,
.classmate-review-choice:focus-visible,
.classmate-safety button:focus-visible,
.classmate-unblock:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}
.classmate-choice.selected {
  border-color: #2563eb;
  background: #eff6ff;
}
.classmate-choice strong,
.classmate-choice span {
  display: block;
  overflow-wrap: anywhere;
}
.classmate-choice strong {
  margin-bottom: 6px;
  font-size: 15px;
}
.classmate-choice span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}
.classmate-choice-result {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}
.classmate-review-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.classmate-review-choice {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.classmate-review-choice.selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.classmate-relationship-list {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.classmate-member-row {
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.classmate-member-row > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.classmate-member-row > div:first-child span {
  color: var(--text-2);
  font-size: 13px;
  text-align: right;
}
.classmate-safety {
  margin-top: 10px;
}
.classmate-safety summary {
  width: max-content;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
}
.classmate-safety-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}
.classmate-safety-actions label {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.classmate-safety-actions select {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 5px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font: inherit;
}
.classmate-safety-actions button,
.classmate-unblock {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.classmate-inline-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 899px) {
  .app-shell {
    width: min(100%, 420px);
  }
  .persistent-learning-assistant {
    right: 12px;
    bottom: 82px;
    width: calc(100vw - 24px);
    height: min(580px, calc(100dvh - 112px));
    border-radius: 18px;
  }
  .persistent-assistant-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    border: 0;
    background: rgba(15, 23, 42, 0.36);
  }
  body.assistant-open .persistent-assistant-backdrop {
    display: block;
  }
  .course-learning-assistant {
    right: 16px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }
}

@media (max-width: 430px) {
  .tabbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-left: -22px;
    margin-right: -22px;
  }
  .tab {
    min-height: 56px;
    padding-left: 0;
    padding-right: 0;
  }
  .tab .tab-icon {
    font-size: 20px;
  }
  .tab span:last-child {
    font-size: 11px;
  }
  .classmates-page {
    padding: 22px 17px 104px;
  }
  .classmates-page h1 {
    font-size: 24px;
  }
  .classmates-value-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .classmates-empty-actions {
    flex-direction: column;
  }
  .classmates-invite-entry > div {
    grid-template-columns: 1fr;
  }
  .classmates-invite-entry button {
    width: 100%;
  }
  .classmate-choice-grid {
    grid-template-columns: 1fr;
  }
  .classmate-choice {
    min-height: 104px;
  }
  .classmate-safety-actions {
    grid-template-columns: 1fr 1fr;
  }
  .classmate-safety-actions label {
    grid-column: 1 / -1;
  }
  body.social-share-open {
    padding: 0;
  }
  body.social-share-open .app-shell,
  body.social-share-open .phone {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body.social-share-open .phone {
    min-height: 100dvh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .persistent-learning-assistant {
    transition: none;
  }
}

/* Classmates · Cosmic University vertical study hall */
.classmates-hall {
  --hall-ink: #f8f2df;
  --hall-muted: #b9c1d4;
  --hall-gold: #f0c979;
  --hall-blue: #79b9d3;
  position: relative;
  min-height: calc(100dvh - 72px);
  margin: -18px -18px 0;
  padding: 28px 20px 116px;
  overflow: hidden;
  color: var(--hall-ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(90, 125, 171, .28), transparent 31%),
    radial-gradient(circle at 83% 26%, rgba(118, 76, 145, .2), transparent 34%),
    linear-gradient(180deg, #07101d 0%, #0c1625 42%, #121827 100%);
}
.classmates-cosmos { position: absolute; inset: 0; pointer-events: none; opacity: .82; background-image: radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.5px), radial-gradient(circle, rgba(240,201,121,.65) 0 1px, transparent 1.5px); background-position: 8px 12px, 38px 58px; background-size: 62px 62px, 91px 91px; mask-image: linear-gradient(#000, transparent 78%); }
.classmates-hall::before { content: ""; position: absolute; top: 72px; left: 7%; right: 7%; height: 260px; border: 1px solid rgba(240,201,121,.16); border-bottom: 0; border-radius: 180px 180px 0 0; box-shadow: inset 0 0 70px rgba(121,185,211,.08); pointer-events: none; }
.classmates-hall > *:not(.classmates-cosmos) { position: relative; z-index: 1; }
.classmates-hall > .classmates-modal-root { z-index: 100; }
body:has(.classmates-dialog-backdrop) .course-learning-assistant {
  opacity: 0;
  pointer-events: none;
}
body:has(.classmates-hall) #app {
  animation: none;
  opacity: 1;
  transform: none;
}
.classmates-hall-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--hall-gold); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.classmates-hall-kicker::before { content: "✦"; font-size: 12px; }
.classmates-hall-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 6px 2px 22px; }
.classmates-hall-header h1, .classmates-entry-hero h1 { margin: 8px 0 5px; color: #fff9e9; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(25px, 6vw, 34px); font-weight: 600; letter-spacing: -.02em; }
.classmates-hall-header p, .classmates-entry-hero p { margin: 0; color: var(--hall-muted); font-size: 13px; }
.classmates-profile-button { flex: 0 0 58px; min-width: 58px; min-height: 58px; padding: 0; border: 1px solid rgba(240,201,121,.32); border-radius: 20px; background: rgba(9,18,31,.72); color: inherit; }
.classmates-profile-button .classmates-seat-name { display: none; }
.classmates-hall-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(3,9,18,.56); backdrop-filter: blur(12px); }
.classmates-hall-tabs button { position: relative; min-height: 44px; border: 0; border-radius: 11px; color: #aeb8ca; background: transparent; font-weight: 700; }
.classmates-hall-tabs button.on { color: #142033; background: linear-gradient(135deg, #f7e8bd, #d8ae62); box-shadow: 0 5px 18px rgba(0,0,0,.2); }
.classmates-hall-tabs b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; border-radius: 9px; color: #fff; background: #a84e54; font-size: 10px; }
.classmates-hall-toolbar { display: flex; align-items: center; gap: 9px; min-height: 62px; padding: 11px 2px; }
.classmates-hall-toolbar span { flex: 1; color: #8d9bb0; font-size: 10px; text-align: center; }
.classmates-hall-toolbar button { min-height: 44px; padding: 0 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #dce4ef; background: rgba(9,18,31,.76); font-size: 11px; font-weight: 700; }
.classmates-hall-toolbar button.primary { border-color: rgba(240,201,121,.34); color: #2b2110; background: var(--hall-gold); }
.classmates-hall-scroll { display: block; padding: 0; animation: none; opacity: 1; }
.classmates-hall-floor { position: relative; margin: 0 -5px 34px; padding: 42px 8px 22px; border: 1px solid rgba(151,176,205,.12); border-radius: 80px 80px 22px 22px; background: linear-gradient(180deg, rgba(26,43,61,.46), rgba(8,16,27,.68)); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 22px 50px rgba(0,0,0,.22); }
.classmates-hall-floor::before, .classmates-hall-floor::after { content: ""; position: absolute; top: 32px; bottom: 18px; width: 7px; border: 1px solid rgba(240,201,121,.12); background: repeating-linear-gradient(180deg, rgba(104,64,39,.55) 0 12px, rgba(204,151,82,.18) 13px 15px); }
.classmates-hall-floor::before { left: 7px; } .classmates-hall-floor::after { right: 7px; }
.classmates-floor-sign { position: absolute; top: 10px; left: 50%; display: flex; align-items: baseline; gap: 8px; transform: translateX(-50%); white-space: nowrap; }
.classmates-floor-sign span { color: #e9d5a3; font-family: Georgia, serif; font-size: 12px; letter-spacing: .08em; }
.classmates-floor-sign small { color: #78869a; font-size: 8px; }
.classmates-table-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 10px; }
.classmates-study-table { min-width: 0; padding: 10px 7px 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: linear-gradient(160deg, rgba(33,49,68,.9), rgba(11,22,36,.94)); box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.classmates-study-table > header { display: flex; justify-content: space-between; align-items: flex-start; min-height: 43px; gap: 4px; }
.classmates-study-table h3 { margin: 0; overflow: hidden; color: #fff4d1; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.classmates-study-table header p { margin: 4px 0 0; overflow: hidden; color: #8fa0b6; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.classmates-study-table header > span { flex: 0 0 auto; color: #bfcee0; font-size: 9px; }
.classmates-table-scene { position: relative; height: 132px; }
.classmates-table-top { position: absolute; z-index: 1; inset: 47px 18% 39px; border: 1px solid #9c673d; border-radius: 9px; background: linear-gradient(145deg, #85532e, #4f2e1e); box-shadow: 0 8px 0 #321d15, 0 12px 17px rgba(0,0,0,.42), inset 0 1px rgba(255,233,183,.22); transform: perspective(100px) rotateX(9deg); }
.desk-book { position: absolute; left: 15%; top: 10px; width: 26px; height: 17px; border-radius: 2px; background: linear-gradient(90deg, #305f72 48%, #e9dcc3 49% 53%, #6b3942 54%); transform: rotate(-7deg); }
.desk-tablet { position: absolute; right: 14%; top: 8px; width: 20px; height: 24px; border: 2px solid #242d38; border-radius: 3px; background: #9bc2ce; transform: rotate(6deg); }
.desk-lamp { position: absolute; left: 48%; top: -11px; width: 4px; height: 20px; background: #d3b06a; }
.desk-lamp::after { content: ""; position: absolute; left: -7px; top: -6px; width: 18px; height: 9px; border-radius: 9px 9px 2px 2px; background: #ebcb7e; box-shadow: 0 5px 14px rgba(249,212,121,.55); }
.classmates-seat { position: absolute; z-index: 2; width: 45px; min-height: 50px; text-align: center; }
.classmates-seat.seat-1 { left: 3px; top: 37px; } .classmates-seat.seat-2 { right: 3px; top: 37px; } .classmates-seat.seat-3 { left: 27%; bottom: -3px; } .classmates-seat.seat-4 { right: 27%; bottom: -3px; }
.classmates-avatar-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; width: 44px; }
.classmates-avatar { position: relative; display: block; width: 34px; height: 39px; }
.avatar-face { position: absolute; z-index: 2; left: 8px; top: 6px; width: 20px; height: 23px; border-radius: 45% 45% 48% 48%; background: #bf855f; box-shadow: inset 0 -3px rgba(115,61,43,.1); }
.tone-light .avatar-face { background: #f1c5a3; } .tone-medium .avatar-face { background: #d69b72; } .tone-tan .avatar-face { background: #ad704e; } .tone-deep .avatar-face { background: #744731; }
.avatar-hair { position: absolute; z-index: 3; left: 6px; top: 2px; width: 24px; height: 15px; border-radius: 14px 14px 5px 5px; background: #28211f; }
.hair-long .avatar-hair { height: 28px; border-radius: 14px 14px 9px 9px; }
.style-wavy .avatar-hair { background: repeating-radial-gradient(circle at 4px 4px, #493126 0 4px, #2d211d 5px 7px); }
.style-curly .avatar-hair { background: radial-gradient(circle at 15% 30%, #231a18 0 5px, transparent 6px), radial-gradient(circle at 50% 18%, #3f2b23 0 6px, transparent 7px), radial-gradient(circle at 82% 34%, #231a18 0 5px, transparent 6px), #39271f; }
.look-female .avatar-hair { background-color: #4a2d24; } .look-male .avatar-hair { border-radius: 11px 11px 3px 3px; }
.avatar-body { position: absolute; z-index: 1; left: 3px; bottom: 0; width: 30px; height: 16px; border-radius: 11px 11px 4px 4px; background: #47728c; }
.avatar-glasses { position: absolute; z-index: 4; left: 8px; top: 13px; width: 8px; height: 6px; border: 1px solid #26313a; border-radius: 3px; box-shadow: 10px 0 0 -1px transparent, 10px 0 0 0 #26313a; }
.avatar-glasses::after { content: ""; position: absolute; left: 8px; top: 2px; width: 3px; border-top: 1px solid #26313a; }
.classmates-seat-name { display: block; width: 48px; margin-top: 1px; overflow: hidden; color: #e9edf4; font-size: 7px; line-height: 12px; white-space: nowrap; text-overflow: ellipsis; }
.classmates-learned-dot, .classmates-owner-star { position: absolute; z-index: 5; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; font-size: 7px; }
.classmates-learned-dot { top: -1px; right: 1px; color: #123423; background: #72cf98; } .classmates-owner-star { top: -2px; left: 0; color: #4c3411; background: #f1cc76; }
.classmates-empty-seat { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 35px; height: 40px; border: 1px dashed rgba(201,216,233,.3); border-radius: 13px; color: #73849a; background: rgba(4,12,23,.45); }
.classmates-empty-seat b { font-size: 15px; font-weight: 400; } .classmates-empty-seat small { font-size: 6px; }
.classmates-study-table > footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 32px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 7px; }
.classmates-study-table footer > span { color: #91a0b4; font-size: 8px; }
.classmates-table-action { min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; color: #2b2110; background: #edca7d; font-size: 8px; font-weight: 800; }
.classmates-table-action.quiet { color: #dce9f2; background: #29485e; }
.classmates-table-action:disabled { color: #8792a3; background: #202d3c; }
.classmates-table-state { color: #8492a5 !important; }
.classmates-empty-hall, .classmates-no-group { padding: 58px 24px; text-align: center; }
.empty-orbit, .classmates-no-group > span { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border: 1px solid rgba(240,201,121,.35); border-radius: 50%; color: var(--hall-gold); box-shadow: 0 0 45px rgba(121,185,211,.16); }
.classmates-empty-hall h2, .classmates-no-group h2 { margin: 0 0 8px; font-family: Georgia, serif; font-weight: 500; }
.classmates-empty-hall p, .classmates-no-group p { color: var(--hall-muted); font-size: 13px; line-height: 1.6; }
.classmates-my-space { padding: 18px 0 0; animation: none; opacity: 1; }
.classmates-my-hero, .classmates-today-panel, .classmates-manage-panel, .classmates-pending-card { margin-bottom: 14px; padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(12,24,39,.78); }
.classmates-my-hero, .classmates-today-panel, .classmates-manage-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.classmates-my-hero span, .classmates-today-panel span, .classmates-manage-panel span { color: var(--hall-gold); font-size: 10px; letter-spacing: .08em; }
.classmates-my-hero h2, .classmates-today-panel h3, .classmates-manage-panel h3 { margin: 5px 0; color: #fff5db; }
.classmates-my-hero p { margin: 0; color: var(--hall-muted); font-size: 11px; }.classmates-my-hero strong { font-size: 18px; }
.classmates-my-table .classmates-study-table { max-width: 270px; margin: 0 auto 14px; }
.classmates-today-panel h3 { font-size: 14px; }.classmates-today-panel .btn { width: auto; min-width: 110px; }
.classmates-manage-panel > header button, .classmates-group-actions button, .classmates-hall-link { min-height: 44px; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; color: #dce5ef; background: rgba(15,28,44,.82); }
.classmates-manage-panel article { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 7px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
.classmates-manage-panel article > span { color: #e5eaf1; font-size: 11px; letter-spacing: 0; }
.classmates-manage-panel article button { min-height: 44px; border: 0; border-radius: 9px; color: #c8d2de; background: #263547; font-size: 9px; }.classmates-manage-panel article button.accept { color: #24301f; background: #a8cc85; }
.classmates-manage-panel > p { color: var(--hall-muted); font-size: 12px; }
.classmates-group-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }.classmates-group-actions button { font-size: 11px; }
.classmates-pending-card h3 { margin-top: 0; }.classmates-pending-card p { color: var(--hall-muted); font-size: 12px; }
.classmates-no-group > div { display: flex; justify-content: center; gap: 8px; }.classmates-no-group .btn { width: auto; }
.classmates-entry-hero { padding: 54px 2px 28px; }.classmates-entry-hero p { max-width: 460px; line-height: 1.7; }
.classmates-entry-card { display: flex; align-items: center; gap: 20px; margin: 8px 0 15px; padding: 18px; border: 1px solid rgba(240,201,121,.2); border-radius: 20px; background: rgba(14,27,44,.75); }
.classmates-entry-avatar .classmates-avatar { transform: scale(1.35); transform-origin: center bottom; }.classmates-entry-avatar .classmates-avatar-wrap { width: 62px; }.classmates-entry-card span { color: var(--hall-gold); font-size: 10px; }.classmates-entry-card h2 { margin: 4px 0 8px; font-size: 16px; }.classmates-entry-card button { padding: 0 12px; }
.classmates-month-choice { display: grid; gap: 10px; padding: 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(4,12,22,.72); }.classmates-month-choice label { color: #dce5ef; font-size: 12px; font-weight: 700; }.classmates-month-choice select, .classmates-dialog input, .classmates-dialog select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; color: #edf3fa; background: #172639; }.classmates-month-choice small { color: #8997aa; font-size: 10px; line-height: 1.5; }
.classmates-hall-error { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 13px; padding: 42px; }.classmates-hall-error h1 { margin: 0; }.classmates-hall-error p { color: var(--hall-muted); }.classmates-hall-error .btn { width: auto; }.classmates-hall-link { padding: 0 13px; }
.classmates-toast { position: fixed; z-index: 90; left: 50%; bottom: 94px; width: max-content; max-width: calc(100% - 48px); padding: 11px 16px; border: 1px solid rgba(139,214,170,.4); border-radius: 12px; color: #def4e7; background: rgba(20,48,37,.96); box-shadow: 0 12px 36px rgba(0,0,0,.35); transform: translateX(-50%); font-size: 12px; }.classmates-toast.error { border-color: rgba(236,143,143,.4); color: #ffe5e5; background: rgba(70,29,34,.96); }
.classmates-modal-root { --hall-gold: #f0c979; --hall-muted: #b9c1d4; }
.classmates-dialog-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 20px; background: rgba(0,5,13,.72); backdrop-filter: blur(5px); }
.classmates-dialog { width: min(430px, 100%); max-height: 85dvh; overflow: auto; padding: 20px; border: 1px solid rgba(240,201,121,.22); border-radius: 24px 24px 16px 16px; color: #edf2f8; background: linear-gradient(160deg, #18293c, #0d1827); box-shadow: 0 -18px 60px rgba(0,0,0,.45); }
.classmates-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.classmates-dialog header span { color: var(--hall-gold); font-size: 10px; }.classmates-dialog h2 { margin: 5px 0 16px; color: #fff5db; font-size: 19px; }.classmates-dialog header > button { width: 40px; height: 40px; border: 0; border-radius: 12px; color: #dbe3ed; background: #26384a; font-size: 22px; }.classmates-dialog form { display: grid; gap: 12px; }.classmates-dialog label { display: grid; gap: 6px; color: #bbc6d4; font-size: 11px; }.classmates-dialog .classmates-check { display: flex; align-items: center; min-height: 38px; }.classmates-dialog .classmates-check input { width: 20px; height: 20px; }.classmates-avatar-preview { display: grid; place-items: center; min-height: 90px; margin-bottom: 13px; border-radius: 16px; background: rgba(5,13,23,.55); }.classmates-avatar-preview .classmates-avatar { transform: scale(1.6); transform-origin: center bottom; }
.classmates-dialog-note { color: #9fadc0; font-size: 11px; line-height: 1.6; }.classmates-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.classmates-dialog-actions button { min-height: 46px; border: 0; border-radius: 12px; color: #dce5ef; background: #26384a; }.classmates-dialog-actions button.danger { color: #fff; background: #914952; }
.classmates-finish-options { display: grid; gap: 10px; }.classmates-finish-options button { display: grid; gap: 5px; min-height: 78px; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; color: #edf3fa; background: #17283a; text-align: left; }.classmates-finish-options span { color: #9eacbd; font-size: 11px; }#classmatesTransferMonth { margin-top: 14px; }

@media all {
  .classmates-hall {
    padding-left: 16px;
    padding-right: 16px;
  }
  .classmates-hall-toolbar span {
    font-size: 11px;
    line-height: 1.35;
  }
  .classmates-hall-header h1,
  .classmates-entry-hero h1 {
    font-size: 28px;
    line-height: 1.25;
    text-wrap: balance;
  }
  .classmates-hall-floor {
    margin-left: 0;
    margin-right: 0;
    padding: 46px 16px 24px;
    border-radius: 56px 56px 20px 20px;
  }
  .classmates-hall-floor::before {
    left: 8px;
  }
  .classmates-hall-floor::after {
    right: 8px;
  }
  .classmates-table-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .classmates-study-table {
    padding: 14px 12px 12px;
  }
  .classmates-study-table > header {
    min-height: 48px;
  }
  .classmates-study-table h3 {
    font-size: 14px;
  }
  .classmates-study-table header p {
    font-size: 10px;
  }
  .classmates-study-table header > span {
    font-size: 11px;
  }
  .classmates-table-scene {
    height: 152px;
  }
  .classmates-table-top {
    inset: 50px 20% 42px;
  }
  .classmates-seat {
    width: 52px;
    min-height: 56px;
  }
  .classmates-seat.seat-1 {
    left: 8px;
    top: 40px;
  }
  .classmates-seat.seat-2 {
    right: 8px;
    top: 40px;
  }
  .classmates-seat.seat-3 {
    left: 29%;
    bottom: 0;
  }
  .classmates-seat.seat-4 {
    right: 29%;
    bottom: 0;
  }
  .classmates-avatar-wrap {
    width: 52px;
  }
  .classmates-avatar {
    transform: scale(1.08);
    transform-origin: center bottom;
  }
  .classmates-seat-name {
    width: 54px;
    font-size: 9px;
    line-height: 14px;
  }
  .classmates-empty-seat {
    width: 42px;
    height: 46px;
  }
  .classmates-empty-seat small {
    font-size: 8px;
  }
  .classmates-study-table footer > span,
  .classmates-table-action {
    font-size: 10px;
  }
  .classmates-table-action {
    padding: 0 12px;
  }
  .classmates-my-table .classmates-study-table {
    max-width: none;
  }
  .classmates-my-table .classmates-table-action {
    display: none;
  }
  body:has(.classmates-hall) .course-learning-assistant {
    inset: auto 10px 76px auto !important;
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
}

@media (max-width: 360px) {
  .classmates-hall { padding-left: 14px; padding-right: 14px; }
  .classmates-table-grid { gap: 12px; }
  .classmates-floor-sign small, .classmates-hall-toolbar span { display: none; }
  .classmates-manage-panel article { grid-template-columns: 44px 1fr; }
  .classmates-manage-panel article button { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .classmates-hall *, .classmates-dialog * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Classmates Hall v3 · approved immersive cosmic university composition */
body:has(.classmates-hall) .phone {
  background: #061223;
}

body:has(.classmates-hall) .topbar {
  position: relative;
  z-index: 12;
  color: #f8ead0;
  background: #061223;
  border-bottom-color: rgba(220, 171, 91, .22);
}

body:has(.classmates-hall) .tabbar {
  z-index: 20;
  padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(74, 148, 225, .5);
  color: #d9ad70;
  background: rgba(2, 16, 34, .97);
  box-shadow: 0 -10px 24px rgba(1, 8, 19, .52);
}

body:has(.classmates-hall) .tabbar .tab {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d9ad70;
  background: transparent;
}

body:has(.classmates-hall) .tabbar .tab.on {
  border-color: rgba(38, 137, 255, .62);
  color: #f5f8ff;
  background: linear-gradient(145deg, rgba(11, 78, 169, .86), rgba(7, 28, 74, .9));
  box-shadow: inset 0 0 18px rgba(38, 137, 255, .26), 0 0 12px rgba(20, 106, 255, .22);
}

body:has(.classmates-hall) .tabbar .tab-icon {
  filter: grayscale(1) brightness(1.7);
}

body:has(.classmates-hall) .course-learning-assistant {
  inset: auto max(15px, calc((100% - 420px) / 2 + 8px)) 78px auto !important;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.classmates-hall {
  --hall-ink: #fff4dc;
  --hall-muted: #c4c9d5;
  --hall-gold: #e8b86d;
  --hall-blue: #2f8fff;
  min-height: calc(100dvh - 72px);
  margin: -18px -18px 0;
  padding: 24px 14px 118px;
  overflow: clip;
  color: var(--hall-ink);
  background-color: #061223;
  background-image:
    linear-gradient(180deg, rgba(1, 11, 27, .04) 0, rgba(1, 10, 24, .1) 45%, rgba(1, 9, 21, .72) 100%),
    url("assets/classmates/cosmic-library-hall-v1.webp");
  background-position: center top, center top;
  background-repeat: repeat-y, repeat-y;
  background-size: 100% 910px, 100% auto;
}

.classmates-hall::before {
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(1, 10, 26, .12), transparent 66%);
  box-shadow: none;
}

.classmates-cosmos {
  display: none;
}

.classmates-hall-header {
  min-height: 122px;
  padding: 8px 6px 16px;
  align-items: flex-start;
}

.classmates-hall-header > div {
  flex: 1;
  min-width: 0;
}

.classmates-hall-header .classmates-hall-kicker {
  display: none;
}

.classmates-hall-header h1 {
  max-width: 290px;
  margin: 4px 0 8px;
  color: #fff1d5;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-shadow: 0 3px 13px rgba(0, 0, 0, .7);
}

.classmates-hall-header p {
  color: #f0dfc2;
  font-size: 13px;
  text-shadow: 0 2px 7px rgba(0, 0, 0, .86);
}

.classmates-profile-button {
  flex: 0 0 64px;
  min-width: 64px;
  min-height: 64px;
  margin-top: 0;
  overflow: hidden;
  border: 2px solid #dcaa59;
  border-radius: 50%;
  background: #081c37;
  box-shadow: 0 0 0 3px rgba(9, 35, 69, .88), 0 5px 12px rgba(0, 0, 0, .42);
}

.classmates-profile-button .classmates-avatar-wrap,
.classmates-profile-button .classmates-avatar {
  width: 58px;
  height: 58px;
}

.classmates-hall-tabs {
  margin: 0 4px 10px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #a76a33;
  border-radius: 24px;
  background: rgba(3, 20, 42, .9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  backdrop-filter: blur(8px);
}

.classmates-quick-actions {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 4px 12px;
}

.classmates-quick-actions button {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(219, 173, 105, .32);
  border-radius: 10px;
  color: #fff3dc;
  background: rgba(3, 22, 43, .9);
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
  cursor: pointer;
}

.classmates-quick-actions button > span {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 8px;
  background: rgba(232, 184, 109, .14);
  color: #f2c77f;
  font-size: 16px;
}

.classmates-quick-actions strong,
.classmates-quick-actions small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.classmates-quick-actions strong {
  align-self: end;
  color: #fff3dc;
  font-size: 12px;
  line-height: 1.25;
}

.classmates-quick-actions small {
  align-self: start;
  margin-top: 2px;
  color: #aebbd0;
  font-size: 9px;
  line-height: 1.3;
}

.classmates-quick-actions .classmates-challenge-entry {
  border-color: rgba(232, 184, 109, .5);
  background: linear-gradient(145deg, rgba(77, 50, 22, .84), rgba(7, 28, 49, .94));
}

.classmates-quick-actions .classmates-invite-entry {
  border-color: rgba(76, 163, 255, .48);
  background: linear-gradient(145deg, rgba(11, 70, 127, .8), rgba(6, 27, 50, .94));
}

.classmates-quick-actions button:focus-visible {
  outline: 3px solid rgba(76, 163, 255, .45);
  outline-offset: 2px;
}

.classmates-hall-tabs button {
  min-height: 48px;
  border-radius: 20px;
  color: #eeb878;
  font-size: 15px;
}

.classmates-hall-tabs button.on {
  color: #fff;
  background: linear-gradient(135deg, #0757be, #07347a);
  box-shadow: inset 0 0 15px rgba(85, 166, 255, .35), 0 0 0 1px rgba(28, 141, 255, .82);
}

.classmates-hall-toolbar {
  min-height: 52px;
  padding: 4px 4px 8px;
  gap: 6px;
}

.classmates-hall-toolbar button {
  min-height: 42px;
  padding: 0 10px;
  border-color: rgba(204, 156, 84, .3);
  border-radius: 12px;
  color: #f4e7d2;
  background: rgba(3, 18, 38, .86);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .28);
}

.classmates-hall-toolbar span {
  color: #d3c4ad;
  font-size: 9px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .9);
}

.classmates-hall-scroll {
  display: block;
}

.classmates-hall-floor {
  min-height: 570px;
  margin: 0 0 30px;
  padding: 55px 4px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.classmates-hall-floor::before,
.classmates-hall-floor::after {
  display: none;
}

.classmates-floor-sign {
  top: 15px;
  padding: 6px 12px;
  border: 1px solid rgba(218, 172, 100, .28);
  border-radius: 16px;
  background: rgba(3, 16, 34, .72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
  backdrop-filter: blur(6px);
}

.classmates-floor-sign span {
  color: #f2d49a;
  font-size: 11px;
}

.classmates-floor-sign small {
  color: #b5b7bd;
  font-size: 8px;
}

.classmates-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px;
  align-items: start;
}

.classmates-study-table {
  display: grid;
  grid-template-rows: 158px auto auto;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), filter 180ms ease;
}

.classmates-study-table:has(.classmates-table-action:not(:disabled)):active {
  transform: scale(.985);
}

.classmates-study-table > header {
  order: 2;
  min-height: 42px;
  padding: 8px 9px 5px;
  gap: 4px;
  border: 1px solid rgba(195, 136, 69, .58);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: #fff;
  background: rgba(3, 18, 36, .92);
}

.classmates-study-table h3 {
  color: #fff5e4;
  font-size: 11px;
  line-height: 1.25;
}

.classmates-study-table header p {
  margin-top: 3px;
  color: #b9c0cc;
  font-size: 7px;
}

.classmates-study-table header > span {
  color: #f3e8d8;
  font-size: 10px;
}

.classmates-table-scene {
  order: 1;
  height: 158px;
}

.classmates-table-top {
  inset: 38px 11px 31px;
  border: 1px solid #b67b43;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .05), transparent 24%, rgba(0, 0, 0, .08) 68%, transparent),
    linear-gradient(145deg, #8a562e, #4d2d1d);
  box-shadow: 0 7px 0 #2d1a13, 0 10px 12px rgba(0, 0, 0, .54), inset 0 1px rgba(255, 229, 180, .25);
  transform: perspective(130px) rotateX(8deg);
}

.desk-book {
  left: 24%;
  top: 19px;
  width: 24px;
  height: 16px;
}

.desk-tablet {
  right: 17%;
  top: 16px;
  width: 18px;
  height: 22px;
}

.desk-lamp {
  top: -5px;
}

.classmates-seat {
  width: 54px;
  min-height: 58px;
}

.classmates-seat.seat-1 { left: 0; top: 0; }
.classmates-seat.seat-2 { right: 0; top: 0; }
.classmates-seat.seat-3 { left: 5px; bottom: 0; }
.classmates-seat.seat-4 { right: 5px; bottom: 0; }

.classmates-avatar-wrap {
  width: 54px;
}

.classmates-avatar {
  display: block;
  width: 50px;
  height: 50px;
  overflow: hidden;
  border: 2px solid #c99650;
  border-radius: 50%;
  background-color: #061831;
  background-image: url("assets/classmates/student-avatars-v1.webp");
  background-position: var(--avatar-x, 0%) var(--avatar-y, 0%);
  background-repeat: no-repeat;
  background-size: 400% 400%;
  box-shadow: 0 0 0 2px rgba(5, 27, 55, .9), 0 4px 8px rgba(0, 0, 0, .5);
  transform: none;
}

.classmates-avatar > i {
  display: none;
}

.classmates-seat-name {
  width: 54px;
  margin-top: 2px;
  color: #fff;
  font-size: 8px;
  line-height: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .95);
}

.classmates-learned-dot,
.classmates-owner-star {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  font-size: 8px;
}

.classmates-learned-dot { right: -1px; }
.classmates-owner-star { left: -1px; }

.classmates-empty-seat {
  width: 48px;
  height: 48px;
  border-color: rgba(215, 177, 119, .58);
  border-radius: 50%;
  color: #e9bd79;
  background: rgba(4, 20, 42, .9);
  box-shadow: 0 0 0 2px rgba(4, 20, 42, .62), 0 4px 8px rgba(0, 0, 0, .42);
}

.classmates-empty-seat b { font-size: 19px; }
.classmates-empty-seat small { font-size: 7px; }

.classmates-study-table > footer {
  order: 3;
  min-height: 46px;
  padding: 4px 6px 7px 9px;
  border: 1px solid rgba(195, 136, 69, .58);
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: rgba(3, 18, 36, .92);
}

.classmates-study-table footer > span {
  color: #d3c7b7;
  font-size: 8px;
}

.classmates-table-action {
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid rgba(99, 225, 175, .46);
  border-radius: 12px;
  color: #e9fff6;
  background: #08795d;
  font-size: 8px;
  box-shadow: inset 0 0 10px rgba(84, 242, 186, .16);
}

.classmates-table-action.quiet {
  border-color: rgba(72, 152, 213, .45);
  color: #e9f6ff;
  background: #245477;
}

.classmates-table-action:disabled,
.classmates-table-state {
  color: #c4c7cc;
  background: #29313d;
}

.classmates-my-space {
  padding-top: 18px;
}

.classmates-my-hero,
.classmates-today-panel,
.classmates-manage-panel,
.classmates-pending-card {
  border-color: rgba(201, 151, 80, .34);
  background: rgba(3, 18, 36, .9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .3);
}

.classmates-my-table .classmates-study-table {
  max-width: 292px;
  margin: 0 auto 18px;
}

@media (max-width: 360px) {
  .classmates-hall {
    padding-left: 10px;
    padding-right: 10px;
  }
  .classmates-hall-header h1 {
    font-size: 25px;
  }
  .classmates-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 8px;
  }
  .classmates-study-table {
    grid-template-rows: 148px auto auto;
  }
  .classmates-table-scene {
    height: 148px;
  }
  .classmates-avatar,
  .classmates-empty-seat {
    width: 46px;
    height: 46px;
  }
  .classmates-avatar-wrap,
  .classmates-seat,
  .classmates-seat-name {
    width: 49px;
  }
  .classmates-table-top {
    inset-inline: 9px;
  }
}

@media (max-width: 430px) {
  .classmates-hall-header h1 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .classmates-study-table {
    transition: none;
  }
}

/* YASI Cosmic University global theme v1
   One academic night-campus shell for learning, practice, classmates and profile. */
:root {
  --bg-gradient:
    radial-gradient(circle at 50% 8%, rgba(47, 143, 255, .18), transparent 32%),
    linear-gradient(180deg, #020817 0%, #071427 52%, #020713 100%);
  --phone-bg: #071427;
  --card: rgba(10, 29, 50, .96);
  --card-hover: rgba(16, 41, 66, .98);
  --ink: #f7f0e3;
  --muted: #aebbd0;
  --text: #f7f0e3;
  --text-2: #b8c4d5;
  --line: rgba(222, 180, 108, .24);
  --border: rgba(222, 180, 108, .24);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .22);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .48);
  --brand: #4ca3ff;
  --brand-d: #8cc8ff;
  --brand-primary: #2f8fff;
  --brand-gradient: linear-gradient(135deg, #1674db, #2f8fff);
  --info: #70bbff;
  --success: #43d5a2;
  --info-bg: rgba(47, 143, 255, .13);
  --ok-bg: rgba(38, 190, 139, .13);
  --warn-bg: rgba(232, 184, 109, .13);
  --theme-gold: #e8b86d;
  --theme-panel: rgba(7, 25, 45, .94);
}

body {
  background-color: #020817;
  background-image:
    linear-gradient(180deg, rgba(1, 7, 18, .62), rgba(2, 9, 20, .9)),
    url("/assets/classmates/cosmic-library-hall-v1.webp");
  background-position: center top;
  background-size: cover;
  color: var(--ink);
}

.phone {
  background:
    linear-gradient(180deg, rgba(4, 15, 31, .72), rgba(4, 15, 31, .96) 26%, #061426 100%),
    url("/assets/classmates/cosmic-library-hall-v1.webp") center top / 980px auto no-repeat;
  border-color: rgba(232, 184, 109, .32);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .04);
}

.topbar {
  border-bottom-color: rgba(232, 184, 109, .2);
  background: rgba(3, 13, 28, .87);
}

.logo,
h1 {
  color: #f5dfb5;
}

.lang {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(232, 184, 109, .3);
  border-radius: 9px;
  color: #f5dfb5;
}

main {
  position: relative;
}

.card,
.opt,
.mod,
.lesson,
.sec,
.duo-card,
.question-card,
.result-card,
.profile-card,
.pay-card,
.checklist-item {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.opt:hover,
.mod:hover,
.lesson:hover,
.card:hover {
  background: var(--card-hover);
}

input,
textarea,
select {
  border-color: rgba(232, 184, 109, .28) !important;
  background: rgba(2, 13, 28, .86) !important;
  color: var(--ink) !important;
}

input::placeholder,
textarea::placeholder {
  color: #8493aa;
}

button,
[role="button"],
.opt,
.mod,
.lesson,
.setting-item {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(76, 163, 255, .45) !important;
  outline-offset: 2px;
}

.btn,
.primary,
.vip-btn {
  min-height: 44px;
}

.btn.primary,
.primary,
.vip-btn {
  border-color: #4ca3ff;
  background: linear-gradient(135deg, #126bc6, #278ef2);
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 102, 196, .26);
}

.tabbar,
body:has(.classmates-hall) .tabbar {
  border-top-color: rgba(232, 184, 109, .24);
  background: rgba(2, 12, 27, .96);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .3);
}

.tabbar .tab,
body:has(.classmates-hall) .tabbar .tab {
  min-height: 62px;
  color: #8f9db2;
}

.tabbar .tab.on,
.tabbar .tab.on span:last-child,
body:has(.classmates-hall) .tabbar .tab.on {
  color: #8cc8ff;
}

.tabbar .tab.on .tab-icon {
  filter: drop-shadow(0 0 9px rgba(47, 143, 255, .72));
}

/* Today learning: dark study desk panels over the university backdrop. */
.learning-home {
  gap: 14px;
}

.learning-scoreboard {
  border: 1px solid rgba(232, 184, 109, .28);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 35, 62, .98), rgba(6, 22, 41, .98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, .26);
}

.learning-scoreboard-head span,
.learning-scoreboard-context,
.learning-scoreboard-plan-note,
.learning-week-summary span,
.learning-week-summary p {
  color: #b9cae0;
}

.learning-scoreboard-track,
.learning-week-track {
  background: rgba(255, 255, 255, .12);
}

.learning-scoreboard-track span,
.learning-week-track span {
  background: linear-gradient(90deg, #2f8fff, #8cc8ff);
}

.learning-path {
  border-color: rgba(232, 184, 109, .26);
  border-radius: 14px;
  background: rgba(6, 24, 44, .96);
}

.learning-path-head span,
.learning-path-head strong,
.learning-path-step.current .learning-path-status {
  color: #f2ce91;
}

.learning-path-head small,
.learning-path-status,
.learning-path-step p {
  color: var(--muted);
}

.learning-path-step,
.learning-path-step.current {
  background: rgba(13, 39, 65, .86);
  box-shadow: none;
}

.learning-path-step.current {
  box-shadow: inset 0 0 0 1px rgba(76, 163, 255, .58);
}

.learning-path-step strong {
  color: var(--ink);
}

.learning-priority {
  border: 1px solid rgba(76, 163, 255, .48);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 37, 67, .98), rgba(7, 26, 48, .98));
}

.learning-priority-assistant strong,
.learning-priority-copy > span,
.learning-priority-assistant > button,
.learning-assistant-discuss {
  color: #8cc8ff;
}

.learning-priority-copy p,
.learning-assistant-panel > p {
  color: var(--muted);
}

.learning-priority .learning-priority-main {
  border-radius: 10px;
  background: linear-gradient(135deg, #126bc6, #278ef2);
}

.learning-entry-card {
  border-color: var(--line);
  border-radius: 14px;
  background: rgba(7, 25, 45, .96);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}

.learning-entry-card:hover {
  background: rgba(14, 39, 64, .98);
}

.learning-entry-icon.vocabulary,
.learning-entry-icon.phrases,
.learning-entry-icon.mistakes {
  background: rgba(232, 184, 109, .12);
}

.learning-entry-state,
.learning-entry-state.neutral {
  background: rgba(232, 184, 109, .13);
  color: #f2ce91;
}

.learning-entry-state.done {
  background: rgba(67, 213, 162, .12);
  color: #72e2ba;
}

/* Practice hall. */
.practice-hall {
  gap: 18px;
  padding: 0 0 36px;
}

.practice-hall-hero {
  position: relative;
  overflow: hidden;
  padding: 21px 19px;
  border: 1px solid rgba(232, 184, 109, .34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 12%, rgba(76, 163, 255, .25), transparent 31%),
    linear-gradient(145deg, rgba(13, 43, 72, .98), rgba(5, 22, 42, .98));
  box-shadow: 0 16px 32px rgba(0, 0, 0, .28);
}

.practice-hall-kicker {
  color: #e8b86d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.practice-hall-hero h2 {
  margin: 6px 0 5px;
  color: #fff4df;
  font-size: 22px;
}

.practice-hall-hero p {
  margin: 0;
  color: #bdc9d9;
  font-size: 13px;
  line-height: 1.55;
}

.practice-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.practice-section-heading h3 {
  color: #f5dfb5;
  font-size: 16px;
}

.practice-section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.practice-skill-list {
  display: grid;
  gap: 10px;
}

.practice-skill-card,
.practice-weekly-card {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 25, 45, .96);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 9px 20px rgba(0, 0, 0, .2);
  cursor: pointer;
}

.practice-skill-card:hover,
.practice-weekly-card:hover {
  border-color: rgba(76, 163, 255, .5);
  background: rgba(13, 38, 63, .98);
}

.practice-skill-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(232, 184, 109, .11);
  font-size: 23px;
}

.practice-skill-copy {
  min-width: 0;
}

.practice-skill-copy strong,
.practice-skill-copy small {
  display: block;
}

.practice-skill-copy strong {
  color: #fff4df;
  font-size: 15px;
}

.practice-skill-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.practice-skill-arrow {
  color: #8cc8ff;
  font-size: 27px;
}

.practice-check-heading {
  margin-top: 3px;
}

.practice-weekly-card {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  border-color: rgba(232, 184, 109, .35);
}

.practice-weekly-cta {
  padding: 8px 10px;
  border-radius: 8px;
  background: #176fc7;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Profile and records. Existing capabilities remain; presentation joins the same campus. */
.profile-space {
  color: var(--ink);
}

.profile-space > h2 {
  color: #f5dfb5 !important;
  font-size: 15px !important;
}

.vip-card {
  border: 1px solid rgba(232, 184, 109, .34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 90% 0, rgba(76, 163, 255, .22), transparent 32%),
    linear-gradient(145deg, rgba(11, 38, 65, .98), rgba(5, 22, 41, .98));
  color: var(--ink);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .28);
}

.vip-avatar {
  border: 1px solid rgba(232, 184, 109, .4);
  background: rgba(232, 184, 109, .12);
  color: #f5dfb5;
}

.vip-info h2 {
  color: #fff4df;
}

.vip-badge,
.vip-badge.free {
  background: rgba(76, 163, 255, .14);
  color: #8cc8ff;
}

.profile-space .card,
.profile-space .card[style] {
  border-color: var(--line) !important;
  background: rgba(7, 25, 45, .96) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm) !important;
}

.profile-space .card [style*="color: #0f172a"],
.profile-space .card [style*="color: var(--text)"] {
  color: var(--ink) !important;
}

.profile-space .card [style*="background: var(--ok-bg)"],
.profile-space .card [style*="background: var(--info-bg)"] {
  border: 1px solid rgba(232, 184, 109, .16);
}

.profile-space > div[style*="display: flex"][style*="margin-bottom: 16px"] .card {
  min-width: 0;
  padding-inline: 8px !important;
}

.profile-space > div[style*="display: flex"][style*="margin-bottom: 16px"] .card > div:last-child {
  font-size: 17px !important;
  line-height: 1.25;
  word-break: keep-all;
}

.setting-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 25, 45, .96);
  box-shadow: var(--shadow-sm);
}

.setting-item {
  min-height: 54px;
  border-bottom-color: rgba(232, 184, 109, .15);
  background: transparent;
}

.setting-item:active {
  background: rgba(76, 163, 255, .1);
}

.setting-item-left {
  color: var(--ink);
}

/* Learning subflows and reusable feedback surfaces. */
.duo-progress-container {
  background: rgba(255, 255, 255, .12);
}

.duo-progress-bar {
  background: linear-gradient(90deg, #2f8fff, #8cc8ff);
}

.duo-option {
  border-color: var(--line);
  background: rgba(7, 25, 45, .96);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.duo-option.correct {
  border-color: #43d5a2;
  background: rgba(38, 190, 139, .17);
  color: #9af0d0;
}

.duo-option.wrong {
  border-color: #f16b76;
  background: rgba(239, 68, 68, .16);
  color: #ffb2b8;
  box-shadow: none;
}

.duo-example,
.learning-assistant-reply,
.course-assistant-reply {
  background: rgba(2, 13, 28, .7);
  color: var(--text-2);
}

.persistent-learning-assistant {
  border-color: rgba(232, 184, 109, .3);
  background: #07172a;
  color: var(--ink);
}

@media (max-width: 520px) {
  body {
    padding: 0;
    background-image: none;
  }
  .phone {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  main {
    padding: 22px 18px 30px;
  }
  .tabbar {
    margin-inline: -18px;
  }
}

@media (max-width: 360px) {
  .practice-weekly-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .practice-weekly-cta {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  main,
  .tab,
  .practice-skill-card,
  .practice-weekly-card {
    animation: none;
    transition: none;
  }
}

/* YASI Cosmic University readability pass v2
   Keep the campus as the surrounding atmosphere; learning happens on an
   opaque, high-contrast reading canvas. */
@media (min-width: 700px) {
  .app-shell {
    width: min(100%, 520px);
  }

  .phone {
    max-width: 520px;
    flex-basis: 520px;
  }
}

body:not(:has(.classmates-hall)) .phone {
  --ink: #172033;
  --muted: #526176;
  --text: #172033;
  --text-2: #435168;
  --line: #d8e0ea;
  --border: #d8e0ea;
  --card: #ffffff;
  --card-hover: #f4f7fb;
  --shadow-sm: 0 2px 7px rgba(23, 32, 51, .08);
  color: #172033;
  background: #f4f7fb;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:not(:has(.classmates-hall)) .topbar {
  color: #f8edd7;
  background: #07182d;
  border-bottom-color: rgba(232, 184, 109, .28);
}

body:not(:has(.classmates-hall)) .logo,
body:not(:has(.classmates-hall)) .topbar .lang {
  color: #f8e2b7;
}

body:not(:has(.classmates-hall)) main {
  color: #172033;
  background: #f4f7fb;
}

body:not(:has(.classmates-hall)) :is(h1, h2, h3),
body:not(:has(.classmates-hall)) :is(.card, .opt, .mod, .lesson, .sec, .duo-card, .question-card, .result-card, .profile-card, .pay-card, .checklist-item) {
  color: #172033;
}

body:not(:has(.classmates-hall)) :is(.card, .opt, .mod, .lesson, .sec, .duo-card, .question-card, .result-card, .profile-card, .pay-card, .checklist-item) {
  border-color: #d8e0ea;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .08);
}

body:not(:has(.classmates-hall)) :is(input, textarea, select) {
  border-color: #aebaca !important;
  background: #ffffff !important;
  color: #172033 !important;
}

body:not(:has(.classmates-hall)) :is(input, textarea)::placeholder {
  color: #59687d;
}

body:not(:has(.classmates-hall)) .tabbar {
  border-top-color: rgba(232, 184, 109, .32);
  background: #07182d;
  box-shadow: 0 -5px 12px rgba(7, 24, 45, .16);
}

body:not(:has(.classmates-hall)) .tabbar .tab {
  color: #b7c2d2;
}

body:not(:has(.classmates-hall)) .tabbar .tab.on,
body:not(:has(.classmates-hall)) .tabbar .tab.on span:last-child {
  color: #8cc8ff;
}

/* Today learning: reading-first hierarchy and type scale. */
body:not(:has(.classmates-hall)) .learning-home {
  gap: 16px;
}

body:not(:has(.classmates-hall)) :is(.learning-scoreboard, .learning-path, .learning-priority, .learning-entry-card) {
  border-color: #ced8e5;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .08);
}

body:not(:has(.classmates-hall)) .learning-priority {
  border-color: #9fc4ee;
  background: #f7fbff;
}

body:not(:has(.classmates-hall)) :is(.learning-priority-assistant strong, .learning-priority-copy > span, .learning-priority-assistant > button, .learning-assistant-discuss) {
  color: #185da8;
}

body:not(:has(.classmates-hall)) :is(.learning-scoreboard-head span, .learning-scoreboard-context, .learning-scoreboard-plan-note, .learning-week-summary span, .learning-week-summary p, .learning-path-head small, .learning-path-status, .learning-path-step p, .learning-priority-copy p, .learning-assistant-panel > p) {
  color: #526176;
}

body:not(:has(.classmates-hall)) :is(.learning-scoreboard-context *, .learning-scoreboard-plan-note *, .learning-week-summary *) {
  color: #526176;
}

body:not(:has(.classmates-hall)) .learning-scoreboard-summary span {
  background: #e9eef5;
  color: #435168;
  font-size: 12px;
}

body:not(:has(.classmates-hall)) .learning-scoreboard-count {
  color: #435168;
}

body:not(:has(.classmates-hall)) :is(.learning-scoreboard-head strong, .learning-path-step strong, .learning-entry-card strong) {
  color: #172033;
}

body:not(:has(.classmates-hall)) :is(.learning-path-step, .learning-path-step.current) {
  background: #f4f7fb;
}

body:not(:has(.classmates-hall)) .learning-path-step.current {
  box-shadow: inset 0 0 0 1px #83b8ef;
}

body:not(:has(.classmates-hall)) .learning-entry-card {
  min-height: 86px;
}

body:not(:has(.classmates-hall)) .learning-entry-card strong {
  font-size: 17px;
  line-height: 1.35;
}

body:not(:has(.classmates-hall)) .learning-entry-card p {
  color: #435168;
  font-size: 14px;
  line-height: 1.55;
}

body:not(:has(.classmates-hall)) :is(.learning-entry-state, .learning-entry-state.neutral) {
  background: #eef2f7;
  color: #435168;
}

body:not(:has(.classmates-hall)) .learning-entry-state.done {
  background: #e7f7ef;
  color: #08734f;
}

/* Practice: plain task cards, strong labels, no image behind reading copy. */
body:not(:has(.classmates-hall)) .practice-hall-hero {
  border-color: #b9cbe0;
  background: #eaf3fd;
  color: #172033;
  box-shadow: none;
}

body:not(:has(.classmates-hall)) .practice-hall-kicker {
  color: #855600;
}

body:not(:has(.classmates-hall)) .practice-hall-hero h2,
body:not(:has(.classmates-hall)) .practice-section-heading h3,
body:not(:has(.classmates-hall)) .practice-skill-copy strong {
  color: #172033;
}

body:not(:has(.classmates-hall)) .practice-hall-hero h2 {
  font-size: 23px;
  line-height: 1.35;
}

body:not(:has(.classmates-hall)) .practice-hall-hero p,
body:not(:has(.classmates-hall)) .practice-section-heading span,
body:not(:has(.classmates-hall)) .practice-skill-copy small {
  color: #435168;
}

body:not(:has(.classmates-hall)) :is(.practice-skill-card, .practice-weekly-card) {
  min-height: 88px;
  border-color: #ced8e5;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .08);
}

body:not(:has(.classmates-hall)) .practice-skill-copy strong {
  font-size: 17px;
}

body:not(:has(.classmates-hall)) .practice-skill-copy small {
  font-size: 14px;
  line-height: 1.5;
}

body:not(:has(.classmates-hall)) .practice-skill-icon {
  background: #eef3f8;
}

/* Profile: records use the same readable paper surface. */
body:not(:has(.classmates-hall)) .profile-space,
body:not(:has(.classmates-hall)) .profile-space > h2,
body:not(:has(.classmates-hall)) .setting-item-left {
  color: #172033 !important;
}

body:not(:has(.classmates-hall)) .vip-card {
  border-color: #b9cbe0;
  background: #eaf3fd;
  color: #172033;
  box-shadow: none;
}

body:not(:has(.classmates-hall)) .vip-info h2 {
  color: #172033;
}

body:not(:has(.classmates-hall)) :is(.vip-badge, .vip-badge.free) {
  background: #cbddec;
  color: #24577f;
}

body:not(:has(.classmates-hall)) .profile-space .card,
body:not(:has(.classmates-hall)) .profile-space .card[style],
body:not(:has(.classmates-hall)) .setting-list {
  border-color: #ced8e5 !important;
  background: #ffffff !important;
  color: #172033 !important;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .08) !important;
}

body:not(:has(.classmates-hall)) .profile-space .card [style*="color: #0f172a"],
body:not(:has(.classmates-hall)) .profile-space .card [style*="color: var(--text)"] {
  color: #172033 !important;
}

body:not(:has(.classmates-hall)) .setting-item {
  min-height: 60px;
  border-bottom-color: #d8e0ea;
}

/* Existing learning subflows inherit the readable canvas as well. */
body:not(:has(.classmates-hall)) .duo-option {
  border-color: #ced8e5;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 2px 7px rgba(23, 32, 51, .08);
}

body:not(:has(.classmates-hall)) :is(.duo-example, .learning-assistant-reply, .course-assistant-reply) {
  background: #eef3f8;
  color: #35445a;
}

/* The immersive hall stays dark, but its operational labels must be legible. */
.classmates-study-table h3 { font-size: 13px; }
.classmates-study-table header p { font-size: 10px; }
.classmates-study-table header > span { font-size: 11px; }
.classmates-seat-name { font-size: 10px; }
.classmates-empty-seat small { font-size: 9px; }
.classmates-study-table footer > span { font-size: 10px; }
.classmates-table-action { font-size: 11px; }

@media (max-width: 520px) {
  body:not(:has(.classmates-hall)) main {
    padding: 20px 16px 34px;
  }

  body:not(:has(.classmates-hall)) .phone {
    font-size: 16px;
  }

  body:not(:has(.classmates-hall)) .practice-skill-card,
  body:not(:has(.classmates-hall)) .practice-weekly-card {
    padding: 15px 13px;
  }
}

@media (forced-colors: active) {
  body:not(:has(.classmates-hall)) :is(.card, .opt, .mod, .lesson, .practice-skill-card, .practice-weekly-card, .setting-list) {
    border: 1px solid CanvasText;
  }
}

/* YASI Cosmic University tonal unification v4
   One night-campus shell, one blue-grey classroom canvas, one readable paper
   surface. The hall remains scenic without overpowering its controls. */
.classmates-hall {
  background-image:
    linear-gradient(180deg, rgba(25, 55, 84, .24) 0%, rgba(12, 33, 56, .34) 48%, rgba(7, 24, 43, .72) 100%),
    url("assets/classmates/cosmic-library-hall-v1.webp");
  background-color: #10263d;
}

.classmates-hall::before {
  inset: 0;
  height: auto;
  background: rgba(41, 68, 93, .08);
  backdrop-filter: saturate(.78) brightness(1.08);
  -webkit-backdrop-filter: saturate(.78) brightness(1.08);
}

body:has(.classmates-hall) .phone,
body:has(.classmates-hall) .topbar {
  background: #0b2036;
}

.classmates-study-table > footer,
.classmates-quick-actions button,
.classmates-hall-toolbar button {
  background-color: rgba(11, 34, 57, .94);
}

body:not(:has(.classmates-hall)) .phone {
  --card: #edf2f7;
  --card-hover: #f5f8fb;
  --line: #b9c7d5;
  --border: #b9c7d5;
  color: #172033;
  background: #14283e;
}

body:not(:has(.classmates-hall)) main {
  color: #e7edf4;
  background: #192d43;
}

body:not(:has(.classmates-hall)) :is(main > h1, main > h2, main > h3, main > .sub) {
  color: #f3e2c1;
}

body:not(:has(.classmates-hall)) :is(.card, .opt, .mod, .lesson, .sec, .duo-card, .question-card, .result-card, .profile-card, .pay-card, .checklist-item) {
  border-color: #c5d0dc;
  background: #edf2f7;
  box-shadow: 0 3px 8px rgba(2, 12, 25, .18);
}

body:not(:has(.classmates-hall)) :is(.learning-scoreboard, .learning-path, .learning-entry-card) {
  border-color: #c5d0dc;
  background: #edf2f7;
  box-shadow: 0 3px 8px rgba(2, 12, 25, .18);
}

body:not(:has(.classmates-hall)) .learning-priority {
  border-color: #8eb9e2;
  background: #e2edf7;
  box-shadow: 0 3px 8px rgba(2, 12, 25, .2);
}

body:not(:has(.classmates-hall)) :is(.learning-path-step, .learning-path-step.current) {
  background: #e3eaf1;
}

body:not(:has(.classmates-hall)) :is(.learning-entry-state, .learning-entry-state.neutral) {
  background: #dce4ec;
}

body:not(:has(.classmates-hall)) .practice-hall-hero,
body:not(:has(.classmates-hall)) .vip-card {
  border-color: #8eb1d1;
  background: #dbe8f3;
}

body:not(:has(.classmates-hall)) .practice-section-heading h3,
body:not(:has(.classmates-hall)) .profile-space > h2 {
  color: #f3e2c1 !important;
}

body:not(:has(.classmates-hall)) .practice-section-heading span {
  color: #bdc9d6;
}

body:not(:has(.classmates-hall)) :is(.practice-skill-card, .practice-weekly-card) {
  border-color: #c5d0dc;
  background: #edf2f7;
  box-shadow: 0 3px 8px rgba(2, 12, 25, .18);
}

body:not(:has(.classmates-hall)) .practice-skill-icon {
  background: #dce5ed;
}

body:not(:has(.classmates-hall)) .profile-space .card,
body:not(:has(.classmates-hall)) .profile-space .card[style],
body:not(:has(.classmates-hall)) .setting-list {
  border-color: #c5d0dc !important;
  background: #edf2f7 !important;
  box-shadow: 0 3px 8px rgba(2, 12, 25, .18) !important;
}

body:not(:has(.classmates-hall)) :is(input, textarea, select) {
  border-color: #9eafc0 !important;
  background: #f4f7fa !important;
}

body:not(:has(.classmates-hall)) :is(.duo-example, .learning-assistant-reply, .course-assistant-reply) {
  background: #dce5ed;
}

@media (prefers-reduced-transparency: reduce) {
  .classmates-hall::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(25, 50, 75, .2);
  }
}

/* The global tutor belongs to the same classroom surface, not a white overlay. */
.persistent-learning-assistant {
  border-color: #58728c;
  background: #d9e3ec;
  color: #172033;
  box-shadow: 0 18px 42px rgba(1, 10, 22, .36);
}

.persistent-assistant-header {
  border-bottom-color: #29445e;
  background: #0b2036;
}

.persistent-assistant-identity strong {
  color: #f3e2c1;
}

.persistent-assistant-identity small {
  color: #bdc9d6;
}

.persistent-assistant-header > button {
  color: #8cc8ff;
}

.persistent-assistant-context {
  border-bottom-color: #aebdcb;
  background: #cbd8e3;
  color: #35485d;
}

.persistent-assistant-messages {
  background: #d9e3ec;
}

.persistent-assistant-message-content > p,
.persistent-assistant-proposal {
  border-color: #c1ceda;
  background: #eef3f7;
  color: #1e2b3d;
  box-shadow: 0 1px 3px rgba(23, 32, 51, .1);
}

.persistent-assistant-proposal button.secondary {
  border-color: #aebdcb;
  background: #e5ebf1;
  color: #35485d;
}

.persistent-assistant-prompt-actions button,
.persistent-assistant-suggestions button {
  border-color: #9fbbd7;
  background: #e3edf6;
  color: #185a9d;
}

.persistent-assistant-suggestions,
.persistent-assistant-composer {
  border-top-color: #aebdcb;
  background: #cbd8e3;
}

.persistent-assistant-composer label {
  color: #35485d;
}

.persistent-assistant-composer textarea {
  border-color: #91a5b8 !important;
  background: #eef3f7 !important;
  color: #172033 !important;
}
