/* ============================================================
   未央集 · 英语 — 设计系统
   浅色、低饱和、以阅读舒适度为第一优先
   ============================================================ */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;
  --line: #e7eaef;
  --line-2: #f0f2f6;

  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-bg: #eff5ff;
  --violet: #7c3aed;
  --violet-bg: #f5f0ff;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --teal: #0d9488;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .04), 0 20px 48px -20px rgba(16, 24, 40, .18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
::selection { background: #dbeafe; }

/* ---------------- 布局 ---------------- */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 232px; flex: 0 0 232px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 10px 20px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed 60%, #db2777);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .35);
}
.brand b { font-size: 15.5px; letter-spacing: .2px; }
.brand span { display: block; font-size: 10.5px; color: var(--ink-3); letter-spacing: 1.4px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: background .14s, color .14s;
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.on { background: var(--brand-bg); color: var(--brand-dark); font-weight: 600; }
.nav a .ic { width: 18px; text-align: center; opacity: .9; font-size: 15px; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }

.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.learner-switch {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); text-align: left;
}
.learner-switch:hover { border-color: #cfd6e0; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--violet-bg); color: var(--violet);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.learner-switch .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learner-switch .st { font-size: 10.5px; color: var(--ink-3); }

.main { flex: 1; min-width: 0; padding: 30px 36px 80px; max-width: 1180px; }

/* ---------------- 通用件 ---------------- */
.h1 { font-size: 23px; font-weight: 700; letter-spacing: -.3px; margin: 0 0 4px; }
.h2 { font-size: 16.5px; font-weight: 650; margin: 0; letter-spacing: -.1px; }
.h3 { font-size: 14px; font-weight: 650; margin: 0; }
.sub { color: var(--ink-2); font-size: 13.5px; margin: 0; }
.tiny { font-size: 11.5px; color: var(--ink-3); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 6px; }
.mt-l { margin-top: 26px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow);
}
.card.tight { padding: 14px 16px; }
.card.flat { box-shadow: none; }

