/* ===== Theme: Light + Soft Purple ===== */
:root{
  --bg: #f5f3ff;
  --panel: #ffffff;
  --panel-alt: #faf8ff;
  --text: #1e1b4b;
  --muted: #6b7280;
  --line: #e5e1f5;
  --primary: #7c3aed;
  --primary-light: #ede9fe;
  --primary-glow: rgba(124, 58, 237, 0.12);
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --accent3: #6366f1;
  --danger: #ef4444;
  --shadow: 0 2px 12px rgba(124, 58, 237, 0.08);
  --shadow-lg: 0 8px 30px rgba(124, 58, 237, 0.12);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 30%, #e0e7ff 70%, #f5f3ff 100%);
  color: var(--text);
  overflow-x: hidden;
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}
.bg::before{
  content:"";
  position:absolute;
  width:500px;
  height:500px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, transparent 70%);
  top:-100px;
  right:-100px;
}
.bg::after{
  content:"";
  position:absolute;
  width:400px;
  height:400px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(99,102,241,.10) 0%, transparent 70%);
  bottom:-80px;
  left:-80px;
}

.wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  position: relative;
  z-index: 1;
}

/* Hero header */
.hero{
  padding: 8px 0 12px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:.5px;
  color: var(--primary);
  font-size: 13px;
}
.brand::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:99px;
  background: linear-gradient(135deg, var(--primary), var(--accent3));
  box-shadow: 0 0 0 5px rgba(124,58,237,.12);
}
.heroTop{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.heroActions{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content:flex-end;
}
.hero h1{
  margin: 8px 0 6px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub{
  margin:0;
  color: var(--muted);
  line-height:1.5;
  font-size: 13px;
}

.entryScreen{
  min-height: calc(100vh - 48px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 0;
}
.entryShell{
  width: min(100%, 1160px);
  min-height: 660px;
  border-radius: 34px;
  overflow:hidden;
  position:relative;
  padding: 30px 44px 52px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.72), rgba(255,255,255,.26)),
    radial-gradient(circle at 50% 0%, rgba(249,168,212,.56), transparent 20%),
    radial-gradient(circle at 85% 16%, rgba(59,130,246,.36), transparent 28%),
    linear-gradient(135deg, #dff4ff 0%, #dceeff 42%, #f6f0ff 100%);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 32px 80px rgba(30, 41, 59, .18);
}
.entryShell::before,
.entryShell::after{
  content:"";
  position:absolute;
  pointer-events:none;
  border: 3px solid rgba(255,255,255,.45);
  opacity:.65;
}
.entryShell::before{
  width:190px;
  height:110px;
  border-color: transparent transparent rgba(255,255,255,.5) rgba(255,255,255,.5);
  border-radius: 0 0 0 140px;
  top: 72px;
  left: 46%;
  transform: rotate(-24deg);
}
.entryShell::after{
  width: 72px;
  height: 118px;
  border-left: 4px solid rgba(255,255,255,.58);
  border-top: 4px solid rgba(255,255,255,.58);
  border-right: 0;
  border-bottom: 0;
  top: 118px;
  right: 68px;
  transform: skew(-18deg);
}
.entryNav{
  display:flex;
  align-items:center;
  gap: 12px;
  position:relative;
  z-index:1;
}
.entryBrandMark{
  width: 54px;
  height: 40px;
  object-fit: contain;
  display:block;
  flex: 0 0 auto;
}
.entryBrandName{
  font-size: 22px;
  font-weight: 850;
  color:#0f172a;
}
.entryFeedbackWrap{
  margin-left:auto;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.entryFeedbackBubble{
  position:absolute;
  right: 0;
  top: 48px;
  min-width: 168px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color:#1e1b4b;
  font-size: 13px;
  font-weight: 850;
  text-align:center;
  box-shadow: 0 14px 34px rgba(79,70,229,.16);
  border:1px solid rgba(124,58,237,.16);
  backdrop-filter: blur(12px);
  animation: feedbackBubbleFloat 2.6s ease-in-out infinite;
  pointer-events:none;
}
.entryFeedbackBubble::before{
  content:"";
  position:absolute;
  right: 28px;
  top: -7px;
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,.86);
  border-left:1px solid rgba(124,58,237,.12);
  border-top:1px solid rgba(124,58,237,.12);
  transform: rotate(45deg);
}
.entryFeedbackBtn{
  position:relative;
  appearance:none;
  border: 0;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color:#fff;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor:pointer;
  box-shadow: 0 14px 34px rgba(79,70,229,.26);
  backdrop-filter: blur(12px);
  animation: feedbackPulse 1.75s ease-in-out infinite;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.entryFeedbackBtn:hover{
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.05);
  box-shadow: 0 18px 40px rgba(79,70,229,.34);
}
.entryFeedbackBtn::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:inherit;
  border:2px solid rgba(124,58,237,.28);
  animation: feedbackRing 1.75s ease-out infinite;
  pointer-events:none;
}
@keyframes feedbackPulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.045); }
}
@keyframes feedbackRing{
  0%{ opacity:.72; transform:scale(.96); }
  100%{ opacity:0; transform:scale(1.2); }
}
@keyframes feedbackBubbleFloat{
  0%,100%{ transform: translateY(0); opacity:.92; }
  50%{ transform: translateY(5px); opacity:1; }
}
.entryHero{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 40px;
  margin-top: 76px;
  position:relative;
  z-index:1;
}
.entryEyebrow{
  color:#334155;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.entryHero h1{
  margin:0;
  color:#050505;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.14;
  letter-spacing:0;
  font-weight: 500;
}
.entryHero p{
  margin: 28px 0 0;
  color:#334155;
  font-size: 20px;
}
.entryDiffuseGlow{
  width: 300px;
  height: 210px;
  flex: 0 0 auto;
  margin-right: 24px;
  margin-bottom: -4px;
  border-radius: 999px;
  filter: blur(28px);
  opacity: .72;
  background:
    radial-gradient(circle at 28% 50%, rgba(56,189,248,.72), transparent 34%),
    radial-gradient(circle at 62% 35%, rgba(168,85,247,.52), transparent 38%),
    radial-gradient(circle at 78% 70%, rgba(251,191,36,.42), transparent 32%),
    radial-gradient(circle at 46% 72%, rgba(34,197,94,.28), transparent 36%);
  animation: diffuseBreath 2.8s ease-in-out infinite;
}
@keyframes diffuseBreath{
  0%,100%{
    transform: translate3d(0,0,0) scale(.96);
    filter: blur(30px);
    opacity:.62;
  }
  50%{
    transform: translate3d(-10px,6px,0) scale(1.06);
    filter: blur(24px);
    opacity:.86;
  }
}
.toolStrip{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 56px;
  min-height: 250px;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 12px 36px rgba(15,23,42,.08);
}
.toolCard{
  appearance:none;
  border:0;
  border-right: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.2);
  color:#111827;
  cursor:pointer;
  min-width:0;
  padding: 42px 28px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 12px;
  font-family: inherit;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.toolCard:last-child{ border-right:0; }
