/* 手机端专题练习 — 与参考图一致的蓝/青/红体系 */
:root {
  --zt-blue: #0091ff;
  --zt-blue-soft: #e8f4ff;
  --zt-teal: #48c9b0;
  --zt-red: #f1948a;
  --zt-text: #1a1a1a;
  --zt-sub: #8a8a8a;
  --zt-line: #ebebeb;
  --zt-bg: #f5f6f8;
  --zt-radius: 12px;
  --zt-safe-bottom: env(safe-area-inset-bottom, 0);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.zt-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--zt-text);
  background: var(--zt-bg);
  min-height: 100vh;
  padding-bottom: calc(72px + var(--zt-safe-bottom));
}

.zt-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
}

.zt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--zt-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.zt-header-title { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.zt-header-btn {
  width: 40px; height: 40px;
  border: none; background: none;
  font-size: 20px; color: var(--zt-text);
  cursor: pointer; border-radius: 8px;
}
.zt-header-btn:active { background: #f0f0f0; }

.zt-link { color: var(--zt-sub); font-size: 14px; text-decoration: none; }
.zt-link-blue { color: var(--zt-blue); }

.zt-tabs-seg {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
}
.zt-tab-seg {
  flex: 1;
  max-width: 160px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--zt-blue);
  background: #fff;
  color: var(--zt-blue);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.zt-tab-seg.on {
  background: var(--zt-blue);
  color: #fff;
}

.zt-tabs-underline {
  display: flex;
  border-bottom: 1px solid var(--zt-line);
  padding: 0 16px;
  background: #fff;
}
.zt-tab-u {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: var(--zt-sub);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}
.zt-tab-u.on { color: var(--zt-text); font-weight: 600; }
.zt-tab-u.on::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 3px;
  background: var(--zt-blue);
  border-radius: 2px;
}

.zt-sub-hint { padding: 8px 16px 12px; font-size: 13px; color: var(--zt-sub); background: #fff; }

.zt-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--zt-line);
}

.zt-btn-primary {
  display: block;
  width: calc(100% - 32px);
  margin: 16px auto;
  padding: 14px;
  border: none;
  border-radius: 24px;
  background: var(--zt-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.zt-btn-primary:active { opacity: 0.9; }

.zt-footer-fixed {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px calc(10px + var(--zt-safe-bottom));
  background: #fff;
  border-top: 1px solid var(--zt-line);
  z-index: 30;
}

.zt-grid-grades { padding: 8px 16px 100px; }
.zt-section-title { font-size: 15px; font-weight: 700; margin: 16px 0 10px; }
.zt-grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.zt-grade-btn {
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #eee;
  color: #444;
  font-size: 15px;
  cursor: pointer;
}
.zt-grade-btn.on {
  background: var(--zt-blue-soft);
  border-color: var(--zt-blue);
  color: var(--zt-blue);
}

/* 首页 */
.zt-home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #0d7eea 0%, #0091ff 100%);
  color: #fff;
}
.zt-pill-grade {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.95);
  color: var(--zt-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.zt-countdown { font-size: 13px; opacity: 0.95; }
.zt-countdown em { color: #ff6b6b; font-style: normal; font-weight: 700; }

.zt-banner {
  height: 120px;
  background: linear-gradient(180deg, #0091ff 60%, #e8f4ff 100%);
  position: relative;
  overflow: hidden;
}
.zt-banner-mascot {
  position: absolute;
  right: 16px;
  bottom: -8px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.zt-profile {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fff;
  margin-top: -24px;
  margin-left: 12px;
  margin-right: 12px;
  border-radius: var(--zt-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
}
.zt-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #e0e0e0;
  flex-shrink: 0;
}
.zt-name-row { font-size: 16px; font-weight: 600; }
.zt-badge-lv {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ff9800;
  color: #fff;
  font-size: 11px;
  vertical-align: middle;
}
.zt-profile-msg { font-size: 13px; color: var(--zt-sub); margin-top: 6px; }

.zt-stage-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
}
.zt-chip {
  padding: 6px 14px;
  border-radius: 16px;
  background: #eee;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
}
.zt-chip.on { background: var(--zt-blue-soft); border-color: var(--zt-blue); color: var(--zt-blue); }

.zt-subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  padding: 16px;
}
.zt-subject-item {
  text-align: center;
  text-decoration: none;
  color: var(--zt-text);
  font-size: 12px;
}
.zt-subject-icon {
  width: 100%;
  aspect-ratio: 1;
  max-height: 56px;
  margin: 0 auto 6px;
  border-radius: 12px;
  background: var(--zt-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--zt-blue);
}

.zt-block-title { padding: 8px 16px; font-size: 16px; font-weight: 700; }

.zt-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 6px;
}
.zt-bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--zt-sub);
  font-size: 11px;
  padding: 4px 0;
}
.zt-bottom-nav a.on { color: var(--zt-blue); font-weight: 600; }

