/* ============================================================
   词王 WordKing  ——  样式表
   设计：移动优先、深色为默认、卡片化、大字号、安全区适配
   ============================================================ */

:root {
  --bg: #0e1014;
  --bg2: #141821;
  --card: #181d27;
  --card2: #1f2531;
  --line: #262d3b;
  --tx: #e9edf4;
  --tx2: #9aa5b8;
  --tx3: #626d80;
  --ac: #4c8dff;
  --ac-soft: rgba(76, 141, 255, .14);
  --ok: #2ecc71;
  --ok-soft: rgba(46, 204, 113, .14);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, .14);
  --bad: #f05252;
  --bad-soft: rgba(240, 82, 82, .14);
  --purple: #a78bfa;
  --r: 18px;
  --r-sm: 12px;
  --sh: 0 8px 30px rgba(0, 0, 0, .35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

[data-theme="light"] {
  --bg: #f2f5fa;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f6f8fc;
  --line: #e3e8f0;
  --tx: #131820;
  --tx2: #5b6577;
  --tx3: #8d97a8;
  --ac: #2f6fed;
  --ac-soft: rgba(47, 111, 237, .1);
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, .1);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, .1);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, .09);
  --purple: #7c3aed;
  --sh: 0 6px 24px rgba(18, 28, 45, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  background: var(--bg);
  color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

::-webkit-scrollbar { width: 0; height: 0; }

/* ---------------- 布局骨架 ---------------- */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

main#view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px calc(96px + var(--safe-b));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
  letter-spacing: .3px;
  flex: 1;
}
.topbar .sub { font-size: 12px; color: var(--tx3); font-weight: 400; margin-left: 6px; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 720px;
  display: flex;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--tx3);
  font-size: 11px;
  padding: 6px 0 4px;
  border-radius: 12px;
  transition: color .15s, transform .1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tabbar a .ic { font-size: 20px; line-height: 1; filter: grayscale(.6) opacity(.7); transition: .15s; }
.tabbar a.on { color: var(--ac); }
.tabbar a.on .ic { filter: none; transform: translateY(-1px); }
.tabbar a:active { transform: scale(.94); }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card + .card { margin-top: 12px; }

.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--tx2); }
.dim { color: var(--tx3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 13px;
  background: var(--card2);
  color: var(--tx);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--line);
  transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ac); border-color: transparent; color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--ac) 34%, transparent); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 22px; font-size: 16.5px; border-radius: 15px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  background: var(--card2);
  color: var(--tx2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag.ac { background: var(--ac-soft); color: var(--ac); border-color: transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tag.purple { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); border-color: transparent; }

.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tx3);
  font-weight: 600;
  letter-spacing: .5px;
  margin: 20px 4px 8px;
  text-transform: uppercase;
}

/* ---------------- 今日页 ---------------- */
.hero {
  margin-top: 8px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 16%, var(--card)), var(--card) 62%);
  border: 1px solid color-mix(in srgb, var(--ac) 26%, var(--line));
  border-radius: 22px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 190px; height: 190px;
  right: -60px; top: -90px;
  background: radial-gradient(circle, color-mix(in srgb, var(--ac) 30%, transparent), transparent 70%);
  pointer-events: none;
}
.hero h2 { margin: 0 0 2px; font-size: 14px; color: var(--tx2); font-weight: 500; }
.hero .big { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.hero .big span { font-size: 15px; font-weight: 500; color: var(--tx2); margin-left: 4px; }

.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { width: 86px; height: 86px; flex: 0 0 auto; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 10px;
  text-align: center;
}
.stat b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.stat span { font-size: 11.5px; color: var(--tx3); }

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.quick {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform .1s, border-color .15s;
}
.quick:active { transform: scale(.98); }
.quick .ic { font-size: 20px; }
.quick b { font-size: 15px; }
.quick span { font-size: 11.5px; color: var(--tx3); }

/* ---------------- 学习卡片 ---------------- */
.study-wrap { padding-top: 6px; }

.study-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--card2);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ac), var(--purple));
  transition: width .3s ease;
}
.study-count { font-size: 12px; color: var(--tx3); font-variant-numeric: tabular-nums; }

.word-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px 18px;
  box-shadow: var(--sh);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.word-card.again-flash { animation: flashRed .5s; }
@keyframes flashRed {
  0% { box-shadow: 0 0 0 0 var(--bad-soft); }
  50% { box-shadow: 0 0 0 6px var(--bad-soft); }
  100% { box-shadow: var(--sh); }
}