.toolCard:hover,
.toolCard:focus-visible{
  background: linear-gradient(180deg, rgba(14,165,233,.96), rgba(56,189,248,.74));
  color:#fff;
  transform: translateY(-8px);
  box-shadow: 0 22px 52px rgba(14,165,233,.26);
  outline: none;
}
.toolCard:hover .toolSub,
.toolCard:focus-visible .toolSub{
  color: rgba(255,255,255,.58);
}
.toolCard.active{
  background: linear-gradient(180deg, rgba(14,165,233,.96), rgba(56,189,248,.74));
  color:#fff;
  box-shadow: 0 22px 52px rgba(14,165,233,.26);
}
.toolCard.disabled{
  cursor:not-allowed;
  opacity:.58;
}
.toolCard.disabled:hover{
  transform:none;
  background: rgba(255,255,255,.2);
  color:#111827;
  box-shadow:none;
}
.toolCard.disabled:hover .toolSub{
  color: rgba(15,23,42,.48);
}
.toolTitle{
  font-size: clamp(21px, 2vw, 30px);
  line-height:1.25;
  font-weight: 850;
}
.toolSub{
  font-size: 17px;
  color: rgba(15,23,42,.48);
}
.toolCard.active .toolSub{
  color: rgba(255,255,255,.58);
}

