/* 成长引擎——学习系统 · 设计系统 v2（暖米白 · SVG线性图标 · 墨绿主色） */
:root {
  --ink: #1f3a30;        /* 主文字 */
  --ink2: #5f736a;       /* 次级文字 */
  --ink3: #8fa29a;       /* 弱文字 */
  --bg: #f7f5f0;         /* 暖米白页面底 */
  --card: #ffffff;       /* 卡片 */
  --line: #e9e5db;       /* 分隔线 */
  --main: #2e7d63;       /* 主色墨绿 */
  --main-d: #256a55;     /* 主色深 */
  --main-soft: #e8f2ee;  /* 主色浅底 */
  --ok: #2e7d63; --ok-bg: #e7f1ec;
  --err: #b03a2e; --err-bg: #f9e9e6;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(31, 58, 48, .07);
  /* 学科主题变量（默认回退墨绿；三科根容器各自覆盖） */
  --subj: var(--main);
  --subj-d: var(--main-d);
  --subj-soft: var(--main-soft);
  --subj-soft2: #dcebe5;
  --subj-border: #cfe3d8;
  --subj-shadow: rgba(46, 125, 99, .16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.8;
  min-height: 100vh;
}
h1, h2, h3 { font-weight: 800; color: var(--ink); line-height: 1.4; }
a { color: var(--main); text-decoration: none; }

/* ── 布局 ── */
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-block; background: var(--main-soft); color: var(--main-d);
  border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700;
}
.badge.plain { background: #f1eeE7; color: var(--ink2); }
.badge.line { background: transparent; border: 1px solid var(--line); color: var(--ink2); }
.badge.xp-pulse { animation: xpPulse 1.8s ease; }
@keyframes xpPulse {
  0%, 100% { background: var(--main-soft); color: var(--main-d); transform: scale(1); }
  35% { background: var(--main); color: #fff; transform: scale(1.1); }
}

/* ── 图标（SVG 线性） ── */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-lg { width: 22px; height: 22px; }
.ic-sm { width: 15px; height: 15px; }

/* ── 按钮 ── */
.big-btn {
  display: block; width: 100%; border: none; border-radius: 11px; cursor: pointer;
  padding: 15px 18px; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--subj); transition: background .15s, transform .1s, box-shadow .15s;
  font-family: inherit;
}
.big-btn:hover { background: var(--subj-d); box-shadow: 0 4px 14px var(--subj-shadow); }
.big-btn:active { transform: translateY(1px); }
.big-btn:disabled { opacity: .6; cursor: not-allowed; }
.big-btn.blue { background: #3b6ea5; }
.big-btn.blue:hover { background: #335e8e; }
.big-btn.line {
  background: #fff; color: var(--subj-d); border: 1.5px solid var(--subj);
}
.big-btn.line:hover { background: var(--subj-soft); box-shadow: none; }
.big-btn.gray { background: #e3e0d6; color: var(--ink2); }
.big-btn.gray:hover { background: #d8d5c9; box-shadow: none; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink2);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; cursor: pointer;
  user-select: none; transition: all .15s; font-family: inherit; font-weight: 600;
}
.chip:hover { border-color: var(--subj); color: var(--subj-d); }
.chip.on { border-color: var(--subj); background: var(--subj-soft); color: var(--subj-d); font-weight: 700; }

/* 标签墙底色选择（可区分的柔和色板 + 选中描边） */
.color-dot {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; flex: none;
}
.color-dot:hover { transform: scale(1.08); }
.color-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--main); }

/* 标签墙展示区块：突破容器宽度，利用两侧空白（窄屏自动恢复） */
.tagwall-wide { margin-left: -36px; margin-right: -36px; }
@media (max-width: 1080px) {
  .tagwall-wide { margin-left: 0; margin-right: 0; }
}

/* 作业SOP 三科区分色：数学浅绿 / 英语浅橙 / 语文浅蓝 */
.sop-card { border-left: 5px solid transparent; }
.sop-card-数学 { background: #f4f9f6; border-left-color: #7ab8a0; }
.sop-card-英语 { background: #fdf7ef; border-left-color: #e6b98a; }
.sop-card-语文 { background: #f3f7fc; border-left-color: #8fb3dd; }
.sub-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 2px; }

/* 耐心充电站（原多巴胺清单） */
.slow-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.slow-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(31,58,48,.10); }
.slow-doing { background: #eef6f2; border-color: rgba(46,125,99,.4); }
.slow-done { background: #e8f2ee; }
.coin-banner { background: #f4efe0; border-color: #e9e5db; }

/* ── 输入 ── */
.q-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-size: 15px; color: var(--ink); outline: none; background: #fff;
  transition: border-color .18s, box-shadow .18s; font-family: inherit;
}
.q-input:hover { border-color: #cdd9d2; }
.q-input:focus { border-color: var(--main); box-shadow: 0 0 0 3px rgba(46,125,99,.12); }
textarea.q-input { resize: vertical; min-height: 64px; }
label.lab { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); margin: 12px 0 4px; }

/* ── 反馈 ── */
.fb-ok { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 9px 13px; font-weight: 600; font-size: 14px; }
.fb-hint { background: #f4f1e8; color: #7a6a3a; border-radius: 10px; padding: 9px 13px; font-size: 14px; line-height: 1.7; }
.score-pill { font-size: 26px; font-weight: 800; color: var(--main); font-variant-numeric: tabular-nums; }

/* ── 番茄钟 ── */
.timer-circle {
  width: 210px; height: 210px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(var(--main) var(--p, 0%), #eef0ea 0);
  display: flex; align-items: center; justify-content: center;
}
.timer-circle .inner {
  width: 182px; height: 182px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.timer-num { font-size: 46px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer-tag { font-size: 14px; color: var(--ink3); margin-top: 4px; }

/* ── 指标卡（三列） ── */
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); flex: 1; min-width: 170px; text-align: center;
}
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-card .num.green { color: var(--main); }
.stat-card .lab { font-size: 13px; color: var(--ink2); margin-top: 4px; }

/* ── 习惯打卡 ── */
.habit-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 12px 14px; font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.habit-btn:hover { border-color: var(--main); }
.habit-btn.done { background: var(--main-soft); border-color: var(--main); }
.habit-btn.locked { opacity: .5; filter: grayscale(.4); }
.habit-btn:disabled { cursor: default; }
.hb-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cdd9d2;
  display: flex; align-items: center; justify-content: center; color: #fff; flex: none;
}
.habit-btn.done .hb-check { background: var(--main); border-color: var(--main); }

/* ── 作业 SOP ── */
.sop-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all .15s; font-family: inherit; text-align: left;
}
.sop-btn:hover { border-color: var(--main); }
.sop-btn.done { background: var(--main-soft); border-color: var(--main); }
.sop-btn.locked { opacity: .6; }
.sop-btn:disabled { cursor: default; }

/* ── 错题怪兽 ── */
.monster-card {
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 16px; margin-bottom: 12px; display: flex; gap: 14px; align-items: flex-start;
}
.monster-badge {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.monster-badge.open { background: #f7e8e2; color: #b03a2e; }
.monster-badge.killed { background: var(--main-soft); color: var(--main-d); }
.mtype-tag { display: inline-block; background: #f1eee7; color: var(--ink2); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; }

/* ── 主页今日任务条 ── */
.today-bar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.today-item {
  flex: 1; min-width: 170px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
}
.today-item .ic { color: var(--main); }

/* ── 标签墙 ── */
.tag-card {
  border-radius: 12px; padding: 14px 16px; font-size: 14.5px; font-weight: 600; line-height: 1.7;
  position: relative; border: 1px solid rgba(31,58,48,.08); overflow: hidden;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease,
              border-color .25s ease, filter .25s ease;
}
/* 渐变扫光：悬停时一道高光从左上扫到右下 */
.tag-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 70%);
  transform: translateX(-130%); transition: transform .75s ease;
}
.tag-card:hover::after { transform: translateX(130%); }
/* 悬浮 + 弹性回弹 + 色彩渐变增艳 + 主色光晕 */
.tag-card:hover {
  transform: translateY(-6px) scale(1.035);
  filter: brightness(1.06) saturate(1.15);
  box-shadow: 0 16px 32px rgba(31,58,48,.18), 0 0 0 1px rgba(46,125,99,.28);
  border-color: rgba(46,125,99,.5);
}
.tag-card:active { transform: translateY(-1px) scale(.99); }
/* 文字跟随卡片浮起：明显上浮 + 放大 + 转主色 + 立体投影 */
.tag-txt { display: block; transition: transform .3s cubic-bezier(.34,1.56,.64,1), text-shadow .3s ease, color .3s ease; }
.tag-card:hover .tag-txt { transform: translateY(-3px) scale(1.05); color: var(--main-d); text-shadow: 0 5px 12px rgba(31,58,48,.25); }
@keyframes tag-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
/* backwards：入场动画结束后释放 transform 控制权，否则 fill-mode:both 会锁死 :hover 的浮动 */
.tag-in { animation: tag-in .4s ease backwards; }
.del-x { position: absolute; top: 6px; right: 10px; cursor: pointer; opacity: .55; font-size: 16px; line-height: 1; transition: opacity .15s, color .15s, transform .15s; }
.del-x:hover { opacity: 1; color: #b03a2e; transform: scale(1.2); }

/* ── 解题万能地图 ── */
.map-progress { display: flex; gap: 8px; }
.map-dot { flex: 1; height: 8px; border-radius: 999px; background: #ecebe4; cursor: pointer; transition: background .3s, box-shadow .3s; }
.map-dot.done { background: var(--subj); }
.map-dot.cur { background: linear-gradient(90deg, var(--subj), var(--subj-d)); box-shadow: 0 0 0 3px var(--subj-shadow); }
.map-flow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 12px; }
.map-step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-node { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; background: var(--subj-soft); color: var(--subj-d); border: 2px solid var(--subj-border); transition: all .3s; }
.step-node.done { background: var(--subj); color: #fff; border-color: var(--subj); }
.step-node.cur { background: #fff; color: var(--subj); border-color: var(--subj); box-shadow: 0 0 0 4px var(--subj-shadow); }
.step-node.sm { width: 26px; height: 26px; font-size: 12px; border-width: 1.5px; }
.step-name { font-size: 13px; font-weight: 700; color: var(--ink2); }
.step-name.cur { color: var(--subj-d); }
.flow-arrow { width: 46px; height: 24px; flex-shrink: 0; color: var(--subj); }
/* 箭头虚线流动 + 光点沿路径移动 */
@keyframes dashflow { to { stroke-dashoffset: -24; } }
.flow-line { stroke-dasharray: 5 7; animation: dashflow 1.2s linear infinite; }
@media (max-width: 820px) { .flow-arrow { display: none; } }
.map-head { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(31,58,48,.08); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: background .2s, border-color .2s; }
.map-head:hover { background: var(--subj-soft); border-color: var(--subj-border); }
.map-head.on { background: var(--subj-soft); border-color: var(--subj-border); }
.dict-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }

/* ── 弹层/提示 ── */
.star-toast {
  position: fixed; left: 50%; top: 28%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 12px; padding: 14px 24px; font-size: 17px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.14); z-index: 99; text-align: center;
  animation: pop .45s ease; border: 1px solid var(--line);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -42%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.mask { position: fixed; inset: 0; background: rgba(31,58,48,.42); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { background: #fff; border-radius: 16px; padding: 24px; max-width: 460px; width: 100%; border: 1px solid var(--line); }

/* ── 表格 ── */
table.mini { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.mini th, table.mini td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }

/* ── 登录页 ── */
body.login-page {
  background: linear-gradient(155deg, #f7f4ee 0%, #f2f4ef 55%, #eef1ec 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; pointer-events: none; }
.glow-a { width: 420px; height: 420px; background: #dcebdd; top: -120px; left: -110px; }
.glow-b { width: 380px; height: 380px; background: #e3e9f2; bottom: -110px; right: -90px; }
.glow-c { width: 200px; height: 200px; background: #efe3c8; top: 42%; left: 74%; }
.login-wrap { position: relative; z-index: 2; width: 100%; max-width: 410px; padding: 24px; }
.login-card {
  background: #fff; border-radius: 16px; padding: 40px 38px 32px;
  border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(31,58,48,.10);
}
.login-mark { width: 52px; height: 52px; margin: 0 auto; border-radius: 13px; background: var(--main-soft); border: 1px solid #d3e5db; display: flex; align-items: center; justify-content: center; color: var(--main); }
.login-title { font-size: 24px; letter-spacing: 1px; margin-top: 16px; text-align: center; }
.login-sub { font-size: 13px; color: var(--ink3); margin-top: 6px; text-align: center; }
.login-form { margin-top: 26px; }
.err-bar { background: var(--err-bg); color: var(--err); border: 1px solid #f2d5cf; border-radius: 10px; padding: 9px 13px; font-size: 13px; margin-bottom: 14px; }
.shake { animation: shake .5s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.f-group { margin-bottom: 16px; }
.f-input {
  position: relative; display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.f-input:hover { border-color: #cdd9d2; }
.f-input.focus { border-color: var(--main); box-shadow: 0 0 0 3px rgba(46,125,99,.12); }
.f-icon { padding-left: 14px; color: var(--ink3); display: flex; }
.f-input.focus .f-icon { color: var(--main); }
.f-input input { flex: 1; border: none; outline: none; background: transparent; padding: 14px 12px 14px 10px; font-size: 15px; color: var(--ink); font-family: inherit; }
.f-label { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); color: var(--ink3); font-size: 15px; pointer-events: none; transition: all .18s; }
.f-input input:focus + .f-label, .f-input input:not(:placeholder-shown) + .f-label {
  top: 0; transform: translateY(-50%) scale(.82); color: var(--main);
  background: #fff; padding: 0 6px;
}
.f-input .eye { padding-right: 13px; cursor: pointer; color: var(--ink3); display: flex; }
.f-input .eye:hover { color: var(--main); }
.login-btn { margin-top: 6px; padding: 15px; font-size: 16px; }
.login-tip { text-align: center; font-size: 12px; color: var(--ink3); margin-top: 16px; }

/* ── 登录 · 拼图滑块验证（点击 → 弹窗验证）── */
.captcha-wrap { margin: 2px 0 14px; }
.captcha-launcher {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 42px; border-radius: 11px; border: 1.5px solid #d3e5db;
  background: var(--main-soft); color: var(--main); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.captcha-launcher:hover { background: #d8e8dd; border-color: var(--main); box-shadow: 0 3px 10px rgba(46,125,99,.18); transform: translateY(-1px); }
.captcha-launcher:active { transform: translateY(0); }
.captcha-done {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 42px; border-radius: 11px; background: #dcefe3;
  border: 1.5px solid #9fc7b2; color: var(--main); font-size: 14px; font-weight: 600;
  animation: capIn .25s ease;
}
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes capFade { from { opacity: 0; } to { opacity: 1; } }

/* 验证弹窗 */
.captcha-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.captcha-mask { position: absolute; inset: 0; background: rgba(31,58,48,.38); animation: capFade .2s ease; }
.captcha-box {
  position: relative; width: 384px; background: #fff; border-radius: 16px;
  padding: 20px 24px 18px; box-shadow: 0 22px 60px rgba(31,58,48,.28);
  animation: capIn .25s ease;
}
.captcha-box-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.captcha-close { cursor: pointer; color: var(--ink3); display: flex; padding: 3px; border-radius: 8px; transition: color .2s, background .2s; }
.captcha-close:hover { color: var(--err); background: #f5ece8; }
.captcha-canvas { position: relative; width: 320px; height: 160px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); background: #f0ece0; margin: 0 auto; box-shadow: inset 0 1px 4px rgba(31,58,48,.06); }
.captcha-canvas.pass { border-color: var(--main); box-shadow: 0 0 0 3px rgba(46,125,99,.16); }
.cap-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cap-bg svg, .cap-piece svg { display: block; }
.cap-piece { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(31,58,48,.35)); }
.captcha-tip { font-size: 12.5px; color: var(--ink3); text-align: center; margin-top: 9px; transition: color .2s; }
.captcha-tip.ok { color: var(--main); font-weight: 600; }
.captcha-tip.err { color: var(--err); }
.captcha-track { position: relative; width: 320px; height: 40px; margin: 10px auto 0; border-radius: 20px; background: #efe9db; border: 1px solid #e0d8c4; overflow: hidden; }
.captcha-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #cfe3d4, #9fc7b2); transition: width .08s linear; }
.captcha-slider { position: absolute; left: 0; top: 2px; width: 36px; height: 36px; border-radius: 18px; background: var(--main); color: #fff; display: flex; align-items: center; justify-content: center; cursor: grab; box-shadow: 0 2px 6px rgba(46,125,99,.35); transition: box-shadow .18s, transform .15s; }
.captcha-slider:hover { box-shadow: 0 4px 12px rgba(46,125,99,.45); transform: translateY(-1px); }
.captcha-slider.on { cursor: grabbing; transform: scale(.94); }
.captcha-box-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.captcha-refresh { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink3); cursor: pointer; padding: 4px 10px; border-radius: 8px; transition: color .2s, background .2s; }
.captcha-refresh:hover { color: var(--main); background: var(--main-soft); }

/* ── 修改密码 · 弹窗 ── */
.pwd-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.pwd-mask { position: absolute; inset: 0; background: rgba(31,58,48,.38); animation: capFade .2s ease; }
.pwd-box { position: relative; width: 360px; background: #fff; border-radius: 16px; padding: 22px 24px 20px; box-shadow: 0 22px 60px rgba(31,58,48,.28); animation: capIn .25s ease; }
.pwd-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.pwd-close { cursor: pointer; color: var(--ink3); display: flex; padding: 3px; border-radius: 8px; transition: color .2s, background .2s; }
.pwd-close:hover { color: var(--err); background: #f5ece8; }
.pwd-form { display: flex; flex-direction: column; gap: 10px; }
.pwd-input { border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 14px; color: var(--ink); font-family: inherit; outline: none; transition: border-color .18s, box-shadow .18s; }
.pwd-input:focus { border-color: var(--main); box-shadow: 0 0 0 3px rgba(46,125,99,.12); }
.pwd-msg { font-size: 12.5px; min-height: 16px; }
.pwd-form .big-btn { padding: 13px; font-size: 15px; }
.login-foot { font-size: 12.5px; color: var(--ink3); margin-top: 22px; text-align: center; line-height: 1.8; }

/* ── 主框架 ── */
body.shell-page { background: var(--bg); }
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 210px; flex-shrink: 0; background: #fbfaf6; color: var(--ink);
  display: flex; flex-direction: column; padding: 18px 0;
  border-right: 1px solid var(--line); overflow: hidden;
}
.sidebar-logo { text-align: center; padding: 8px 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.sidebar-name { font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.sidebar-role { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.side-nav {
  flex: 1; min-height: 0; overflow-y: auto; padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: #d8e5dc; border-radius: 4px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.nav-group-label {
  font-size: 11px; letter-spacing: 3px; color: var(--ink3); font-weight: 700;
  padding: 12px 14px 2px; text-transform: uppercase;
}
.menu-item {
  display: flex; align-items: center; gap: 11px; color: var(--ink2); font-size: 15px; font-weight: 600;
  padding: 11px 14px; border-radius: 10px; position: relative; transition: all .15s;
}
.menu-item:hover { background: #f1efe8; color: var(--main-d); }
.menu-item.on { background: var(--main-soft); color: var(--main-d); font-weight: 700; }
.menu-item.on::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px;
  background: var(--main); border-radius: 3px;
}
.sidebar-foot { padding: 14px 10px; flex: none; display: none; }
.logout-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink2);
  border-radius: 10px; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.logout-btn:hover { background: #f1efe8; color: var(--err); border-color: #e3ccc6; }
.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0;
}
.topbar-title { font-size: 17px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-pill { display: flex; align-items: center; gap: 7px; color: var(--ink2); font-size: 14px; font-weight: 600; background: none; border: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-family: inherit; transition: background .18s, color .18s; }
.user-pill:hover { background: var(--main-soft); color: var(--main-d); }
.user-menu-wrap { position: relative; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 14px 40px rgba(31,58,48,.18); padding: 6px; z-index: 90; animation: capIn .18s ease; }
.user-menu-head { padding: 7px 12px 8px; border-bottom: 1px dashed var(--line); margin-bottom: 5px; font-size: 12.5px; color: var(--ink3); font-weight: 600; }
.user-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: none; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink2); font-weight: 600; cursor: pointer; font-family: inherit; transition: background .16s, color .16s; }
.user-menu-item:hover { background: var(--main-soft); color: var(--main-d); }
.user-menu-item.danger:hover { background: #f7ece8; color: var(--err); }
.ic-xs { width: 14px; height: 14px; }
.must-star { margin-left: auto; display: inline-flex; color: #d9a518; animation: starPulse 2.6s ease-in-out infinite; flex: none; }
.must-star svg { filter: drop-shadow(0 0 3px rgba(217,165,24,.55)); }
.menu-item:hover .must-star { transform: rotate(18deg) scale(1.12); transition: transform .2s ease; }
@keyframes starPulse {
  0%, 100% { opacity: .55; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.08); }
}
.shell-frame { flex: 1; width: 100%; border: none; background: var(--bg); }
.progress-track { height: 12px; border-radius: 999px; background: #ecebe4; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--main), #3f8f73); transition: width .6s ease; }
.card.morning { background: linear-gradient(135deg, #f0f7f3 0%, #e9f2ec 100%); border-color: #dcebe1; }
.card.quote { border-left: 4px solid var(--main); }
.card.math-hero { background: linear-gradient(135deg, var(--subj-soft) 0%, var(--subj-soft2) 100%); border-color: var(--subj-border); }
.card.math-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 22px var(--subj-shadow); }

/* 学科切换卡（顶部三科） */
.subject-card { border: 2px solid transparent; transition: all .2s; }
.subject-card:hover { transform: translateY(-2px); }
.subject-card.on { border-color: var(--subj); background: var(--subj-soft); }

/* ── 全站鼠标交互增强（悬浮反馈） ── */
.card, .stat-card, .badge, .chip, .big-btn, .today-item, .menu-item {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(46, 125, 99, .10); border-color: #cfe3d8; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(46, 125, 99, .08); }
.badge:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(46, 125, 99, .14); }
.chip:hover:not(.on) { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(46, 125, 99, .12); }
.big-btn:hover:not(:disabled) { transform: translateY(-1px); }
.menu-item:hover { transform: translateX(2px); }
.today-item { border-radius: 12px; }
.today-item .ic { transition: transform .18s ease, color .18s ease; }
.today-item:hover { background: var(--main-soft); transform: translateY(-2px); }
.today-item:hover .ic { transform: scale(1.12); }
.progress-track:hover { box-shadow: 0 0 0 3px rgba(46, 125, 99, .08); }

/* ── 学习悟道页 ── */
.wu-hero { border-left: 5px solid var(--main); background: linear-gradient(135deg, #f0f7f3 0%, #e9f2ec 100%); border-color: #dcebe1; }
.wu-quote-p { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.7; margin-top: 12px; }
.wu-quote-s { font-size: 14.5px; color: var(--ink2); line-height: 1.8; margin-top: 8px; }
/* 树形四层：卡片之间用树干连接，顶部树冠、底部根系 */
.wu-canopy { width: 130px; height: 30px; display: block; margin: 0 auto 2px; color: var(--main); }
.wu-trunk { width: 5px; height: 30px; margin: 2px auto; background: linear-gradient(180deg, #d9e8de 0%, var(--main) 100%); border-radius: 3px; flex: none; }
.wu-roots { width: 150px; height: 42px; display: block; margin: 4px auto 0; color: var(--main); }
.wu-layer-row { display: flex; align-items: center; gap: 12px; }
.wu-layer { cursor: pointer; border: 2px solid transparent; border-radius: 16px; padding: 20px 22px; display: flex; align-items: center; gap: 16px; position: relative; transition: all .22s ease; flex: 1 1 auto; }
.wu-layer:hover { transform: translateX(4px); box-shadow: 0 8px 20px rgba(46, 125, 99, .14); }
.wu-layer.on { border-color: #b3541e; }
/* 卡片外侧的流动箭头（指向右侧详情）：hover 卡片所在行时浮现 */
.wu-flow-arrow { flex: none; color: #1e5a47; opacity: 0; transform: translateX(-8px); transition: opacity .25s ease, transform .25s ease; }
.wu-layer-row:hover .wu-flow-arrow { opacity: 1; transform: translateX(0); }
.wu-badge { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 800; flex: none; }
.wu-root { background: var(--main); color: #fff; box-shadow: 0 3px 10px rgba(46, 125, 99, .22); }
.wu-fruit { background: #3d7a63; color: #fff; box-shadow: 0 3px 10px rgba(46, 125, 99, .18); }
.wu-mid { background: #fdfaf2; color: #2b3a36; border: 1px solid #d8e5dc; }
.wu-badge-mid { background: #e8f1ec; color: var(--main); }
.wu-detail-card { transition: all .25s ease; }
.wu-detail-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(46, 125, 99, .14); border-color: #c8dccf; }
.wu-detail-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; margin: 0 -14px; border-bottom: 1px dashed #eef1ec; font-size: 15px; line-height: 1.65; border-radius: 10px; position: relative; transition: background .2s ease, transform .2s ease; }
.wu-detail-item::before { content: ''; position: absolute; left: 2px; top: 20%; height: 60%; width: 3px; background: var(--main); border-radius: 2px; opacity: 0; transform: scaleY(.4); transition: all .2s ease; }
.wu-detail-item:hover { background: #eef5f0; transform: translateX(4px); }
.wu-detail-item:hover::before { opacity: 1; transform: scaleY(1); }
.wu-detail-item:hover .wu-detail-no { background: var(--main); color: #fff; }
.wu-detail-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e8f1ec; color: var(--main); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; transition: background .2s ease, color .2s ease; }
.wu-detail-tip { margin-top: 18px; padding: 14px 16px; border-top: none; border-radius: 10px; background: #f7f9f5; font-size: 13.5px; line-height: 1.75; color: #5c6f67; transition: background .2s ease, transform .2s ease; }
.wu-detail-tip:hover { background: #f3efdf; }
.wu-fly { background: #eef3ea; border: 1px solid #cfe0d3; color: var(--main); border-radius: 20px; padding: 7px 14px; font-size: 14px; font-weight: 700; transition: all .2s ease; }
.wu-fly:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(46, 125, 99, .16); }
.wu-arr { color: var(--main); font-weight: 800; font-size: 18px; }
.wu-fly-arrow { flex: none; color: var(--main); }
/* 回环大弧线：横跨飞轮上方，从"自信"绕回"动力" */
.wu-fly-loop { position: absolute; left: 1%; right: 1%; top: -22px; width: 98%; height: 30px; color: var(--main); pointer-events: none; }
.wu-arr-back { color: #b3541e; font-weight: 800; font-size: 16px; padding-left: 4px; }
.wu-principle { flex: 1; min-width: 220px; }
.wu-principle .ic { color: var(--main); }
.wu-master { font-size: 15.5px; line-height: 1.9; color: var(--ink); }
.wu-master-name { font-size: 13px; font-weight: 700; color: var(--main); margin-top: 10px; }
.wu-master-tag { font-size: 12px; color: var(--ink3); margin-top: 3px; }

/* ── 失败博物馆 · 藏品陈列 ── */
.fail-theme {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}
.fail-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fail-item {
  margin-top: 10px; background: #faf8f2; border: 1px solid var(--line);
  border-left-width: 4px; border-radius: 12px; padding: 12px 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fail-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fail-empty { transition: transform .2s ease; }
.fail-empty:hover { transform: translateY(-2px); }

/* ── 作业及复预习 v2：作业区清单 + 复习预习区阶段 ── */
.plan-no {
  width: 24px; height: 24px; border-radius: 6px; background: var(--main-soft); color: var(--main-d);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.plan-no.done { background: var(--main); color: #fff; }
.plan-done-tag { font-size: 12px; color: var(--main-d); font-weight: 600; flex-shrink: 0; }
.sop-card { border-left: 4px solid var(--subj-acc, var(--main)); }

.phase-block {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fcfbf6; transition: opacity .3s, background .3s;
}
.phase-block.locked { opacity: .58; background: #f6f5ef; }
.phase-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.phase-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--main); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff;
}
.phase-dot.done { background: var(--main); border-color: var(--main); }
.phase-steps { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.phase-step {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink2);
  background: #f6f4ec; border: 1px solid #ece7da; border-radius: 8px; padding: 6px 10px;
}
.step-num {
  width: 18px; height: 18px; border-radius: 50%; background: var(--subj-acc, var(--main));
  color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* 复习/预习中 · 全屏沉浸 */
.focus-overlay {
  position: fixed; inset: 0; z-index: 80; background: linear-gradient(160deg, rgba(23,54,44,.96) 0%, rgba(32,74,60,.96) 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.focus-ripple {
  position: absolute; border-radius: 50%; border: 2px solid rgba(207,232,220,.28);
  animation: focusPing 2.8s ease-out infinite;
}
.focus-ripple.r1 { width: 180px; height: 180px; }
.focus-ripple.r2 { width: 320px; height: 320px; animation-delay: .5s; }
.focus-ripple.r3 { width: 460px; height: 460px; animation-delay: 1s; }
@keyframes focusPing {
  0% { transform: scale(.4); opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}
.focus-box {
  position: relative; z-index: 2; max-width: 420px; width: 92%; text-align: center; color: #fdfaf3;
  animation: focusBreath 3.2s ease-in-out infinite;
}
@keyframes focusBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: .82; }
}
.focus-title { font-size: 30px; font-weight: 800; letter-spacing: 4px; margin: 8px 0 6px; }
.focus-quote {
  margin: 6px auto 12px; font-size: 17px; font-weight: 600; letter-spacing: 1px;
  color: rgba(253,250,243,.92); line-height: 1.6; max-width: 360px;
}
.focus-tip { font-size: 13.5px; color: rgba(253,250,243,.78); line-height: 1.6; }
.focus-steps { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; text-align: left; }
.focus-step {
  display: flex; align-items: center; gap: 9px; font-size: 14px; color: #fdfaf3;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 9px 12px;
}
.focus-step .step-num { background: #fdfaf3; color: #17362c; }
.focus-box .big-btn.line { border-color: rgba(253,250,243,.7); color: #fdfaf3; background: transparent; }
.focus-box .big-btn.line:hover { background: rgba(255,255,255,.12); }



/* ── 首页快速导航（作业清单 → 习惯打卡 → 数学强化） ── */
.qnav { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; }
.qnav-card { flex:1; position:relative; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:13px 8px 11px; text-align:center; cursor:pointer; box-shadow:var(--shadow); transition:transform .15s ease, box-shadow .15s ease; }
.qnav-card:hover { transform:translateY(-2px); box-shadow:0 5px 14px rgba(46,125,99,.14); }
.qnav-card .ic { color:var(--main); }
.qnav-name { font-size:13.5px; font-weight:800; color:#3a352c; margin-top:5px; }
.qnav-status { font-size:12px; margin-top:3px; color:#c2410c; font-weight:700; display:inline-flex; align-items:center; gap:3px; }
.qnav-status.ok { color:var(--main-d); }
.qnav-dot { position:absolute; top:9px; right:9px; color:#d9a518; animation:starPulse 2.6s ease-in-out infinite; flex:none; }
.qnav-dot svg { filter:drop-shadow(0 0 3px rgba(217,165,24,.55)); }
.qnav-arrow { width:13px; height:13px; flex:0 0 auto; color:var(--main); opacity:.55; align-self:center; }

/* ── 升级进度 + 今日总进度 一行两列等高 ── */
.dual-card { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.dual-card .card { margin-bottom:0; display:flex; flex-direction:column; justify-content:center; }


/* ── 首页全屏专注（番茄钟运行/暂停时盖住全页） ── */
.focus-full { position:fixed; inset:0; z-index:300; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; background:radial-gradient(ellipse at 50% 30%, #2f8a6e 0%, #1f5c49 55%, #153f31 100%); }
.focus-full-ring { width:230px; height:230px; border-radius:50%; background:conic-gradient(#f4e8c8 var(--p, 0%), rgba(244,232,200,.14) 0); display:flex; align-items:center; justify-content:center; box-shadow:0 0 60px rgba(244,232,200,.18); }
.focus-full-inner { width:190px; height:190px; border-radius:50%; background:rgba(15,48,37,.55); display:flex; align-items:center; justify-content:center; }
.focus-full-num { font-size:58px; font-weight:800; color:#f6efdc; letter-spacing:2px; font-variant-numeric:tabular-nums; }
.focus-full-title { font-size:19px; font-weight:800; color:#f6efdc; letter-spacing:2px; }
.focus-full-min { font-size:14px; color:rgba(246,239,220,.75); }
.focus-full-btn { min-width:130px; padding:11px 20px; border:none; border-radius:999px; background:#f4e8c8; color:#1f5c49; font-size:15px; font-weight:800; cursor:pointer; box-shadow:0 3px 10px rgba(0,0,0,.18); transition:transform .12s ease; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.focus-full-btn:hover { transform:translateY(-2px); }
.focus-full-btn.line { background:transparent; color:#f6efdc; border:1px solid rgba(246,239,220,.5); }


/* ── 全屏专注联动（子页发 geFull，隐藏左侧菜单与顶栏） ── */
body.shell-full .sidebar { display:none; }
body.shell-full .topbar { display:none; }
