:root {
  --bg: #faf7f1;
  --bg-soft: #f3ede2;
  --card: #ffffff;
  --ink: #26211c;
  --ink-2: #4a423a;
  --muted: #8c8279;
  --line: #e9e1d4;
  --brand: #0f766e;
  --brand-soft: #e6f2f0;
  --accent: #c2410c;
  --accent-soft: #fdeee5;
  --gold: #b45309;
  --ok: #15803d;
  --ok-soft: #e8f5ec;
  --bad: #b91c1c;
  --bad-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(38, 33, 28, 0.05);
  --shadow: 0 2px 4px rgba(38, 33, 28, 0.04), 0 12px 28px -16px rgba(38, 33, 28, 0.22);
  --radius: 18px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "SimSun", "STSong", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(1200px 500px at 50% -10%, #fffdf8 0%, rgba(255, 253, 248, 0) 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(15, 118, 110, 0.04) 0%, rgba(15, 118, 110, 0) 70%);
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

#app { max-width: 760px; margin: 0 auto; padding: 0 18px 120px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0 12px;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, var(--bg) 55%, rgba(250, 247, 241, 0.72));
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(150deg, #0f766e, #0b5d56);
  color: #f4fffc; display: grid; place-items: center;
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  box-shadow: 0 3px 10px -3px rgba(15, 118, 110, 0.6);
}
.brand-name { font-size: 16px; }
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.06em; }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { border-color: #d8cdbb; transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- 欢迎区 ---------- */
.hello { padding: 18px 2px 14px; }
.hello-date { font-size: 12.5px; color: var(--muted); letter-spacing: 0.08em; }
.hello-title {
  margin: 7px 0 0; font-family: var(--serif);
  font-size: 27px; line-height: 1.35; font-weight: 700; letter-spacing: 0.01em;
}
.hello-title em { font-style: normal; color: var(--brand); }
.hello-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 进度卡 ---------- */
.progress-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-top: 4px;
}
.ring { position: relative; width: 74px; height: 74px; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring-track { stroke: #eee6d9; }
.ring-bar { stroke: var(--brand); transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 1px; font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: 0.02em;
}
.ring-label small { font-size: 10px; color: var(--muted); font-weight: 500; }
.progress-meta { flex: 1; min-width: 0; }
.progress-meta h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.progress-meta p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.streak-pill {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
}

/* ---------- 学科筛选 ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 16px 2px 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: all 0.16s ease; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---------- 任务卡 ---------- */
.task-list { display: grid; gap: 11px; }
.task-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  animation: rise 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #ddd2c0; }
.task-card:active { transform: scale(0.995); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.task-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-family: var(--serif);
  font-size: 17px; font-weight: 700;
}
.task-body { flex: 1; min-width: 0; }
.task-kicker { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.05em; }
.task-title { margin: 5px 0 3px; font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.task-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-status { flex: 0 0 auto; align-self: center; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.status-todo { border: 1.5px dashed #d6cbb8; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-bad { background: var(--bad-soft); color: var(--bad); }
.task-status svg { width: 13px; height: 13px; }

/* ---------- 按科目分组 ---------- */
.task-groups { display: grid; gap: 22px; }
.task-group { display: grid; gap: 10px; }
.group-head { display: flex; align-items: center; gap: 9px; padding: 0 2px; }
.group-glyph {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-family: var(--serif);
  font-size: 13px; font-weight: 700;
}
.group-name { flex: 0 0 auto; font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em; }
.group-bar { flex: 1 1 auto; min-width: 24px; height: 4px; border-radius: 2px; background: var(--bg-soft); overflow: hidden; }
.group-bar i { display: block; height: 100%; border-radius: 2px; transition: width 0.32s ease; }
.group-count { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }


/* ---------- 详情页 ---------- */
.detail-head { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); padding: 7px 12px 7px 9px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.back-btn svg { width: 14px; height: 14px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
}
.panel-pad { padding: 18px; }

/* 诗词 */
.poem-head { text-align: center; padding: 24px 20px 16px; border-bottom: 1px dashed var(--line); }
.poem-title { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: 0.1em; margin: 0; }
.poem-author { margin-top: 7px; font-size: 12.5px; color: var(--muted); letter-spacing: 0.14em; }
.poem-lines { padding: 20px 22px 22px; text-align: center; }
.poem-line {
  font-family: var(--serif); font-size: 21px; line-height: 2.05; letter-spacing: 0.08em;
  color: var(--ink); transition: all 0.28s ease; border-radius: 6px; padding: 1px 4px;
}
.poem-line .py { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 0.06em; color: #b6a995; line-height: 1.9; }
.poem-line.active { color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 8px var(--brand-soft); }

.note-row { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; line-height: 1.75; }
.note-key { flex: 0 0 auto; font-weight: 700; color: var(--accent); font-family: var(--serif); }
.note-val { color: var(--ink-2); }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted);
  padding: 16px 18px 8px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.prose { font-size: 14px; line-height: 1.95; color: var(--ink-2); padding: 0 18px 18px; font-family: var(--serif); }

/* 视频位 */
.video-slot {
  position: relative; margin: 0 0 14px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #23302e 0%, #16211f 60%, #101a19 100%);
  aspect-ratio: 16 / 9; max-height: 220px; display: grid; place-items: center; border: 1px solid #16211f;
  box-shadow: var(--shadow);
}
.video-slot.is-placeholder {
  aspect-ratio: auto; max-height: none; padding: 20px 16px;
}
.video-slot video, .video-slot iframe { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.video-placeholder { text-align: center; padding: 20px; color: #cfdcd9; }
.video-placeholder .vp-badge {
  display: inline-block; font-size: 10.5px; letter-spacing: 0.16em; padding: 4px 10px;
  border: 1px solid rgba(207, 220, 217, 0.35); border-radius: 999px; color: #9fb8b4; margin-bottom: 12px;
}
.video-placeholder h4 { margin: 0 0 6px; font-size: 14.5px; color: #eaf4f2; font-weight: 600; }
.video-placeholder p { margin: 0 0 14px; font-size: 12px; color: #8fa5a2; line-height: 1.6; }
.play-voice-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #eaf4f2; border-radius: 999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(6px); transition: background 0.16s ease;
}
.play-voice-btn:hover { background: rgba(255, 255, 255, 0.18); }
.play-voice-btn svg { width: 15px; height: 15px; }

/* 讲解栏 */
.narrator {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--brand-soft); border-radius: 14px; margin-bottom: 14px;
  border: 1px solid #d2e8e4;
}
.narrator-text { flex: 1; font-size: 12.5px; color: #0b5d56; line-height: 1.6; min-width: 0; }
.narrator-text strong { font-weight: 700; }
.narrator-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px -4px rgba(15, 118, 110, 0.7);
}
.narrator-btn svg { width: 15px; height: 15px; }
.narrator-btn.playing { background: var(--accent); }

/* 题目 */
.q-kicker { font-size: 11.5px; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.q-stem { margin: 10px 0 16px; font-size: 16.5px; line-height: 1.8; font-weight: 600; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 13px 14px; margin-bottom: 9px; border-radius: 13px;
  border: 1px solid var(--line); background: #fff; font-size: 14.5px; line-height: 1.6;
  transition: all 0.16s ease;
}
.opt:hover:not(:disabled) { border-color: #cbbfa9; background: #fffdf8; }
.opt-key {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--bg-soft); font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-top: 1px;
}
.opt.correct { border-color: #9ed4b4; background: var(--ok-soft); }
.opt.correct .opt-key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: #edb8b8; background: var(--bad-soft); }
.opt.wrong .opt-key { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }

.answer-input-row { display: flex; gap: 9px; }
.answer-input {
  flex: 1; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line);
  font-size: 15px; background: #fff; outline: none; transition: border-color 0.16s ease;
}
.answer-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.answer-input-row .btn-primary { flex: 0 0 auto; white-space: nowrap; padding: 13px 20px; }
.btn-primary {
  padding: 13px 22px; border-radius: 13px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; transition: opacity 0.16s ease, transform 0.16s ease;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.feedback { border-radius: 14px; padding: 14px 16px; margin-top: 4px; animation: rise 0.3s ease backwards; }
.feedback.ok { background: var(--ok-soft); border: 1px solid #bfe3ca; }
.feedback.bad { background: var(--bad-soft); border: 1px solid #f0c8c8; }
.feedback-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.feedback-head svg { width: 16px; height: 16px; flex: 0 0 auto; }
.feedback.ok .feedback-head { color: var(--ok); }
.feedback.bad .feedback-head { color: var(--bad); }
.feedback-body { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.feedback-body .kb { font-weight: 700; color: var(--ink); }

.steps { margin: 10px 0 0; padding-left: 0; list-style: none; }
.steps li {
  position: relative; padding-left: 20px; margin: 7px 0; font-size: 13px; line-height: 1.8; color: var(--ink-2);
}
.steps li::before {
  content: ""; position: absolute; left: 5px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

.nav-row { display: flex; gap: 10px; margin-top: 16px; }
.nav-row .btn-ghost { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.nav-row .btn-ghost:disabled { opacity: 0.35; }
.nav-row .btn-primary { flex: 1; }

/* ---------- 引导页 ---------- */
.onboard { padding: 46px 0 0; text-align: center; }
.onboard h1 { font-family: var(--serif); font-size: 30px; margin: 18px 0 10px; letter-spacing: 0.04em; }
.onboard .lead { font-size: 14px; color: var(--muted); line-height: 1.85; margin: 0 auto 30px; max-width: 400px; }
.seal {
  width: 62px; height: 62px; margin: 0 auto; border-radius: 16px;
  background: linear-gradient(150deg, #0f766e, #0b5d56); color: #f4fffc;
  display: grid; place-items: center; font-family: var(--serif); font-size: 30px;
  box-shadow: 0 10px 30px -10px rgba(15, 118, 110, 0.55);
}
.field-label { display: block; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); margin: 22px 0 9px; }
.text-input {
  width: 100%; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line);
  background: #fff; font-size: 15px; outline: none;
}
.text-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.grade-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.grade-btn {
  padding: 13px 0; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all 0.15s ease;
}
.grade-btn[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px -8px rgba(15, 118, 110, 0.9); }
.grade-hint { font-size: 11.5px; color: var(--muted); margin-top: 9px; text-align: left; }
.onboard-cta { width: 100%; margin-top: 28px; padding: 15px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; }

/* ---------- 错题本 / 我的 ---------- */
.wrong-item { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.wrong-item:last-child { border-bottom: none; }
.wrong-q { font-size: 14px; line-height: 1.7; font-weight: 600; }
.wrong-a { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.wrong-a b { color: var(--ok); }
.wrong-meta { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.wrong-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-btn { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-2); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 12px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 23px; font-weight: 700; font-family: var(--serif); letter-spacing: 0.02em; }
.stat-num small { font-size: 11px; font-family: var(--sans); color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 5px; letter-spacing: 0.05em; }

.bar-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.bar-name { flex: 0 0 42px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.bar-track { flex: 1; height: 7px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bar-val { flex: 0 0 46px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat-cell { height: 26px; border-radius: 5px; background: var(--bg-soft); }
.heat-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 10px; }

.row-link { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.row-link:last-child { border-bottom: none; }
.row-link .val { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }

/* ---------- 空状态 / toast ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.empty .em-mark { font-family: var(--serif); font-size: 34px; color: #d9cfc0; display: block; margin-bottom: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: rgba(38, 33, 28, 0.94); color: #fff; font-size: 13px; font-weight: 500;
  padding: 11px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 90; backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 底部导航 ---------- */
.tabbar {
  white-space: nowrap;
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40;
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line);
  box-shadow: 0 8px 30px -12px rgba(38, 33, 28, 0.35); backdrop-filter: blur(14px);
}
.tab {
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 9px 17px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all 0.18s ease;
}
.tab svg { width: 15px; height: 15px; }
.tab[aria-current="page"] { background: var(--ink); color: #fff; }

@media (max-width: 520px) {
  #app { padding: 0 14px 118px; }
  .hello-title { font-size: 23px; }
  .poem-line { font-size: 19px; }
  .grade-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-grid { gap: 8px; }
}

/* ---------- 排行榜 ---------- */
.progress-time { display: flex; align-items: center; gap: 5px; }
.progress-time svg { width: 12px; height: 12px; flex: 0 0 auto; opacity: 0.75; }

.my-rank {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #f2fbf9; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
  box-shadow: 0 12px 26px -14px rgba(15, 118, 110, 0.65);
}
.my-rank.is-empty {
  background: var(--card); color: var(--ink);
  border: 1px dashed var(--line); box-shadow: none;
}
.my-rank-no {
  flex: 0 0 auto; font-family: var(--serif); font-size: 34px;
  font-weight: 700; line-height: 1; display: flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.my-rank-no small { font-size: 13px; margin-left: 2px; opacity: 0.85; font-weight: 400; }
.my-rank-info { flex: 1; min-width: 0; }
.my-rank-info h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.my-rank-info p { margin: 0; font-size: 12px; line-height: 1.6; opacity: 0.86; }
.my-rank.is-empty .my-rank-info p { color: var(--muted); opacity: 1; }
.my-rank-pct { flex: 0 0 auto; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rank-list { display: grid; }
.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 58px 44px 44px;
  align-items: center; gap: 8px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.rank-row:last-child { border-bottom: none; }
.rank-row.is-me { background: var(--brand-soft); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.rank-no {
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  color: var(--muted); text-align: center; font-variant-numeric: tabular-nums;
}
.rank-no.gold { color: var(--gold); }
.rank-no.silver { color: #7d858f; }
.rank-no.bronze { color: #a9663b; }
.rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-name i {
  font-style: normal; font-size: 10px; font-weight: 500;
  background: var(--brand); color: #fff;
  border-radius: 4px; padding: 1px 4px; margin-left: 5px; vertical-align: 1px;
}
.rank-progress { height: 5px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.rank-progress i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width 0.3s ease; }
.rank-done, .rank-time {
  font-size: 11.5px; color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums;
}
.rank-note {
  font-size: 11.5px; color: var(--muted); text-align: center;
  margin: 14px 0 6px; line-height: 1.8; padding: 0 12px;
}

/* 窄屏防挤压 */
@media (max-width: 380px) {
  .rank-row { grid-template-columns: 24px minmax(0, 1fr) 46px 38px 38px; gap: 6px; font-size: 12px; }
  .my-rank { gap: 10px; padding: 14px; }
  .my-rank-no { font-size: 28px; }
  .my-rank-info h3 { font-size: 14px; margin-bottom: 4px; }
  .my-rank-info p { font-size: 11px; line-height: 1.5; }
  .my-rank-pct { font-size: 16px; }
}
.progress-time.is-done { color: var(--ok); font-weight: 600; }
