/* ============================================================
   移动端 · 样式（375px 设计，自适应）
   ============================================================ */
body { background: #e9edf5; }
.m-wrap { max-width: 430px; margin: 0 auto; min-height: 100vh; background: #f5f7fb; position: relative; box-shadow: 0 0 60px rgba(25, 40, 70, .12); }

/* ---------- 登录 ---------- */
.m-login {
  min-height: 100vh; padding: 34px 26px 28px; display: flex; flex-direction: column;
  background: linear-gradient(165deg, #2f6bf6 0%, #4f46e5 42%, #f5f7fb 42.1%, #f5f7fb 100%);
}
.m-login .brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.m-login .brand .badge { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg,#d92b3a,#9e1220); display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 1px solid rgba(255,255,255,.3); }
.m-login .brand b { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.m-login .brand span { display: block; font-size: 10.5px; opacity: .7; letter-spacing: 1px; }
.m-login h1 { color: #fff; font-size: 25px; line-height: 1.45; font-weight: 600; margin-top: 36px; }
.m-login .desc { color: rgba(255,255,255,.78); font-size: 12.5px; margin-top: 9px; line-height: 1.8; }
.m-login .card {
  background: #fff; border-radius: 18px; padding: 22px 20px; margin-top: 34px;
  box-shadow: 0 14px 40px rgba(25, 40, 70, .1); border: none;
}
.m-login .card h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.m-login .card .sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.m-login .input { height: 44px; border-radius: 11px; font-size: 14px; }
.m-login .btn { height: 44px; border-radius: 11px; margin-top: 4px; }
.m-login .tip { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.8; }
.m-login .foot { margin-top: auto; text-align: center; font-size: 11px; color: #a3aec1; padding-top: 20px; }

/* ---------- 顶栏 ---------- */
.m-header {
  height: 52px; display: flex; align-items: center; gap: 9px; padding: 0 16px;
  background: #fff; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
}
.m-header .badge { width: 27px; height: 27px; border-radius: 8px; background: linear-gradient(135deg,#d92b3a,#9e1220); display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; flex: none; }
.m-header .ttl { font-size: 14.5px; font-weight: 600; letter-spacing: .2px; }
.m-header .spacer { flex: 1; }
.m-header .hi-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); position: relative; }
.m-header .hi-btn:active { background: #f1f4fa; }
.m-header .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.m-nav-back { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); }
.m-nav-back:active { background: #f1f4fa; }

.m-body { padding: 14px 15px 84px; min-height: calc(100vh - 52px); }
.m-body.no-tab { padding-bottom: 28px; }

/* ---------- 底部 Tab ---------- */
.m-tabbar {
  position: fixed; bottom: 0; width: 100%; max-width: 430px; height: 58px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); z-index: 40; padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9aa7ba; font-size: 10.5px; position: relative; }
.m-tabbar a.active { color: var(--primary); }
.m-tabbar a.active .ico { stroke-width: 2.2; }
.m-tabbar a .badge-num { position: absolute; top: 4px; right: 22px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 9.5px; display: grid; place-items: center; }

/* ---------- 通用 ---------- */
.m-card { background: #fff; border-radius: 14px; padding: 15px 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.m-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.m-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.m-more { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.m-row { display: flex; align-items: center; gap: 10px; }
.m-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-muted { color: var(--muted); font-size: 11.5px; }
.m-list-item { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f2f5fa; }
.m-list-item:last-child { border-bottom: none; }
.m-badge-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }

/* 首页 */
.m-hero { border-radius: 16px; padding: 18px 18px 16px; color: #fff; background: linear-gradient(125deg, #2f6bf6, #5b4bf0 62%, #7c3aed); position: relative; overflow: hidden; }
.m-hero::after { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.1); right: -70px; top: -80px; }
.m-hero h2 { font-size: 18px; font-weight: 600; position: relative; }
.m-hero p { font-size: 11.8px; color: rgba(255,255,255,.8); margin-top: 5px; position: relative; }
.m-hero .grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; gap: 8px; position: relative; }
.m-hero .grid b { display: block; font-size: 17px; font-weight: 600; }
.m-hero .grid span { font-size: 10.5px; color: rgba(255,255,255,.72); }

.m-course-scroll { display: flex; gap: 11px; overflow-x: auto; padding-bottom: 4px; margin: 0 -15px; padding-left: 15px; padding-right: 15px; }
.m-course-scroll::-webkit-scrollbar { display: none; }
.m-course-item { width: 168px; flex: none; background: #fff; border-radius: 13px; overflow: hidden; border: 1px solid var(--line); }
.m-course-item .cv { height: 74px; padding: 11px 12px; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.4; display: flex; align-items: flex-end; }
.m-course-item .in { padding: 9px 12px 11px; }
.m-course-item .in .nm { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.m-todo { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f2f5fa; }
.m-todo:last-child { border-bottom: none; }
.m-todo .tx { flex: 1; min-width: 0; }
.m-todo .tx b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-todo .tx span { font-size: 11px; color: var(--muted); }

/* 课程详情 */
.m-cover { border-radius: 15px 15px 0 0; height: 118px; padding: 15px 16px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; }
.m-cover .cat { font-size: 10.5px; background: rgba(255,255,255,.2); padding: 2px 7px; border-radius: 5px; align-self: flex-start; margin-bottom: 6px; }
.m-cover .nm { font-size: 16px; font-weight: 600; line-height: 1.4; }

.m-chapter-title { padding: 10px 4px; font-size: 12.5px; color: var(--muted); background: #f8fafd; margin: 0 -16px; padding-left: 16px; }
.m-lesson { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #f4f7fb; }
.m-lesson:last-child { border-bottom: none; }
.m-lesson .nm { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 播放器 */
.m-player { background: #0d1526; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.m-stage { aspect-ratio: 16/10; display: grid; place-items: center; color: #fff; position: relative; background: radial-gradient(circle at 50% 42%, #233049, #0c1322 78%); }
.m-stage .pb { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.94); color: #12192a; display: grid; place-items: center; }
.m-stage .tt { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: rgba(255,255,255,.9); right: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-pbar { padding: 9px 13px; background: #0a1120; display: flex; align-items: center; gap: 9px; color: #9db0ca; font-size: 11px; }
.m-pbar .tr { flex: 1; height: 3px; background: #22304a; border-radius: 3px; overflow: hidden; }
.m-pbar .tr i { display: block; height: 100%; background: linear-gradient(90deg,#4a7bf7,#8b5cf6); }

/* 考试 */
.m-exam { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; margin-bottom: 10px; }
.m-exam .hd { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 8px; }
.m-exam .hd b { font-size: 13.8px; font-weight: 500; line-height: 1.5; flex: 1; }
.m-exam .meta { display: flex; gap: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; margin-bottom: 10px; }

.m-q { background: #fff; border-radius: 13px; padding: 16px; margin-bottom: 11px; }
.m-q .qh { display: flex; gap: 8px; margin-bottom: 12px; }
.m-q .qn { width: 23px; height: 23px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.m-q .qs { font-size: 13.5px; line-height: 1.75; flex: 1; }
.m-opt { display: flex; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; }
.m-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.m-opt.ok { border-color: #9fe3c3; background: var(--success-soft); }
.m-opt.no { border-color: #ffc4be; background: var(--danger-soft); }
.m-opt .k { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 11px; flex: none; background: #fff; }
.m-opt.sel .k { background: var(--primary); border-color: var(--primary); color: #fff; }

.m-timer { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.m-timer.warn { color: var(--danger); }

/* 成绩 */
.m-score { text-align: center; padding: 22px 16px; background: #fff; border-radius: 15px; margin-bottom: 12px; }
.m-score .v { font-size: 42px; font-weight: 600; line-height: 1; letter-spacing: -1px; }
.m-score .l { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* 我的 */
.m-mine-hero { background: linear-gradient(125deg,#2f6bf6,#6d4ef0); border-radius: 15px; padding: 18px; color: #fff; display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.m-mine-hero .av { width: 52px; height: 52px; border-radius: 15px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 17px; font-weight: 600; border: 1px solid rgba(255,255,255,.25); }
.m-mine-hero h3 { font-size: 16.5px; font-weight: 600; }
.m-mine-hero p { font-size: 11px; opacity: .8; margin-top: 2px; }
.m-menu-item { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #f2f5fa; font-size: 13.5px; }
.m-menu-item:last-child { border-bottom: none; }
.m-menu-item .ar { color: #c3cddd; margin-left: auto; }

.m-empty { text-align: center; padding: 46px 16px; color: var(--muted); font-size: 12.5px; }
.m-empty .ico { width: 36px; height: 36px; color: #c3cddd; margin-bottom: 8px; }

@media (min-width: 431px) {
  .m-wrap { margin: 0 auto; }
  .m-tabbar { left: 50%; transform: translateX(-50%); }
}
