:root {
    --bg: #f5f6fa;
    --card: #ffffff;
    --primary: #4f6ef7;
    --primary-dark: #3d56d4;
    --primary-soft: #eef1fe;
    --text: #1f2430;
    --muted: #8a90a0;
    --border: #e6e8ef;
    --green: #16a34a;
    --green-soft: #e8f7ee;
    --red: #ef4444;
    --red-soft: #fdecec;
    --orange: #f59e0b;
    --orange-soft: #fef3e2;
    --shadow: 0 1px 3px rgba(30,40,80,.06), 0 6px 24px rgba(30,40,80,.06);
    --radius: 16px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
  }
  button { font-family: inherit; cursor: pointer; }
  input, textarea, select { font-family: inherit; font-size: 16px; }
  .hidden { display: none !important; }

  /* ===== 顶部 ===== */
  .app-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .header-left { display: flex; align-items: center; gap: 12px; }
  .logo {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7b8cff);
    color: #fff; display: flex; align-items: center; justify-content: center;
    flex: none;
  }
  .header-title h1 { font-size: 18px; font-weight: 700; line-height: 1.3; }
  .header-title p { font-size: 12px; color: var(--muted); }
  .header-right { display: flex; align-items: center; gap: 10px; }
  .user-chip {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border); background: #fff;
    color: var(--text); font-size: 13px; font-weight: 600;
    padding: 7px 13px; border-radius: 999px; transition: .15s;
  }
  .user-chip svg { width: 15px; height: 15px; color: var(--primary); }
  .user-chip:active { transform: scale(.96); }
  .sync-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--muted);
    background: #f1f2f6; padding: 5px 10px; border-radius: 999px;
  }
  .sync-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #c2c6d0; }
  .sync-badge.synced .dot { background: var(--green); }
  .sync-badge.syncing .dot { background: var(--orange); animation: blink 1s infinite; }
  .sync-badge.offline .dot { background: var(--muted); }
  @keyframes blink { 50% { opacity: .3; } }

  /* ===== Tab ===== */
  .tabbar {
    position: sticky; top: 66px; z-index: 29;
    display: flex; gap: 8px; background: var(--bg);
    padding: 10px 16px 6px;
    border-bottom: 1px solid var(--border);
  }
  .tab {
    flex: 1; max-width: 220px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 16px; border-radius: 12px; border: none;
    background: transparent; color: var(--muted); font-size: 15px; font-weight: 600;
    transition: all .18s;
  }
  .tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
  .tab svg { width: 18px; height: 18px; }

  main { max-width: 960px; margin: 0 auto; padding: 16px 16px 120px; }
  .view { display: block; }

  /* ===== 今日跟读 ===== */
  .today-card {
    background: linear-gradient(135deg, #4f6ef7, #6a83ff);
    color: #fff; border-radius: var(--radius);
    padding: 20px; display: flex; gap: 18px; align-items: center; justify-content: space-between;
    box-shadow: 0 10px 30px rgba(79,110,247,.25);
    margin-bottom: 16px;
  }
  .today-card h2 { font-size: 15px; font-weight: 600; opacity: .9; margin-bottom: 12px; }
  .today-stats { display: flex; gap: 22px; flex-wrap: wrap; }
  .stat { display: flex; flex-direction: column; }
  .stat .stat-num { font-size: 26px; font-weight: 800; line-height: 1.1; }
  .stat .stat-num.green { color: #b7ffd0; }
  .stat .stat-num.orange { color: #ffd9a0; }
  .stat .stat-label { font-size: 12px; opacity: .8; margin-top: 3px; }
  .today-right { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
  .ring-wrap { position: relative; width: 74px; height: 74px; }
  .ring-svg { width: 74px; height: 74px; transform: rotate(-90deg); }
  .ring-svg circle { fill: none; stroke-width: 8; }
  .ring-bg { stroke: rgba(255,255,255,.25); }
  .ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
  .ring-pct {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #fff;
  }
  .btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--primary); border: none;
    padding: 12px 20px; border-radius: 12px; font-size: 15px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
  }
  .btn-primary:active { transform: scale(.97); }

  /* ===== 工具条 ===== */
  .toolbar {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 14px 16px; margin-bottom: 14px;
  }
  .chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  /* 节 chips 多的时候:
       - 手机 (<720px): 横向滑动 (默认 overflow-x: auto)
       - 电脑 (>=720px): 自动换行,所有节一眼可见 */
  .section-chips { margin-top: 8px; }
  @media (min-width: 720px) {
    .chips.section-chips,
    .section-chips {
      flex-wrap: wrap;
      overflow-x: visible;
      padding-bottom: 0;
      row-gap: 8px;          /* 行间距 */
    }
    .chips.section-chips::-webkit-scrollbar,
    .section-chips::-webkit-scrollbar { display: none; }
    .section-chips .chip { flex: initial; }
  }
  .chip {
    flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 14px; white-space: nowrap;
  }
  .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
  .toolbar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
  .switch-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
  .switch { position: relative; width: 44px; height: 26px; flex: none; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch .track {
    position: absolute; inset: 0; background: #d6dae3; border-radius: 999px; transition: .2s;
  }
  .switch .track::before {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  }
  .switch input:checked + .track { background: var(--primary); }
  .switch input:checked + .track::before { transform: translateX(18px); }
  .voice-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
  .voice-row select {
    padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 14px; max-width: 220px;
  }
  .voice-row input[type=range] { width: 110px; accent-color: var(--primary); }
  .voice-row input[type=number] {
    width: 62px; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 16px; text-align: center;
    -moz-appearance: textfield;
  }
  .voice-row input[type=number]::-webkit-inner-spin-button,
  .voice-row input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  .rate-val { font-size: 13px; color: var(--text); min-width: 34px; }

  /* ===== 句子列表 ===== */
  .sentence-list { display: flex; flex-direction: column; gap: 12px; }
  .sentence-card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 16px 12px; border: 2px solid transparent; transition: border-color .2s, background .2s;
  }
  .sentence-card.active { border-color: var(--primary); background: var(--primary-soft); }
  .sentence-card.mastered { opacity: .78; }
  .sentence-top { display: flex; gap: 10px; align-items: flex-start; }
  .sentence-en { font-size: 18px; font-weight: 700; color: var(--text); flex: 1; line-height: 1.5; }
  .sentence-card.mastered .sentence-en { color: var(--green); }
  .sentence-zh { font-size: 15px; color: var(--muted); margin-top: 6px; padding-left: 2px; }
  .sentence-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
  .chapter-tag {
    font-size: 11px; color: var(--primary); background: var(--primary-soft);
    padding: 3px 9px; border-radius: 999px; font-weight: 600;
  }
  .icon-btn {
    width: 40px; height: 40px; border-radius: 10px; border: none; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
    transition: .15s;
  }
  .icon-btn svg { width: 19px; height: 19px; }
  .icon-btn:hover { background: #f1f2f6; }
  .mark-btn { color: var(--muted); background: #f1f2f6; border-radius: 999px; width: 38px; height: 38px; }
  .mark-btn.on { color: #fff; background: var(--green); }
  .listen-btn {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 38px; padding: 7px 15px; border-radius: 999px; border: none;
    background: var(--primary-soft); color: var(--primary);
    font-size: 13px; font-weight: 700; transition: .15s;
  }
  .listen-btn svg { width: 15px; height: 15px; }
  .listen-btn:active { transform: scale(.95); background: #dfe6ff; }
  .empty {
    text-align: center; color: var(--muted); padding: 48px 20px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px;
  }
  .empty.small { padding: 20px; box-shadow: none; border: 1px dashed var(--border); }

  /* ===== 管理面板 ===== */
  .panel {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px; margin-bottom: 14px;
  }
  .panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
  .panel h3 svg { width: 18px; height: 18px; color: var(--primary); }
  .panel .desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
  .field { margin-bottom: 12px; }
  .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
  .field input[type=text], .field input[type=password], .field textarea, .field select {
    width: 100%; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--border);
    background: #fbfbfd; color: var(--text); outline: none; transition: border-color .15s;
  }
  .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: #fff; }
  .field textarea { min-height: 72px; resize: vertical; line-height: 1.6; }
  .field textarea.code { min-height: 150px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 14px; }
  .field-row { display: flex; gap: 12px; }
  .field-row .field { flex: 1; }
  .btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 11px 18px; border-radius: 11px; border: none; font-size: 14px; font-weight: 600;
    transition: .15s;
  }
  .btn svg { width: 16px; height: 16px; }
  .btn-block { width: 100%; justify-content: center; }
  .btn.primary { background: var(--primary); color: #fff; }
  .btn.primary:active { background: var(--primary-dark); }
  .btn.ghost { background: #f1f2f6; color: var(--text); }
  .btn.danger { background: var(--red-soft); color: var(--red); }
  .btn:disabled { opacity: .5; cursor: not-allowed; }
  .format-tip {
    background: var(--primary-soft); border-radius: 11px; padding: 12px 14px;
    font-size: 13px; color: #4a5bb8; line-height: 1.7; margin-bottom: 12px;
  }
  .format-tip code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 5px; font-family: ui-monospace, monospace; }
  .mg-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 0; border-bottom: 1px solid var(--border);
  }
  .mg-row:last-child { border-bottom: none; }
  .mg-info { min-width: 0; }
  .mg-name { font-size: 15px; font-weight: 600; }
  .mg-ellipsis { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
  .mg-sub { font-size: 12px; color: var(--muted); margin-left: 10px; }
  .btn-sm { padding: 7px 13px; border-radius: 9px; border: none; font-size: 13px; font-weight: 600; flex: none; }
  .btn-sm.danger { background: var(--red-soft); color: var(--red); }
  .btn-sm.ghost { background: #f1f2f6; color: var(--text); }
  .btn-sm[disabled] { opacity: .35; cursor: not-allowed; }
  .mg-sub-line { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .mg-sub-line .expired { color: var(--red); font-weight: 600; }
  .mg-sub-line .valid { color: var(--green); }
  .mg-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; }
  .mg-group { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--card); }
  .mg-group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 12px 14px; cursor: pointer; user-select: none;
    background: #f6f7fb; transition: background .15s;
  }
  .mg-group-head:hover { background: #eef1f7; }
  .mg-group-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text); }
  .mg-group-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mg-group-count { font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
  .mg-group-chevron { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
  .mg-group.open > .mg-group-head .mg-group-chevron { transform: rotate(180deg); }
  .mg-group > .mg-group-body { display: none; }
  .mg-group.open > .mg-group-body { display: block; }
  .mg-group-body .mg-row { padding-left: 14px; padding-right: 14px; }
  .mg-group-body .mg-row:last-child { border-bottom: none; }
  .mg-group.mg-subgroup { margin: 6px 0 6px 12px; }
  .mg-group.mg-subgroup > .mg-group-head { background: #f5f7fb; }
  .pwd-status { font-size: 13px; margin-top: 12px; }
  .pwd-status.ok { color: var(--green); }
  .pwd-status.none { color: var(--orange); }
  .backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 560px) { .backup-grid { grid-template-columns: 1fr; } }

  /* ===== 播放条 ===== */
  .player-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--card); border-top: 1px solid var(--border);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(30,40,80,.08);
  }
  .player-inner { max-width: 960px; margin: 0 auto; }
  .player-progress { height: 3px; background: #eef0f5; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
  .player-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s; }
  .player-row { display: flex; align-items: center; gap: 10px; }
  .player-pos { font-size: 12px; color: var(--muted); min-width: 56px; font-variant-numeric: tabular-nums; }
  .player-controls { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
  .pbtn {
    width: 46px; height: 46px; border-radius: 50%; border: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f2f6; color: var(--text); transition: .15s;
  }
  .pbtn svg { width: 20px; height: 20px; }
  .pbtn.main { width: 56px; height: 56px; background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(79,110,247,.35); }
  .pbtn:active { transform: scale(.94); }

  /* ===== 弹层（登录 / 密码） ===== */
  .overlay {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(15,18,30,.45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
  }
  .overlay-box {
    background: #fff; border-radius: 20px; width: 100%; max-width: 360px;
    padding: 26px 22px; box-shadow: 0 20px 60px rgba(15,18,30,.25);
    max-height: 86vh; overflow-y: auto;
  }
  .overlay-box h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 4px; }
  .overlay-desc { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 16px; }
  .overlay-icon {
    width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 12px;
    background: var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
  }
  .overlay-icon svg { width: 26px; height: 26px; }
  .login-tabs { display: flex; gap: 6px; background: #f1f2f6; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
  .login-tab { flex: 1; padding: 9px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; transition: .15s; }
  .login-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
  .sub-input { margin-top: 8px; }
  .section-gap { margin-top: 16px; }
  .lock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
  .lock-row .lock-note { font-size: 13px; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
  .lock-row .lock-note svg { width: 15px; height: 15px; }
  .divider {
    display: flex; align-items: center; gap: 10px; margin: 4px 0 14px;
    font-size: 12px; color: var(--muted);
  }
  .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .overlay-btns { display: flex; gap: 10px; margin-top: 6px; }
  .overlay-btns .btn { flex: 1; justify-content: center; }
  .account-expire { font-size: 12px; text-align: center; margin: -8px 0 12px; }
  .account-expire.valid { color: var(--green); }
  .account-expire.expired { color: var(--red); }
  .help-box {
    background: var(--primary-soft); border-radius: 12px; padding: 16px 18px;
    line-height: 1.9; font-size: 14px; color: #4a5bb8;
  }
  .help-box b { color: var(--primary-dark); }

  /* ===== 微信收款码 ===== */
  .qrcode-block { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
  .qrcode-block h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--primary-dark); }
  .qrcode-block .desc { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
  .qrcode-preview {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); border: 1px dashed var(--border); border-radius: 12px;
    min-height: 140px; padding: 10px; margin-bottom: 10px;
  }
  .qrcode-preview img { max-width: 100%; max-height: 220px; display: block; border-radius: 6px; }
  .qrcode-empty { color: var(--muted); font-size: 13px; }
  .qrcode-actions { display: flex; gap: 10px; }
  .qrcode-actions .btn { flex: 1; }
  .qrcode-show { margin-top: 16px; text-align: center; }
  .qrcode-show h4 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--primary-dark); }
  .qrcode-show img { max-width: 240px; width: 100%; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }

  /* ===== Toast ===== */
  #toast {
    position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(20px);
    background: rgba(30,34,46,.92); color: #fff; padding: 11px 20px; border-radius: 12px;
    font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; max-width: 86vw;
  }
  #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  @media (max-width: 640px) {
    main { padding: 12px 12px 130px; }
    .today-card { flex-direction: column; align-items: flex-start; }
    .today-right { flex-direction: row; width: 100%; justify-content: space-between; }
    .sentence-en { font-size: 17px; }
    .header-right .sync-badge { display: none; }
  }

/* ===== 共享骨架补充：顶部标签里的「管理」是跳转链接（后台已独立成 admin.html） ===== */
a.tab, a.tab:visited { text-decoration: none; }
a.tab.tab-link { color: var(--muted); }
a.tab.tab-link:hover { color: var(--primary); background: #f4f6fb; }

/* ===== 全局隐藏工具类（v19 补回：抽取骨架时曾遗漏，弹层/视图切换依赖它） ===== */
.hidden { display: none !important; }

/* ===== v19.1 句子纠错 ===== */
/* 前台：句子卡片左下角的「纠错」按钮（与 listen-btn 同风格） */
.fb-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; font-weight: 500;
  padding: 4px 8px; border-radius: 8px; transition: all .15s;
}
.fb-btn:hover { color: #e67e22; background: #fdf3ea; }
.fb-btn svg { flex: none; }

/* 前台：纠错弹层的句子提示 */
#fbSentenceDesc { font-weight: 500; }

/* 后台：纠错信息列表 */
.fb-filter { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.fb-filter-btn { opacity: .65; }
.fb-filter-btn.active { opacity: 1; background: var(--primary-soft); color: var(--primary); }
.fb-row {
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--card, #fff);
}
.fb-row.done { opacity: .55; }
.fb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.fb-user { font-weight: 600; font-size: 13px; color: var(--primary); }
.fb-time { font-size: 12px; color: var(--muted); }
.fb-status {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; margin-left: auto;
  background: #fdf3ea; color: #e67e22;
}
.fb-row.done .fb-status { background: #ecfaef; color: #27ae60; }
.fb-sentence { font-size: 13px; color: var(--text, #1f2937); margin-bottom: 4px; }
.fb-content {
  font-size: 13px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fb-row.expanded .fb-content { display: block; -webkit-line-clamp: unset; overflow: visible; }
.fb-actions { display: flex; gap: 8px; margin-top: 8px; }
/* 该条纠错对应的句子在哪一章哪一节（由后端反查 sentences 表带回） */
.fb-chap {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft, #eef2ff); color: var(--primary, #4f46e5);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 原句已被删除 —— 快照还在, 但句子表里已经查不到 */
.fb-chap.gone { background: #fdecea; color: #c0392b; }

/* ===== 后台：内容管理（逐句搜索 / 编辑 / 删除） =====
   与前台句子卡片同源的信息层次：英文在上加粗、中文在下淡一档、章·节做成小标签。 */
.cm-info { font-size: 12px; color: var(--muted); margin: 12px 0 2px; min-height: 17px; line-height: 1.6; word-break: break-all; }
.cm-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cm-row:last-child { border-bottom: none; }
.cm-row.deleting { opacity: .4; pointer-events: none; }
.cm-text { min-width: 0; flex: 1; }
.cm-en-text { font-size: 15px; font-weight: 600; line-height: 1.55; word-break: break-word; }
.cm-zh-text { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 3px; word-break: break-word; }
.cm-tag {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; color: var(--muted); background: #f1f2f6;
}
.cm-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; }
/* 行内编辑态：整行变成一张高亮的小表单 */
.cm-row.editing {
  display: block; background: var(--primary-soft); border-bottom: none;
  border-radius: 12px; padding: 12px 13px; margin: 8px 0;
}
.cm-row.editing .cm-tag { background: rgba(255,255,255,.75); color: var(--primary); margin: 0 0 8px; }
.cm-row.editing .field { margin-bottom: 8px; }
.cm-row.editing .field label { font-size: 12px; margin-bottom: 4px; }
.cm-row.editing .field textarea { min-height: 52px; background: #fff; font-size: 14px; }
.cm-row.editing .cm-actions { justify-content: flex-end; }
/* 命中的关键词 */
.cm-hit { background: #fff3b0; color: inherit; border-radius: 3px; padding: 0 1px; }
/* ===== v19.6 用户管理：搜索按钮 + 创建用户 ===== */
.user-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.user-toolbar input[type="text"] { flex: 1; width: auto; }
.btn-sm.primary { background: var(--primary); color: #fff; }
.btn-sm.primary:active { background: var(--primary-dark); }
.cu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (max-width: 640px) { .cu-grid { grid-template-columns: 1fr; } }
.cu-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
/* ===== v19.6b 注册开关激活态 ===== */
.btn-sm.toggle-on { background: var(--red-soft); color: var(--red); }