/* 目录树 */
.zt-tree-item {
  border-bottom: 1px solid var(--zt-line);
  background: #fff;
}
.zt-unit-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px 14px 16px;
}
.zt-expand {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--zt-blue);
  color: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}
.zt-unit-title { flex: 1; font-size: 15px; line-height: 1.45; }
.zt-chili-row { font-size: 10px; color: #ccc; margin-top: 6px; letter-spacing: 2px; }
.zt-icon-pen {
  width: 36px; height: 36px;
  border: 1px solid var(--zt-blue);
  border-radius: 6px;
  color: var(--zt-blue);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.zt-lessons {
  padding: 0 16px 12px 54px;
  border-left: 2px solid var(--zt-line);
  margin-left: 30px;
}
.zt-lesson-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  position: relative;
}
.zt-lesson-row::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--zt-blue);
}
.zt-lesson-text { flex: 1; font-size: 14px; line-height: 1.4; }

.zt-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  border-top: 8px solid var(--zt-bg);
  text-decoration: none;
  color: var(--zt-text);
  font-size: 15px;
}

/* 做题页 */
.zt-quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
}
.zt-timer {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--zt-blue-soft);
  color: var(--zt-blue);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zt-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 13px;
  background: #fff;
}
.zt-meta-row .prog { color: var(--zt-blue); font-weight: 700; font-size: 15px; }

.zt-q-nav {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  background: #fff;
}
.zt-q-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--zt-blue);
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  cursor: pointer;
}
.zt-q-num.done { background: #7ec8ff; }
.zt-q-num.current { box-shadow: 0 0 0 3px rgba(0,145,255,0.35); }

.zt-q-body { padding: 16px; min-height: 200px; }
.zt-q-text { font-size: 16px; line-height: 1.65; margin-bottom: 20px; }
.zt-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid var(--zt-line);
  background: #fff;
  cursor: pointer;
}
.zt-option.on { border-color: var(--zt-blue); background: var(--zt-blue-soft); }
.zt-opt-key {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--zt-blue-soft);
  color: var(--zt-blue);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.zt-option.on .zt-opt-key { background: var(--zt-blue); color: #fff; }

/* 报告页 */
.zt-report-gauge-wrap { text-align: center; padding: 28px 16px 8px; background: #fff; }
.zt-gauge-label { font-size: 14px; color: var(--zt-sub); margin-bottom: 8px; }
.zt-gauge-svg { display: block; margin: 0 auto; }
.zt-gauge-center {
  margin-top: -150px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}
.zt-gauge-pct { font-size: 42px; font-weight: 700; color: #333; line-height: 1.1; }

.zt-stat-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--zt-line);
}
.zt-stat-item { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.zt-stat-split { width: 1px; height: 20px; background: var(--zt-line); }

.zt-result-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  background: #fff;
}
.zt-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.zt-dot.ok { background: var(--zt-teal); }
.zt-dot.bad { background: var(--zt-red); }

.zt-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: #fff;
}
.zt-btn-wide { flex: 1; min-width: 120px; padding: 12px; border-radius: 22px; font-size: 15px; font-weight: 600; cursor: pointer; }
.zt-btn-wide.primary { background: var(--zt-blue); color: #fff; border: none; }
.zt-btn-wide.outline { background: #fff; color: var(--zt-blue); border: 2px solid var(--zt-blue); }
.zt-continue {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: var(--zt-sub);
  text-decoration: none;
  padding: 4px 8px;
}

.zt-explain-block {
  margin: 12px 16px;
  padding: 14px;
  border-radius: var(--zt-radius);
  background: #fff;
  border: 1px solid var(--zt-line);
}
.zt-explain-block h4 { margin: 0 0 8px; font-size: 15px; }
.zt-explain-meta { font-size: 13px; color: var(--zt-sub); margin-bottom: 8px; }
.zt-ans-line { font-size: 14px; margin: 4px 0; }
.zt-ans-line.ok { color: #2e7d32; }
.zt-ans-line.bad { color: #c62828; }

.hidden { display: none !important; }
