:root {
  --paper: #fffaf0;
  --paper-strong: #fff4d8;
  --ink: #20242b;
  --muted: #6b7280;
  --line: #e7dccb;
  --orange: #f97316;
  --green: #22c55e;
  --blue: #3b82f6;
  --red: #ef4444;
  --shadow: 0 18px 50px rgba(77, 54, 24, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(249, 115, 22, 0.11), transparent 30%),
    radial-gradient(circle at 80% 4%, rgba(59, 130, 246, 0.1), transparent 26%),
    linear-gradient(180deg, #fffdfa 0%, #fbf1df 100%);
  min-height: 100vh;
}

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

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(231, 220, 203, 0.8);
  background: rgba(255, 253, 250, 0.86);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), #facc15);
  box-shadow: var(--shadow);
}

.brand strong { display: block; font-size: 20px; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
}

.user-chip, .age-chip, .badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  padding: 8px 12px;
  color: #475569;
  font-size: 14px;
}

.primary-link, .btn.primary {
  background: var(--ink);
  color: #fff;
}

.ghost, .btn.subtle {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(32, 36, 43, 0.08);
}

.btn.small { padding: 10px 14px; font-size: 14px; background: var(--paper-strong); }
.btn.full { width: 100%; }

.flash-wrap { max-width: 1180px; margin: 18px auto 0; padding: 0 24px; }
.flash { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.flash.success { border-color: rgba(34, 197, 94, 0.4); }
.flash.danger { border-color: rgba(239, 68, 68, 0.4); }
.flash.warning { border-color: rgba(249, 115, 22, 0.45); }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 48px;
  align-items: center;
  padding: 54px 24px 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0;
}

h1, h2, h3, p { margin-top: 0; }

.hero h1 {
  font-size: 58px;
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-text, .lead {
  color: #4b5563;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 14px; margin: 28px 0; }

.demo-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

code {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 10px;
}

.hero-board {
  position: relative;
  min-height: 500px;
}

.paper {
  width: 82%;
  height: 430px;
  margin-left: auto;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(231,220,203,.45) 1px, transparent 1px);
  background-size: 100% 34px;
}

.apple {
  position: absolute;
  width: 180px;
  height: 160px;
  border: 6px solid #2f2f2f;
  border-radius: 45% 48% 52% 50%;
  left: 118px;
  top: 118px;
  transform: rotate(-7deg);
}

.shade {
  position: absolute;
  width: 150px;
  height: 3px;
  background: #333;
  left: 165px;
  transform: rotate(-24deg);
  opacity: .64;
}
.s1 { top: 240px; }
.s2 { top: 258px; width: 128px; }
.s3 { top: 276px; width: 104px; }

.feedback-preview {
  position: absolute;
  left: 0;
  bottom: 34px;
  width: 310px;
  padding: 22px;
  border-radius: 20px;
  background: #1f2937;
  color: #fff;
  box-shadow: var(--shadow);
}
.feedback-preview p { color: #fde68a; line-height: 1.7; margin: 10px 0 0; }

.section, .workspace {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px;
}
.section.compact { padding-top: 18px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}
.section-head h2, .page-head h1 { margin-bottom: 0; }

.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.flow div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(77, 54, 24, 0.07);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tech-card, .panel, .auth-card, .feedback-card, .art-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 34px rgba(77, 54, 24, 0.08);
}
.tech-card {
  padding: 24px;
  min-height: 190px;
}
.dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent), transparent 84%);
  margin-bottom: 18px;
}
.tech-card p, .muted, small { color: var(--muted); line-height: 1.65; }
.text-link { color: var(--orange); font-weight: 900; }

