/* ══ 学习画像页面（2026-10-31 P1；2026-11-02 视觉重做）══
   暖纸 + 茶金，和站内其它页同一套语言；图全部是手写 SVG（见 js/learn.js）。 */

#learnPage { min-height: 100vh; }
/* 顶栏是 position:fixed（见 .wl-topbar），所以主区必须让出 96px，否则标题会钻到顶栏底下 */
.learn-main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 96px 0 80px; }
.lrn-loading { padding: 60px 0; text-align: center; color: var(--c-text-muted); font-size: .9em; }

/* ── 顶部：问候 / 连续打卡 / 一句结论 / 四块指标 ───────────────────────── */
.lrn-hero { border-radius: 22px; padding: 20px 22px 18px; margin: 14px 0 16px;
  background: linear-gradient(118deg, #FBF4E4 0%, #F6EAD3 58%, #F1E1C4 100%);
  border: 1px solid rgba(138,106,47,.22); box-shadow: 0 10px 24px -18px rgba(92,64,51,.55); }
html.dark .lrn-hero { background: linear-gradient(118deg, #2C2822 0%, #2A251F 60%, #332C22 100%);
  border-color: rgba(199,169,104,.28); box-shadow: 0 10px 24px -18px rgba(0,0,0,.8); }
.lrn-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lrn-hello { font-family: 'Noto Serif SC', serif; font-size: 1.06em; font-weight: 700; color: #4A3B26; }
html.dark .lrn-hello { color: #F2E4C8; }
.lrn-streak { font-size: .76em; color: #7A5C22; background: rgba(255,252,246,.72);
  border: 1px solid rgba(138,106,47,.3); border-radius: 999px; padding: 4px 11px; }
.lrn-streak b { font-family: 'Noto Serif SC', serif; font-size: 1.15em; }
.lrn-streak small { display: block; font-size: .82em; color: var(--c-text-muted); text-align: right; }
html.dark .lrn-streak { color: #EAD9B4; background: rgba(30,27,23,.55); border-color: rgba(199,169,104,.32); }
.lrn-hero-line { margin: 10px 0 14px; font-size: .84em; color: #5C4A33; line-height: 1.65; }
.lrn-hero-line b { font-family: 'Noto Serif SC', serif; font-size: 1.22em; color: #7A4E12; }
html.dark .lrn-hero-line { color: #D8CBB6; }
html.dark .lrn-hero-line b { color: #F0CE8C; }

.lrn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lrn-tile { position: relative; background: rgba(255,252,246,.72); border: 1px solid rgba(138,106,47,.14);
  border-radius: 14px; padding: 11px 12px 9px; }
html.dark .lrn-tile { background: rgba(38,34,28,.66); border-color: rgba(199,169,104,.16); }
.lrn-tile b { display: block; font-family: 'Noto Serif SC', serif; font-size: 1.34em; color: #5C4033;
  font-variant-numeric: tabular-nums; line-height: 1.2; }
.lrn-tile span { display: block; margin-top: 1px; font-size: .68em; color: var(--c-text-muted); }
html.dark .lrn-tile b { color: #F0E2C4; }
.lrn-spark { position: absolute; right: 9px; bottom: 9px; width: 44px; height: 15px; opacity: .85; }
.lrn-spark-b { fill: #8A6A2F; }
.lrn-spark-b.t2 { fill: #A9695E; }
.lrn-spark-b.t3 { fill: #6E8FA3; }
.lrn-weekline { margin: 12px 0 0; font-size: .74em; color: var(--c-text-muted); }

/* ── 卡片栅格 ─────────────────────────────────────────────────────────── */
.lrn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lrn-sec { background: var(--c-bg-card, #FFFCF6); border: 1px solid rgba(138,106,47,.16);
  border-radius: 18px; padding: 18px 20px 20px; margin: 0; min-width: 0; }
.lrn-sec.lrn-wide { grid-column: 1 / -1; }
#lrnPlanSec { margin-top: 16px; }
.lrn-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.lrn-sec-hd h2 { font-family: 'Noto Serif SC', serif; font-size: 1.02em; font-weight: 700; color: var(--c-text); margin: 0; }
.lrn-sub { font-size: .7em; color: var(--c-text-muted); text-align: right; }
.lrn-foot { margin: 10px 0 0; font-size: .72em; color: var(--c-text-muted); line-height: 1.6; }
/* 卷别切换（能力画像用）：一排小胶囊，和站内筛选条同语言 */
.lrn-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.lrn-tab { min-height: 28px; padding: 0 11px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .74em;
  color: var(--c-text-secondary); background: transparent; border: 1px solid rgba(138,106,47,.28); }
.lrn-tab:hover { background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.lrn-tab.on { color: #FFFCF8; background: linear-gradient(180deg, #8A6A2F, #6E5322); border-color: #6E5322; font-weight: 600; }
html.dark .lrn-tab { color: #D8CBB6; border-color: rgba(199,169,104,.3); }
html.dark .lrn-tab.on { color: #241F18; background: linear-gradient(180deg, #E0C07C, #C9A968); border-color: #C9A968; }

/* ── 成绩曲线 ─────────────────────────────────────────────────────────── */
.lrn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.lrn-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--c-accent) 8%, transparent); border: 1px solid rgba(138,106,47,.18); }
.lrn-chip b { font-family: 'Noto Serif SC', serif; font-size: 1.02em; color: #6E5322; font-variant-numeric: tabular-nums; }
.lrn-chip small { font-size: .66em; color: var(--c-text-muted); }
.lrn-chip.up b { color: #3F6B3A; }
html.dark .lrn-chip b { color: #E7CE96; }
html.dark .lrn-chip.up b { color: #9FD08F; }
.lrn-chart { width: 100%; height: auto; display: block; overflow: visible; }
.lrn-grid-line { stroke: rgba(120,113,108,.18); stroke-dasharray: 3 5; }
.lrn-axis { fill: var(--c-text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.lrn-line { fill: none; stroke: #8A6A2F; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lrn-area { opacity: .9; }
html.dark .lrn-area { opacity: .42; }
.lrn-avg-line { stroke: rgba(138,106,47,.55); stroke-width: 1.2; stroke-dasharray: 5 5; }
.lrn-dot { fill: #8A6A2F; stroke: #FFFCF6; stroke-width: 2; }
html.dark .lrn-dot { stroke: #1F1C18; }
.lrn-dot-lab { fill: #6E5322; font-size: 10.5px; font-weight: 600; }
html.dark .lrn-dot-lab { fill: #E7CE96; }
.lrn-void { padding: 18px 4px 4px; text-align: center; }
.lrn-void b { display: block; font-family: 'Noto Serif SC', serif; font-size: .96em; color: var(--c-text); }
.lrn-void p { margin: 8px auto 14px; max-width: 46ch; font-size: .78em; color: var(--c-text-muted); line-height: 1.7; }

/* ── 能力雷达 ─────────────────────────────────────────────────────────── */
.lrn-ability { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: center; }
.lrn-radar-wrap { display: grid; place-items: center; }
.lrn-radar { width: 100%; max-width: 205px; height: auto; overflow: visible; }
.lrn-radar-ring { fill: none; stroke: rgba(120,113,108,.2); stroke-width: 1; }
.lrn-radar-spoke { stroke: rgba(120,113,108,.16); stroke-width: 1; }
.lrn-radar-tick { fill: var(--c-text-muted); font-size: 8.5px; }
.lrn-radar-lab { font-size: 9.5px; fill: var(--c-text-secondary); font-family: 'Noto Serif SC', serif; }
.lrn-radar-val { font-size: 9.5px; fill: #8A6A2F; font-weight: 600; }
html.dark .lrn-radar-val { fill: #E7CE96; }
.lrn-radar-dot { fill: #8A6A2F; stroke: #FFFCF6; stroke-width: 1.4; }
html.dark .lrn-radar-dot { stroke: #1F1C18; }
.lrn-radar-empty { width: 100%; max-width: 205px; min-height: 150px; display: grid; place-content: center;
  text-align: center; gap: 6px; font-size: .78em; color: var(--c-text); border-radius: 14px;
  border: 1px dashed rgba(138,106,47,.32); background: color-mix(in srgb, var(--c-accent) 4%, transparent); }
.lrn-radar-empty span { font-size: .86em; color: var(--c-text-muted); line-height: 1.6; }
/* 只有 1~2 个题型时用横条代替雷达（见 learnRateBars） */
.lrn-rbars { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.lrn-rbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .76em; }
.lrn-rbar span { color: var(--c-text-secondary); white-space: nowrap; }
.lrn-rbar i { display: block; height: 8px; border-radius: 4px; background: rgba(120,113,108,.14); overflow: hidden; }
.lrn-rbar i b { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #D9A94E, #8A6A2F); }
.lrn-rbar em { font-style: normal; font-variant-numeric: tabular-nums; color: #6E5322; font-weight: 600; }
html.dark .lrn-rbar em { color: #E7CE96; }
.lrn-ab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lrn-ab-list li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 8px;
  padding: 7px 10px; border-radius: 11px; background: color-mix(in srgb, var(--c-accent) 5%, transparent); }
.lrn-ab-list b { font-size: .82em; color: var(--c-text); font-weight: 600; white-space: nowrap; }
.lrn-ab-list em { font-family: 'Noto Serif SC', serif; font-style: normal; font-size: .96em; color: #7A5C22;
  font-variant-numeric: tabular-nums; }
html.dark .lrn-ab-list em { color: #E7CE96; }
.lrn-ab-list span { font-size: .68em; color: var(--c-text-muted); }
.lrn-extra { margin: 12px 0 0; font-size: .72em; color: var(--c-text-muted); line-height: 1.6; }

/* ── 题型分布环形图 ───────────────────────────────────────────────────── */
.lrn-donut-wrap { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; align-items: center; }
.lrn-donut { width: 100%; max-width: 140px; height: auto; }
.lrn-donut-seg { transition: opacity .15s ease; }
.lrn-donut-wrap:hover .lrn-donut-seg { opacity: .55; }
.lrn-donut-seg:hover { opacity: 1; }
.lrn-donut-num { font-family: 'Noto Serif SC', serif; font-size: 19px; fill: #5C4033; font-weight: 700; }
.lrn-donut-cap { font-size: 9px; fill: var(--c-text-muted); }
html.dark .lrn-donut-num { fill: #F0E2C4; }
.lrn-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lrn-legend li { display: grid; grid-template-columns: 8px 1fr auto auto; align-items: center; gap: 6px;
  font-size: .74em; color: var(--c-text-secondary); }
.lrn-legend i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.lrn-legend em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--c-text); }
.lrn-legend small { font-size: .9em; color: var(--c-text-muted); min-width: 3.2em; text-align: right; }

/* ── 打卡热力图 ───────────────────────────────────────────────────────── */
.lrn-heat-wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.lrn-heat-main { min-width: 0; }
.lrn-heat { width: 100%; max-width: 430px; height: auto; }
.lrn-heat-lab { fill: var(--c-text-muted); font-size: 8.5px; }
.lrn-heat-c { fill: #EDE6DA; }
.lrn-heat-c.lv1 { fill: #E9D6AC; }
.lrn-heat-c.lv2 { fill: #DCC084; }
.lrn-heat-c.lv3 { fill: #C9A968; }
.lrn-heat-c.lv4 { fill: #8A6A2F; }
html.dark .lrn-heat-c { fill: #3A342B; }
html.dark .lrn-heat-c.lv1 { fill: #4F4330; }
html.dark .lrn-heat-c.lv2 { fill: #6E5735; }
html.dark .lrn-heat-c.lv3 { fill: #8A6A2F; }
html.dark .lrn-heat-c.lv4 { fill: #C9A968; }
.lrn-heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .68em; color: var(--c-text-muted); }
.lrn-heat-side { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; flex: 1 1 320px; min-width: 0; }
.lrn-heat-side > div { background: color-mix(in srgb, var(--c-accent) 6%, transparent); border-radius: 12px; padding: 9px 10px; }
.lrn-heat-side dt { font-size: .66em; color: var(--c-text-muted); }
.lrn-heat-side dd { margin: 2px 0 0; font-family: 'Noto Serif SC', serif; font-size: 1.16em; color: #5C4033; font-variant-numeric: tabular-nums; }
.lrn-heat-side dd small { font-size: .58em; color: var(--c-text-muted); margin-left: 2px; }
html.dark .lrn-heat-side dd { color: #F0E2C4; }
.lrn-heat-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; background: #EDE6DA; }
.lrn-heat-legend i.lv1 { background: #E9D6AC; } .lrn-heat-legend i.lv2 { background: #DCC084; }
.lrn-heat-legend i.lv3 { background: #C9A968; } .lrn-heat-legend i.lv4 { background: #8A6A2F; }
html.dark .lrn-heat-legend i { background: #2E2A25; }
html.dark .lrn-heat-legend i.lv1 { background: #4A3F2C; } html.dark .lrn-heat-legend i.lv2 { background: #6B5636; }
html.dark .lrn-heat-legend i.lv3 { background: #8A6A2F; } html.dark .lrn-heat-legend i.lv4 { background: #C9A968; }

/* ── 目标圆环 ─────────────────────────────────────────────────────────── */
.lrn-rings { display: flex; gap: 18px; justify-content: center; margin: 4px 0 14px; }
.lrn-ring { width: 88px; height: auto; }
.lrn-ring circle:last-of-type { stroke: #8A6A2F; }
.lrn-ring.t2 circle:last-of-type { stroke: #6E8FA3; }
.lrn-ring-num { font-family: 'Noto Serif SC', serif; font-size: 21px; fill: #5C4033; font-weight: 700; }
.lrn-ring-cap { font-size: 9px; fill: var(--c-text-muted); }
html.dark .lrn-ring-num { fill: #F0E2C4; }
.lrn-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .8em; color: var(--c-text-secondary); }
.lrn-goal label { display: inline-flex; align-items: center; gap: 6px; }
.lrn-goal input { width: 60px; padding: 5px 8px; border-radius: 9px; border: 1px solid rgba(138,106,47,.3);
  background: var(--c-bg-card, #FFFCF6); color: var(--c-text); font: inherit; font-size: .95em; }
.lrn-save { min-height: 34px; padding: 0 14px; border-radius: 10px; cursor: pointer; font: inherit; font-size: .8em;
  font-weight: 600; color: #5C4033; background: #F5EFE4; border: 1px dashed rgba(138,106,47,.45); }
.lrn-save:hover { background: #FFFCF6; }
html.dark .lrn-save { color: #EADFC8; background: #2E2A24; }

/* ── 薄弱点 / 空态 ────────────────────────────────────────────────────── */
.lrn-weak { border-radius: 14px; padding: 14px 16px; background: linear-gradient(100deg, #FBF3E2, #F6EBD6);
  border: 1px dashed rgba(138,106,47,.45); }
html.dark .lrn-weak { background: linear-gradient(100deg, #2E2A24, #2A2621); border-color: rgba(199,169,104,.35); }
.lrn-weak-t { display: flex; align-items: baseline; gap: 10px; }
.lrn-weak-t b { font-family: 'Noto Serif SC', serif; font-size: 1.04em; color: #5C4033; }
.lrn-weak-t em { font-style: normal; font-family: 'Noto Serif SC', serif; font-size: 1.2em; color: #B45309; }
.lrn-weak p { margin: 6px 0 12px; font-size: .78em; color: var(--c-text-secondary); }
html.dark .lrn-weak-t b { color: #F0E2C4; }
.lrn-cta { min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid #6E5322; cursor: pointer;
  font: inherit; font-size: .82em; font-weight: 700; color: #FFFCF8;
  background: linear-gradient(180deg, #8A6A2F, #6E5322); }
.lrn-cta:hover { background: linear-gradient(180deg, #97763A, #765A26); }
.lrn-empty { margin: 0; font-size: .8em; color: var(--c-text-muted); line-height: 1.7; }

/* ── 本周计划（P4）────────────────────────────────────────────────────── */
.lrn-plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.lrn-plan-bar span { font-size: .76em; color: var(--c-text-muted); }
.lrn-plan-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lrn-day { border: 1px solid rgba(138,106,47,.16); border-radius: 13px; padding: 10px 12px;
  background: color-mix(in srgb, var(--c-accent) 4%, transparent); }
.lrn-day-hd { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.lrn-day-hd b { font-family: 'Noto Serif SC', serif; font-size: .86em; color: #5C4033; }
html.dark .lrn-day-hd b { color: #F0E2C4; }
.lrn-day-hd span { font-size: .66em; color: #8A6A2F; border: 1px dashed rgba(138,106,47,.4);
  border-radius: 8px; padding: 1px 6px; }
.lrn-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lrn-task label { display: flex; align-items: flex-start; gap: 8px; font-size: .78em; color: var(--c-text-secondary);
  cursor: pointer; line-height: 1.5; }
.lrn-task input { margin: 2px 0 0; accent-color: #6E5322; flex: none; }
.lrn-task.done span { text-decoration: line-through; color: var(--c-text-muted); }

@media (max-width: 900px) {
  .learn-main { padding: 84px 0 96px; }
  .lrn-tiles { grid-template-columns: repeat(2, 1fr); }
  .lrn-grid { grid-template-columns: 1fr; }
  .lrn-ability { grid-template-columns: 1fr; }
  .lrn-radar { max-width: 200px; }
  .lrn-plan-days { grid-template-columns: 1fr; }
  .lrn-donut-wrap { grid-template-columns: 120px minmax(0, 1fr); }
  .lrn-heat-side { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .lrn-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .lrn-legend { width: 100%; }
  .lrn-ring { width: 76px; }
}