.wc-word {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  word-break: break-word;
}
.wc-word.long { font-size: 30px; }
.wc-word.xlong { font-size: 24px; }
.wc-ph {
  color: var(--tx2);
  font-size: 15px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Segoe UI", "Lucida Sans Unicode", sans-serif;
}
.spk {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ac-soft);
  color: var(--ac);
  display: grid; place-items: center;
  font-size: 15px;
  flex: 0 0 auto;
  transition: transform .1s;
}
.spk:active { transform: scale(.9); }
.spk.playing { animation: pulseSnd .8s infinite; }
@keyframes pulseSnd {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.wc-meta { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

.answer-zone {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  animation: fadeUp .22s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.trans-list { display: flex; flex-direction: column; gap: 6px; }
.trans-line { font-size: 18px; font-weight: 600; line-height: 1.45; }
.trans-line em {
  font-style: normal;
  font-size: 12px;
  color: var(--ac);
  background: var(--ac-soft);
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 7px;
  vertical-align: 2px;
}
.en-def { font-size: 13.5px; color: var(--tx2); margin-top: 10px; line-height: 1.55; }

.block-title {
  font-size: 11.5px;
  color: var(--tx3);
  font-weight: 700;
  letter-spacing: .8px;
  margin: 16px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.block-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.ex-item { margin-bottom: 10px; }
.ex-en { font-size: 14.5px; line-height: 1.55; }
.ex-en b, .ex-en mark {
  color: var(--ac);
  background: var(--ac-soft);
  padding: 0 2px;
  border-radius: 4px;
  font-weight: 700;
}
.ex-cn { font-size: 13px; color: var(--tx2); margin-top: 2px; }
.ex-src { font-size: 11px; color: var(--tx3); margin-top: 2px; }

.mem-box {
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tx);
}
.mem-box .lbl { color: var(--warn); font-weight: 700; margin-right: 4px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12.5px;
  color: var(--tx2);
}
.chip b { color: var(--tx); font-weight: 600; }

.rel-item { font-size: 13px; color: var(--tx2); margin: 3px 0; }
.rel-item b { color: var(--tx); }

.judge-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.judge {
  padding: 12px 4px 11px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--card2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform .08s;
}
.judge:active { transform: scale(.95); }
.judge small { font-size: 10.5px; font-weight: 500; opacity: .7; }
.judge[data-q="0"] { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.judge[data-q="1"] { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.judge[data-q="2"] { color: var(--ac); background: var(--ac-soft); border-color: transparent; }
.judge[data-q="3"] { color: var(--ok); background: var(--ok-soft); border-color: transparent; }

.show-answer {
  margin-top: 16px;
  width: 100%;
  padding: 15px;
  border-radius: 15px;
  background: var(--ac);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ac) 32%, transparent);
}
.show-answer:active { transform: scale(.98); }

.card-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  color: var(--tx3);
  font-size: 12px;
}
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--card2);
  color: var(--tx2);
  font-size: 17px;
  border: 1px solid var(--line);
}
.icon-btn.on { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.icon-btn:active { transform: scale(.93); }

/* ---------------- 列表 ---------------- */
.list { display: flex; flex-direction: column; }
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.li:last-child { border-bottom: none; }
.li .w-main { font-size: 16.5px; font-weight: 650; }
.li .w-sub { font-size: 12.5px; color: var(--tx3); margin-top: 1px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.search-box input,
.search-box input[type="text"],
.search-box input:not([type]) {
  flex: 1;
  background: none !important;
  border: none !important;
  outline: none;
  padding: 0;
  font-size: 15px;
  border-radius: 0;
}
.search-box input::placeholder { color: var(--tx3); }

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--tx2);
  white-space: nowrap;
}
.fchip.on { background: var(--ac); color: #fff; border-color: transparent; font-weight: 600; }

/* 分批加载 */
.more-btn { width: 100%; margin: 14px 0 6px; }

/* ---------------- 统计 ---------------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 110px;
  margin-top: 12px;
}
.chart .col-b {
  flex: 1;
  background: var(--card2);
  border-radius: 5px 5px 2px 2px;
  position: relative;
  min-height: 3px;
  transition: height .35s ease;
}
.chart .col-b > i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--ac), color-mix(in srgb, var(--ac) 55%, transparent));
}
.chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--tx3); margin-top: 6px; }

.mastery-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0 8px;
  background: var(--card2);
}
.mastery-bar > i { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--tx2); }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------------- 设置项 ---------------- */
.setting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setting:last-child { border-bottom: none; }
.setting .grow b { font-size: 15px; font-weight: 600; display: block; }
.setting .grow small { color: var(--tx3); font-size: 12px; }

.stepper { display: flex; align-items: center; gap: 2px; background: var(--card2); border-radius: 11px; padding: 3px; border: 1px solid var(--line); }
.stepper button { width: 32px; height: 30px; border-radius: 8px; font-size: 17px; color: var(--tx2); }
.stepper button:active { background: var(--line); }
.stepper span { min-width: 42px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

input[type="text"], input[type="password"], input[type="number"], input:not([type]), select, textarea {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  outline: none;
  width: 100%;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--ac); }

.switch {
  width: 48px; height: 28px;
  border-radius: 99px;
  background: var(--line);
  position: relative;
  transition: background .2s;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(20px); }

/* ---------------- 测验 ---------------- */
.quiz-q {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 600;
  margin: 10px 0 16px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 13px;
  background: var(--card);
  border: 1.5px solid var(--line);
  margin-bottom: 9px;
  font-size: 15px;
  transition: .12s;
}
.opt .idx {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--card2);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx3);
  flex: 0 0 auto;
}
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .idx { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .idx { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }

.spell-input {
  font-size: 24px !important;
  letter-spacing: 1px;
  text-align: center;
  padding: 16px !important;
  font-weight: 700;
}

/* ---------------- 弹层 / Toast ---------------- */
#sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
#sheet-mask.on { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 720px;
  max-height: 86dvh;
  overflow-y: auto;
  background: var(--bg2);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + var(--safe-b));
  z-index: 61;
  transition: transform .28s cubic-bezier(.32, .72, .26, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
}
#sheet.on { transform: translate(-50%, 0); }
.sheet-handle {
  width: 38px; height: 4px;
  border-radius: 99px;
  background: var(--line);
  margin: 6px auto 12px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 14px);
  background: color-mix(in srgb, var(--tx) 92%, transparent);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 90;
  max-width: 84vw;
  text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--tx3);
}
.empty .ic { font-size: 44px; margin-bottom: 12px; opacity: .7; }
.empty b { display: block; color: var(--tx2); font-size: 16px; margin-bottom: 6px; }