.auth-shell {
  max-width: 900px;
  margin: 0 auto;
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.auth-card { width: min(470px, 100%); padding: 34px; }
.auth-card.wide { width: min(760px, 100%); }

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #374151;
  font-weight: 800;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255,255,255,.82);
  font: inherit;
}
textarea { resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.head-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.dashboard-grid, .learn-layout, .teacher-layout, .parent-layout, .feedback-layout, .agent-layout, .ask-layout, .chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 22px;
}
.agent-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); }
.ask-layout { grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr); }
.chat-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
.panel { padding: 24px; }
.main-panel { min-height: 260px; }
.agent-callout {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, .12), rgba(249, 115, 22, .10)),
    rgba(255,255,255,.86);
}
.agent-callout h2 { max-width: 720px; }
.agent-callout p { color: #4b5563; line-height: 1.8; max-width: 790px; margin-bottom: 0; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-head h2 { margin-bottom: 0; }
.badge { font-weight: 900; }
.badge.warm { background: #fff1dd; color: #9a3412; }

.task-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.task-row:first-of-type { border-top: 0; }

.progress-ring {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  margin: 20px auto;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0 70%, #f3e6d1 70% 100%);
  color: #fff;
  font-size: 46px;
  font-weight: 900;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.art-card {
  overflow: hidden;
  display: grid;
}
.art-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #fff;
}
.art-card strong, .art-card small { padding: 0 14px; }
.art-card strong { padding-top: 13px; }
.art-card small { padding-bottom: 14px; }
.empty {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.step-list {
  counter-reset: steps;
  list-style: none;
  padding: 0;
  margin: 0;
}
.step-list li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.8;
}
.step-list li::before {
  content: counter(steps);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--paper-strong);
  color: #9a3412;
  font-weight: 900;
}
.tip-box {
  margin-top: 20px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span {
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 8px 10px;
  color: #9a3412;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.dimension-grid div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.dimension-grid strong { font-size: 18px; }
.dimension-grid span { color: var(--muted); }

.upload-panel form { margin-top: 8px; }

.feedback-layout {
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  align-items: start;
}
.art-preview img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
}
.student-note {
  margin: 16px 0 0;
  color: #4b5563;
  line-height: 1.8;
}
.feedback-card { padding: 28px; }
.feedback-top { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.feedback-card h2 {
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 14px;
}
.feedback-card > p { color: #4b5563; line-height: 1.8; }
.feedback-section {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.feedback-section.good strong { color: #15803d; }
.feedback-section.action strong { color: #c2410c; }
.feedback-section li { margin-bottom: 8px; line-height: 1.7; }
.feedback-section ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}
.feedback-section ul li {
  word-break: normal;
  overflow-wrap: anywhere;
}
.diagnosis-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.diagnosis-list div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  padding: 14px;
}
.diagnosis-list span {
  font-weight: 900;
  margin-right: 8px;
}
.diagnosis-list em {
  font-style: normal;
  color: #7c3aed;
  background: #f3e8ff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}
.diagnosis-list p {
  color: #4b5563;
  line-height: 1.65;
  margin: 12px 0 6px;
}
.diagnosis-list small { color: #9a3412; }
.mini-plan {
  margin-bottom: 0;
  line-height: 1.9;
}

.answer-panel { min-height: 360px; }
.answer-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.ai-answer {
  white-space: pre-wrap;
  line-height: 1.9;
  color: #374151;
  font-size: 17px;
}
.history-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.history-list p { color: #4b5563; line-height: 1.75; margin: 10px 0; }

.score-card {
  min-width: 150px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.score-card strong { display: block; font-size: 38px; }
.score-card span { color: var(--muted); }
.result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
}
.result-banner.pass { background: #ecfdf5; border-color: #bbf7d0; }
.result-banner.fail { background: #fff7ed; border-color: #fed7aa; }
.quiz-form {
  display: grid;
  gap: 18px;
}
.question-card {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 34px rgba(77, 54, 24, 0.08);
}
.question-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.question-head strong { line-height: 1.6; }
.question-head span { color: var(--muted); white-space: nowrap; }
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.option {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fff;
  cursor: pointer;
}
.option input { width: auto; }
.explain {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.question-visual {
  height: 130px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.question-visual.composition i {
  position: absolute; width: 90px; height: 70px; border: 4px solid #111827; left: 46%; top: 28%;
}
.question-visual.composition b {
  position: absolute; width: 46px; height: 46px; background: #f97316; border-radius: 50%; left: 24%; top: 34%;
}
.question-visual.line i, .question-visual.line b, .question-visual.line em {
  position: absolute; height: 4px; background: #111827; left: 80px; right: 80px; transform: rotate(-8deg);
}
.question-visual.line i { top: 42px; }
.question-visual.line b { top: 66px; }
.question-visual.line em { top: 90px; }
.question-visual.color {
  background: linear-gradient(90deg, #ef4444 0 33%, #facc15 33% 66%, #3b82f6 66%);
}
.question-visual.light {
  background: radial-gradient(circle at 30% 30%, #fff 0 10%, #fef3c7 18%, #9ca3af 60%, #111827 100%);
}
.attempt-list {
  display: grid;
  gap: 10px;
}
.attempt-list div {
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.attempt-list span, .mini-feed span { color: var(--muted); line-height: 1.6; }

.room-list {
  display: grid;
  gap: 10px;
}
.room-create {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.room-create input, .room-create select { padding: 10px 12px; }
.room-list a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.room-list a.active { border-color: #f97316; background: #fff7ed; }
.room-list span { color: var(--muted); }
.chat-panel { min-height: 680px; display: grid; grid-template-rows: auto 1fr auto; }
.message-list {
  min-height: 460px;
  max-height: 560px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
}
.message {
  max-width: 78%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.message.mine {
  justify-self: end;
  background: #ecfeff;
  border-color: #bae6fd;
}
.message-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.message p { margin: 8px 0 0; line-height: 1.7; }
.message img {
  max-width: 260px;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 10px;
  background: #fff;
}
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px auto;
  gap: 10px;
  margin-top: 14px;
}
.chat-form input { margin: 0; }
.mini-feed {
  display: grid;
  gap: 10px;
}
.mini-feed div {
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.advice-grid div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.advice-grid p { color: #4b5563; line-height: 1.7; margin-bottom: 0; }
.safety {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfeff;
  color: #155e75;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.metrics div {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.metrics strong { display: block; font-size: 34px; }
.metrics span { color: var(--muted); }

.stack-form { display: grid; }
.issue-list { display: grid; gap: 12px; }
.issue-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.check-list { padding-left: 22px; line-height: 2; }

@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .nav { gap: 10px; }
  .user-chip { display: none; }
  .hero, .dashboard-grid, .learn-layout, .teacher-layout, .parent-layout, .feedback-layout, .agent-layout, .ask-layout, .chat-layout {
    grid-template-columns: 1fr;
  }
  .hero h1 { font-size: 42px; }
  .hero-board { min-height: 430px; }
  .flow, .tech-grid, .gallery, .metrics, .advice-grid, .dimension-grid, .diagnosis-list, .history-list, .option-grid, .chat-form { grid-template-columns: 1fr; }
  .page-head, .section-head { align-items: flex-start; flex-direction: column; }
  .agent-callout { align-items: flex-start; flex-direction: column; }
  .message { max-width: 100%; }
  .two-col { grid-template-columns: 1fr; }
}

/* Product polish pass: dashboard, game map, paged quiz, profile, and chat */
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.profile-chip img, .profile-chip i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  color: #fff;
  font-style: normal;
  font-weight: 900;
}
.student-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 28px;
}
.student-hero h1 {
  font-size: 42px;
  line-height: 1.2;
  max-width: 820px;
  margin-bottom: 12px;
}
.student-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 22px;
  margin-bottom: 22px;
}
.feature-stack {
  display: grid;
  gap: 22px;
}
.feature-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 22px 60px rgba(77, 54, 24, 0.1);
  overflow: hidden;
  position: relative;
}
.feature-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -80px;
  bottom: -90px;
  background: rgba(255,255,255,.42);
}
.feature-agent {
  min-height: 542px;
  background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(249,115,22,.12)), #fffdf8;
}
.feature-game {
  background: linear-gradient(135deg, rgba(34,197,94,.13), rgba(59,130,246,.12)), #fffdf8;
}
.feature-ask {
  background: linear-gradient(135deg, rgba(250,204,21,.16), rgba(249,115,22,.11)), #fffdf8;
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: #111827;
  font-weight: 900;
  margin-bottom: 18px;
}
.feature-card h2 {
  font-size: 30px;
  line-height: 1.25;
}
.feature-card p:not(.eyebrow) {
  color: #4b5563;
  line-height: 1.85;
  font-size: 17px;
}
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}
.game-hero h1 {
  font-size: 46px;
  line-height: 1.18;
  max-width: 900px;
}
.game-stat-card {
  border-radius: 24px;
  background: #111827;
  color: #fff;
  padding: 24px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}
.game-stat-card strong { font-size: 44px; }
.game-stat-card span { color: #fde68a; }
.game-stat-card .btn {
  justify-content: center;
}
.map-shell {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.map-toolbar div:first-child { display: grid; gap: 4px; }
.map-toolbar span { color: var(--muted); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; }
.legend .done { background: #22c55e; }
.legend .current { background: #f97316; }
.legend .locked { background: #cbd5e1; }
.level-map {
  max-height: 620px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(20, minmax(44px, 1fr));
  gap: 10px;
  padding: 8px 4px 12px;
}
.level-node {
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(77, 54, 24, 0.08);
}
.level-node.done { background: #dcfce7; border-color: #86efac; color: #166534; }
.level-node.current { background: #f97316; border-color: #f97316; color: #fff; transform: scale(1.08); }
.level-node.locked { background: #f1f5f9; color: #94a3b8; box-shadow: none; }
.quiz-stage {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.question-slide { display: none; min-height: 460px; }
.question-slide.active { display: grid; align-content: start; gap: 18px; }
.slide-top { display: flex; justify-content: space-between; color: var(--muted); }
.slide-top span { color: #f97316; font-weight: 900; }
.question-slide h2 { font-size: 30px; line-height: 1.45; max-width: 980px; }
.play-options .option { min-height: 70px; font-size: 18px; }
.quiz-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}
.quiz-dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.quiz-dots button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
  font-weight: 900;
}
.quiz-dots button.active { background: #111827; color: #fff; }
.quiz-dots button.answered { border-color: #22c55e; box-shadow: inset 0 0 0 3px #bbf7d0; }
.submit-quiz { display: none; }
.attempt-list.rich { grid-template-columns: repeat(3, 1fr); }
.attempt-list a {
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.review-list { display: grid; gap: 16px; }
.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 34px rgba(77, 54, 24, 0.08);
}
.review-card.ok { border-color: #86efac; }
.review-card.wrong { border-color: #fecaca; }
.answer-compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.answer-compare div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fffdf8; }
.answer-compare span { display: block; color: var(--muted); margin-bottom: 6px; }
.wechat-shell {
  height: calc(100vh - 190px);
  min-height: 680px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
}
.conversation-panel { border-right: 1px solid var(--line); background: #fffaf0; overflow: auto; padding: 18px; }
.member-picker { display: grid; gap: 8px; max-height: 160px; overflow: auto; padding: 8px 0; }
.member-picker label { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.member-picker input { width: auto; }
.conversation-list { display: grid; gap: 10px; margin-top: 14px; }
.conversation {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  color: #334155;
}
.conversation.active, .conversation:hover { background: #fff; box-shadow: 0 8px 20px rgba(77, 54, 24, 0.08); }
.conversation span { color: var(--muted); display: block; margin-top: 4px; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  font-weight: 900;
}
.avatar.big { width: 84px; height: 84px; font-size: 32px; }
.group-avatar { background: linear-gradient(135deg, #111827, #475569); }
.chat-window { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; background: #f8fafc; }
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-header h2 { margin-bottom: 4px; }
.chat-header p { margin: 0; color: var(--muted); }
.wechat-messages { max-height: none; height: 100%; border: 0; border-radius: 0; background: #f8fafc; padding: 22px; }
.wechat-message { display: flex; gap: 12px; max-width: 76%; }
.wechat-message.mine { justify-self: end; flex-direction: row-reverse; }
.wechat-message.mine .message-meta { justify-content: flex-end; }
.bubble-wrap { min-width: 0; }
.bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(77,54,24,.06);
}
.wechat-message.mine .bubble { background: #dcfce7; border-color: #bbf7d0; }
.bubble p { margin: 0; line-height: 1.75; }
.bubble img { max-width: 280px; max-height: 240px; object-fit: contain; border-radius: 14px; background: #fff; margin-top: 8px; }
.wechat-input {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.image-upload {
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
}
.image-upload input { display: none; }
.profile-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
}

@media (max-width: 900px) {
  .student-hero { align-items: flex-start; flex-direction: column; }
  .student-feature-grid, .game-hero, .wechat-shell, .quiz-nav, .answer-compare, .attempt-list.rich {
    grid-template-columns: 1fr;
  }
  .level-map { grid-template-columns: repeat(5, 1fr); }
  .wechat-shell { height: auto; }
  .conversation-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .wechat-message { max-width: 100%; }
  .wechat-input { grid-template-columns: 1fr; }
}

/* Kid-friendly visual refresh */
.kid-home {
  background:
    radial-gradient(circle at 7% 12%, rgba(250, 204, 21, .16), transparent 20%),
    radial-gradient(circle at 93% 18%, rgba(56, 189, 248, .13), transparent 24%);
}
.kid-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}
.kid-hero h1 {
  font-size: 52px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.kid-score {
  width: 160px;
  height: 130px;
  border-radius: 28px;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: var(--shadow);
}
.kid-score strong { font-size: 42px; }
.kid-score span { color: #fde68a; }
.vivid-home {
  max-width: 1400px;
}
.vivid-hero {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, .7fr) 150px;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 34px;
  padding: 38px 42px;
  margin-bottom: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 16%, rgba(56,189,248,.28), transparent 26%),
    radial-gradient(circle at 18% 78%, rgba(250,204,21,.25), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,253,245,.8) 45%, rgba(239,246,255,.88));
  box-shadow: 0 30px 80px rgba(31, 41, 55, .12);
}
.vivid-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.75);
  pointer-events: none;
}
.vivid-copy {
  position: relative;
  z-index: 2;
}
.vivid-copy h1 {
  font-size: 58px;
  line-height: 1.04;
  margin: 8px 0 14px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-orbit {
  position: relative;
  z-index: 1;
  height: 280px;
  display: grid;
  place-items: center;
}
.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(15,23,42,.12);
  transform: rotate(-16deg);
}
.hero-orbit::before {
  width: 320px;
  height: 150px;
}
.hero-orbit::after {
  width: 390px;
  height: 205px;
  border-color: rgba(249,115,22,.18);
  transform: rotate(16deg);
}
.orbit-logo {
  position: relative;
  z-index: 3;
  width: 176px;
  height: 176px;
  border-radius: 46px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316 50%, #8b5cf6);
  box-shadow: 0 24px 60px rgba(249,115,22,.32);
}
.orbit-logo span {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.2);
  font-size: 34px;
  font-weight: 900;
}
.orbit-logo strong {
  font-size: 20px;
}
.planet,
.paint-stroke {
  position: absolute;
  z-index: 2;
  display: block;
}
.planet {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(31,41,55,.15);
}
.planet-a { left: 8%; top: 25%; background: #67e8f9; }
.planet-b { right: 8%; top: 24%; background: #fde047; }
.planet-c { left: 24%; bottom: 12%; background: #86efac; }
.paint-stroke {
  width: 138px;
  height: 28px;
  border-radius: 999px;
  transform: rotate(-18deg);
}
.stroke-a { right: 4%; bottom: 18%; background: #fb7185; }
.stroke-b { left: 4%; bottom: 34%; background: #38bdf8; }
.glow-score {
  position: relative;
  z-index: 2;
  box-shadow: 0 22px 55px rgba(15,23,42,.28);
}
.vivid-grid {
  margin-bottom: 28px;
}
.vivid-grid .kid-module {
  transition: transform .18s ease, box-shadow .18s ease;
}
.vivid-grid .kid-module:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 70px rgba(77,54,24,.16);
}
.kid-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}
.kid-module {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(77,54,24,.12);
}
.kid-module::before {
  content: "";
  position: absolute;
  inset: auto -70px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.kid-module::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 18px;
  right: 28px;
  top: 28px;
  border-radius: 999px;
  opacity: .55;
  background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 20px);
}
.kid-module.technique { background: linear-gradient(135deg, #e0f2fe, #dcfce7); }
.kid-module.agent { background: linear-gradient(135deg, #f3e8ff, #ffedd5); }
.kid-module.game { background: linear-gradient(135deg, #fef3c7, #d9f99d); }
.kid-module.ask { background: linear-gradient(135deg, #ffe4e6, #fef9c3); }
.module-badge {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
}
.kid-module h2 {
  font-size: 34px;
  line-height: 1.18;
  margin: 18px 0 12px;
}
.kid-module p {
  color: #475569;
  font-size: 17px;
  line-height: 1.8;
  max-width: 650px;
}
.kid-module strong {
  color: #111827;
  font-size: 18px;
  position: relative;
}
.kid-module strong {
  width: fit-content;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: 0 10px 24px rgba(77,54,24,.08);
}
.technique-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.technique-tile {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  padding: 20px;
  box-shadow: 0 14px 34px rgba(77,54,24,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.technique-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(77,54,24,.13);
}
.tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}
.technique-tile strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}
.technique-tile small { color: var(--muted); }
.technique-tile p {
  color: #475569;
  line-height: 1.65;
  margin: 10px 0 0;
}
.game-hero.adventure {
  border-radius: 30px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(220,252,231,.9), rgba(224,242,254,.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.adventure-map {
  border-radius: 32px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #bbf7d0 0%, #fef3c7 100%);
  padding: 22px;
  box-shadow: var(--shadow);
}
.chapter-nav {
  display: flex;
  gap: 10px;
}
.route-scene {
  height: 620px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 13% 82%, #38bdf8 0 9%, #7dd3fc 10%, transparent 15%),
    radial-gradient(ellipse at 86% 72%, #86efac 0 12%, transparent 18%),
    radial-gradient(ellipse at 84% 22%, #4ade80 0 11%, transparent 17%),
    radial-gradient(ellipse at 16% 22%, #bef264 0 9%, transparent 15%),
    linear-gradient(180deg, #bff7b7 0%, #fef08a 100%);
}
.route-path { display: none; }
.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.route-svg path {
  fill: none;
  stroke: rgba(255,255,255,.92);
  stroke-width: 68;
  stroke-linecap: round;
  filter: drop-shadow(0 8px 0 rgba(101, 163, 13, .17));
}
.route-svg::after {
  content: "";
}
.route-node {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  border: 4px solid #fff;
  color: #111827;
  background: #67e8f9;
  box-shadow: 0 12px 24px rgba(31,41,55,.18);
  font-weight: 900;
  z-index: 3;
}
.route-node span {
  font-size: 25px;
  line-height: 1;
}
.route-node em {
  font-style: normal;
  color: #facc15;
  font-size: 14px;
  text-shadow: 0 1px 0 #92400e;
}
.route-node.current {
  background: #f97316;
  color: #fff;
  transform: scale(1.08);
}
.route-node.locked {
  background: #cbd5e1;
  color: #64748b;
  opacity: .9;
}
.route-node.locked em {
  color: #64748b;
  font-size: 12px;
  text-shadow: none;
}
.pos-0 { left: 7%; top: 75%; }
.pos-1 { left: 18%; top: 64%; }
.pos-2 { left: 30%; top: 69%; }
.pos-3 { left: 41%; top: 57%; }
.pos-4 { left: 48%; top: 40%; }
.pos-5 { left: 39%; top: 26%; }
.pos-6 { left: 47%; top: 12%; }
.pos-7 { left: 61%; top: 8%; }
.pos-8 { left: 73%; top: 17%; }
.pos-9 { left: 68%; top: 37%; }
.pos-10 { left: 80%; top: 45%; }
.pos-11 { left: 89%; top: 28%; }
.map-decoration {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.map-decoration.pond {
  left: 4%;
  bottom: 5%;
  width: 160px;
  height: 86px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.35);
}
.map-decoration.candy {
  left: 70%;
  bottom: 12%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: repeating-conic-gradient(#f97316 0 20deg, #fff 20deg 40deg);
  box-shadow: 0 12px 24px rgba(77,54,24,.16);
}
.map-decoration.tree {
  width: 130px;
  height: 130px;
  border-radius: 45% 55% 48% 52%;
  background: #22c55e;
  box-shadow: 0 16px 30px rgba(34,197,94,.25);
}
.tree-a { right: 7%; top: 18%; }
.tree-b { left: 15%; top: 17%; width: 95px; height: 95px; }
.map-decoration.studio {
  right: 18%;
  top: 5%;
  width: 120px;
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(#7c2d12 0 32%, #f59e0b 32%);
  box-shadow: 0 12px 26px rgba(77,54,24,.16);
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.reward-card {
  display: grid;
  gap: 10px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(77,54,24,.08);
}
.reward-card p { color: #64748b; line-height: 1.6; margin: 0; }
.reward-card span { color: #f97316; font-weight: 900; }
.pretty-drop, .pretty-upload {
  cursor: pointer;
  border: 1.5px dashed #fdba74;
  border-radius: 18px;
  background: #fff7ed;
  padding: 18px;
  color: #9a3412;
  text-align: center;
  font-weight: 900;
}
.pretty-drop input, .pretty-upload input {
  display: none;
}
.pretty-drop span {
  display: block;
  color: #64748b;
  font-weight: 600;
  margin-top: 8px;
}
.soft-note {
  margin-top: 14px;
  border-radius: 18px;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  padding: 16px;
}
.soft-note p {
  color: #155e75;
  line-height: 1.7;
  margin: 6px 0 0;
}
.agent-page {
  max-width: 1480px;
  height: calc(100vh - 76px);
  overflow: hidden;
  padding: 18px 24px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.agent-page .page-head {
  margin-bottom: 12px;
  align-items: end;
}
.agent-page .page-head h1 {
  font-size: 32px;
  line-height: 1.12;
}
.agent-page .lead {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 0;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.agent-chat-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}
.workspace:has(.agent-chat-shell) {
  max-width: 1480px;
  height: calc(100vh - 76px);
  overflow: hidden;
  padding-top: 22px;
  padding-bottom: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.workspace:has(.agent-chat-shell) .page-head {
  margin-bottom: 16px;
}
.workspace:has(.agent-chat-shell) .page-head h1 {
  font-size: 34px;
  line-height: 1.15;
}
.workspace:has(.agent-chat-shell) .lead {
  font-size: 17px;
  line-height: 1.55;
  margin-bottom: 0;
}
.agent-sidebar {
  padding: 18px;
  background: #fffaf0;
  border-right: 1px solid var(--line);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}
.agent-sidebar a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  color: #334155;
}
.agent-sidebar a.active, .agent-sidebar a:hover {
  background: #fff;
  box-shadow: 0 8px 20px rgba(77,54,24,.08);
}
.agent-sidebar small { color: #94a3b8; }
.agent-chat-window {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  min-height: 0;
  background: #f8fafc;
}
.agent-message-list {
  overflow: auto;
  min-height: 0;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 16px;
}
.agent-empty {
  margin: auto;
  text-align: center;
  max-width: 520px;
  color: #64748b;
}
.agent-empty h2 { color: #111827; }
.agent-msg {
  display: flex;
  gap: 12px;
  max-width: 82%;
}
.agent-msg.user {
  justify-self: end;
  flex-direction: row-reverse;
}
.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  font-weight: 900;
  flex: 0 0 auto;
}
.agent-bubble {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px 16px;
  line-height: 1.8;
  box-shadow: 0 8px 20px rgba(77,54,24,.06);
}
.agent-msg.user .agent-bubble {
  background: #dcfce7;
  border-color: #bbf7d0;
}
.agent-bubble img {
  max-width: 320px;
  max-height: 260px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  margin-bottom: 10px;
}
.agent-bubble p { margin: 0; white-space: pre-wrap; }
.thought-time {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  padding: 4px 10px;
  font-weight: 800;
}
.thinking-bubble {
  color: #475569;
}
.thinking-bubble small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
}
.thinking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  background: #f97316;
  box-shadow: 16px 0 0 #facc15, 32px 0 0 #22c55e;
  animation: thinkingPulse 1s infinite ease-in-out;
}
@keyframes thinkingPulse {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}
.agent-input-bar {
  display: grid;
  grid-template-columns: 112px auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 5;
}
.agent-input-bar .pretty-upload {
  padding: 13px 14px;
  border-radius: 16px;
}
.agent-input-bar .pretty-upload span {
  display: block;
}
.file-status {
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
}
.file-status.active {
  color: #16a34a;
  font-weight: 900;
}
.agent-input-bar input[name="message"] {
  min-height: 48px;
}
.mini-diagnosis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.mini-diagnosis span {
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 6px 10px;
}
.mini-diagnosis b { margin-right: 6px; color: #111827; }
.tile-steps {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}
.tile-steps li { margin-bottom: 4px; }

.kid-agent-page {
  position: relative;
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 184, 76, .18), transparent 26%),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, .16), transparent 28%),
    linear-gradient(135deg, #fff8ef 0%, #f8fbff 58%, #fff7ed 100%);
}
.kid-agent-page .page-head {
  position: relative;
  border-radius: 26px;
  padding: 14px 18px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(226, 211, 188, .75);
}
.agent-doodles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 26px;
}
.agent-doodles span {
  position: absolute;
  display: block;
  opacity: .7;
}
.doodle-line {
  width: 148px;
  height: 34px;
  right: 310px;
  top: 16px;
  border-bottom: 4px solid #fb7185;
  border-radius: 50%;
  transform: rotate(-5deg);
}
.doodle-line::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 22px;
  right: 10px;
  top: 14px;
  border-bottom: 3px dashed #f59e0b;
  border-radius: 50%;
}
.doodle-flower {
  width: 46px;
  height: 46px;
  right: 180px;
  bottom: 14px;
  border: 3px solid #22c55e;
  border-radius: 50% 50% 45% 45%;
}
.doodle-flower::before,
.doodle-flower::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 3px solid #22c55e;
  border-radius: 50%;
  transform: rotate(45deg);
}
.doodle-spark,
.doodle-star {
  width: 54px;
  height: 54px;
  right: 42px;
  top: 14px;
  background:
    linear-gradient(#f97316, #f97316) center/4px 46px no-repeat,
    linear-gradient(90deg, #f97316, #f97316) center/46px 4px no-repeat;
  transform: rotate(18deg);
}
.doodle-pencil {
  width: 132px;
  height: 14px;
  right: 270px;
  top: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #facc15 0 72%, #f97316 72% 84%, #111827 84%);
  transform: rotate(-10deg);
}
.doodle-rainbow {
  width: 96px;
  height: 52px;
  right: 140px;
  bottom: 12px;
  border: 5px solid #38bdf8;
  border-bottom: 0;
  border-radius: 96px 96px 0 0;
}
.doodle-rainbow::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 5px solid #fb7185;
  border-bottom: 0;
  border-radius: 90px 90px 0 0;
}
.kid-agent-page .agent-chat-shell {
  border-color: #f2dcc3;
  background: rgba(255, 253, 247, .9);
}
.kid-agent-page .agent-sidebar {
  background:
    linear-gradient(180deg, rgba(255,247,237,.96), rgba(240,253,250,.82)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(251,146,60,.08) 31px 32px);
}
.kid-agent-page .agent-chat-window {
  background:
    radial-gradient(circle at 84% 12%, rgba(187,247,208,.38), transparent 18%),
    radial-gradient(circle at 10% 92%, rgba(254,240,138,.32), transparent 20%),
    #f8fbff;
}
.kid-agent-page .agent-inspector {
  background: linear-gradient(180deg, #fffaf0, #f0fdfa);
}
.kid-agent-page .agent-inspector div {
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  position: relative;
  padding-left: 20px;
}
.kid-agent-page .agent-inspector div::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 36px;
  left: 0;
  top: 18px;
  border-radius: 999px;
  background: linear-gradient(#fb7185, #facc15);
}
.empty-doodle {
  width: 160px;
  height: 96px;
  margin: 0 auto 14px;
  border: 4px solid #0f172a;
  border-radius: 22px;
  position: relative;
  background:
    radial-gradient(circle at 36px 58px, #fb7185 0 10px, transparent 11px),
    radial-gradient(circle at 78px 44px, #facc15 0 12px, transparent 13px),
    linear-gradient(160deg, transparent 50%, rgba(34,197,94,.18) 51%);
}
.empty-doodle::before {
  content: "";
  position: absolute;
  width: 98px;
  height: 34px;
  left: 30px;
  bottom: 10px;
  border-bottom: 4px solid #0f172a;
  border-radius: 50%;
  transform: rotate(-4deg);
}
.ask-empty-doodle {
  background:
    radial-gradient(circle at 42px 42px, #38bdf8 0 12px, transparent 13px),
    radial-gradient(circle at 92px 56px, #fb7185 0 10px, transparent 11px),
    linear-gradient(150deg, transparent 45%, rgba(250,204,21,.2) 46%);
}

@media (max-width: 900px) {
  .kid-hero { align-items: flex-start; flex-direction: column; }
  .kid-module-grid, .technique-board, .reward-grid, .agent-chat-shell, .agent-input-bar { grid-template-columns: 1fr; }
  .workspace:has(.agent-chat-shell) {
    height: auto;
    overflow: visible;
  }
  .agent-chat-shell {
    height: auto;
  }
  .kid-module { min-height: 240px; }
  .vivid-hero {
    grid-template-columns: 1fr;
    padding: 26px;
  }
  .vivid-copy h1 { font-size: 42px; }
  .hero-orbit { height: 220px; }
  .glow-score { width: 100%; }
  .route-scene { height: 760px; }
  .route-node { width: 68px; height: 68px; }
  .agent-doodles {
    opacity: .45;
  }
  .week11-actions {
    grid-template-columns: 1fr;
  }
  .pos-0 { left: 8%; top: 8%; }
  .pos-1 { left: 45%; top: 13%; }
  .pos-2 { left: 70%; top: 22%; }
  .pos-3 { left: 38%; top: 30%; }
  .pos-4 { left: 10%; top: 40%; }
  .pos-5 { left: 42%; top: 48%; }
  .pos-6 { left: 72%; top: 56%; }
  .pos-7 { left: 48%; top: 64%; }
  .pos-8 { left: 17%; top: 71%; }
  .pos-9 { left: 40%; top: 80%; }
  .pos-10 { left: 66%; top: 84%; }
  .pos-11 { left: 78%; top: 91%; }
}

/* Final page-lock overrides for the two AI chat pages. */
.workspace.agent-page {
  max-width: 1480px;
  height: calc(100vh - 76px);
  overflow: hidden;
  padding-top: 16px;
  padding-bottom: 14px;
  grid-template-rows: auto minmax(0, 1fr);
}
.workspace.agent-page .page-head {
  margin-bottom: 12px;
}
.workspace.agent-page .page-head h1 {
  font-size: 32px;
  line-height: 1.12;
}
.workspace.agent-page .lead {
  font-size: 16px;
  line-height: 1.45;
}
.workspace.agent-page .agent-chat-shell {
  height: 100%;
  min-height: 0;
}
.workspace.agent-page .agent-sidebar,
.workspace.agent-page .agent-message-list {
  min-height: 0;
  overflow: auto;
}
.workspace.agent-page .agent-input-bar {
  min-height: 84px;
}
.pro-agent-page {
  max-width: 1580px;
}
.pro-agent-shell {
  grid-template-columns: 260px minmax(0, 1fr) 280px;
}
.agent-window-head {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--line);
}
.agent-window-head div {
  display: grid;
  gap: 4px;
}
.agent-window-head span,
.agent-window-head em {
  color: #64748b;
  font-style: normal;
}
.agent-inspector {
  border-left: 1px solid var(--line);
  background: #fffaf0;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}
.agent-inspector > strong {
  font-size: 18px;
}
.agent-inspector div {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 6px;
}
.agent-inspector span,
.agent-inspector p {
  color: #64748b;
  line-height: 1.65;
}
.prompt-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.prompt-grid button {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  color: #334155;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.prompt-grid button:hover {
  border-color: #fdba74;
  background: #fff7ed;
}
.pro-agent-input {
  grid-template-columns: 112px auto minmax(0, 1fr) auto;
}
.pro-agent-input textarea {
  min-height: 54px;
  max-height: 120px;
  resize: vertical;
  margin: 0;
}

/* Product-grade pages */
.landing-pro {
  max-width: 1420px;
  margin: 0 auto;
  min-height: calc(100vh - 76px);
  padding: 70px 28px 36px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(460px, .72fr);
  gap: 44px;
  align-items: center;
}
.landing-copy h1 {
  font-size: 64px;
  line-height: 1.04;
  max-width: 850px;
  margin: 12px 0 20px;
}
.landing-copy .lead {
  max-width: 780px;
  font-size: 19px;
  line-height: 1.85;
}
.product-demo {
  margin-top: 24px;
}
.product-device {
  border-radius: 38px;
  background: #111827;
  padding: 14px;
  box-shadow: 0 34px 90px rgba(15,23,42,.28);
}
.device-top {
  height: 46px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.device-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fb7185;
}
.device-top span:nth-child(2) { background: #facc15; }
.device-top span:nth-child(3) { background: #22c55e; }
.device-top strong { margin-left: auto; font-size: 14px; color: #cbd5e1; }
.device-canvas {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 25%, rgba(250,204,21,.35), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(56,189,248,.32), transparent 24%),
    linear-gradient(135deg, #fff7ed, #ecfeff 52%, #f5f3ff);
}
.brand-comet {
  position: absolute;
  left: 44px;
  top: 48px;
  width: 112px;
  height: 112px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 54px;
  font-weight: 900;
  background: linear-gradient(135deg, #fb923c, #8b5cf6);
  box-shadow: 0 24px 60px rgba(249,115,22,.26);
}
.orbit-line {
  position: absolute;
  left: 36px;
  top: 120px;
  width: 480px;
  height: 240px;
  border: 5px dashed rgba(15,23,42,.12);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.preview-card {
  position: absolute;
  width: 260px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 20px 50px rgba(77,54,24,.14);
  backdrop-filter: blur(14px);
}
.preview-card small { color: #f97316; font-weight: 900; }
.preview-card b { display: block; margin: 10px 0; font-size: 22px; }
.preview-card p { color: #475569; line-height: 1.65; margin: 0; }
.preview-card.ai { right: 34px; top: 190px; }
.preview-card.stars { left: 70px; bottom: 48px; }
.preview-card.stars b { font-size: 44px; color: #f97316; }
.product-flow div {
  min-height: 112px;
  align-content: center;
}
.product-flow b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  margin-right: 8px;
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.market-grid article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  padding: 24px;
  box-shadow: 0 18px 46px rgba(77,54,24,.09);
}
.market-grid span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  font-weight: 900;
}
.market-grid h3 { font-size: 24px; margin: 18px 0 10px; }
.market-grid p { color: #64748b; line-height: 1.75; }
.product-page {
  max-width: 1440px;
}
.report-head {
  align-items: end;
}
.product-metrics div {
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,253,245,.72));
  box-shadow: 0 16px 42px rgba(77,54,24,.08);
}
.teacher-command,
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 22px;
  margin-bottom: 26px;
}
.command-main {
  min-height: 420px;
}
.class-insight,
.family-script,
.next-plan {
  border: 1px solid #fed7aa;
  border-radius: 20px;
  background: #fff7ed;
  padding: 18px;
  margin-bottom: 16px;
}
.class-insight strong,
.family-script strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}
.class-insight p,
.family-script p,
.next-plan p {
  color: #475569;
  line-height: 1.75;
}
.compact-form input,
.compact-form select,
.compact-form textarea {
  margin-top: 8px;
}
.student-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.student-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  padding: 20px;
  box-shadow: 0 14px 34px rgba(77,54,24,.08);
}
.student-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.student-card span,
.student-card small {
  color: #64748b;
}
.mini-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quick-product-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: -8px 0 28px;
}
.quick-product-strip a {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  padding: 16px;
  box-shadow: 0 12px 32px rgba(77,54,24,.08);
}
.quick-product-strip strong {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
}
.quick-product-strip span { color: #475569; font-weight: 800; }
.radar-board {
  display: grid;
  gap: 16px;
}
.radar-board div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}
.radar-board i {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316 var(--w), #e2e8f0 var(--w));
}
.radar-board b { color: #f97316; }
.badge-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.badge-wall div {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #fff7ed, #ecfeff);
  border: 1px solid var(--line);
}
.badge-wall strong { font-size: 20px; }
.badge-wall span { color: #64748b; line-height: 1.5; }
.achievement-wall {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.achievement-badge {
  min-height: 154px;
  border-radius: 28px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 8px;
  color: #0f172a;
  border: 1px solid rgba(251, 146, 60, .28);
  background:
    radial-gradient(circle at 86% 18%, rgba(255,255,255,.8) 0 20px, transparent 21px),
    linear-gradient(135deg, #fff7ed, #ecfeff);
  box-shadow: 0 18px 35px rgba(77,54,24,.08);
  position: relative;
  overflow: hidden;
}
.achievement-badge::after {
  content: "";
  position: absolute;
  width: 116px;
  height: 52px;
  right: -28px;
  bottom: -16px;
  border: 5px solid rgba(15,23,42,.08);
  border-top: 0;
  border-radius: 0 0 80px 80px;
  transform: rotate(-18deg);
}
.achievement-badge i {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-style: normal;
  color: #fff;
  font-size: 24px;
  font-weight: 1000;
  background: linear-gradient(135deg, #fb7185, #f97316);
  box-shadow: 0 12px 22px rgba(249,115,22,.25);
}
.achievement-badge strong {
  font-size: 20px;
  line-height: 1.2;
}
.achievement-badge span {
  color: #475569;
  line-height: 1.45;
}
.achievement-badge em {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-style: normal;
  font-weight: 900;
  color: #9a3412;
  background: #ffedd5;
}
.achievement-badge.locked {
  filter: grayscale(.95);
  opacity: .62;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-color: #cbd5e1;
}
.achievement-badge.locked i {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: none;
}
.achievement-badge.locked em {
  color: #475569;
  background: #e2e8f0;
}
.week-card {
  margin: 28px 0;
  border-radius: 30px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(251,146,60,.24);
  background:
    radial-gradient(circle at 92% 18%, rgba(56,189,248,.24), transparent 24%),
    radial-gradient(circle at 8% 78%, rgba(250,204,21,.22), transparent 22%),
    linear-gradient(135deg, #fff7ed, #f8fafc);
  box-shadow: var(--shadow);
}
.week-card h2 {
  margin: 4px 0 10px;
  font-size: 28px;
  line-height: 1.25;
}
.week-card p {
  margin: 0;
  color: #475569;
  line-height: 1.75;
  max-width: 860px;
}
.week11-actions {
  display: grid;
  grid-template-columns: repeat(3, 118px);
  gap: 12px;
}
.week11-actions a {
  min-height: 112px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #0f172a;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
}
.week11-actions strong {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #3b82f6);
  font-size: 22px;
}
.week11-actions span {
  font-weight: 900;
}
.wrongbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.wrong-list {
  display: grid;
  gap: 12px;
}
.wrong-list article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}
.wrong-list p {
  margin: 8px 0 0;
  color: #475569;
}
.wrong-list small {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
  line-height: 1.6;
}
.check-list.clean li {
  margin-bottom: 10px;
}

@media (max-width: 1000px) {
  .landing-pro,
  .teacher-command,
  .report-grid,
  .market-grid,
  .student-card-grid,
  .quick-product-strip,
  .wrongbook-grid,
  .achievement-wall,
  .week-card {
    grid-template-columns: 1fr;
  }
  .week11-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .landing-copy h1 { font-size: 44px; }
  .product-device { min-width: 0; }
}

/* Next product upgrade: course paths, portfolio, reference answers, and richer artwork cards */
.practice-pro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
  grid-template-areas:
    "steps reference"
    "upload reference";
  gap: 22px;
  align-items: start;
}
.practice-pro-layout > .panel:first-child {
  grid-area: steps;
}
.practice-pro-layout .upload-panel {
  grid-area: upload;
}
.reference-panel {
  grid-area: reference;
  position: static;
}
.reference-art {
  height: auto;
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc, #fff7ed);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.reference-svg-wrap {
  padding: 12px;
}
.reference-svg {
  width: 100%;
  height: auto;
  display: block;
}
.reference-art.line i {
  left: 50px;
  top: 70px;
  width: 190px;
  height: 90px;
  border-bottom: 5px solid #111827;
  border-radius: 50%;
}
.reference-art.line b {
  left: 82px;
  bottom: 58px;
  width: 180px;
  height: 5px;
  background: repeating-linear-gradient(90deg, #111827 0 22px, transparent 22px 32px);
  transform: rotate(10deg);
}
.reference-art.composition i,
.reference-art.shape i {
  left: 56px;
  bottom: 50px;
  width: 210px;
  height: 6px;
  background: #111827;
}
.reference-art.composition b,
.reference-art.shape b {
  left: 85px;
  top: 68px;
  width: 96px;
  height: 96px;
  border: 5px solid #111827;
  border-radius: 22px;
}
.reference-art.composition em,
.reference-art.shape em {
  left: 210px;
  top: 96px;
  width: 62px;
  height: 62px;
  border: 5px solid #111827;
  border-radius: 50%;
}
.reference-art.color i {
  left: 62px;
  top: 58px;
  width: 190px;
  height: 150px;
  border-radius: 45% 55% 50% 50%;
  background: linear-gradient(135deg, #fb7185, #fde047 45%, #22c55e);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.65);
}
.reference-art.light i {
  left: 78px;
  top: 52px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 20%, #fef3c7 21% 46%, #f97316 47% 100%);
}
.reference-art.light b {
  left: 150px;
  top: 150px;
  width: 150px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15,23,42,.18);
  transform: rotate(-9deg);
}
.standard-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.standard-list li {
  border-radius: 14px;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  color: #155e75;
  padding: 10px 12px;
  font-weight: 800;
}
.course-path-grid {
  display: grid;
  gap: 22px;
}
.course-path-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), color-mix(in srgb, var(--accent), transparent 86%));
  padding: 26px;
  box-shadow: 0 20px 54px rgba(77,54,24,.1);
}
.course-path-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}
.course-path-head > span {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 28px;
  font-weight: 900;
}
.course-path-head h2 { font-size: 34px; }
.lesson-road {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.lesson-road a {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.88);
  background: rgba(255,255,255,.76);
  padding: 18px;
}
.lesson-road i {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #111827;
  font-style: normal;
  font-weight: 900;
}
.lesson-road strong { font-size: 20px; }
.lesson-road small { color: #64748b; line-height: 1.6; }
.art-showcase {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.pro-art-card {
  border-radius: 26px;
  padding: 10px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(77,54,24,.11);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pro-art-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(77,54,24,.16);
}
.art-thumb {
  position: relative;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(248,250,252,.9) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(248,250,252,.9) 25%, transparent 25%),
    #fff;
  background-size: 26px 26px;
}
.art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.art-thumb span {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(17,24,39,.86);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.art-info {
  display: grid;
  gap: 6px;
  padding: 14px 8px 6px;
}
.art-info strong { font-size: 18px; }
.art-info small { color: #64748b; }
.art-info em {
  color: #f97316;
  font-style: normal;
  font-weight: 900;
}
.teacher-art-showcase {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.portfolio-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.portfolio-hero div {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.84);
  padding: 22px;
  box-shadow: 0 16px 40px rgba(77,54,24,.08);
}
.portfolio-hero strong { display: block; font-size: 38px; }
.portfolio-hero span { color: #64748b; }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.portfolio-item {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  padding: 14px;
  box-shadow: 0 18px 46px rgba(77,54,24,.1);
}
.portfolio-thumb {
  height: 280px;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
}
.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.portfolio-thumb span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 6px 10px;
}
.portfolio-item strong { display: block; font-size: 20px; margin: 14px 0 6px; }
.portfolio-item p { color: #64748b; margin: 0; }
.agent-market {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.agent-product-card {
  min-height: 310px;
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,246,255,.8));
  padding: 22px;
  box-shadow: 0 18px 46px rgba(77,54,24,.09);
}
.agent-product-card span {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  color: #fff;
  font-weight: 900;
}
.agent-product-card h2 { font-size: 24px; }
.agent-product-card p { color: #475569; line-height: 1.7; }
.agent-product-card small { color: #94a3b8; line-height: 1.5; }

@media (max-width: 1000px) {
  .practice-pro-layout,
  .lesson-road,
  .art-showcase,
  .portfolio-hero,
  .portfolio-grid,
  .agent-market {
    grid-template-columns: 1fr;
  }
  .practice-pro-layout {
    grid-template-areas:
      "steps"
      "reference"
      "upload";
  }
  .pro-agent-shell {
    grid-template-columns: 1fr;
  }
  .agent-inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .reference-panel { position: static; }
}

/* Polished child-friendly AI agent pages: decorations stay in safe corners. */
.workspace.agent-page.kid-agent-page {
  max-width: 1520px;
  padding: 18px 24px 16px;
  background:
    radial-gradient(circle at 4% 28%, rgba(255, 214, 102, .22), transparent 26%),
    radial-gradient(circle at 96% 18%, rgba(125, 211, 252, .22), transparent 26%),
    linear-gradient(135deg, #fffaf2 0%, #f8fcff 54%, #f3fff7 100%);
}
.kid-agent-page .page-head {
  min-height: 122px;
  padding: 22px 284px 20px 26px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 58%, rgba(236,254,255,.78) 100%),
    radial-gradient(circle at 82% 22%, rgba(254, 240, 138, .35), transparent 18%);
  border: 1px solid rgba(226, 211, 188, .7);
  box-shadow: 0 18px 40px rgba(77,54,24,.08);
}
.kid-agent-page .page-head > div:not(.agent-doodles),
.kid-agent-page .head-actions {
  position: relative;
  z-index: 2;
}
.kid-agent-page .head-actions {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 238px;
  justify-content: flex-end;
}
.kid-agent-page .page-head h1 {
  max-width: 900px;
  font-size: 33px;
  letter-spacing: 0;
}
.kid-agent-page .page-head .lead {
  max-width: 860px;
  color: #475569;
}
.kid-agent-page .agent-doodles {
  inset: 0;
  z-index: 1;
  opacity: .95;
}
.kid-agent-page .agent-doodles span {
  opacity: .48;
}
.kid-agent-page .doodle-line {
  width: 118px;
  height: 24px;
  right: 340px;
  top: 20px;
  border-bottom-width: 3px;
}
.kid-agent-page .doodle-line::after {
  width: 58px;
  height: 16px;
  top: 10px;
  border-bottom-width: 2px;
}
.kid-agent-page .doodle-flower {
  width: 36px;
  height: 36px;
  right: 322px;
  bottom: 18px;
  border-width: 3px;
  opacity: .36;
}
.kid-agent-page .doodle-spark,
.kid-agent-page .doodle-star {
  width: 32px;
  height: 32px;
  right: 54px;
  top: 10px;
  background:
    linear-gradient(#fb923c, #fb923c) center/4px 30px no-repeat,
    linear-gradient(90deg, #fb923c, #fb923c) center/30px 4px no-repeat;
  opacity: .36;
}
.kid-agent-page .doodle-pencil {
  width: 108px;
  height: 13px;
  right: 330px;
  top: 26px;
  opacity: .52;
}
.kid-agent-page .doodle-rainbow {
  width: 70px;
  height: 38px;
  right: 318px;
  bottom: 14px;
  border-width: 4px;
  opacity: .4;
}
.kid-agent-page .doodle-rainbow::before {
  inset: 8px;
  border-width: 4px;
}
.kid-agent-page .agent-chat-shell {
  border-radius: 30px;
  border-color: rgba(226, 211, 188, .78);
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 48px rgba(77,54,24,.09);
}
.kid-agent-page .agent-sidebar {
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(255,248,235,.98), rgba(239,253,246,.96)),
    radial-gradient(circle at 0 0, rgba(251,146,60,.12), transparent 24%);
}
.kid-agent-page .agent-sidebar > strong {
  font-size: 18px;
}
.kid-agent-page .agent-sidebar a {
  border: 1px solid transparent;
  background: rgba(255,255,255,.58);
  box-shadow: none;
}
.kid-agent-page .agent-sidebar a.active,
.kid-agent-page .agent-sidebar a:hover {
  border-color: rgba(253,186,116,.55);
  background: #fff;
  box-shadow: 0 12px 24px rgba(77,54,24,.08);
}
.kid-agent-page .agent-chat-window {
  background:
    linear-gradient(90deg, rgba(255,255,255,.76) 0 1px, transparent 1px) 0 0/36px 36px,
    linear-gradient(180deg, rgba(255,255,255,.72) 0 1px, transparent 1px) 0 0/36px 36px,
    radial-gradient(circle at 100% 24%, rgba(187,247,208,.38), transparent 20%),
    linear-gradient(180deg, #f8fbff, #fffefa);
}
.kid-agent-page .agent-window-head {
  min-height: 74px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
}
.kid-agent-page .agent-window-head strong {
  font-size: 20px;
}
.kid-agent-page .agent-message-list {
  padding: 28px 34px;
}
.kid-agent-page .agent-bubble {
  border-radius: 22px;
  border-color: rgba(226,211,188,.82);
  box-shadow: 0 16px 34px rgba(77,54,24,.08);
}
.kid-agent-page .agent-msg.assistant .agent-bubble {
  background: rgba(255,255,255,.96);
}
.kid-agent-page .agent-msg.user .agent-bubble {
  background: linear-gradient(135deg, #dcfce7, #ecfeff);
  border-color: #bbf7d0;
}
.kid-agent-page .agent-inspector {
  padding: 22px 18px;
  background:
    radial-gradient(circle at 100% 100%, rgba(34,197,94,.14), transparent 24%),
    linear-gradient(180deg, #fffaf0, #f0fdfa);
}
.kid-agent-page .agent-inspector > strong {
  color: #0f172a;
}
.kid-agent-page .agent-inspector div {
  padding: 16px 16px 16px 22px;
  border-radius: 22px;
  border-color: rgba(226,211,188,.78);
  background: rgba(255,255,255,.84);
}
.kid-agent-page .agent-inspector div::before {
  height: 44px;
  top: 18px;
}
.kid-agent-page .agent-input-bar {
  padding: 16px 20px;
  background: rgba(255,255,255,.94);
}
.kid-agent-page .pretty-upload {
  background: #fff7ed;
  border-color: #fdba74;
}
.kid-agent-page .btn.primary {
  box-shadow: 0 14px 28px rgba(15,23,42,.14);
}

@media (max-width: 1100px) {
  .kid-agent-page .page-head {
    padding-right: 24px;
  }
  .kid-agent-page .head-actions {
    position: static;
    transform: none;
    width: auto;
    justify-content: flex-start;
    margin-top: 12px;
  }
  .kid-agent-page .agent-doodles {
    display: none;
  }
}

/* Final restore: keep the AI page actions in the original right-side flow.
   Decorations stay behind the title and never sit on top of the age tag/buttons. */
.workspace.agent-page.kid-agent-page .page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 118px;
  padding: 20px 24px;
  overflow: hidden;
}

.workspace.agent-page.kid-agent-page .page-head > div:not(.agent-doodles):not(.head-actions) {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  position: relative;
  z-index: 2;
}

.workspace.agent-page.kid-agent-page .head-actions {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  width: auto;
  min-width: 0;
  margin-top: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  z-index: 3;
}

.workspace.agent-page.kid-agent-page .agent-doodles {
  inset: 0;
  z-index: 0;
  opacity: .56;
}

.workspace.agent-page.kid-agent-page .doodle-line {
  right: 390px;
  top: 16px;
  width: 112px;
  opacity: .28;
}

.workspace.agent-page.kid-agent-page .doodle-pencil {
  right: 382px;
  top: 24px;
  width: 96px;
  opacity: .32;
}

.workspace.agent-page.kid-agent-page .doodle-flower,
.workspace.agent-page.kid-agent-page .doodle-rainbow {
  right: 392px;
  bottom: 18px;
  opacity: .24;
}

.workspace.agent-page.kid-agent-page .doodle-spark,
.workspace.agent-page.kid-agent-page .doodle-star {
  right: 318px;
  top: 18px;
  width: 28px;
  height: 28px;
  opacity: .18;
}

@media (max-width: 1320px) {
  .workspace.agent-page.kid-agent-page .agent-doodles {
    display: none;
  }
}

/* Conversation side menu: WeChat-like three-dot actions for AI records. */
.agent-sidebar .thread-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: start;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  transition: background .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.agent-sidebar .thread-row.active,
.agent-sidebar .thread-row:hover {
  border-color: rgba(253,186,116,.55);
  background: #fff;
  box-shadow: 0 12px 24px rgba(77,54,24,.08);
}

.agent-sidebar .thread-link,
.kid-agent-page .agent-sidebar .thread-link {
  min-width: 0;
  padding: 12px 4px 12px 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.agent-sidebar .thread-link.active,
.agent-sidebar .thread-link:hover,
.kid-agent-page .agent-sidebar .thread-link.active,
.kid-agent-page .agent-sidebar .thread-link:hover {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.thread-menu {
  position: relative;
  align-self: start;
  padding-top: 8px;
}

.thread-menu summary {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  list-style: none;
  user-select: none;
}

.thread-menu summary::-webkit-details-marker {
  display: none;
}

.thread-menu summary:hover {
  background: #fff7ed;
  color: #f97316;
}

.thread-menu form {
  position: absolute;
  right: 0;
  top: 34px;
  width: 92px;
  z-index: 20;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 16px 34px rgba(77,54,24,.16);
}

.thread-menu button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 900;
  cursor: pointer;
}

.thread-menu button:hover {
  background: #ffedd5;
}

/* Course path doodles: low-layer child-friendly lines, never over text. */
.course-path-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.course-path-head,
.lesson-road {
  position: relative;
  z-index: 2;
}

.path-doodles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .72;
}

.path-doodle {
  position: absolute;
  display: block;
}

.path-doodle-loop {
  right: 8%;
  top: 34px;
  width: 142px;
  height: 72px;
  border: 5px solid color-mix(in srgb, var(--accent), transparent 58%);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-16deg);
  opacity: .34;
}

.path-doodle-pencil {
  right: 16%;
  top: 134px;
  width: 116px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde047 0 76%, #fb923c 76% 88%, #64748b 88%);
  transform: rotate(-12deg);
  opacity: .36;
}

.path-doodle-spark {
  right: 5%;
  bottom: 54px;
  width: 34px;
  height: 34px;
  background:
    linear-gradient(#fb923c, #fb923c) center/4px 32px no-repeat,
    linear-gradient(90deg, #fb923c, #fb923c) center/32px 4px no-repeat;
  transform: rotate(16deg);
  opacity: .28;
}

.path-doodle-wave {
  left: 8%;
  bottom: 42px;
  width: 136px;
  height: 28px;
  border-bottom: 4px solid rgba(56,189,248,.45);
  border-radius: 0 0 70% 70%;
  transform: rotate(-4deg);
}

.path-doodle-wave::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 10px;
  width: 86px;
  height: 22px;
  border-bottom: 3px dashed rgba(251,146,60,.5);
  border-radius: 0 0 70% 70%;
}
