.learning-center { min-height: 560px; }
.learning-center { --learning-border:#e2e8f0; line-height:1.65; }
.learning-center .learning-head { padding:8px 0 24px; border-bottom:1px solid var(--learning-border); }
.learning-center .learning-head h2 { margin:0 0 6px; letter-spacing:.02em; }
.learning-center .learning-head > .row { flex-wrap:wrap; gap:8px; }
.learning-center #learningHome > h3 { font-size:17px; margin:22px 0 14px; }
.learning-center .learning-grid { align-items:start; gap:18px; }
.learning-center .learning-item { padding:20px; border-radius:16px; background:#fff; box-shadow:0 3px 14px #0f172a06; min-width:0; overflow-wrap:anywhere; }
.learning-center .learning-item h4 { font-size:17px; line-height:1.5; margin:12px 0 8px; }
.learning-center .learning-item-actions { padding-top:14px; border-top:1px solid #eef2f7; }
.learning-center .learning-panel-head { align-items:center; padding-bottom:16px; border-bottom:1px solid var(--learning-border); }
.learning-center .learning-panel-head h3 { margin:0; }
.learning-center .learning-form-grid :is(input:not([type=checkbox]),textarea,select) { box-sizing:border-box; width:100%; min-width:0; padding:10px 12px; border:1px solid #cbd5e1; border-radius:9px; font:inherit; }
.learning-center .question-toolbar { gap:10px; padding:16px 0; }
.learning-center .question-toolbar strong { margin-right:auto; }
.learning-prompt { display:block; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.75; margin:8px 0 12px; }
.learning-original-options { padding:0 0 0 30px; margin:12px 0 16px; }
.learning-original-options li { padding:8px 12px; margin:6px 0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.learning-center .result-answer { padding:22px; border-radius:14px; }
.learning-center .result-answer p { white-space:pre-wrap; overflow-wrap:anywhere; margin:10px 0; }
.learning-center .quiz-score { padding:20px 24px; border:1px solid #c7d2fe; border-radius:14px; background:#eef2ff; }
.learning-center .learning-answer-table table { width:100%; }
.learning-center .learning-answer-table td { vertical-align:top; padding:14px; }
.learning-center .learning-answer-table th { padding:12px 14px; text-align:left; background:#f8fafc; }
.learning-center .learning-answer-table td:first-child { min-width:220px; }
.learning-upload-list { display:grid; gap:10px; margin:12px 0; }
.learning-upload-file { display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:8px 16px; padding:14px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; }
.learning-upload-file strong { overflow-wrap:anywhere; color:#334155; }
.learning-upload-file span { grid-column:1/-1; font-size:13px; }
.learning-upload-file progress { width:100%; align-self:center; accent-color:#4f46e5; }
.learning-upload-file.is-error { border-color:#fca5a5; color:#b91c1c; }
.learning-upload-file.is-success span { color:#047857; }
.learning-upload-summary { color:#334155; font-weight:600; margin-top:12px; }
#tab-learning .lc-section-head, #tab-learning .lc-row { gap:12px; flex-wrap:wrap; }
#tab-learning .lc-row > span { min-width:0; overflow-wrap:anywhere; }
#tab-learning .lc-q { line-height:1.7; }
@media (max-width:700px) {
  .learning-center .learning-grid { grid-template-columns:minmax(0,1fr); }
  .learning-center .learning-head > .row { width:100%; }
  .learning-center .question-toolbar strong { width:100%; }
  .learning-center .question-toolbar button { flex:1 1 40%; min-height:42px; }
  .learning-center .learning-panel-head { align-items:stretch; }
  .learning-upload-file { grid-template-columns:minmax(0,1fr); }
  .learning-center .learning-answer-table table, .learning-center .learning-answer-table tbody, .learning-center .learning-answer-table tr, .learning-center .learning-answer-table td { display:block; width:auto; }
  .learning-center .learning-answer-table thead { display:none; }
  .learning-center .learning-answer-table tr { border:1px solid #e2e8f0; border-radius:12px; margin-bottom:14px; padding:8px; }
  .learning-center .learning-answer-table td { border:0; padding:8px; min-width:0; }
  .learning-center .learning-answer-table td:nth-child(2)::before { content:'参考答案：'; color:#64748b; }
  .learning-center .learning-answer-table td:nth-child(3)::before { content:'得分：'; color:#64748b; }
  .learning-center .learning-answer-table td:nth-child(4)::before { content:'批语：'; color:#64748b; }
}
.learning-head, .learning-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.learning-head p, .learning-panel-head p { margin:0; }
.learning-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.learning-item { border:1px solid #e2e8f0; border-radius:12px; padding:16px; background:linear-gradient(145deg,#fff,#f8fafc); }
.learning-item h4 { margin:8px 0 6px; color:#0f172a; }
.learning-item p { margin:4px 0; white-space:pre-wrap; }
.learning-item-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.learning-item-actions button { padding:6px 10px; font-size:13px; }
.learning-file-list { display:flex; flex-direction:column; gap:8px; margin:12px 0; }
.learning-file-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; }
.learning-file-name { min-width:0; overflow-wrap:anywhere; }
.learning-file-actions { display:flex; flex:0 0 auto; flex-wrap:wrap; gap:6px; }
.learning-file-actions button { padding:4px 9px; font-size:12px; }
.learning-preview-modal { position:fixed; inset:0; z-index:12000; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(15,23,42,.55); }
.learning-preview-modal.hidden { display:none; }
.learning-preview-dialog { width:min(1100px,96vw); height:min(820px,92vh); display:flex; flex-direction:column; padding:18px; border-radius:14px; background:#fff; box-shadow:0 24px 60px rgba(15,23,42,.28); }
.learning-preview-dialog .learning-panel-head { margin-bottom:12px; }
.learning-preview-dialog h3 { min-width:0; margin:0; overflow-wrap:anywhere; }
.learning-preview-body { flex:1; min-height:0; overflow:auto; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; }
.learning-preview-body iframe { width:100%; height:100%; min-height:600px; border:0; background:#fff; }
.learning-markdown-preview { min-height:100%; margin:0; padding:20px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; color:#0f172a; font:14px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; background:#fff; }
.learning-panel { max-width:960px; margin:0 auto; }
.learning-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:16px; }
.learning-form-grid label { display:flex; flex-direction:column; gap:5px; font-weight:600; }
.learning-form-grid label.wide { grid-column:1/-1; }
.learning-form-grid label.check { flex-direction:row; align-items:center; font-weight:500; }
.question-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 0; border-top:1px solid #e2e8f0; }
.question-editor, .take-question, .review-submission, .result-answer { border:1px solid #e2e8f0; border-radius:10px; padding:16px; margin-bottom:14px; background:#fff; }
.question-editor-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.question-editor textarea, .question-editor input, .question-editor select { width:100%; }
.question-editor-grid { display:grid; grid-template-columns:2fr 1fr; gap:10px; }
.question-editor-grid .wide { grid-column:1/-1; }
#quizEditor .question-editor { padding:22px; border-radius:16px; box-shadow:0 3px 12px rgba(15,23,42,.04); }
#quizEditor .question-editor-head { padding-bottom:14px; border-bottom:1px solid #e2e8f0; margin-bottom:18px; }
#quizEditor .question-editor-head strong { font-size:16px; color:#4338ca; }
#quizEditor .question-editor-grid { gap:16px; }
#quizEditor .question-editor-grid > label { display:flex; flex-direction:column; gap:8px; font-weight:600; }
#quizEditor textarea { box-sizing:border-box; resize:vertical; line-height:1.6; min-width:0; }
#quizEditor .qe-score-field { max-width:160px; }
#quizEditor .qe-section { border-top:1px solid #eef2f7; padding-top:16px; }
#quizEditor .qe-section-head, #quizEditor .qe-blank-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
#quizEditor .muted { font-size:13px; line-height:1.6; font-weight:400; margin-top:0; margin-bottom:0; }
#quizEditor .qe-option-list, #quizEditor .qe-reference-list { display:grid; gap:10px; margin-bottom:12px; }
#quizEditor .qe-option-row, #quizEditor .qe-reference-row { display:flex; align-items:center; gap:12px; padding:12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; }
#quizEditor .qe-option-row.is-correct { border-color:#34d399; background:#ecfdf5; }
#quizEditor .qe-option-check { display:flex; align-items:center; gap:10px; cursor:pointer; flex-shrink:0; padding:8px 0; }
#quizEditor .qe-option-correct { width:18px; height:18px; margin:0; accent-color:#059669; cursor:pointer; }
#quizEditor .qe-option-letter, #quizEditor .qe-reference-number { display:grid; place-items:center; min-width:28px; height:28px; border-radius:7px; background:#e0e7ff; color:#4338ca; font-weight:700; }
#quizEditor .qe-option-text, #quizEditor .qe-reference-text { flex:1; width:0; background:#fff; }
#quizEditor .qe-option-row button, #quizEditor .qe-reference-row button { flex-shrink:0; font-size:12px; padding:6px 8px; }
#quizEditor button:disabled { opacity:.4; cursor:not-allowed; }
#quizEditor :is(input, textarea, select, button):focus-visible { outline:2px solid #6366f1; outline-offset:3px; }
#quizEditor [hidden] { display:none !important; }
#quizEditor .qe-preview { margin-top:18px; border-top:1px dashed #cbd5e1; padding-top:12px; }
#quizEditor .qe-preview summary { cursor:pointer; color:#4f46e5; font-size:13px; width:fit-content; }
#quizEditor .qe-preview-body { margin-top:12px; padding:16px; border-radius:10px; background:#f8fafc; }
#quizEditor .qe-preview-prompt, #quizEditor .qe-preview-option { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
#quizEditor .qe-preview-prompt { font-weight:600; margin-bottom:10px; }
#quizEditor .qe-preview-option { padding:7px 10px; margin-top:6px; border-radius:6px; background:#fff; }
#quizEditor .qe-preview-option.is-correct { background:#ecfdf5; color:#065f46; }
#quizEditor .qe-correct-tag { display:inline-block; margin-left:12px; font-size:12px; color:#047857; }
#quizEditor .qe-preview-answer { border:1px dashed #cbd5e1; border-radius:6px; padding:16px; color:#64748b; }
#quizEditor .has-error { border-color:#ef4444; }
#quizEditor .qe-error { color:#b91c1c; margin:12px 0 0; font-size:13px; }
#quizEditor .quiz-editor-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px; border:1px solid #e2e8f0; background:#f8fafc; border-radius:12px; }
@media (max-width:700px) {
  #quizEditor .question-editor { padding:14px; }
  #quizEditor .qe-option-row, #quizEditor .qe-reference-row { gap:8px; padding:8px; flex-wrap:wrap; }
  #quizEditor .qe-option-text, #quizEditor .qe-reference-text { min-width:120px; }
}
.option-answer { display:block; margin:8px 0; padding:10px; border:1px solid #e2e8f0; border-radius:8px; cursor:pointer; }
.option-answer:hover { border-color:#4f46e5; background:#eef2ff; }
.option-answer input { margin-right:8px; }
.quiz-score { font-size:28px; font-weight:800; color:#4f46e5; margin:10px 0 20px; }
.status-pill { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:700; background:#e2e8f0; }
.status-open { background:#dcfce7; color:#166534; }
.status-closed { background:#fee2e2; color:#991b1b; }
.status-draft { background:#fef3c7; color:#92400e; }
.learning-answer-table { overflow-x:auto; }
.stats-bar { height:8px; border-radius:999px; overflow:hidden; background:#e2e8f0; margin-top:6px; }
.stats-bar span { display:block; height:100%; background:#10b981; }
.review-score { width:90px !important; }
@media (max-width:700px) {
  .learning-head, .learning-panel-head { flex-direction:column; }
  .learning-form-grid, .question-editor-grid { grid-template-columns:1fr; }
  .learning-form-grid label.wide, .question-editor-grid .wide { grid-column:auto; }
  .learning-file-row { align-items:flex-start; flex-direction:column; }
  .learning-preview-modal { padding:8px; }
  .learning-preview-dialog { width:100%; height:96vh; padding:12px; }
}