/* ---------------- 结算 ---------------- */
.finish {
  text-align: center;
  padding: 30px 10px;
}
.finish .big-emoji { font-size: 60px; }
.finish h2 { font-size: 24px; margin: 10px 0 4px; }
.finish .stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.finish .stats3 div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 6px; }
.finish .stats3 b { display: block; font-size: 22px; }
.finish .stats3 span { font-size: 11.5px; color: var(--tx3); }

/* ---------------- 启动加载层 ---------------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  transition: opacity .35s;
}
#boot.gone { opacity: 0; pointer-events: none; }
.boot-logo {
  width: 68px; height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5b9bff, #a78bfa);
  display: grid; place-items: center;
  font-size: 36px; font-weight: 800; color: #fff;
  box-shadow: 0 10px 30px rgba(76, 141, 255, .35);
}
.boot-tx { font-size: 15px; font-weight: 600; }
.boot-tip { font-size: 12px; color: var(--tx3); }

/* ---------------- 词书切换 ---------------- */
.book-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  margin: 8px 0 10px;
  text-align: left;
}
.book-bar:active { transform: scale(.99); }
.book-bar .bic { font-size: 22px; line-height: 1; }
.book-bar b { display: block; font-size: 15.5px; font-weight: 650; }
.book-bar small { color: var(--tx3); font-size: 11.5px; }

.book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.book-row:last-child { border-bottom: none; }
.book-row.now { background: transparent; }
.book-row .grow b { font-size: 15.5px; display: block; }
.book-row .grow small { color: var(--tx3); font-size: 11.5px; }
.book-row .tag { flex: 0 0 auto; }

.src-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.src-row:last-child { border-bottom: none; }
.src-row .grow b { font-size: 15px; display: block; font-weight: 600; }
.src-row .grow small { color: var(--tx3); font-size: 11.5px; }

.add-tabs { display: flex; gap: 8px; margin: 10px 0 14px; }
.add-tabs button {
  flex: 1;
  padding: 9px 6px;
  border-radius: 11px;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--tx2);
  font-size: 13px;
  font-weight: 600;
}
.add-tabs button.on { background: var(--ac); color: #fff; border-color: transparent; }

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 10px;
  color: var(--tx2);
  font-size: 14px;
}
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 桌面端微调 ---------------- */
@media (min-width: 760px) {
  main#view { padding-left: 20px; padding-right: 20px; }
  .wc-word { font-size: 46px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}
