:root{
  --bg:#f3f6fb;
  --panel:#ffffff;
  --line:#e1e8f4;
  --text:#16233d;
  --muted:#73839f;
  --blue:#2f66ff;
  --blue-soft:#edf4ff;
  --green:#1aa96b;
  --red:#ff5a5a;
  --purple:#7a58ff;
  --shadow:0 20px 50px rgba(28,52,97,.08);
  --shadow-soft:0 8px 24px rgba(28,52,97,.05);
  --radius:22px;
  --chat-column-width:372px;
  --chat-top-offset:72px;
  --splitter-width:10px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--bg)}
body{overflow-x:hidden;overflow-y:auto}
.app-shell{display:flex;min-height:100vh;overflow:hidden}
.sidebar{
  width:196px;min-width:196px;background:#fff;border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:14px 10px 12px;gap:10px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:4px 8px 12px;
  border-bottom:1px solid var(--line);
}
.brand-icon{
  width:34px;
  height:34px;
  border-radius:12px;
  background:linear-gradient(180deg,#eef5ff 0%,#e6efff 100%);
  display:grid;
  place-items:center;
  color:#2460f5;
  font-size:16px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(47,102,255,.08);
}
.brand-title{
  font-size:15px;
  font-weight:900;
  color:#142448;
  line-height:1.18;
  letter-spacing:.01em;
}
.brand-sub{
  font-size:12px;
  color:#71809c;
  margin-top:5px;
  line-height:1.2;
}
.sidebar-nav{display:flex;flex-direction:column;gap:4px;padding-top:8px}
.nav-item{
  width:100%;
  display:flex;align-items:center;gap:12px;padding:12px 12px;border-radius:14px;color:#30415e;
  font-size:13px;cursor:pointer;border:1px solid #eef2f8;transition:all .18s ease;background:#fbfcff;
  appearance:none;
  text-align:left;
  outline:none;
}
.nav-item:hover{background:#f5f8ff;border-color:#dbe6f8}
.nav-item:focus-visible{border-color:#9cbcff;box-shadow:0 0 0 3px rgba(47,102,255,.12)}
.nav-item.active{background:linear-gradient(180deg,#eef4ff 0%,#e8f0ff 100%);border-color:#d4e0fb;color:#1d4fd8;font-weight:800;box-shadow:0 10px 20px rgba(47,102,255,.08)}
.nav-icon{
  width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
  color:#51617e;
  stroke-width:2;
}
.nav-icon:not(:has(svg)){
  background:transparent;
}
.nav-item.active .nav-icon{
  color:#1d4fd8;
  background:transparent;
}
.sidebar-guide{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px 8px;
  border-top:1px solid var(--line);
  color:#5c6c88;
  flex:1;
}
.guide-block{
  padding:0;
}
.guide-title{
  margin-bottom:5px;
  color:#1d2d4d;
  font-size:12px;
  font-weight:800;
}
.guide-block p{
  margin:0;
  font-size:12px;
  line-height:1.65;
}
.guide-block ul{
  margin:0;
  padding-left:14px;
}
.guide-block li{
  margin:3px 0;
  font-size:12px;
  line-height:1.45;
}
.sidebar-online{display:flex;align-items:center;gap:8px;padding:8px 6px 0;color:#5a6d8d;font-size:13px}
.sidebar-online .dot{width:10px;height:10px;border-radius:50%;background:#21b563}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{
  height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;
  justify-content:space-between;padding:0 22px 0 26px;flex-shrink:0
}
.topbar-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:800;color:#193069}
.topbar-bot{width:28px;height:28px;border-radius:10px;background:#eef4ff;display:inline-flex;align-items:center;justify-content:center;color:#2f66ff;stroke-width:2}
.topbar-actions{display:flex;align-items:center;gap:12px}
.beta-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid #cfe0f5;
  background:#f4f8ff;
  color:#2457cb;
  font-size:12px;
  font-weight:800;
  letter-spacing:0;
  white-space:nowrap;
}
.ghost-btn,.primary-btn,.small-ghost,.ghost-mini,.upload-btn,.send-btn,.quick-pill{
  font-family:inherit;border:1px solid var(--line);background:#fff;color:#4b5b77;cursor:pointer;
}
.ghost-btn,.primary-btn{height:38px;padding:0 14px;border-radius:12px;font-size:14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.primary-btn{background:linear-gradient(180deg,#6c54ff 0%,#4f46ff 100%);border-color:transparent;color:#fff;box-shadow:0 10px 18px rgba(79,70,255,.18)}
.ghost-btn svg,.primary-btn svg,.small-ghost svg,.upload-btn svg{
  width:16px;
  height:16px;
  stroke-width:2;
}
.avatar{width:40px;height:40px;border-radius:50%;background:#5869ff;color:#fff;display:grid;place-items:center;font-size:18px;font-weight:700}
.content-grid{
  display:block;
  position:relative;
  padding:18px calc(var(--chat-column-width) + var(--splitter-width) + 28px) 18px 14px;
  min-height:calc(100vh - var(--chat-top-offset));
  overflow:visible;
}
.center-column{display:flex;flex-direction:column;gap:18px;min-width:0}
.chat-column{
  position:fixed;
  top:calc(var(--chat-top-offset) + 18px);
  right:14px;
  width:var(--chat-column-width);
  min-width:280px;
  z-index:20;
  height:calc(100vh - var(--chat-top-offset) - 36px);
}
.split-resizer{
  position:fixed;
  top:calc(var(--chat-top-offset) + 18px);
  right:calc(var(--chat-column-width) + 14px);
  width:var(--splitter-width);
  height:calc(100vh - var(--chat-top-offset) - 36px);
  z-index:25;
  cursor:col-resize;
  touch-action:none;
  transition:background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.split-resizer::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:1px;
  transform:translateX(-50%);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(47,102,255,.03),rgba(47,102,255,.12),rgba(47,102,255,.03));
  opacity:.85;
  transition:background .18s ease, opacity .18s ease, width .18s ease;
}
.split-resizer::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:6px;
  height:58px;
  transform:translate(-50%,-50%);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  box-shadow:0 6px 14px rgba(28,52,97,.05), inset 0 0 0 1px rgba(47,102,255,.06);
  opacity:.78;
  transition:height .18s ease, width .18s ease, opacity .18s ease, box-shadow .18s ease, background .18s ease;
}
.split-resizer:hover::before,
.split-resizer:focus-visible::before{
  width:2px;
  background:linear-gradient(180deg,rgba(47,102,255,.10),rgba(47,102,255,.24),rgba(47,102,255,.10));
  opacity:1;
}
.split-resizer:hover::after,
.split-resizer:focus-visible::after{
  width:8px;
  height:72px;
  opacity:1;
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 24px rgba(28,52,97,.10), inset 0 0 0 1px rgba(47,102,255,.12);
}
.split-resizer:hover{
  background:linear-gradient(180deg,rgba(47,102,255,.02),rgba(47,102,255,.035),rgba(47,102,255,.02));
}
.split-resizer:focus-visible{
  outline:none;
}
.is-resizing-chat{
  cursor:col-resize;
  user-select:none;
}
.is-resizing-chat .split-resizer{
  background:linear-gradient(180deg,rgba(47,102,255,.035),rgba(47,102,255,.06),rgba(47,102,255,.035));
}
.is-resizing-chat .split-resizer::before{
  width:2px;
  background:linear-gradient(180deg,rgba(47,102,255,.16),rgba(47,102,255,.32),rgba(47,102,255,.16));
  opacity:1;
}
.is-resizing-chat .split-resizer::after{
  width:10px;
  height:88px;
  opacity:1;
  background:#ffffff;
  box-shadow:0 14px 28px rgba(28,52,97,.14), inset 0 0 0 1px rgba(47,102,255,.18);
}
.is-resizing-chat .chat-column,
.is-resizing-chat .content-grid,
.is-resizing-chat .split-resizer{
  transition:none!important;
}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft)}
.upload-panel{
  padding:22px 22px 18px;
  border-color:#e7edf8;
  box-shadow:0 14px 34px rgba(28,52,97,.05);
}
.workspace-block{
  margin-top:12px;
  padding:14px;
  border:1px solid #e9eef8;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#fcfdff 100%);
}
.workspace-block-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.workspace-block-head strong{
  display:block;
  font-size:14px;
  color:#1a2f55;
}
.upload-drop{
  margin-top:0;border:2px dashed #cadef7;border-radius:16px;min-height:150px;background:#fbfdff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:14px 14px
}
.upload-copy{
  display:flex;
  flex-direction:column;
  align-items:inherit;
}
.upload-actions{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  justify-content:center;
}
.upload-drop.drag-over,
.upload-drop.has-file,
.upload-drop.paste-focus{
  border-color:#2f66ff;
  background:#f3f7ff;
}
.upload-drop.paste-ready,
.grading-combined-card.paste-ready,
.grading-upload-card.paste-ready{
  outline:none;
}
.upload-drop.paste-ready:focus-visible,
.grading-combined-card.paste-ready:focus-visible,
.grading-upload-card.paste-ready:focus-visible,
.grading-combined-card.paste-focus,
.grading-upload-card.paste-focus{
  border-color:#2f66ff;
  box-shadow:0 0 0 4px rgba(47,102,255,.08),0 14px 34px rgba(36,62,117,.08);
}
.upload-drop.has-file .upload-icon{
  background:#1aa96b;
  box-shadow:0 12px 22px rgba(26,169,107,.2);
}
.upload-preview{
  position:relative;
  width:min(100%,720px);
  max-height:280px;
  margin-bottom:12px;
  border:1px solid #d9e5f6;
  border-radius:14px;
  background:#fff;
  overflow:auto;
  box-shadow:0 10px 24px rgba(36,62,117,.08);
}
.upload-preview img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
}
.preview-remove{
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border:1px solid rgba(217,229,246,.9);
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#263655;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(36,62,117,.16);
  z-index:2;
}
.preview-remove:hover{
  background:#fff1f1;
  border-color:#ffc6c6;
  color:#d92d2d;
}
.upload-drop.has-file{
  min-height:168px;
  display:grid;
  grid-template-columns:minmax(280px,380px) minmax(0,1fr) auto;
  gap:12px;
  justify-content:flex-start;
  align-items:center;
  text-align:left;
  padding:12px 14px;
}
.upload-drop.has-file .upload-icon{
  display:none;
}
.upload-drop.has-file .upload-preview{
  width:100%;
  max-height:260px;
  margin-bottom:0;
  align-self:stretch;
  overflow:auto;
}
.upload-drop.has-file .upload-preview img{
  width:100%;
  min-height:190px;
  object-fit:contain;
  object-position:center top;
}
.upload-drop.has-file .preview-remove{
  display:none;
}
.upload-drop.has-file .upload-copy{
  min-width:0;
  justify-content:center;
}
.upload-drop.has-file .upload-title{
  margin-top:0;
  font-size:13px;
  line-height:1.35;
  font-weight:800;
  color:#1f355c;
  word-break:break-all;
}
.upload-drop.has-file .upload-sub{
  margin-top:4px;
  font-size:11px;
  line-height:1.45;
}
.upload-drop.has-file .upload-btn{
  margin-top:0;
  height:32px;
  padding:0 12px;
  font-size:12px;
  box-shadow:none;
}
.upload-drop.has-file .upload-hint{
  margin-top:4px;
  font-size:11px;
}
.upload-drop.has-file .upload-actions{
  align-items:flex-end;
  justify-content:center;
  gap:8px;
}
.upload-mini{
  min-width:72px;
  margin-top:0;
  border:1px solid #d5e1f5;
  color:#3656a0;
  background:#fff;
}
.upload-icon{width:36px;height:36px;border-radius:50%;background:#2f66ff;color:#fff;display:grid;place-items:center;font-size:17px;box-shadow:0 8px 14px rgba(47,102,255,.16)}
.upload-icon svg{width:18px;height:18px;stroke-width:2}
.upload-title{margin-top:10px;font-size:15px;font-weight:800;color:#22395f}
.upload-sub{margin-top:4px;font-size:12px;color:#8593aa;line-height:1.45}
.upload-sub:empty,
.upload-hint:empty{
  display:none;
}
.upload-btn{
  margin-top:10px;height:36px;padding:0 16px;border-radius:12px;border-color:transparent;background:#2f66ff;color:#fff;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  box-shadow:0 7px 12px rgba(47,102,255,.12)
}
.upload-hint{margin-top:6px;font-size:11px;color:#8a97ad}
.upload-drop:not(.has-file) .upload-mini{min-width:88px;height:34px}
.grading-workspace{
  margin-top:0;
  padding:14px;
  border:1px solid #dfe8f7;
  border-radius:18px;
  background:linear-gradient(180deg,#fbfdff 0%,#f7faff 100%);
}
.grading-input-center{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.grading-input-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.grading-input-tab{
  height:48px;
  border:1px solid #dbe6f8;
  border-radius:14px;
  background:#fff;
  color:#294164;
  font-size:13px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  transition:all .18s ease;
}
.grading-input-tab svg{
  width:16px;
  height:16px;
  stroke-width:2;
}
.grading-input-tab:hover{
  border-color:#c5d8fb;
  background:#f8fbff;
}
.grading-input-tab.active{
  border-color:#bfd4ff;
  background:linear-gradient(180deg,#edf4ff 0%,#e7efff 100%);
  color:#1f50cc;
  box-shadow:0 10px 24px rgba(47,102,255,.08);
}
.grading-combined-card{
  padding:12px;
  border:1px solid #d8e5f8;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.grading-combined-card--primary{
  border-color:#cdddff;
  box-shadow:0 14px 34px rgba(36,62,117,.08);
}
.grading-card-head--stack{
  align-items:flex-start;
  justify-content:space-between;
}
.grading-card-head--stack > div{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.grading-panel-copy{
  margin:0;
  max-width:520px;
  color:#6d7c95;
  font-size:13px;
  line-height:1.65;
}
.grading-dynamic-panel{
  display:none;
}
.grading-dynamic-panel.grading-panel-active{
  display:block;
}
.grading-upload-empty--action{
  gap:12px;
}
.grading-upload-empty--action .upload-btn{
  margin-top:0;
}
.grading-text-panel{
  border:1px solid #dbe5f6;
  border-radius:14px;
  padding:14px 16px;
  background:#fff;
}
.grading-text-guide{
  color:#5f708d;
}
.grading-text-title{
  font-size:13px;
  font-weight:800;
  color:#1f3153;
  margin-bottom:6px;
}
.grading-text-guide p{
  margin:0;
  font-size:13px;
  line-height:1.65;
}
.grading-card-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.grading-card-head strong{
  font-size:14px;
  color:#203354;
}
.grading-card-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#edf4ff;
  color:#2457cb;
  font-size:12px;
  font-weight:900;
}
.grading-card-badge--answer{
  background:#eefbf4;
  color:#138454;
}
.grading-card-badge--combined{
  background:#eef4ff;
  color:#2b5ad6;
}
.grading-card-body{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.grading-upload-empty{
  min-height:180px;
  border:2px dashed #d6e1f3;
  border-radius:14px;
  background:#fbfdff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px;
  color:#6d7c95;
  font-size:13px;
  line-height:1.6;
}
.grading-upload-empty svg{
  width:22px;
  height:22px;
  margin-bottom:10px;
  color:#2f66ff;
}
.grading-preview{
  position:relative;
  border:1px solid #d9e5f6;
  border-radius:14px;
  background:#fff;
  max-height:280px;
  overflow:auto;
  box-shadow:0 10px 24px rgba(36,62,117,.08);
}
.grading-preview img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
}
.grading-actions{
  display:flex;
  justify-content:flex-start;
}
.grading-actions--combined{
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.grading-inline-tip{
  font-size:12px;
  line-height:1.5;
  color:#6f7f99;
}
.grading-preview--combined{
  max-height:320px;
}
.grading-note{display:none}
.workflow-grading .recognition-panel,
.workflow-grading .feature-row{
  display:none!important;
}
.workflow-grading #uploadDrop{
  display:none!important;
}
.workflow-grading .mode-selector{
  display:grid!important;
}
.workflow-grading .workspace-block--upload{
  padding-top:0;
}
.workflow-grading .workspace-block--upload .workspace-block-head{
  margin-bottom:10px;
}
.workflow-grading .grading-workspace{
  padding:12px;
  border-radius:16px;
}
.workflow-grading .grading-combined-card{
  padding:10px;
}
.workflow-grading .grading-upload-empty{
  min-height:148px;
  padding:16px;
}
.workflow-grading .fixed-compose{
  margin-top:12px;
}
.workflow-grading .latex-hidden{
  min-height:90px;
}
.fixed-compose{
  position:sticky;
  top:8px;
  z-index:5;
  margin-top:0;
  padding:0;
  border:0;
  border-radius:0;
  background:#fff;
  box-shadow:none;
}
.latex-hidden{
  width:100%;
  min-height:84px;
  border:1px solid #d8e3f3;
  border-radius:12px;
  padding:12px 14px;
  font-family:inherit;
  font-size:14px;
  color:var(--text);
  background:#fbfdff;
  resize:vertical;
  outline:none;
}
.latex-hidden:focus{border-color:#8fb0ff;box-shadow:0 0 0 4px rgba(47,102,255,.08)}
.text-mode-active{
  min-height:120px;
  margin-top:0;
  background:#fff;
}
.recognition-panel{
  margin-top:12px;
  padding:12px;
  border:1px solid #dfe8f7;
  border-radius:14px;
  background:#fbfdff;
}
.recognition-panel.is-hidden{
  display:none!important;
}
.recognition-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}
.recognition-head strong{
  font-size:14px;
  color:#203354;
}
.recognition-head span{
  font-size:12px;
  color:#6f7e97;
  line-height:1.5;
  text-align:right;
}
.recognition-head span.busy{
  color:#2459d6;
}
.recognized-input{
  width:100%;
  min-height:120px;
  border:1px solid #d8e3f3;
  border-radius:12px;
  padding:12px 14px;
  font-family:inherit;
  font-size:14px;
  color:var(--text);
  background:#fff;
  resize:vertical;
  outline:none;
}
.recognized-input:focus{border-color:#8fb0ff;box-shadow:0 0 0 4px rgba(47,102,255,.08)}
.recognized-preview-wrap{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #e3ebf7;
  border-radius:12px;
  background:#fbfdff;
}
.recognized-preview-title{
  margin-bottom:8px;
  font-size:12px;
  font-weight:800;
  color:#4b5f84;
}
.recognized-preview{
  font-size:14px;
  line-height:1.85;
  color:#25324c;
}
.recognized-preview .katex-display{
  margin:10px 0;
  overflow-x:auto;
}
.recognized-preview:empty::before{
  content:"这里会显示渲染后的公式预览";
  color:#8b98ad;
  font-size:12px;
}
.recognition-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}
.ghost-mini{
  height:34px;
  padding:0 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
}
.mode-selector{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:8px;
}
.mode-card{
  min-height:66px;
  border:1px solid #dfe8f7;
  border-radius:14px;
  background:#fff;
  color:#42526f;
  text-align:left;
  padding:10px 12px 9px;
  cursor:pointer;
  font-family:inherit;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  position:relative;
  overflow:hidden;
}
.mode-card::after{
  content:"";
  position:absolute;
  inset:auto 10px 7px 10px;
  height:2px;
  border-radius:999px;
  background:#edf2fb;
}
.mode-card.active{
  border-color:#2f66ff;
  background:#edf4ff;
  color:#1f4fe0;
  box-shadow:0 0 0 3px rgba(47,102,255,.08);
}
.mode-card.active::after{background:#2f66ff}
.mode-title{font-size:13px;font-weight:900;color:#1f2d4d}
.mode-sub{font-size:11px;color:#8290a8;line-height:1.28}
.mode-card.active .mode-title{color:#1f4fe0}
.mode-card.active .mode-sub{color:#4665b8}
.mode-note{
  margin-top:6px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#5d6d88;
  font-size:12px;
  line-height:1.5;
}
.estimate-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #edf2fb;
  border-radius:12px;
  background:#fbfdff;
  color:#53637e;
  font-size:12px;
  font-weight:700;
}
.estimate-content{
  flex:1;
  min-width:0;
}
.estimate-textline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.estimate-percent{
  flex:0 0 auto;
  font-size:12px;
  font-weight:800;
  color:#2457cb;
}
.estimate-track{
  height:6px;
  margin-top:8px;
  border-radius:999px;
  background:#e8eef9;
  overflow:hidden;
}
.estimate-fill{
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2f66ff 0%,#6f90ff 100%);
  transition:width .35s ease;
}
.estimate-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2f66ff;
  box-shadow:0 0 0 4px rgba(47,102,255,.12);
  flex:0 0 auto;
}
.estimate-row.busy{
  background:#f3f7ff;
  border-color:#bfd2ff;
  color:#2653c5;
}
.estimate-row.busy .estimate-dot{
  animation:pulse 1.2s infinite;
}
.estimate-row.busy .estimate-fill{
  box-shadow:0 0 0 1px rgba(47,102,255,.08) inset;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(47,102,255,.32)}
  70%{box-shadow:0 0 0 8px rgba(47,102,255,0)}
  100%{box-shadow:0 0 0 0 rgba(47,102,255,0)}
}
.action-row{display:flex;justify-content:flex-start;margin-top:10px}
.action-row .primary-btn{width:100%;justify-content:center}
.feature-row-head{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:2px;
}
.feature-row-head strong{
  font-size:13px;
  color:#22395f;
}
.feature-row-head span{
  max-width:520px;
  font-size:11px;
  color:#8593aa;
  line-height:1.45;
  text-align:right;
}
.result-box .result-html,
.card-box .result-html{padding:0 2px}
.result-box{padding:16px 18px 18px}
.result-box.result-mode-standard .section-head h3{color:#1e4fd8}
.result-box.result-mode-slow .section-head h3{color:#23734f}
.result-box.result-mode-exam .section-head h3{color:#9a5b08}
.result-focus-strip{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 10px;
  padding:9px 11px;
  border:1px solid #dfe8f7;
  border-radius:12px;
  background:#fbfdff;
  color:#50617e;
  font-size:12px;
  line-height:1.45;
}
.result-focus-strip span{
  flex:0 0 auto;
  padding:3px 8px;
  border-radius:999px;
  background:#edf4ff;
  color:#2450bf;
  font-weight:900;
}
.result-focus-strip strong{
  font-weight:800;
}
.result-enhancement-strip{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 10px;
  padding:9px 11px;
  border:1px solid #dfe8f7;
  border-radius:12px;
  background:#f8fbff;
  color:#50617e;
  font-size:12px;
  line-height:1.45;
}
.result-enhancement-strip span{
  flex:0 0 auto;
  padding:3px 8px;
  border-radius:999px;
  background:#edf4ff;
  color:#2450bf;
  font-weight:900;
}
.result-enhancement-strip strong{
  font-weight:800;
}
.result-enhancement-strip.status-done{
  border-color:#d8efdf;
  background:#f7fcf8;
}
.result-enhancement-strip.status-done span{
  background:#e7f6ec;
  color:#23734f;
}
.result-enhancement-strip.status-failed{
  border-color:#f2ded8;
  background:#fff9f8;
}
.result-enhancement-strip.status-failed span{
  background:#fff0ec;
  color:#b14d3a;
}
.explain-bridge{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:0 0 12px;
}
.bridge-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:8px 10px;
  border:1px solid #e0e8f6;
  border-radius:12px;
  background:#fff;
  min-width:0;
  flex:1 1 220px;
}
.bridge-label{
  flex:0 0 auto;
  font-size:12px;
  font-weight:800;
  color:#2450bf;
  background:#edf4ff;
  border-radius:999px;
  padding:3px 8px;
}
.bridge-text{
  min-width:0;
  font-size:12px;
  line-height:1.5;
  color:#5a6b88;
}
.structure-warning,
.structure-ok{
  margin:0 0 10px;
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  line-height:1.5;
  font-weight:700;
}
.structure-warning{
  background:#fff7f4;
  border:1px solid #ffd7cc;
  color:#b04b31;
}
.structure-ok{
  background:#f4fbf6;
  border:1px solid #d8ecdd;
  color:#2f7a4e;
}
.result-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
  padding:12px;
  border:1px solid #e4ebf7;
  border-radius:18px;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9ff 100%);
}
.result-nav-item{
  min-height:38px;
  padding:0 14px;
  border:1px solid #d7e3f7;
  border-radius:999px;
  background:#fff;
  color:#5b6b86;
  font-size:13px;
  font-weight:800;
  font-family:inherit;
  cursor:pointer;
  transition:all .18s ease;
}
.result-nav-item:hover{
  border-color:#bdd0f8;
  color:#2458d0;
  background:#f8fbff;
}
.result-nav-item.active{
  border-color:#2f66ff;
  background:#edf4ff;
  color:#1f4fe0;
  box-shadow:0 0 0 3px rgba(47,102,255,.08);
}
.result-html{
  color:#25324c;
  font-size:14px;
  line-height:1.85;
  transition:opacity .28s ease, transform .28s ease;
}
.result-html.updating{
  opacity:.72;
  transform:translateY(2px);
}
.result-html h2,.result-html h3{
  margin:18px 0 10px;
  color:#17284d;
  line-height:1.35;
}
.explain-section{
  margin:0 0 16px;
  padding:18px 18px 16px;
  border:1px solid #e0e8f7;
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 22px rgba(36,62,117,.05);
}
.explain-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid #edf2fb;
}
.explain-section-head h2{
  margin:0;
  font-size:18px;
  font-weight:900;
}
.explain-section--problem{
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
  border-color:#d8e4fb;
}
.explain-section--diagnosis,
.explain-section--method,
.explain-section--check{
  background:#fcfdff;
}
.explain-section--review{
  background:linear-gradient(180deg,#fff9f8 0%,#ffffff 100%);
  border-color:#ffd9d3;
}
.explain-section--exam{
  background:linear-gradient(180deg,#fffdf6 0%,#ffffff 100%);
  border-color:#f7e3ae;
}
.explain-section--card{
  background:linear-gradient(180deg,#f7faff 0%,#ffffff 100%);
  border-color:#dbe7ff;
}
.explain-section--solution p,
.explain-section--solution li{
  font-size:14px;
  line-height:1.95;
}
.explain-section--solution{
  border-width:2px;
  box-shadow:0 12px 28px rgba(36,62,117,.08);
}
.explain-section--diagnosis,
.explain-section--keyinfo,
.explain-section--method,
.explain-section--check,
.explain-section--practice,
.explain-section--card{
  padding:15px 16px 14px;
  box-shadow:0 3px 10px rgba(36,62,117,.035);
}
.solution-steps{
  display:grid;
  gap:10px;
}
.step-card{
  padding:12px 14px;
  border:1px solid #dfe7f7;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.step-card-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.step-card-head h3{
  margin:0;
  padding:0;
  border:0;
  font-size:15px;
  color:#1b3260;
}
.step-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  height:26px;
  padding:0 9px;
  border-radius:999px;
  background:#edf4ff;
  color:#2457cb;
  font-size:12px;
  font-weight:800;
}
.step-card-body{
  color:#25324c;
}
.step-card-body > :first-child{
  margin-top:0;
}
.step-card-body > :last-child{
  margin-bottom:0;
}
.result-html p{margin:9px 0}
.result-html ul,.result-html ol{padding-left:20px}
.result-html ol li::marker{font-weight:800;color:#2f66ff}
.result-html blockquote{
  margin:12px 0;
  padding:12px 14px;
  border-left:4px solid #2f66ff;
  border-radius:0 14px 14px 0;
  background:#f7faff;
  color:#30508b;
}
.result-html .katex-display{
  margin:16px 0 18px;
  padding:10px 6px;
  overflow-x:auto;
  overflow-y:hidden;
}
.result-html table{
  width:100%;
  margin:12px 0;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid #dfe8f7;
  border-radius:14px;
  background:#fff;
}
.result-html thead th{
  background:#f8fbff;
  color:#53637e;
  font-size:12px;
  font-weight:800;
}
.result-html th,
.result-html td{
  padding:10px 12px;
  border-bottom:1px solid #edf2fb;
  text-align:left;
  vertical-align:top;
  line-height:1.7;
}
.result-html tr:last-child th,
.result-html tr:last-child td{
  border-bottom:0;
}
.result-html th{
  width:118px;
  color:#5d6c86;
  font-size:12px;
  font-weight:800;
  background:#fbfdff;
}
.result-html td{
  color:#1d2a44;
  font-size:13px;
}
.card-row{
  display:grid;
  grid-template-columns:108px 1fr;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #edf2fb;
}
.card-row:last-child{border-bottom:0}
.card-label{font-size:13px;font-weight:800;color:#51617d}
.card-value{font-size:13px;color:#25324c;line-height:1.6}
.result-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #f0d8d2;
  background:#fff8f7;
}
.result-notice-warning{
  border-color:#f3e0b5;
  background:#fffdf6;
}
.result-notice-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.result-notice-copy strong{
  color:#7c2d1f;
  font-size:13px;
  line-height:1.5;
}
.result-notice-warning .result-notice-copy strong{
  color:#8c6508;
}
.result-notice-copy span{
  color:#6a7892;
  font-size:12px;
  line-height:1.55;
}
.result-notice-btn{
  flex:0 0 auto;
  min-width:92px;
  height:36px;
  padding:0 14px;
  border:1px solid #d7e3f7;
  border-radius:10px;
  background:#fff;
  color:#2458d0;
  font-size:13px;
  font-weight:800;
  font-family:inherit;
  cursor:pointer;
}
.result-notice-btn:hover{
  background:#f7fbff;
  border-color:#bdd0f8;
}
.workspace-block--followup{display:none}
.feature-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:0}
.feature-card{
  border:1px solid #dfe8f7;border-radius:16px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);box-shadow:none;padding:14px 12px;min-height:84px;display:flex;flex-direction:column;justify-content:center;gap:6px
}
.feature-title{font-size:13px;font-weight:800;color:#2b56cf}
.feature-sub{font-size:12px;color:#8794a9;line-height:1.35}
.result-box.result-mode-slow .result-nav{
  background:linear-gradient(180deg,#f6fcf7 0%,#ffffff 100%);
  border-color:#d7ecdd;
}
.result-box.result-mode-slow .result-nav-item.active{
  border-color:#2f9d6e;
  background:#edf9f2;
  color:#1d7b52;
  box-shadow:0 0 0 3px rgba(47,157,110,.1);
}
.result-box.result-mode-slow .explain-section--solution{
  background:linear-gradient(180deg,#f9fdf9 0%,#ffffff 100%);
  border-color:#d8ebdc;
}
.result-box.result-mode-slow .step-badge{
  background:#edf9f2;
  color:#1d7b52;
}
.result-box.result-mode-exam .result-nav{
  background:linear-gradient(180deg,#fffaf0 0%,#ffffff 100%);
  border-color:#f0dfb7;
}
.result-box.result-mode-exam .result-nav-item.active{
  border-color:#d58a1a;
  background:#fff3db;
  color:#9a5b08;
  box-shadow:0 0 0 3px rgba(213,138,26,.12);
}
.result-box.result-mode-exam .explain-section{
  box-shadow:0 6px 16px rgba(134,88,17,.05);
}
.result-box.result-mode-exam .explain-section--solution,
.result-box.result-mode-exam .explain-section--method{
  background:linear-gradient(180deg,#fffdf7 0%,#ffffff 100%);
  border-color:#f3e1b3;
}
.result-box.result-mode-exam .step-card{
  border-color:#f3dfb0;
  background:linear-gradient(180deg,#fffdfa 0%,#ffffff 100%);
}
.result-box.result-mode-exam .step-badge{
  background:#fff3db;
  color:#9a5b08;
}
.result-box.result-mode-grading{
  background:linear-gradient(180deg,#fcfdff 0%,#ffffff 100%);
}
.result-box.result-mode-grading .result-html{
  display:grid;
  gap:14px;
}
.result-box.result-mode-grading .result-html > h2{
  margin:0;
  padding:0;
}
.result-box.result-mode-grading .result-html > h2 + *{
  margin-top:-4px;
}
.result-box.result-mode-grading .result-html > h2[id]{
  display:flex;
  align-items:center;
  gap:10px;
  padding:18px 18px 0;
  font-size:18px;
  font-weight:900;
  color:#18305f;
}
.result-box.result-mode-grading .result-html > h2[id]::before{
  content:"";
  width:8px;
  height:24px;
  border-radius:999px;
  background:linear-gradient(180deg,#2f66ff 0%,#6b85ff 100%);
  flex-shrink:0;
}
.result-box.result-mode-grading .result-html > h2[id^="section-"]{
  border:1px solid #dfe8f7;
  border-bottom:0;
  border-radius:20px 20px 0 0;
  background:#fff;
  box-shadow:0 8px 22px rgba(36,62,117,.05);
}
.result-box.result-mode-grading .result-html > h2[id="section-problem"],
.result-box.result-mode-grading .result-html > h2[id="section-answer"]{
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
  border-color:#d7e4fb;
}
.result-box.result-mode-grading .result-html > h2[id="section-type"],
.result-box.result-mode-grading .result-html > h2[id="section-route"]{
  background:linear-gradient(180deg,#fbfcff 0%,#ffffff 100%);
  border-color:#dfe8f7;
}
.result-box.result-mode-grading .result-html > h2[id="section-rubric"]{
  background:linear-gradient(180deg,#fbfcff 0%,#ffffff 100%);
}
.result-box.result-mode-grading .result-html > h2[id="section-score"]{
  background:linear-gradient(180deg,#fffaf3 0%,#ffffff 100%);
  border-color:#f3dfb2;
}
.result-box.result-mode-grading .result-html > h2[id="section-loss"]{
  background:linear-gradient(180deg,#fff8f8 0%,#ffffff 100%);
  border-color:#ffd9d3;
}
.result-box.result-mode-grading .result-html > h2[id="section-fast"]{
  background:linear-gradient(180deg,#fffdf6 0%,#ffffff 100%);
  border-color:#f3e2b4;
}
.result-box.result-mode-grading .result-html > h2[id="section-card"]{
  background:linear-gradient(180deg,#f7faff 0%,#ffffff 100%);
  border-color:#d7e3ff;
}
.result-box.result-mode-grading .result-html > h2[id] + p,
.result-box.result-mode-grading .result-html > h2[id] + ul,
.result-box.result-mode-grading .result-html > h2[id] + ol,
.result-box.result-mode-grading .result-html > h2[id] + table,
.result-box.result-mode-grading .result-html > h2[id] + blockquote{
  margin-top:0;
}
.result-box.result-mode-grading .result-html > h2[id] ~ p,
.result-box.result-mode-grading .result-html > h2[id] ~ ul,
.result-box.result-mode-grading .result-html > h2[id] ~ ol,
.result-box.result-mode-grading .result-html > h2[id] ~ table,
.result-box.result-mode-grading .result-html > h2[id] ~ blockquote{
  margin-left:0;
  margin-right:0;
}
.result-box.result-mode-grading .result-html > h2[id] + p,
.result-box.result-mode-grading .result-html > h2[id] + ul,
.result-box.result-mode-grading .result-html > h2[id] + ol,
.result-box.result-mode-grading .result-html > h2[id] + table,
.result-box.result-mode-grading .result-html > h2[id] + blockquote,
.result-box.result-mode-grading .result-html > h2[id] + div{
  border:1px solid #dfe8f7;
  border-top:0;
  border-radius:0 0 20px 20px;
  background:#fff;
  padding:0 18px 18px;
  box-shadow:0 8px 22px rgba(36,62,117,.05);
}
.result-box.result-mode-grading .result-html > h2[id="section-rubric"] + table{
  overflow:hidden;
  padding:0;
}
.result-box.result-mode-grading .result-html > h2[id="section-rubric"] + table th{
  width:auto;
}
.result-box.result-mode-grading .result-html > h2[id="section-rubric"] + table td,
.result-box.result-mode-grading .result-html > h2[id="section-rubric"] + table th{
  font-size:13px;
  line-height:1.7;
}
.result-box.result-mode-grading .result-html > h2[id="section-marking"] + ul,
.result-box.result-mode-grading .result-html > h2[id="section-marking"] + ol{
  list-style:none;
  padding:0 18px 18px;
}
.result-box.result-mode-grading .result-html > h2[id="section-marking"] + p{
  padding:0 18px 18px;
}
.result-box.result-mode-grading .result-html > h2[id="section-marking"] + ul li,
.result-box.result-mode-grading .result-html > h2[id="section-marking"] + ol li{
  margin:0 0 10px;
  padding:12px 14px;
  border:1px solid #dfe7f7;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.result-box.result-mode-grading .result-html > h2[id="section-loss"] + ul,
.result-box.result-mode-grading .result-html > h2[id="section-loss"] + ol{
  padding-left:20px;
}
.result-box.result-mode-grading .result-html > h2[id="section-fast"] + p,
.result-box.result-mode-grading .result-html > h2[id="section-fast"] + ul,
.result-box.result-mode-grading .result-html > h2[id="section-fast"] + ol{
  background:linear-gradient(180deg,#fffef9 0%,#ffffff 100%);
}
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ul,
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ol{
  list-style:none;
  padding:0 18px 18px;
}
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ul li,
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ol li{
  margin:0;
  padding:8px 0;
  border-bottom:1px solid #edf2fb;
}
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ul li:last-child,
.result-box.result-mode-grading .result-html > h2[id="section-card"] + ol li:last-child{
  border-bottom:0;
}
.result-box.result-mode-grading .result-html blockquote{
  border-left-color:#f0aa18;
  background:#fffaf0;
  color:#7a5411;
}
.result-box.result-mode-grading .result-html strong{
  color:#16305d;
}
.result-box.result-type-choice .result-type-badge{
  background:#eef6ff;
  border-color:#c8dcff;
  color:#1557c0;
}
.result-box.result-type-choice .result-type-note{
  background:linear-gradient(180deg,#f7fbff 0%,#ffffff 100%);
  border-color:#d7e6ff;
}
.result-box.result-type-choice .result-nav-item.active{
  border-color:#1d67dd;
  background:#edf5ff;
  color:#1557c0;
}
.result-box.result-type-choice .explain-section--solution{
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
  border-color:#d7e6ff;
}
.result-box.result-type-choice .step-badge{
  background:#eaf3ff;
  color:#175cc5;
}
.result-box.result-type-blank .result-type-badge{
  background:#f6f8ff;
  border-color:#dedcff;
  color:#5547bd;
}
.result-box.result-type-blank .result-type-note{
  background:linear-gradient(180deg,#fbfaff 0%,#ffffff 100%);
  border-color:#e6e0ff;
}
.result-box.result-type-blank .result-nav-item.active{
  border-color:#6558d8;
  background:#f1efff;
  color:#5547bd;
}
.result-box.result-type-blank .explain-section--check,
.result-box.result-type-blank .explain-section--solution{
  background:linear-gradient(180deg,#fcfbff 0%,#ffffff 100%);
  border-color:#e5dfff;
}
.result-box.result-type-blank .step-badge{
  background:#f1efff;
  color:#5b48be;
}
.result-box.result-type-solution .result-type-badge{
  background:#eefbf4;
  border-color:#d2eddc;
  color:#23734f;
}
.result-box.result-type-solution .result-type-note{
  background:linear-gradient(180deg,#f8fdf9 0%,#ffffff 100%);
  border-color:#dcefe2;
}
.result-box.result-type-solution .result-nav-item.active{
  border-color:#2f8b60;
  background:#eef8f2;
  color:#23734f;
}
.result-box.result-type-solution .explain-section--solution{
  background:linear-gradient(180deg,#fbfefc 0%,#ffffff 100%);
  border-color:#dcefe2;
}
.result-box.result-type-solution .step-badge{
  background:#edf8f1;
  color:#23734f;
}
.chat-panel{
  padding:16px 16px 18px;
  display:flex;
  flex-direction:column;
  position:relative;
  top:auto;
  height:100%;
  max-height:none;
  border-color:#e7edf8;
  background:linear-gradient(180deg,#fcfdff 0%,#f7faff 100%);
  box-shadow:0 18px 38px rgba(28,52,97,.08);
}
.panel-header,.section-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.panel-header h3,.section-head h3{margin:0;font-size:16px;display:flex;align-items:center;gap:8px}
.chat-panel-title{
  min-width:0;
}
.assistant-hero{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 4px 10px 0;
  outline:none;
  overflow:visible;
}
.assistant-hero-copy{
  min-width:0;
  flex:1;
  padding-top:10px;
  padding-left:0;
}
.assistant-hero-head{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.assistant-hero-head h3{
  margin:0;
  font-size:17px;
  color:#182a4d;
}
.assistant-name{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  background:#eef4ff;
  border:1px solid #d7e4ff;
  color:#2457cb;
  font-size:12px;
  font-weight:800;
}
.assistant-hero-copy p{
  margin:5px 0 0;
  font-size:12px;
  line-height:1.62;
  color:#70809d;
}
.assistant-status-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}
.assistant-status-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2f66ff;
  box-shadow:0 0 0 6px rgba(47,102,255,.10);
}
.assistant-status-text{
  font-size:12px;
  font-weight:700;
  color:#31517f;
}
.assistant-bubble{
  position:absolute;
  left:10px;
  top:100%;
  margin-top:10px;
  max-width:238px;
  padding:10px 13px;
  border-radius:16px;
  background:rgba(34,54,95,.94);
  color:#fff;
  font-size:12px;
  line-height:1.55;
  box-shadow:0 14px 28px rgba(28,52,97,.18);
  opacity:0;
  transform:translateY(-6px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:4;
}
.assistant-bubble::before{
  content:"";
  position:absolute;
  left:18px;
  bottom:100%;
  border:6px solid transparent;
  border-bottom-color:rgba(34,54,95,.94);
}
.assistant-hero:hover .assistant-bubble,
.assistant-hero:focus-visible .assistant-bubble,
.assistant-hero.is-open .assistant-bubble{
  opacity:1;
  transform:translateY(0);
}
[data-assistant-state="thinking"] .assistant-status-dot{
  background:#4f46ff;
  box-shadow:0 0 0 7px rgba(79,70,255,.12);
}
[data-assistant-state="done"] .assistant-status-dot{
  background:#1aa96b;
  box-shadow:0 0 0 7px rgba(26,169,107,.12);
}
[data-assistant-state="celebrate"] .assistant-status-dot{
  background:#18a567;
  box-shadow:0 0 0 8px rgba(24,165,103,.14);
}
@keyframes assistantFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-3px)}
}
@keyframes assistantCelebrate{
  0%{opacity:0;transform:scale(.72)}
  35%{opacity:1;transform:scale(1)}
  100%{opacity:0;transform:scale(1.18)}
}
.chat-head-btn{
  flex:0 0 auto;
  min-width:78px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
}
.chat-head-btn span{
  white-space:nowrap;
}
.chat-head-btn svg{
  flex:0 0 auto;
}
.result-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.result-type-badge,
.result-mode-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid #d7e3f7;
  background:#fff;
  color:#35517e;
}
.result-type-badge{
  background:#eef4ff;
  border-color:#cfe0ff;
  color:#2450bf;
}
.result-mode-badge{
  background:#f8fbff;
}
.result-type-note{
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:14px;
  background:#f8fbff;
  border:1px solid #dfe8f7;
  color:#5c6d88;
  font-size:12px;
  line-height:1.6;
  font-weight:700;
}
.small-ghost,.select,.ghost-mini{height:34px;padding:0 12px;border-radius:10px;font-size:13px;font-weight:700;background:#fff}
.export-pdf-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-color:#cfe0f5;
  color:#2457cb;
}
.export-pdf-btn:hover{
  border-color:#9dbbff;
  background:#f4f8ff;
}
.chat-body{
  min-height:260px;
  max-height:none;
  flex:1;
  overflow-y:auto;
  border:1px solid #e8eef8;
  border-radius:20px;
  background:rgba(255,255,255,.9);
  padding:15px 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.chat-context{
  margin:0 0 6px;
  padding:12px 12px;
  border:1px solid #e8eef8;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);
}
.chat-context-label{
  font-size:11px;
  font-weight:900;
  color:#8a97ad;
  letter-spacing:.04em;
}
.chat-context-main{
  margin-top:5px;
  font-size:13px;
  font-weight:900;
  color:#20375e;
}
.chat-context-sub{
  margin-top:5px;
  font-size:12px;
  line-height:1.55;
  color:#73829c;
}
.chat-welcome{
  font-size:14px;
  line-height:1.8;
  color:#34415d;
}
.chat-welcome ul{margin:10px 0 0;padding-left:18px}
.diagnosis-demo{
  margin-bottom:14px;
  padding:12px;
  border:1px solid #dfe8f7;
  border-radius:14px;
  background:#fff;
}
.diagnosis-demo-head{
  margin-bottom:8px;
  color:#1d2a44;
  font-size:13px;
  font-weight:800;
}
.diagnosis-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid #e2eaf8;
  border-radius:12px;
  background:#fff;
}
.diagnosis-table + .diagnosis-table{
  margin-top:10px;
}
.diagnosis-table th,
.diagnosis-table td{
  padding:10px 12px;
  border-bottom:1px solid #edf2fb;
  vertical-align:top;
  text-align:left;
}
.diagnosis-table tr:last-child th,
.diagnosis-table tr:last-child td{
  border-bottom:0;
}
.diagnosis-table th{
  width:112px;
  color:#5c6c88;
  font-size:12px;
  font-weight:800;
  background:#f8fbff;
}
.diagnosis-table td{
  color:#1d2a44;
  font-size:13px;
  line-height:1.7;
}
.diagnosis-demo-note{
  margin:8px 0 0;
  padding:10px 12px;
  border-radius:12px;
  background:#f5f8ff;
  color:#3f57a6;
  font-size:12px;
  line-height:1.6;
}
.chat-msg{
  max-width:88%;
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:12px 14px;
  border-radius:18px;
  font-size:14px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
  box-shadow:none;
}
.chat-msg.user{
  align-self:flex-end;
  background:linear-gradient(180deg,#3269ff 0%,#255cf0 100%);
  color:#fff;
  border-bottom-right-radius:4px;
}
.chat-msg.ai,
.chat-msg.system{
  align-self:flex-start;
  background:linear-gradient(180deg,#ffffff 0%,#fcfdff 100%);
  color:#1d2a44;
  border:1px solid #e2eaf8;
  border-bottom-left-radius:4px;
}
.chat-msg .msg-time{
  font-size:11px;
  opacity:.72;
}
.chat-msg .msg-content p{margin:0 0 8px}
.chat-msg .msg-content p:last-child{margin-bottom:0}
.chat-msg .msg-content ul,
.chat-msg .msg-content ol{margin:8px 0;padding-left:20px}
.chat-msg .msg-content li{margin:4px 0}
.chat-msg .msg-content h1,
.chat-msg .msg-content h2,
.chat-msg .msg-content h3{
  margin:10px 0 6px;
  font-size:15px;
  line-height:1.45;
}
.chat-msg .msg-content hr{
  border:0;
  border-top:1px solid #edf2fb;
  margin:10px 0;
}
.chat-msg.user .msg-time{color:#eef3ff}
.chat-msg.ai .msg-time,
.chat-msg.system .msg-time{color:#7a859a}
.chat-typing{
  display:flex;
  align-items:center;
  gap:4px;
  padding:10px 14px;
  background:#fff;
  border:1px solid #dfe8fb;
  border-radius:16px;
  align-self:flex-start;
}
.chat-typing span{
  width:6px;height:6px;border-radius:50%;
  background:#2f66ff;
  animation:typing 1.4s infinite;
}
.chat-typing span:nth-child(2){animation-delay:.2s}
.chat-typing span:nth-child(3){animation-delay:.4s}
@keyframes typing{
  0%,60%,100%{opacity:.35;transform:scale(1)}
  30%{opacity:1;transform:scale(1.2)}
}
.chat-suggestion-panel{
  margin-top:0;
  padding:0 2px;
  border:0;
  border-radius:0;
  background:transparent;
}
.chat-suggestion-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  padding:0 2px;
}
.chat-suggestion-head span{
  font-size:12px;
  font-weight:800;
  color:#4e6081;
  letter-spacing:0;
}
.chat-suggestion-head em{
  font-style:normal;
  font-size:11px;
  color:#8c9ab4;
}
.chat-suggestion-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.chat-compose{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #e8eef8;
}
.chat-input-row{display:flex;align-items:flex-end;gap:10px;margin-top:12px}
.chat-input-row input{
  flex:1;height:44px;border-radius:15px;border:1px solid #dde6f4;padding:0 14px;font-size:14px;color:#22314d;background:#fff;outline:none
}
.chat-input-row input:focus{border-color:#8fb0ff;box-shadow:0 0 0 4px rgba(47,102,255,.08)}
.send-btn{width:92px;height:44px;border-radius:15px;background:linear-gradient(180deg,#3269ff 0%,#2158ef 100%);color:#fff;border-color:transparent;font-weight:800}
.chat-inline-image{
  position:relative;
  display:inline-flex;
  flex-direction:column;
  gap:8px;
}
.chat-inline-image img{
  display:block;
  max-width:min(100%,320px);
  max-height:360px;
  border-radius:12px;
  border:1px solid #d8e3f3;
  object-fit:contain;
  background:#fff;
}
.chat-inline-image.pending{
  padding-top:8px;
}
.chat-inline-remove{
  position:absolute;
  top:12px;
  right:12px;
  width:28px;
  height:28px;
  border:0;
  border-radius:50%;
  background:rgba(24,35,59,.78);
  color:#fff;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  z-index:2;
  box-shadow:0 6px 12px rgba(24,35,59,.18);
}
.chat-inline-caption{
  font-size:12px;
  color:#5d6b86;
  line-height:1.4;
}
.recognized-problem{
  width:100%;
}
.recognized-problem-title{
  margin-bottom:10px;
  font-size:14px;
  font-weight:800;
  color:#1e2d4c;
}
.recognized-problem-body{
  font-size:14px;
  color:#25324c;
  line-height:1.8;
}
.recognized-problem-body .katex-display{
  margin:12px 0;
  overflow-x:auto;
  overflow-y:hidden;
}
.recognized-problem-body > div{
  margin:6px 0;
}
.quick-pill{
  min-height:32px;
  width:100%;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  line-height:1.25;
  text-align:center;
  color:#4a618f;
  background:#fff;
  border:1px solid #e3ebf7;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:all .18s ease;
}
.quick-pill:hover{
  border-color:#c9daf9;
  background:#f7faff;
  color:#294fba;
  box-shadow:none;
}
.right-panel{padding:16px 16px 14px}
.diagnosis-panel{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.diagnosis-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.diagnosis-item{
  min-height:70px;
  border:1px solid #dfe8f7;
  border-radius:14px;
  padding:12px;
  background:#fff;
}
.diagnosis-item span{
  display:block;
  margin-bottom:8px;
  font-size:12px;
  color:#7a879e;
  font-weight:700;
}
.diagnosis-item strong{
  display:block;
  font-size:14px;
  color:#1e2d4c;
  line-height:1.35;
}
.diagnosis-note{
  margin:12px 0 0;
  padding:12px;
  border-radius:14px;
  background:#edf4ff;
  color:#405fbc;
  font-size:13px;
  line-height:1.65;
}
.stat-card{background:#fff;border-radius:14px;padding:14px 12px;border:1px solid #dbe6f6;min-height:88px}
.stat-label{font-size:13px;color:#5c6c88;margin-bottom:14px;font-weight:600}
.stat-value{font-size:24px;font-weight:800;line-height:1}
.stat-value.small{font-size:13px}
.stat-value.blue{color:#235efb}.stat-value.green{color:#20a35f}.stat-value.red{color:#ef5a5a}.stat-value.dark{color:#1f2d4d}
.stat-value small{font-size:13px;font-weight:700;color:#5c6c88}
.bar-row{display:grid;grid-template-columns:78px 1fr 40px;gap:10px;align-items:center}
.bar-row span,.bar-row em{font-size:13px;color:#52637f;font-style:normal}
.bar{height:8px;border-radius:999px;background:#edf2fb;overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#3f7dff,#5d92ff)}
.wrong-item{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:#5b6a87;padding:3px 0;border-bottom:1px solid #f1f4f8}
.wrong-item:last-child{border-bottom:0}
.tag{display:inline-flex;align-items:center;gap:6px;color:#ff5a5a;font-weight:700}
.advice-panel{background:#fbfdff;border-radius:16px;border:1px solid #edf2fb;padding:14px}
.advice-panel p{margin:0;color:#5c6c88;font-size:13px;line-height:1.7}
.ghost-mini{margin-top:12px;border-color:#cfe0f5;color:#3d64e8}

@media (max-width: 1280px){
  :root{
    --chat-column-width:340px;
    --chat-top-offset:72px;
  }
  .feature-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width: 1024px){
  .content-grid{
    display:block;
    padding:14px;
    min-height:auto;
  }
  .chat-column{
    position:static;
    right:auto;
    width:auto;
    min-width:0;
    height:auto;
    margin-top:16px;
  }
  .split-resizer{
    display:none;
    right:auto;
    top:auto;
    height:auto;
  }
  .chat-panel{
    position:static;
    height:auto;
    max-height:none;
    box-shadow:0 12px 28px rgba(28,52,97,.06);
  }
  .chat-body{
    min-height:240px;
    max-height:420px;
    flex:none;
  }
}

@media (max-width: 560px){
  .app-shell{flex-direction:column}
  .sidebar{
    width:100%;
    min-width:0;
    border-right:0;
    border-bottom:1px solid var(--line);
    padding:12px;
    gap:10px;
  }
  .brand{padding:2px 4px 10px}
  .sidebar-nav{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    padding-top:0;
  }
  .nav-item{
    padding:11px 10px;
    justify-content:flex-start;
    font-size:13px;
  }
  .sidebar-online{display:none}
  .main{min-width:0}
  .chat-body{
    min-height:220px;
    max-height:360px;
    flex:none;
  }
}

@media (max-width: 768px){
  .topbar{
    height:auto;
    padding:14px 14px;
    gap:12px;
    align-items:flex-start;
    flex-direction:column;
  }
  .topbar-title{
    font-size:16px;
    line-height:1.3;
  }
  .topbar-actions{
    width:100%;
    justify-content:space-between;
    flex-wrap:wrap;
  }
  .ghost-btn,.primary-btn{
    flex:1 1 140px;
    justify-content:center;
  }
  .content-grid{
    padding:12px;
    gap:12px;
  }
  .upload-panel,.chat-panel,.right-panel,.advice-panel{
    padding:14px;
  }
  :root{
  }
  .upload-drop.has-file{
    grid-template-columns:1fr;
    align-items:flex-start;
  }
  .upload-drop.has-file .upload-preview{
    width:100%;
    max-height:260px;
  }
  .upload-drop.has-file .upload-actions{
    width:100%;
    align-items:stretch;
  }
  .grading-input-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .upload-actions{
    flex-direction:column;
    width:100%;
  }
  .feature-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .workspace-block{
    padding:12px;
  }
  .result-nav{
    padding:10px;
    gap:8px;
  }
  .result-nav-item{
    flex:1 1 calc(50% - 8px);
    justify-content:center;
  }
  .mode-selector{
    grid-template-columns:1fr;
  }
  .mode-card{
    min-height:74px;
  }
  .chat-suggestion-grid{grid-template-columns:1fr}
  .chat-input-row{
    flex-direction:column;
  }
  .send-btn{
    width:100%;
  }
  .quick-pill{width:100%;justify-content:center}
  .explain-section{
    padding:16px 14px 14px;
    border-radius:18px;
  }
  .explain-section-head h2{
    font-size:16px;
  }
  .assistant-hero-copy{
    padding-top:8px;
  }
  .assistant-bubble{
    left:6px;
    max-width:210px;
  }
}

@media (max-width: 480px){
  :root{
    --chat-column-width:auto;
    --chat-top-offset:72px;
  }
  .sidebar-nav{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .nav-item{
    padding:10px 8px;
    font-size:12px;
  }
  .nav-icon{
    width:16px;
    height:16px;
    font-size:16px;
  }
  .upload-drop{
    min-height:220px;
    padding:20px 14px;
  }
  .upload-actions{
    width:100%;
  }
  .upload-title{
    font-size:16px;
  }
  .grading-input-tabs{
    grid-template-columns:1fr;
  }
  .grading-card-head--stack{
    flex-direction:column;
  }
  .grading-panel-copy{
    max-width:none;
  }
  .fixed-compose{
    padding:12px;
  }
  .latex-hidden{
    min-height:84px;
  }
  .feature-row{
    grid-template-columns:1fr;
  }
  .card-row{
    grid-template-columns:1fr;
  }
  .diagnosis-grid{
    grid-template-columns:1fr;
  }
}

@media print{
  @page{
    size:A4;
    margin:14mm 12mm;
  }
  html,body{
    height:auto!important;
    overflow:visible!important;
    background:#fff!important;
    color:#111827!important;
  }
  body.pdf-export-active .sidebar,
  body.pdf-export-active .topbar,
  body.pdf-export-active .chat-column,
  body.pdf-export-active .result-nav,
  body.pdf-export-active .result-type-note,
  body.pdf-export-active .result-focus-strip,
  body.pdf-export-active .export-pdf-btn,
  body.pdf-export-active .structure-warning,
  body.pdf-export-active .structure-ok{
    display:none!important;
  }
  body.pdf-export-active .app-shell,
  body.pdf-export-active .main,
  body.pdf-export-active .content-grid,
  body.pdf-export-active .center-column,
  body.pdf-export-active .upload-panel{
    display:block!important;
    min-height:0!important;
    width:100%!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
  }
  body.pdf-export-active .workspace-block--upload,
  body.pdf-export-active .workspace-block--compose,
  body.pdf-export-active .workspace-block--followup,
  body.pdf-export-active #resultNotice{
    display:none!important;
  }
  body.pdf-export-active .workspace-block{
    border:0!important;
    box-shadow:none!important;
    background:#fff!important;
    padding:0!important;
    margin:0!important;
  }
  body.pdf-export-active .result-box{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body.pdf-export-active .section-head{
    padding:0 0 10px!important;
    margin:0 0 14px!important;
    border-bottom:1px solid #d1d5db!important;
  }
  body.pdf-export-active .section-head h3{
    font-size:20px!important;
    color:#111827!important;
  }
  body.pdf-export-active .result-meta{
    gap:6px!important;
  }
  body.pdf-export-active .result-type-badge,
  body.pdf-export-active .result-mode-badge{
    min-height:24px!important;
    padding:0 8px!important;
    border:1px solid #d1d5db!important;
    background:#fff!important;
    color:#374151!important;
    font-size:11px!important;
  }
  body.pdf-export-active .result-html{
    font-size:12px!important;
    line-height:1.65!important;
    color:#111827!important;
  }
  body.pdf-export-active .explain-section{
    break-inside:avoid;
    page-break-inside:avoid;
    margin:0 0 10px!important;
    padding:10px 0 8px!important;
    border:0!important;
    border-top:1px solid #e5e7eb!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body.pdf-export-active .explain-section-head{
    margin:0 0 8px!important;
    padding:0!important;
    border:0!important;
  }
  body.pdf-export-active .explain-section-head h2{
    font-size:15px!important;
    color:#111827!important;
  }
  body.pdf-export-active .step-card{
    break-inside:avoid;
    page-break-inside:avoid;
    margin:0 0 8px!important;
    padding:8px 0!important;
    border:0!important;
    border-top:1px dashed #e5e7eb!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  body.pdf-export-active .step-badge{
    min-width:0!important;
    height:22px!important;
    padding:0 8px!important;
    background:#f3f4f6!important;
    color:#374151!important;
    font-size:10px!important;
  }
  body.pdf-export-active table{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  body.pdf-export-active .katex-display{
    break-inside:avoid;
    page-break-inside:avoid;
    margin:8px 0 10px!important;
    padding:4px 0!important;
    overflow:visible!important;
  }
}
