/* ---------- landing ---------- */
.landing { overflow: hidden; }
.landing-body { flex: 1; overflow-y: auto; padding: 0 22px calc(132px + var(--safe-b)); }
.hero { padding: 26px 0 22px; }
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(217, 180, 91, 0.4);
  background: linear-gradient(160deg, rgba(217, 180, 91, 0.16), rgba(217, 180, 91, 0.02));
  display: grid; place-items: center; color: var(--gold);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.brand-sub { font-size: 10px; color: var(--text-3); letter-spacing: 0.18em; margin-top: 2px; }
.hero h1 {
  font-size: 32px; line-height: 1.42; font-weight: 700; letter-spacing: 0.01em;
  /* one line on normal phones; shrink instead of wrapping on narrow ones */
  white-space: nowrap;
}
@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin: 14px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.stat-cell { padding: 14px 10px; text-align: center; background: var(--ink-1); }
.stat-cell + .stat-cell { border-left: 1px solid var(--line); }
.stat-num { font-size: 19px; font-weight: 700; color: var(--gold); letter-spacing: 0.01em; }
.stat-lbl { font-size: 10.5px; color: var(--text-3); margin-top: 4px; letter-spacing: 0.06em; }

.value-list { margin-top: 28px; }
.value-item { padding: 18px 0; border-top: 1px solid var(--line); }
.value-item:last-child { border-bottom: 1px solid var(--line); }
.value-head { display: flex; align-items: baseline; gap: 10px; }
.value-idx { font-size: 11px; color: var(--gold); letter-spacing: 0.14em; }
.value-title { font-size: 16px; font-weight: 600; }
.value-desc { margin: 8px 0 0; font-size: 13px; line-height: 1.85; color: var(--text-2); }

.price-card {
  margin-top: 28px; padding: 22px; border-radius: var(--radius);
  border: 1px solid rgba(217, 180, 91, 0.28);
  background: linear-gradient(155deg, rgba(217, 180, 91, 0.1), rgba(217, 180, 91, 0.015) 55%), var(--ink-1);
}
.price-main { display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; }
.price-cur { font-size: 18px; color: var(--gold); transform: translateY(-6px); }
.price-num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--gold); letter-spacing: -0.02em; }
.price-unit { font-size: 14px; color: var(--text-2); margin-left: 4px; }
.price-tag { display: inline-flex; margin-top: 10px; }
.price-block + .price-block { margin-top: 0; }
.price-desc {
  margin: 8px 0 0; font-size: 13px; line-height: 1.85; color: var(--text-2);
}
.price-sep { height: 1px; background: var(--line); margin: 18px 0; }

.wechat-card { margin-top: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.wechat-top { display: flex; gap: 14px; align-items: center; }
.qr {
  width: 108px; height: 108px; flex: 0 0 108px; border-radius: 10px;
  background: var(--qr-plate); padding: 6px; display: grid; place-items: center; border: 1px solid var(--line);
}
.qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wechat-info { flex: 1; min-width: 0; }
.wechat-id {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
}
.steps { margin: 16px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; padding: 5px 0; }
.steps b { color: var(--gold); font-weight: 600; flex: 0 0 auto; }

.faq { margin-top: 26px; }
.faq-item { border-top: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { font-size: 14px; font-weight: 600; }
.faq-a { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin-top: 6px; }
.landing-foot { margin-top: 26px; padding-bottom: 12px; font-size: 11px; color: var(--text-3); line-height: 1.9; text-align: center; }

.cta-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px calc(14px + var(--safe-b));
  background: var(--ink-0);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; z-index: 20;
}
.cta-bar .btn { flex: 1; white-space: nowrap; padding: 0 12px; }

/* ---------- auth ---------- */
.auth-body { padding: 8px 22px calc(24px + var(--safe-b)); }
.auth-title { font-size: 26px; font-weight: 700; margin: 12px 0 6px; }
.auth-sub { font-size: 13px; color: var(--text-2); line-height: 1.75; }
.recovery-box {
  margin-top: 18px; padding: 18px; border-radius: var(--radius);
  border: 1px dashed rgba(217, 180, 91, 0.45); background: var(--gold-soft);
}
.recovery-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px;
  letter-spacing: 0.14em; color: var(--gold); margin: 10px 0; font-weight: 600;
}

