/* 学习端 H5 样式（企微内打开，移动优先） */
:root {
  --brand: #6b4eff;
  --brand-dark: #5538e0;
  --brand-soft: #f0edff;
  --ok: #12a150;
  --warn: #d97706;
  --err: #dc2626;
  --text: #1f2430;
  --sub: #6b7280;
  --line: #e8eaef;
  --bg: #f4f5f8;
  --card: #fff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7;
  padding-bottom: 84px;
}
[v-cloak] { display: none; }

.m-head {
  background: linear-gradient(135deg, var(--brand), #8b6bff); color: #fff;
  padding: 18px 16px 22px; position: sticky; top: 0; z-index: 20;
}
.m-head .t { font-size: 18px; font-weight: 700; }
.m-head .s { font-size: 12px; opacity: .88; margin-top: 2px; }
.m-head.plain { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.m-head.plain .back { cursor: pointer; font-size: 22px; line-height: 1; margin-right: 6px; }
.m-head.plain .row { display: flex; align-items: center; gap: 4px; }

.m-wrap { padding: 12px; max-width: 720px; margin: 0 auto; }
.m-card {
  background: var(--card); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.m-card .h { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.m-meta { color: var(--sub); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.m-task { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.m-task .ic {
  width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex: 0 0 42px;
}
.m-task .info { flex: 1; min-width: 0; }
.m-task .info .h { font-size: 15px; font-weight: 600; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-task .arrow { color: #c3c8d2; font-size: 20px; }

.m-tag {
  display: inline-block; padding: 0 8px; border-radius: 9px; font-size: 11px; line-height: 18px;
}
.m-tag.gray { background: #f3f4f6; color: #6b7280; }
.m-tag.blue { background: #eff6ff; color: #1d4ed8; }
.m-tag.green { background: #ecfdf5; color: #047857; }
.m-tag.orange { background: #fffbeb; color: #b45309; }
.m-tag.red { background: #fef2f2; color: #b91c1c; }

.m-bar { height: 6px; background: #eef0f4; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.m-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.m-bar.green i { background: var(--ok); }
.m-bar.red i { background: var(--err); }

/* 底部固定操作栏 */
.m-foot {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; z-index: 30; max-width: 720px; margin: 0 auto;
}
.m-btn {
  flex: 1; border: 0; border-radius: 9px; padding: 12px; font-size: 15px; font-weight: 600;
  background: var(--brand); color: #fff; cursor: pointer;
}
.m-btn:active { background: var(--brand-dark); }
.m-btn:disabled { background: #c9ced8; cursor: not-allowed; }
.m-btn.ghost { background: #f3f4f6; color: var(--text); }
.m-btn.ok { background: var(--ok); }
.m-btn.danger { background: var(--err); }

/* 课程正文 */
.m-doc { background: #fff; border-radius: 12px; padding: 18px 16px; }
.m-doc h2 {
  font-size: 16px; margin: 20px 0 10px; padding-left: 10px;
  border-left: 3px solid var(--brand);
}
.m-doc h2:first-child { margin-top: 0; }
.m-doc h3 { font-size: 15px; margin: 16px 0 8px; }
.m-doc p { margin: 8px 0; }
.m-doc ul, .m-doc ol { margin: 8px 0; padding-left: 22px; }
.m-doc li { margin: 5px 0; }
.m-doc blockquote {
  margin: 10px 0; padding: 10px 14px; background: #fafafa;
  border-left: 3px solid #d1d5db; color: #4b5563; font-size: 14px;
}
.m-doc a { color: var(--brand); word-break: break-all; }
.m-doc img { max-width: 100%; border-radius: 8px; }
.m-video {
  display: flex; align-items: center; gap: 10px; background: var(--brand-soft);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; color: var(--brand-dark);
  text-decoration: none; font-size: 14px; font-weight: 600;
}

/* 考试 */
.m-q { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.m-q .no { font-size: 12px; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.m-q .stem { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.m-opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 14px;
  transition: all .12s;
}
.m-opt .k {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid #cfd4de; flex: 0 0 24px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #6b7280;
}
.m-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.m-opt.on .k { background: var(--brand); border-color: var(--brand); color: #fff; }
.m-opt.right { border-color: var(--ok); background: #ecfdf5; }
.m-opt.right .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.m-opt.wrong { border-color: var(--err); background: #fef2f2; }
.m-opt.wrong .k { background: var(--err); border-color: var(--err); color: #fff; }
.m-exp {
  margin-top: 10px; padding: 10px 12px; background: #fafafa; border-radius: 8px;
  font-size: 13px; color: #4b5563;
}
.m-progress {
  position: sticky; top: 0; z-index: 25; background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 16px; font-size: 13px; display: flex; align-items: center; gap: 10px;
}
.m-progress .bar { flex: 1; height: 6px; background: #eef0f4; border-radius: 3px; overflow: hidden; }
.m-progress .bar i { display: block; height: 100%; background: var(--brand); }

/* 成绩 */
.m-result { text-align: center; padding: 26px 16px 20px; }
.m-result .score { font-size: 52px; font-weight: 800; line-height: 1; }
.m-result .score.pass { color: var(--ok); }
.m-result .score.fail { color: var(--err); }
.m-result .lab { color: var(--sub); font-size: 13px; margin-top: 6px; }
.m-result .msg { margin-top: 12px; font-size: 15px; font-weight: 600; }

.m-empty { text-align: center; padding: 60px 20px; color: var(--sub); }
.m-empty .big { font-size: 40px; margin-bottom: 10px; }

.m-note {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 9px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}
.m-note.blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.m-note.red { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.lx-toast {
  position: fixed; left: 50%; top: 20px; transform: translate(-50%, -20px); z-index: 999;
  background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; max-width: 84vw;
}
.lx-toast.show { opacity: 1; transform: translate(-50%, 0); }
.lx-toast.ok { background: var(--ok); }
.lx-toast.err { background: var(--err); }

.m-loading { text-align: center; padding: 40px 16px; color: var(--sub); font-size: 13px; }