.textbookBoard{
  grid-template-columns: .82fr 1.18fr;
}
.textbookResult{
  min-height: 360px;
}
.textbookEmpty{
  min-height: 320px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px;
}
.textbookHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfeff, #eef2ff);
  border: 1px solid rgba(99,102,241,.12);
}
.textbookArea{
  font-size: 20px;
  font-weight: 850;
  color: var(--text);
}
.textbookSource{
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.textbookGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.textbookSubject{
  min-height: 140px;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow: var(--shadow);
}
.textbookSubjectName{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.textbookVersion{
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 850;
  color: var(--primary);
}
.textbookNote{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.65;
}
.textbookAiResult{
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.textbookSectionTitle{
  font-size: 16px;
  font-weight: 850;
  color: var(--text);
  margin-bottom: 10px;
}
.textbookTable{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
  overflow:hidden;
  border-radius: 10px;
}
.textbookTable th{
  background:#f1f5f9;
  color:#334155;
  text-align:left;
  padding: 9px 10px;
}
.textbookTable td{
  border-top:1px solid #e5e7eb;
  color:#475569;
  padding: 9px 10px;
  vertical-align:top;
}
.textbookTips{
  margin: 12px 0 0;
  padding-left: 18px;
  color:#475569;
  font-size: 13px;
  line-height: 1.7;
}
.textbookChapterMeta{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.chapterGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.chapterItem{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid rgba(99,102,241,.1);
  color: #1f2937;
  font-weight: 700;
}
.chapterItem span{
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  flex: 0 0 auto;
}

.knowledgeBoard{
  grid-template-columns: .82fr 1.18fr;
}
.subjectTabs{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}
.subjectTab{
  appearance:none;
  border: 1px solid var(--line);
  background:#fff;
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  cursor:pointer;
  font-weight: 750;
  font-family: inherit;
}
.subjectTab.active{
  background: var(--primary);
  color:#fff;
  border-color: var(--primary);
}
.teacherGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.teacherCard{
  appearance:none;
  border: 1px solid var(--line);
  background:#fff;
  border-radius: 14px;
  padding: 14px 10px;
  cursor:pointer;
  font-family: inherit;
  color: var(--text);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.teacherCard:hover,
.teacherCard.active{
  transform: translateY(-2px);
  border-color: var(--accent2);
  box-shadow: var(--shadow-lg);
}
.teacherAvatar{
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size: 24px;
  font-weight: 850;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  overflow:hidden;
  box-shadow: 0 10px 24px rgba(79,70,229,.14);
}
.teacherAvatar.hasImage{
  background:#eef2ff;
  border: 2px solid rgba(255,255,255,.86);
}
.teacherAvatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
}
.teacherCard[data-teacher="jiankun"] .teacherAvatar img{
  object-position:center 18%;
}
.teacherName{
  font-size: 14px;
  font-weight: 850;
}
.teacherRole{
  font-size: 11px;
  color: var(--muted);
}
.knowledgeFiles{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 10px;
}
.knowledgeFile{
  border:1px solid var(--line);
  background:#fff;
  color: var(--muted);
  border-radius:999px;
  padding: 5px 10px;
  font-size: 12px;
}
.knowledgeFile.skill{
  background: var(--primary-light);
  border-color: rgba(124,58,237,.22);
  color: var(--primary);
  font-weight: 750;
}
.chatBox{
  min-height: 420px;
  max-height: 520px;
  overflow:auto;
  border:1px solid var(--line);
  background:#fff;
  border-radius: 14px;
  padding: 14px;
}
.chatMsg{
  max-width: 86%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.65;
  font-size: 14px;
}
.chatMsg.user{
  margin-left:auto;
  background: var(--primary);
  color:#fff;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}
.chatMsg.assistant{
  background:#f8fafc;
  color:#334155;
  border:1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}
.chatAnswerTitle{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  margin: 12px 0 8px;
  color:#18223a;
}
.chatAnswerTitle:first-child{
  margin-top:0;
}
.chatAnswerTitle span{
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  line-height:1;
}
.chatAnswerTitle strong{
  font-size: 15px;
  line-height:1.55;
}
.chatAnswerHeading{
  font-weight: 850;
  font-size: 15px;
  color:#18223a;
  margin: 12px 0 7px;
}
.chatAnswerPara{
  margin: 7px 0;
  color:#344258;
}
.chatAnswerList{
  margin: 6px 0 10px 0;
  padding-left: 0;
  list-style:none;
  display:grid;
  gap: 7px;
}
.chatAnswerList li{
  position:relative;
  padding-left: 18px;
  color:#344258;
}
.chatAnswerList li::before{
  content:"";
  position:absolute;
  left:2px;
  top:.72em;
  width: 6px;
  height: 6px;
  border-radius:50%;
  background: var(--accent2);
}
.chatMsg.assistant strong{
  color:#111827;
  font-weight: 850;
}
.chatMsg.assistant code{
  font-family: inherit;
  background:#eef2ff;
  color: var(--primary);
  border-radius: 6px;
  padding: 1px 5px;
}
.chatInputRow{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
  align-items:end;
}
.chatInputRow textarea{
  min-height: 74px;
}

.reportSwitch{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.reportType{
  appearance:none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  cursor:pointer;
  text-align:left;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  font-family: inherit;
}
.reportType:hover{ transform: translateY(-1px); border-color: var(--accent2); }
.reportType.active{
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 6px 22px rgba(124,58,237,.14);
}
.reportType span{
  display:block;
  font-size: 15px;
  font-weight: 800;
}
.reportType small{
  display:block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
  margin-top: 12px;
  align-items:start;
}

/* Panels */
.panel{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
#xscBoard > .panel:last-child,
#xqBoard > .panel:last-child{
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  display:flex;
  flex-direction:column;
}
#xscBoard > .panel:last-child .card.soft,
#xqBoard > .panel:last-child .card.soft{
  flex:1;
  min-height:0;
  padding: 14px 16px 16px;
}
.panelHead{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-alt), #fff);
}
.panelTitle{ font-weight:700; font-size:14px; }
.panelSub{ color: var(--muted); font-size: 12px; margin-top: 3px; }

/* Cards */
.card{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.card:last-child{ border-bottom:0; }
.soft{
  background: var(--panel-alt);
}
.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
h2{
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--primary);
}
.muted{ color: var(--muted); font-size: 12px; }

/* Form */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 4px;
  margin: 8px 0;
}
.field span{
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

input, select, textarea{
  width:100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline:none;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
textarea{ resize: vertical; min-height: 78px; }
input::placeholder, textarea::placeholder{ color: #c4b5fd; }
input:focus, select:focus, textarea:focus{
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}
input[readonly]{
  background: #f3f4f6;
  color: #4b5563;
  cursor: default;
}

.inline{
  display:flex;
  align-items:center;
  gap:8px;
}
.pill{
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  min-width: 42px;
  text-align: center;
}
.sep{
  color: var(--muted);
  padding: 0 2px;
  font-weight: 600;
}

/* Subject grid */
.subjectGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.xqSubjectGrid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.subjectBlock{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
}
.subjectTitle{
  font-weight: 650;
  margin-bottom: 8px;
  font-size: 13px;
}
.subjectInputs{
  display:flex;
  align-items:center;
  gap: 8px;
}
.subjectInputs input{ padding: 8px 10px; }
.subjectInputs .pill{ margin-left:auto; }
.subjectTargetRow{
  display:flex;
  align-items:center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.subjectTargetRow input{
  max-width: 96px;
  padding: 7px 9px;
}
.planSubjectChoices{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-height:40px;
  align-items:center;
}
.planSubjectChoices label{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:7px 11px;
  color:var(--text);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
.planSubjectChoices input{
  width:auto;
  margin:0;
  accent-color:var(--primary);
}
.teacherPreviewChoices .teacherChoice{
  --teacher-main: var(--primary);
  --teacher-soft: #fff;
  --teacher-border: var(--line);
  background: var(--teacher-soft);
  border-color: var(--teacher-border);
  color: var(--teacher-main);
  box-shadow: 0 5px 14px rgba(30,27,75,.04);
}
.teacherPreviewChoices .teacherChoice.jiankun{ --teacher-main:#0f766e; --teacher-soft:#ecfeff; --teacher-border:#99f6e4; }
.teacherPreviewChoices .teacherChoice.liumeng{ --teacher-main:#2563eb; --teacher-soft:#eff6ff; --teacher-border:#bfdbfe; }
.teacherPreviewChoices .teacherChoice.lizhen{ --teacher-main:#ea580c; --teacher-soft:#fff7ed; --teacher-border:#fed7aa; }
.teacherPreviewChoices .teacherChoice.liuyusi{ --teacher-main:#0284c7; --teacher-soft:#f0f9ff; --teacher-border:#bae6fd; }
.teacherPreviewChoices .teacherChoice.yunyang{ --teacher-main:#dc2626; --teacher-soft:#fff1f2; --teacher-border:#fecdd3; }
.teacherPreviewChoices .teacherChoice.quliu{ --teacher-main:#9333ea; --teacher-soft:#faf5ff; --teacher-border:#e9d5ff; }
.teacherPreviewChoices .teacherChoice.qiaokai{ --teacher-main:#1d4ed8; --teacher-soft:#eff6ff; --teacher-border:#bfdbfe; }
.teacherPreviewChoices .teacherChoice.wangjingwen{ --teacher-main:#be185d; --teacher-soft:#fdf2f8; --teacher-border:#fbcfe8; }
.teacherPreviewChoices .teacherChoice:has(input:checked){
  background: var(--teacher-main);
  border-color: var(--teacher-main);
  color:#fff;
  box-shadow: 0 10px 22px rgba(30,27,75,.12);
}
.teacherPreviewChoices .teacherChoice input{
  accent-color: var(--teacher-main);
}

.otherSubjectsRow{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.miniField{
  display:flex;
  flex-direction:column;
  gap: 4px;
  margin: 0;
}
.miniField span{
  font-size: 10px;
  color: var(--muted);
}
.miniField input{ padding: 7px 9px; }

/* Buttons */
.btn{
  appearance:none;
  border: none;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  cursor:pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s ease;
  font-family: inherit;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn.ai{
  background: linear-gradient(135deg, var(--primary), var(--accent3));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn.ai:hover{
  box-shadow: 0 6px 20px rgba(124,58,237,.4);
}
.btn.ai.policy{
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 4px 14px rgba(245,158,11,.3);
}
.btn.ai.policy:hover{
  box-shadow: 0 6px 20px rgba(245,158,11,.4);
}
.btn.pdf{
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
}
.btn.pdf:hover{
  border-color: var(--accent2);
  background: var(--primary-light);
}
.btn.img{
  background: #fff;
  color: var(--accent3);
  border: 1px solid var(--line);
}
.btn.img:hover{
  border-color: var(--accent2);
  background: var(--primary-light);
}
.btn.help{
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.btn.help:hover{
  border-color: var(--accent2);
  color: var(--primary);
  background: var(--primary-light);
}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}

@keyframes aiPulse{
  0%,100%{ box-shadow: 0 4px 14px rgba(124,58,237,.3); }
  50%{ box-shadow: 0 6px 24px rgba(124,58,237,.5); }
}
.btn.ai.loading{
  animation: aiPulse 1.2s ease infinite;
}

.hint{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}
.hint.bad{ color: var(--danger); }

/* Report preview */
.reportPreview{
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow:auto;
  background: var(--panel-alt);
  height: 100%;
  min-height: 0;
}
.reportFrame{
  width:100%;
  height: 100%;
  min-height: 0;
  border:0;
  background: #fff;
}

.foot{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  padding: 0 16px;
}

.hide{ display:none !important; }

/* Modal */
.modalOverlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 16px;
  background: rgba(30,27,75,.40);
  backdrop-filter: blur(8px);
}
.modalCard{
  width: min(600px, 100%);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(124,58,237,.15);
  overflow:hidden;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modalTitle{ font-weight: 800; font-size: 15px; }
.modalSub{
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.modalClose{
  appearance:none;
  border: none;
  background: var(--panel-alt);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor:pointer;
  font-size: 18px;
  line-height: 0;
  transition: all .2s;
}
.modalClose:hover{ background: #fee2e2; color: var(--danger); }
.modalBody{ padding: 14px 16px 2px; }
.modalList{ margin: 0; padding-left: 18px; line-height: 1.75; color: var(--muted); font-size: 14px; }
.feedbackCard{
  width: min(560px, 100%);
}
.feedbackGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feedbackCard textarea{
  resize: vertical;
  min-height: 130px;
}
.modalFoot{
  padding: 12px 16px 16px;
  display:flex;
  gap: 10px;
  justify-content:flex-end;
}
.modalFoot .btn{
  background: linear-gradient(135deg, var(--primary), var(--accent3));
  color: #fff;
  padding: 8px 20px;
}

@media print{
  .modalOverlay{ display:none !important; }
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  #xscBoard > .panel:last-child,
  #xqBoard > .panel:last-child{
    position: static;
    height: min(72vh, 720px);
  }
  .textbookBoard{ grid-template-columns: 1fr; }
  .knowledgeBoard{ grid-template-columns: 1fr; }
  .reportPreview, .reportFrame{ min-height: 0; }
  .otherSubjectsRow{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xqSubjectGrid{ grid-template-columns: 1fr; }
  .entryShell{ padding: 24px; min-height: auto; }
  .entryHero{ margin-top: 56px; align-items:flex-start; }
  .entryDiffuseGlow{ display:none; }
  .toolStrip{ grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .toolCard{ min-height: 180px; }
  .toolCard.active{ margin:0; }
  .textbookGrid{ grid-template-columns: 1fr; }
  .chapterGrid{ grid-template-columns: 1fr; }
  .teacherGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .entryScreen{ min-height: auto; padding: 10px 0 24px; }
  .entryShell{ border-radius: 24px; padding: 20px 16px 24px; }
  .entryBrandName{ font-size: 18px; }
  .entryFeedbackBtn{ font-size: 14px; padding: 11px 17px; }
  .entryFeedbackBubble{ top: 42px; min-width: 148px; font-size: 12px; padding: 8px 11px; }
  .entryHero{ margin-top: 42px; }
  .entryEyebrow{ font-size: 14px; }
  .entryHero h1{ font-size: 38px; }
  .entryHero p{ font-size: 15px; margin-top: 16px; }
  .toolStrip{ grid-template-columns: 1fr; margin-top: 34px; }
  .toolCard{ min-height: 130px; padding: 28px 18px; }
  .toolTitle{ font-size: 22px; }
  .toolSub{ font-size: 14px; }
  .reportSwitch{ grid-template-columns: 1fr; }
  .heroTop{ align-items: flex-start; }
  .heroActions{ justify-content:flex-start; }
  .grid2{ grid-template-columns: 1fr; }
  .feedbackGrid{ grid-template-columns: 1fr; }
  .teacherGrid{ grid-template-columns: 1fr; }
  .chatInputRow{ grid-template-columns: 1fr; }
}