/* ---------- home ---------- */
.greet { padding: 6px 0 18px; }
.greet-name { font-size: 24px; font-weight: 700; }
.greet-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.continue-card {
  padding: 18px; border-radius: var(--radius);
  border: 1px solid rgba(217, 180, 91, 0.24);
  background: linear-gradient(150deg, rgba(217, 180, 91, 0.09), transparent 60%), var(--ink-1);
}
.continue-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.continue-title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.continue-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.action {
  padding: 16px 8px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.action:active { border-color: var(--gold-dim); background: var(--ink-2); }
.action svg { width: 22px; height: 22px; color: var(--gold); }
.action span { font-size: 12px; color: var(--text-2); }

.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-1); }
.metric { padding: 14px 6px; text-align: center; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-num { font-size: 18px; font-weight: 700; }
.metric-lbl { font-size: 10px; color: var(--text-3); margin-top: 3px; }

.pay-banner {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--cinnabar-soft); border: 1px solid rgba(239, 111, 108, 0.3);
  display: flex; align-items: center; gap: 10px;
}
.pay-banner-main { flex: 1; }
.pay-banner-title { font-size: 14px; font-weight: 600; color: var(--danger-text); }
.pay-banner-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* ---------- papers ---------- */
.seg {
  display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 4px;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); background: var(--ink-1); border: 1px solid var(--line);
  transition: all 160ms var(--ease);
}
.seg button.on { background: var(--gold-soft); color: var(--gold); border-color: rgba(217, 180, 91, 0.3); }

.paper-card {
  padding: 15px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); margin-top: 10px;
}
.paper-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.paper-name { font-size: 15px; font-weight: 600; line-height: 1.5; flex: 1; }
.paper-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.paper-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11.5px; color: var(--text-3); }

/* ---------- practice ---------- */
.practice { background: var(--ink-0); }
.practice-head { padding: 0 16px; flex: 0 0 auto; }
.progress-line { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.progress-count { font-size: 12px; color: var(--text-2); flex: 0 0 auto; }

.q-wrap { flex: 1; overflow-y: auto; padding: 8px 16px 16px; }
.q-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.q-stem { font-size: 17px; line-height: 1.9; letter-spacing: 0.01em; }
.q-stem-sub { margin-top: 10px; font-size: 13px; color: var(--text-3); line-height: 1.7; }

.opts { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--ink-1);
  transition: border-color 140ms var(--ease), background 140ms var(--ease), transform 120ms var(--ease);
  text-align: left; width: 100%;
}
.opt:active { transform: scale(0.995); }
.opt-key {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--ink-3); color: var(--text-2); margin-top: 1px;
  transition: all 140ms var(--ease);
}
.opt-text { flex: 1; font-size: 15px; line-height: 1.72; color: var(--text-1); }
.opt.selected { border-color: var(--gold-dim); background: rgba(217, 180, 91, 0.06); }
.opt.selected .opt-key { background: var(--gold-fill); color: var(--gold-on-fill); }
.opt.correct { border-color: rgba(70, 201, 139, 0.5); background: var(--jade-soft); }
.opt.correct .opt-key { background: var(--jade); color: var(--jade-ink); }
.opt.wrong { border-color: rgba(239, 111, 108, 0.5); background: var(--cinnabar-soft); }
.opt.wrong .opt-key { background: var(--cinnabar); color: var(--cinnabar-ink); }
.opt.muted { opacity: 0.55; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-3px); } 60% { transform: translateX(2px); } }
.opt.nudge { animation: nudge 180ms var(--ease); }

.answer-actions { margin-top: 16px; display: flex; gap: 10px; }

.bottom-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line); background: var(--ink-0);
}
.bottom-bar .btn { height: 46px; }
.bottom-bar .btn-ghost { flex: 0 0 auto; }
.bottom-bar .btn-primary { flex: 1; }

/* answer card */
.card-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.card-cell {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--text-2); font-size: 13px;
  display: grid; place-items: center; transition: all 140ms var(--ease);
}
.card-cell.cur { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.card-cell.ok { background: var(--jade-soft); border-color: rgba(70, 201, 139, 0.35); color: var(--jade); }
.card-cell.bad { background: var(--cinnabar-soft); border-color: rgba(239, 111, 108, 0.35); color: var(--cinnabar); }
.card-cell.done { background: var(--ink-3); color: var(--text-1); }
.card-legend { display: flex; gap: 16px; padding: 4px 0 14px; font-size: 11px; color: var(--text-3); }
.card-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }

/* analysis */
.analysis {
  margin-top: 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); overflow: hidden;
}
.analysis-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--ink-1);
}
.analysis-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.04em; }
.analysis-answer { font-size: 13px; font-weight: 700; color: var(--jade); }
.analysis-body {
  padding: 15px; font-size: 14px; line-height: 1.95; color: var(--text-1);
  white-space: pre-wrap; word-break: break-word;
}
.analysis-flag {
  margin: 12px 15px 0; padding: 10px 12px; border-radius: 9px;
  background: var(--amber-soft); border: 1px solid var(--amber-line);
  font-size: 12.5px; line-height: 1.7; color: var(--amber-text);
}

/* ---------- exam ---------- */
.exam-timer { font-size: 15px; font-weight: 700; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.exam-timer.warn { color: var(--cinnabar); }
.exam-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.exam-list-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.exam-list-item:last-child { border-bottom: 0; }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.8; color: var(--text-2); }