.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 550; font-size: 14px;
  transition: all .14s;
}
.btn:hover { border-color: #cfd6e0; background: #fbfcfd; }
.btn:active { transform: translateY(.5px); }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .3), 0 6px 16px -8px rgba(37, 99, 235, .55);
}
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--line-2); color: var(--ink-2);
}
.chip.blue { background: var(--brand-bg); color: var(--brand-dark); }
.chip.violet { background: var(--violet-bg); color: var(--violet); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input {
  width: 100%; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  outline: none; transition: border-color .14s, box-shadow .14s;
}
.input:focus { border-color: #a8c4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }

.divider { height: 1px; background: var(--line); margin: 18px 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); font-size: 13.5px; }

/* ---------------- 顶栏（移动端）---------------- */
.mobile-top { display: none; }

/* ---------------- 首页 ---------------- */
.hero {
  background: linear-gradient(140deg, #111827 0%, #1e293b 55%, #312e81 100%);
  border-radius: 20px; padding: 24px 26px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(99, 102, 241, .55), transparent 62%);
  border-radius: 50%;
}
.hero .k { font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #a5b4fc; font-weight: 600; }
.hero .big { font-size: 30px; font-weight: 700; letter-spacing: -.8px; margin: 6px 0 2px; }
.hero .big em { font-style: normal; color: #93c5fd; }
.hero .desc { color: #cbd5e1; font-size: 13.5px; max-width: 520px; position: relative; }
.hero .hbot { display: flex; gap: 26px; margin-top: 18px; position: relative; flex-wrap: wrap; }
.hero .hbot div span { display: block; font-size: 11px; color: #94a3b8; }
.hero .hbot div b { font-size: 17px; font-variant-numeric: tabular-nums; }

.task {
  display: flex; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line-2);
  align-items: flex-start;
}
.task:last-child { border-bottom: none; }
.task .idx {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  background: var(--brand-bg); color: var(--brand-dark);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; margin-top: 2px;
}
.task.done .idx { background: var(--ok-bg); color: var(--ok); }
.task.done .tl { text-decoration: line-through; color: var(--ink-3); }
.task .tl { font-weight: 600; font-size: 14.5px; }
.task .ty { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.task .why {
  margin-top: 8px; padding: 8px 11px; border-radius: 9px;
  background: #f8fafc; border-left: 2.5px solid #c7d7f5;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
}
.task .why b { color: var(--brand-dark); font-weight: 600; }
.task .act { margin-left: auto; flex: none; align-self: center; }

.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.heat { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: #eef1f6; display: block; }

/* ---------------- 词汇卡 ---------------- */
.flash-wrap { max-width: 620px; margin: 0 auto; }
.qbar { display: flex; gap: 4px; height: 5px; border-radius: 99px; overflow: hidden; background: #eef1f6; margin-bottom: 18px; }
.qbar i { flex: 1; background: #eef1f6; transition: background .2s; }
.qbar i.done { background: #22c55e; }
.qbar i.now { background: var(--brand); }

.flash {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px 30px 28px; box-shadow: var(--shadow-lg); min-height: 300px;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  position: relative;
}
.flash .word { font-size: 38px; font-weight: 700; letter-spacing: -1px; word-break: break-word; }
.flash .ph { color: var(--ink-3); font-family: var(--mono); font-size: 14px; margin-top: 6px; }
.flash .hint { color: var(--ink-3); font-size: 12.5px; margin-top: 22px; }
.flash .rear { margin-top: 16px; }
.flash .def { font-size: 19px; font-weight: 600; }
.flash .pos { display: inline-block; font-size: 11.5px; color: var(--violet); background: var(--violet-bg); padding: 1px 7px; border-radius: 6px; margin-right: 7px; vertical-align: 2px; }
.flash .ex {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: #fafbfc;
  border: 1px solid var(--line-2); text-align: left; font-family: var(--serif); font-size: 15px; line-height: 1.7;
}
.flash .ex mark { background: #fef3c7; color: inherit; padding: 0 2px; border-radius: 3px; }
.flash .ex .cn { font-family: var(--font); font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.flash .flip-zone { cursor: pointer; }

.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }
.rate-grid button {
  padding: 11px 6px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel); display: flex; flex-direction: column; gap: 2px; align-items: center;
  transition: all .13s;
}
.rate-grid button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.rate-grid button b { font-size: 13.5px; font-weight: 650; }
.rate-grid button span { font-size: 10.5px; color: var(--ink-3); }
.rate-grid button[data-g="0"]:hover { border-color: #fca5a5; background: var(--bad-bg); }
.rate-grid button[data-g="1"]:hover { border-color: #fcd34d; background: var(--warn-bg); }
.rate-grid button[data-g="2"]:hover { border-color: #6ee7b7; background: var(--ok-bg); }
.rate-grid button[data-g="3"]:hover { border-color: #a5b4fc; background: var(--brand-bg); }
.rate-grid kbd {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; line-height: 1.4;
}

/* ---------------- 阅读 ---------------- */
.reader {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 40px; box-shadow: var(--shadow);
}
.reader .title { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 4px; }
.reader .body { font-family: var(--serif); font-size: 17px; line-height: 1.92; color: #1f2937; margin-top: 22px; }
.reader .body p { margin: 0 0 18px; }
.reader .body p:first-child::first-letter { font-size: 1.1em; }

.qitem { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.qitem:last-child { border-bottom: none; }
.qstem { font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px;
  border-radius: 10px; border: 1px solid var(--line); margin-bottom: 7px;
  cursor: pointer; transition: all .13s; font-size: 13.5px;
}
.opt:hover { border-color: #cfd6e0; background: #fcfcfd; }
.opt .k {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--ink-3);
}
.opt.sel { border-color: #a8c4f5; background: var(--brand-bg); }
.opt.sel .k { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.right { border-color: #6ee7b7; background: var(--ok-bg); }
.opt.right .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: #fca5a5; background: var(--bad-bg); }
.opt.wrong .k { background: var(--bad); border-color: var(--bad); color: #fff; }
.explain {
  margin-top: 8px; padding: 10px 13px; border-radius: 9px; background: #f8fafc;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.65; border-left: 2.5px solid #c7d7f5;
}

/* ---------------- 整本书 ---------------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.bookcard {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s; cursor: pointer;
}
.bookcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bookcard .cov {
  height: 118px; display: flex; align-items: flex-end; padding: 14px 16px;
  color: #fff; position: relative;
}
.bookcard .cov .lv {
  position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 700;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px);
  padding: 2px 8px; border-radius: 99px; letter-spacing: .4px;
}
.bookcard .cov .t { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.bookcard .bd { padding: 13px 16px 15px; flex: 1; display: flex; flex-direction: column; }
.bookcard .bd .au { font-size: 12px; color: var(--ink-3); }
.bookcard .bd .bl { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.6; flex: 1; }
.progress { height: 4px; border-radius: 99px; background: #eef1f6; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); border-radius: 99px; }

.bookread { display: grid; grid-template-columns: 1fr 316px; gap: 22px; align-items: start; }
.btext {
  font-family: var(--serif); font-size: 17.5px; line-height: 1.95; color: #1f2937;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 40px; box-shadow: var(--shadow);
}
.btext p { margin: 0 0 20px; }
.btext .w { cursor: pointer; border-radius: 3px; padding: 0 .5px; transition: background .1s; }
.btext .w:hover { background: #dbeafe; }
.btext .w.on { background: #bfdbfe; }
.btext .w.marked { border-bottom: 2px solid #fbbf24; }

.sidebar-sticky { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 14px; }
.lookup { min-height: 120px; }
.lookup .lw { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.lookup .lm { font-size: 15px; margin-top: 8px; font-weight: 550; }
.lookup .ln { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.lookup .lf { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }

.noteitem { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.noteitem:last-child { border-bottom: none; }
.noteitem .q { font-family: var(--serif); font-style: italic; color: #334155; }

/* ---------------- 写作 ---------------- */
.wgrid { display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.editor-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
.editor-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line-2); background: #fbfcfd;
}
.editor-area { position: relative; }
.editor-hl, .editor-input {
  margin: 0; padding: 18px 22px; font-family: var(--serif); font-size: 16.5px; line-height: 1.9;
  white-space: pre-wrap; word-wrap: break-word; letter-spacing: 0; border: 0;
  width: 100%; min-height: 340px;
}
.editor-hl { position: absolute; inset: 0; pointer-events: none; color: transparent; overflow: hidden; }
.editor-hl span { color: transparent; }
.editor-hl .er { border-bottom: 2px solid #ef4444; background: rgba(239, 68, 68, .07); border-radius: 2px; }
.editor-hl .wn { border-bottom: 2px solid #f59e0b; background: rgba(245, 158, 11, .08); border-radius: 2px; }
.editor-input {
  position: relative; background: transparent; color: var(--ink);
  caret-color: var(--brand); resize: none; outline: none; display: block;
}
.issue-item {
  padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  margin-bottom: 7px; cursor: pointer; transition: all .13s; background: var(--panel);
}
.issue-item:hover { border-color: #cfd6e0; background: #fcfcfd; }
.issue-item .t { font-size: 12.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.issue-item .m { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.issue-item .f { font-size: 12px; color: var(--ok); margin-top: 3px; }
.issue-item.er { border-left: 2.5px solid var(--bad); }
.issue-item.wn { border-left: 2.5px solid var(--warn); }

.ladder-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ladder-step .n {
  width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--line-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-3);
}
.ladder-step.cur .n { background: var(--brand); color: #fff; }
.ladder-step.past .n { background: var(--ok-bg); color: var(--ok); }
.ladder-step .tx { font-family: var(--serif); font-size: 14px; line-height: 1.6; flex: 1; }
.ladder-step .nt { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------------- 分析 ---------------- */
.stat-big { font-size: 27px; font-weight: 700; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.bars { display: flex; gap: 5px; align-items: flex-end; height: 116px; }
.bars .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bars .col i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #3b82f6, #93c5fd); min-height: 3px; }
.bars .col i.zero { background: #eef1f6; }

.errbar { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.errbar:last-child { border-bottom: none; }
.errbar .lbl { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.errbar .track { width: 108px; height: 6px; border-radius: 99px; background: #eef1f6; flex: none; overflow: hidden; }
.errbar .track i { display: block; height: 100%; border-radius: 99px; background: var(--bad); }
.errbar .cnt { width: 34px; text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex: none; }

.radar-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; }
.domlist { display: flex; flex-direction: column; gap: 9px; }
.domrow { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.domrow .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.domrow .nm { width: 62px; flex: none; }
.domrow .track { flex: 1; height: 6px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.domrow .track i { display: block; height: 100%; border-radius: 99px; }
.domrow .v { width: 34px; text-align: right; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------------- 认证页 ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px; background:
  radial-gradient(900px 500px at 15% 10%, #e8eefc 0%, transparent 55%),
  radial-gradient(700px 500px at 85% 90%, #f3ecff 0%, transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card .logo-lg {
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed 60%, #db2777);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 19px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, .35);
}
.auth-tabs { display: flex; gap: 4px; padding: 3px; background: var(--line-2); border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; padding: 7px; border: 0; background: transparent; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.auth-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.08); }

/* ---------------- 诊断 ---------------- */
.diag-q { max-width: 720px; margin: 0 auto; }
.diag-progress { display: flex; gap: 3px; margin-bottom: 20px; }
.diag-progress i { flex: 1; height: 3px; border-radius: 99px; background: #eef1f6; }
.diag-progress i.done { background: var(--brand); }
.diag-progress i.cur { background: #93c5fd; }

/* ---------------- Toast / Modal ---------------- */
.toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 11px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: tin .22s ease;
  max-width: 88vw;
}
.toast.bad { background: #991b1b; }
.toast.ok { background: #065f46; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-host { position: fixed; inset: 0; background: rgba(16, 24, 40, .38); z-index: 90; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal {
  background: var(--panel); border-radius: 18px; padding: 24px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg); animation: min .2s ease; max-height: 86vh; overflow: auto;
}
@keyframes min { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- 骨架屏 ---------------- */
.skel { background: linear-gradient(90deg, #f0f2f6 25%, #f7f8fa 37%, #f0f2f6 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .bookread { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
  .wgrid { grid-template-columns: 1fr; }
  .radar-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .side { display: none; }
  .main { padding: 16px 15px 96px; }
  .mobile-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30;
  }
  .mobile-top .brand { padding: 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g4.two { grid-template-columns: 1fr 1fr; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); display: flex; padding: 6px 4px 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 4px 0; color: var(--ink-3); font-size: 10px; font-weight: 550;
  }
  .tabbar a.on { color: var(--brand); }
  .tabbar a .ic { font-size: 17px; line-height: 1.2; }

  .hero { padding: 20px; border-radius: 16px; }
  .hero .big { font-size: 25px; }
  .reader { padding: 22px 18px; }
  .reader .body { font-size: 16.5px; }
  .btext { padding: 22px 18px; font-size: 16.5px; }
  .flash { padding: 26px 18px 22px; }
  .flash .word { font-size: 31px; }
  .auth-card { padding: 24px; }
  .rate-grid { grid-template-columns: 1fr 1fr; }
  .editor-hl, .editor-input { padding: 14px 16px; font-size: 16px; min-height: 280px; }
}

@media (min-width: 861px) { .tabbar { display: none; } }

/* ============================================================
   补充组件
   ============================================================ */
.seg {
  display: inline-flex; padding: 3px; background: var(--line-2);
  border-radius: 10px; gap: 2px; flex: none;
}
.seg button {
  padding: 6px 12px; border: 0; background: transparent; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background .12s, color .12s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }

.form-err {
  margin-top: 12px; padding: 9px 12px; border-radius: 9px;
  background: var(--bad-bg); color: var(--bad); font-size: 12.5px; line-height: 1.6;
}

a.errbar { text-decoration: none; color: inherit; }

.editor-toolbar .input:focus { box-shadow: none; border-color: transparent; }

.btext a, .reader a { text-decoration: none; }

/* 阅读卡片在书架网格里的紧凑版 */
.shelf .bookcard .cov .t { font-size: 15px; }

@media (max-width: 860px) {
  .between { flex-wrap: wrap; }
  .seg { overflow-x: auto; max-width: 100%; }
  .stat-big { font-size: 21px; }
  .editor-toolbar { flex-wrap: wrap; gap: 8px; }
}