/* report */
.score-hero { text-align: center; padding: 18px 0 6px; }
.score-ring { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring circle:first-child { stroke: var(--ink-3) !important; }
.score-ring circle:last-child { stroke: var(--gold) !important; }
.score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-val { font-size: 38px; font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: -0.02em; }
.score-lbl { font-size: 11px; color: var(--text-3); margin-top: 6px; letter-spacing: 0.08em; }
.stat-line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }
.secbar { margin-top: 12px; }
.secbar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); }

/* ---------- wrongbook ---------- */
.wrong-card { padding: 15px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); margin-top: 10px; }
.wrong-stem { font-size: 14.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wrong-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--text-3); }

/* ---------- me ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 10px 0 20px; }
.avatar {
  width: 54px; height: 54px; border-radius: 16px; flex: 0 0 54px;
  overflow: hidden; background: var(--ink-2);
  border: 1px solid var(--line);
}
.avatar svg { border-radius: 16px; }
.avatar-sm { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
.avatar-sm svg { border-radius: 14px; }
.greet-row { display: flex; align-items: center; gap: 12px; }
.setting-row {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--line); width: 100%; text-align: left;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .row-title { font-size: 14.5px; font-weight: 500; }

/* ---------- admin ---------- */
.admin-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.admin-stat .card { padding: 14px; }
.admin-num { font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: -0.01em; }
.admin-lbl { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.user-card { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); margin-top: 10px; }
.user-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.user-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.code-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; letter-spacing: 0.08em;
}

/* ---------- grade filter ---------- */
.seg button .seg-count {
  margin-left: 6px; font-size: 10px; color: var(--text-3);
}
.seg button.on .seg-count { color: var(--gold); }
.grade-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 2px;
}

/* ---------- trial note (landing, price-free) ---------- */
.trial-note {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--ink-1);
  font-size: 13px; line-height: 1.8; color: var(--text-2);
}

/* ---------- upgrade sheet price ---------- */
.upgrade-price {
  display: flex; align-items: flex-end; gap: 4px; color: var(--gold);
}
.upgrade-price .price-cur { font-size: 17px; transform: translateY(-8px); }
.upgrade-price .price-num { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.upgrade-price .price-unit { font-size: 14px; color: var(--text-2); margin-left: 4px; }

/* ---------- loading ---------- */
.loading-body { display: flex; flex-direction: column; }
.loading-block { padding: 44px 0 28px; text-align: center; }
.spinner {
  width: 30px; height: 30px; margin: 0 auto;
  border: 2.5px solid var(--ink-3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.loading-hint { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.q-skeleton { padding-top: 8px; }

/* ---------- theme selector ---------- */
.theme-seg {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 0 0 14px;
}
.theme-seg button {
  height: 38px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--line); background: var(--ink-2); color: var(--text-2);
}
.theme-seg button.on {
  background: var(--gold-soft); color: var(--gold);
  border-color: var(--gold-dim);
}

/* Tab-level screens have no app bar; the status bar and tab bar are enough. */
.screen-body.no-bar {
  padding-top: calc(12px + var(--safe-t));
}
/* the tab bar floats over content; keep the last row fully visible */
.screen-body.with-tab { padding-bottom: calc(92px + var(--safe-b)); }
.seg-top {
  padding-top: 0;
  margin-top: 2px;
}

/* ---------- report: 逐题回顾 ---------- */
.review-head { align-items: center; }
.review-seg {
  display: inline-flex; gap: 6px; overflow: visible; padding: 0;
}
.review-seg button {
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--text-2);
}
.review-seg button.on {
  background: var(--gold-soft); color: var(--gold-text);
  border-color: var(--gold-dim);
}
.review-seg .nums { font-size: 11px; opacity: .85; margin-left: 1px; }

.answer-block {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.answer-inline {
  display: flex; align-items: baseline; gap: 10px;
}
.answer-label {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  letter-spacing: .04em;
}
.answer-value {
  flex: 1; min-width: 0;
  font-size: 13.5px; color: var(--jade);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.answer-list {
  margin: 6px 0 0; padding: 0; list-style: none;
}
.answer-list li {
  position: relative; padding-left: 12px; margin-top: 4px;
  font-size: 13.5px; line-height: 1.6; color: var(--jade);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.answer-list li::before {
  content: ''; position: absolute; left: 2px; top: .62em;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: .7;
}

/* ---------- 题库：多遍进度条（单条，颜色随遍数加深）---------- */
.bar.lap-0 > i { background: var(--gold); opacity: .38; }
.bar.lap-1 > i { background: var(--gold); opacity: .55; }
.bar.lap-2 > i { background: var(--gold); opacity: .70; }
.bar.lap-3 > i { background: var(--gold); opacity: .82; }
.bar.lap-4 > i { background: var(--gold); opacity: .92; }
.bar.lap-5 > i { background: var(--gold); opacity: 1; }
