  :root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --surface-3: #f0f0f2;
    --border: #e5e5ea;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #aeaeb2;
    --accent: #0071e3;
    --accent-light: #409cff;
    --accent-bg: #f0f7ff;
    --green: #34c759;
    --green-bg: #e8f8ed;
    --blue: #007aff;
    --blue-bg: #e8f2fd;
    --red: #ff3b30;
    --red-bg: #fee8e7;
    --orange: #ff9500;
    --orange-bg: #fff3e0;
    --purple: #af52de;
    --purple-bg: #f6edfb;
    --teal: #5ac8fa;
    --teal-bg: #e6f7fd;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
    --modal-bg: #ffffff;
    --modal-backdrop: rgba(0,0,0,0.35);
    --input-bg: #ffffff;
    --input-border: #e5e5ea;
    --grip-line: rgba(0,0,0,0.18);
    --dock-bg: rgba(255,255,255,0.68);
    --dock-border: rgba(0,0,0,0.06);
    --dock-shadow-outer: 0 4px 24px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.04);
    --dock-shadow-inner: inset 0 0.5px 0 rgba(255,255,255,0.6);
    --dock-item-color: #6e6e73;
    --dock-item-hover-color: #1d1d1f;
    --dock-item-hover-bg: rgba(0,0,0,0.04);
    --dock-label-color: rgba(0,0,0,0.45);
    --dock-dot-color: rgba(0,0,0,0.35);
    --dock-divider-color: rgba(0,0,0,0.1);
  }

  [data-theme="dark"] {
    --bg: #1c1c1e;
    --surface: #2c2c2e;
    --surface-2: #3a3a3c;
    --surface-3: #48484a;
    --border: #38383a;
    --text: #f5f5f7;
    --text-2: #98989d;
    --text-3: #636366;
    --accent: #409cff;
    --accent-light: #70b5ff;
    --accent-bg: rgba(64,156,255,0.15);
    --green: #30d158;
    --green-bg: rgba(48,209,88,0.15);
    --blue: #409cff;
    --blue-bg: rgba(64,156,255,0.15);
    --red: #ff453a;
    --red-bg: rgba(255,69,58,0.15);
    --orange: #ff9f0a;
    --orange-bg: rgba(255,159,10,0.15);
    --purple: #bf5af2;
    --purple-bg: rgba(191,90,242,0.15);
    --teal: #64d2ff;
    --teal-bg: rgba(100,210,255,0.15);
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.06);
    --modal-bg: #2c2c2e;
    --modal-backdrop: rgba(0,0,0,0.6);
    --input-bg: #1c1c1e;
    --input-border: #38383a;
    --grip-line: rgba(255,255,255,0.2);
    --dock-bg: rgba(44,44,46,0.78);
    --dock-border: rgba(255,255,255,0.08);
    --dock-shadow-outer: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0.5px rgba(255,255,255,0.06);
    --dock-shadow-inner: inset 0 0.5px 0 rgba(255,255,255,0.1);
    --dock-item-color: #98989d;
    --dock-item-hover-color: #f5f5f7;
    --dock-item-hover-bg: rgba(255,255,255,0.06);
    --dock-label-color: rgba(255,255,255,0.5);
    --dock-dot-color: rgba(255,255,255,0.45);
    --dock-divider-color: rgba(255,255,255,0.1);
  }

  @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* 投影模式：全屏 + 适度放大 + 隐藏 chrome（讲题专用）*/
  body.projection-mode header,
  body.projection-mode .dock,
  body.projection-mode .classroom-switcher,
  body.projection-mode .context-sidebar,
  body.projection-mode .sidebar-edge-trigger,
  body.projection-mode #syncStatus,
  body.projection-mode .release-marker { display: none !important; }
  body.projection-mode .app-container { padding-top: 16px !important; }
  body.projection-mode #page-practice { padding: 0 3vw !important; }
  /* 字号适度放大（不夸张）*/
  body.projection-mode .passage,
  body.projection-mode .passage-content,
  body.projection-mode .passage-text { font-size: 28px !important; line-height: 1.85 !important; }
  body.projection-mode .blank-inline { font-size: 28px !important; padding: 2px 8px !important; }
  body.projection-mode .answer-filled { font-size: 28px !important; }
  body.projection-mode .drawer { font-size: 22px !important; }
  body.projection-mode .drawer-content { font-size: 22px !important; line-height: 1.75 !important; }
  body.projection-mode .lesson-card { font-size: 21px !important; }
  body.projection-mode .migration-card-sentence { font-size: 20px !important; }

  /* 投影模式顶部居中浮动控制条 */
  .projection-controls {
    position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
    z-index: 9999;
    display: flex; gap: 4px; align-items: center;
    background: rgba(28,28,30,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 6px; border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(255,255,255,0.1);
  }
  .projection-controls button {
    border: none; background: transparent; color: #fff;
    padding: 8px 14px; border-radius: 999px;
    cursor: pointer; font-size: 14px; font-family: inherit;
    font-weight: 500; min-width: 44px;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all .15s;
  }
  .projection-controls button:hover { background: rgba(255,255,255,0.12); }
  .projection-controls button:active { transform: scale(0.95); }
  .projection-controls .pc-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); margin: 0 2px; }
  .projection-controls .pc-exit {
    background: rgba(255,59,48,0.85); color: #fff;
  }
  .projection-controls .pc-exit:hover { background: rgba(255,59,48,1); }

  /* 投影模式下抽屉支持：铺满全屏 / 收缩底部 / 拖拽调整 */
  body.projection-mode .drawer { transition: height .25s cubic-bezier(.2,.85,.25,1) !important; }
  body.projection-mode .drawer.drawer-state-half { height: 60vh !important; }
  body.projection-mode .drawer.drawer-state-full { height: 100vh !important; top: 0 !important; }
  body.projection-mode .drawer.drawer-state-mini { height: 80px !important; }
  body.projection-mode .drawer.drawer-state-mini .drawer-tabs,
  body.projection-mode .drawer.drawer-state-mini .drawer-content { display: none !important; }
  /* 抽屉头部加投影专属的尺寸切换按钮 */
  .drawer-projection-size-btns {
    display: none; gap: 4px; margin-left: 8px;
  }
  body.projection-mode .drawer-projection-size-btns { display: inline-flex; }
  .drawer-projection-size-btns button {
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-2); padding: 3px 9px; border-radius: 6px;
    cursor: pointer; font-size: 12px; font-family: inherit;
    transition: all .12s;
  }
  .drawer-projection-size-btns button:hover { background: var(--accent-bg); color: var(--accent); }
  .drawer-projection-size-btns button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 100px;
  }

  header {
    background: var(--surface);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 0.5px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    contain: layout style;
    will-change: transform;
    transform: translateZ(0);
  }
  .logo { font-size: 17px; font-weight: 700; color: var(--accent); letter-spacing: -.3px; }
  .nav { display: flex; gap: 4px; min-width: 0; flex-shrink: 1; }
  .nav-btn {
    border: none; background: none; padding: 6px 16px;
    border-radius: 6px; font-size: 14px; cursor: pointer;
    color: var(--text-2); transition: all .15s;
  }
  .nav-btn:hover { background: var(--surface-3); }
  .nav-btn.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }

  .theme-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 15px; padding: 4px 8px; border-radius: 6px;
    color: var(--text-2); line-height: 1;
    transition: background .15s;
  }
  .theme-toggle:hover { background: var(--surface-3); }
  .theme-toggle .icon-sun { display: none; }
  .theme-toggle .icon-moon { display: inline; }
  [data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
  [data-theme="dark"] .theme-toggle .icon-moon { display: none; }

  .page { display: none; padding: 24px; margin: 0 auto; max-width: clamp(960px, calc(100% - 320px), 2200px); }
  .page.active { display: block; }
  .page-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
  .page-desc { font-size: var(--font-base, 24px); color: var(--text-2); margin-bottom: 24px; }

  .home-subview { display: none; }
  .home-subview.active { display: block; }

  .category-section { margin-bottom: 28px; }
  .category-section-title {
    font-size: var(--font-base, 24px); font-weight: 700; color: var(--text); margin-bottom: 10px;
    padding-left: 12px; border-left: 3px solid var(--accent);
  }
  .grid-11 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
  }
  .card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all .18s;
    position: relative;
  }
  .card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
  .card-tag {
    display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 4px; margin-bottom: 8px;
    background: var(--accent-bg); color: var(--accent);
  }
  .card-tag.green { background: var(--green-bg); color: var(--green); }
  .card-tag.blue { background: var(--blue-bg); color: var(--blue); }
  .card-tag.red { background: var(--red-bg); color: var(--red); }
  .card-tag.orange { background: var(--orange-bg); color: var(--orange); }
  .card-tag.purple { background: var(--purple-bg); color: var(--purple); }
  .card-tag.teal { background: var(--teal-bg); color: var(--teal); }
  .card-title { font-size: clamp(14px, var(--font-base, 24px), 30px); font-weight: 600; margin-bottom: 4px; }
  .card-desc { font-size: clamp(12px, var(--font-sm, 21px), 24px); color: var(--text-3); }
  .card-count { font-size: clamp(12px, var(--font-sm, 21px), 24px); color: var(--text-3); margin-top: 4px; }

  .section-title {
    font-size: var(--font-lg, 25px); font-weight: 700; margin: 28px 0 12px; padding-left: 12px;
    border-left: 3px solid var(--accent);
  }

  .practice-layout {
    margin: 0 auto; padding: 16px;
  }
  /* 侧栏触发带：左边缘不可见热区 */
  .sidebar-edge-trigger {
    position: fixed;
    left: 0; top: 52px; bottom: 0;
    width: 10px;
    z-index: 149;
  }
  /* 侧栏本体：固定定位，隐藏于左边缘外，hover 滑出 */
  .context-sidebar {
    position: fixed;
    left: 0; top: 52px; bottom: 0;
    width: 220px;
    z-index: 150;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 0.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(-100% + 8px));
    transition: transform .32s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow .32s ease;
    overflow-y: auto; overflow-x: hidden;
    border-radius: 0 var(--radius) var(--radius) 0;
  }
  /* 隐藏时可见的手柄条 + grip 指示器 */
  .context-sidebar::before {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 8px;
    pointer-events: none;
    /* 三条细线 grip */
    background:
      linear-gradient(to top, transparent calc(50% - 12px), var(--grip-line, rgba(0,0,0,0.18)) calc(50% - 12px), var(--grip-line, rgba(0,0,0,0.18)) calc(50% - 10px), transparent calc(50% - 10px)),
      linear-gradient(to top, transparent calc(50% - 2px), var(--grip-line, rgba(0,0,0,0.22)) calc(50% - 2px), var(--grip-line, rgba(0,0,0,0.22)) 50%, transparent 50%),
      linear-gradient(to top, transparent calc(50% + 8px), var(--grip-line, rgba(0,0,0,0.18)) calc(50% + 8px), var(--grip-line, rgba(0,0,0,0.18)) calc(50% + 10px), transparent calc(50% + 10px));
    border-radius: 0 4px 4px 0;
    transition: opacity .2s ease;
  }
  .context-sidebar:hover::before { opacity: 0; }
  /* 触发热区或侧栏本身 hover → 滑出 */
  .sidebar-edge-trigger:hover ~ .context-sidebar,
  .context-sidebar:hover {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.14), 0 0 0 0.5px rgba(0,0,0,0.04);
  }
  .context-sidebar-content { padding: 8px 0; }
  .context-sidebar-empty { padding: 24px 12px; font-size: 12px; color: var(--text-3); text-align: center; }
  .context-sidebar-title {
    font-size: 13px; font-weight: 600; color: var(--text);
    padding: 6px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
  }
  .context-sidebar-year {
    font-size: 10px; font-weight: 600; color: var(--text-3);
    padding: 8px 12px 2px; letter-spacing: 0.5px;
  }
  .context-sidebar-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 12px; color: var(--text);
    transition: background .12s;
  }
  .context-sidebar-item:hover { background: var(--surface-2); }
  .context-sidebar-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
  .context-sidebar-item .cs-tag {
    font-size: 9px; padding: 1px 5px; border-radius: 4px;
    background: var(--surface-3); color: var(--text-3); flex-shrink: 0;
  }
  .context-sidebar-item .cs-tag.green { background: var(--green-bg); color: var(--green); }
  .context-sidebar-item .cs-num {
    font-size: 10px; color: var(--text-3); margin-left: auto; flex-shrink: 0;
  }
  .context-sidebar-item .cs-cat {
    font-size: 10px; color: var(--text-3); margin-left: auto; flex-shrink: 0;
  }
  .left-panel { padding-left: 0; }

  .source-info {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  }
  .source-tag {
    font-size: 13px; font-weight: 600; padding: 3px 10px;
    background: var(--accent); color: #fff; border-radius: 4px;
  }
  .source-count { font-size: 13px; color: var(--text-2); }
  .source-switcher { margin-left: auto; display: flex; gap: 6px; }
  .source-switch-btn {
    padding: 4px 10px; font-size: 12px; border: 1px solid var(--border);
    border-radius: 4px; background: var(--surface); cursor: pointer;
    color: var(--text-2); transition: all .15s;
  }
  .source-switch-btn:hover { background: var(--surface-3); }
  .source-switch-btn.active { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); font-weight: 600; }

  .classroom-switcher {
    position: sticky; top: 64px; z-index: 220;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; margin-bottom: 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow);
  }
  [data-theme="dark"] .classroom-switcher { background: rgba(44,44,46,0.92); }
  .classroom-switcher-group {
    display: flex; align-items: center; gap: 6px; min-width: 0;
  }
  .classroom-switcher-label {
    font-size: 12px; font-weight: 700; color: var(--text-3);
    white-space: nowrap;
  }
  .classroom-switcher select {
    height: 34px; min-width: 132px; max-width: min(42vw, 320px);
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--input-bg); color: var(--text);
    padding: 0 28px 0 10px; font-size: 13px; font-family: inherit;
    outline: none;
  }
  .classroom-switcher select:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg);
  }
  .classroom-icon-btn,
  .classroom-action-btn {
    height: 34px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--text-2);
    cursor: pointer; font-family: inherit; font-weight: 700;
    transition: all .15s;
  }
  .classroom-icon-btn {
    width: 34px; padding: 0; font-size: 17px; line-height: 32px;
  }
  .classroom-action-btn {
    padding: 0 12px; font-size: 13px; white-space: nowrap;
  }
  .classroom-icon-btn:hover,
  .classroom-action-btn:hover {
    background: var(--accent-bg); color: var(--accent); border-color: var(--accent);
  }
  .classroom-action-btn.primary {
    background: var(--accent); color: #fff; border-color: var(--accent);
  }
  .classroom-action-btn.primary:hover { background: var(--accent-light); color: #fff; }
  .classroom-progress {
    margin-left: auto; font-size: 12px; color: var(--text-3);
    white-space: nowrap;
  }

  .passage-box {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    font-size: var(--passage-font-size, 24px);
    line-height: 2.1;
    color: var(--text);
    white-space: pre-wrap;
    margin-bottom: 16px;
  }
  .passage-box p { margin-bottom: 16px; }
  .passage-box p:last-child { margin-bottom: 0; }
  .passage-box .cat-hint { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
  .passage-box .cat-exam-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
  .passage-box .cat-sentence { font-size: var(--passage-font-size, 24px); line-height: 1.8; margin: 6px 0; }
  .passage-box .cat-ans-btn { font-size: 13px; vertical-align: middle; border: 1px solid var(--border); background: var(--surface-2); color: var(--accent); border-radius: 12px; padding: 2px 10px; margin-left: 8px; cursor: pointer; font-family: inherit; }
  .passage-box .cat-ans { font-size: 0.7em; color: var(--text-2); }
  .passage-box .cat-ans b { color: var(--accent); }
  .font-ctrl-btn {
    width: 22px; height: 22px; border: 1px solid var(--border);
    border-radius: 4px; background: var(--surface); cursor: pointer;
    font-size: 13px; line-height: 20px; text-align: center; padding: 0;
    color: var(--text-2); transition: all .15s;
  }
  .font-ctrl-btn:hover { background: var(--surface-3); border-color: var(--accent); }
  .blank-inline {
    display: inline-block; min-width: 52px; text-align: center;
    padding: 0.1em 0.4em; margin: 0 2px;
    border-bottom: 2px dashed var(--accent);
    background: var(--accent-bg);
    border-radius: 3px;
    font-weight: 600; font-size: 0.85em;
    cursor: pointer;
    color: var(--accent);
    transition: all .15s;
    position: relative;
    vertical-align: baseline;
  }
  .blank-inline:hover { background: #cce5ff; border-bottom-color: var(--accent-light); }
  .blank-inline.highlight { background: #ffd60a; border-bottom-color: var(--orange); color: var(--orange); }

  .hint-text { font-size: var(--font-sm, 21px); color: var(--text-3); margin-bottom: 12px; }

  .translation-section { margin-bottom: 12px; }
  .translation-toggle {
    padding: 8px 14px; font-size: var(--font-sm, 21px); color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    user-select: none;
  }
  .translation-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .translation-arrow { font-size: 12px; transition: transform 0.2s; color: var(--text-3); }
  .translation-arrow.open { transform: rotate(90deg); }
  .translation-body {
    padding: 16px 20px; font-size: var(--passage-font-size, 24px); line-height: 2.1;
    color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
    border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }
  .translation-body p { margin-bottom: 12px; }
  .translation-body p:last-child { margin-bottom: 0; }

  .answer-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
  }
  .answer-table th {
    background: var(--surface-2); padding: 10px 16px; text-align: left;
    font-weight: 600; color: var(--text-2); font-size: 12px;
    border-bottom: 1px solid var(--border);
  }
  .answer-table td { padding: 10px 16px; border-bottom: 1px solid var(--surface-3); }
  .answer-table tr { cursor: pointer; transition: background .1s; }
  .answer-table tr:hover { background: var(--accent-bg); }
  .answer-table tr.selected { background: var(--accent-bg); }
  .answer-table tr.selected .q-no { color: var(--accent); font-weight: 700; }
  .q-no { font-weight: 600; color: var(--accent); width: 60px; }
  .q-answer { font-weight: 700; color: var(--text); width: 100px; }
  .q-type { color: var(--text-2); font-size: 13px; }

  .analysis-title, .migration-title {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
  }
  .empty-hint { text-align: center; color: var(--text-3); font-size: 13px; padding: 32px 0; }

  .analysis-box {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    margin-bottom: 12px;
  }
  .analysis-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: var(--surface-2); cursor: pointer;
    user-select: none;
  }
  .analysis-header-left { display: flex; align-items: center; gap: 10px; }
  .analysis-q-no { font-weight: 700; font-size: 15px; color: var(--accent); }
  .analysis-q-type {
    font-size: 12px; padding: 2px 8px; background: var(--accent-bg);
    color: var(--accent); border-radius: 4px;
  }
  .analysis-toggle { font-size: 12px; color: var(--text-3); transition: transform .2s; }
  .analysis-box.open .analysis-toggle { transform: rotate(180deg); }
  .analysis-body { display: none; padding: 16px; }
  .analysis-box.open .analysis-body { display: block; }
  .analysis-answer {
    font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 10px;
    padding: 8px 14px; background: var(--accent-bg); border-radius: 6px;
    display: inline-block;
  }
  .analysis-sentence {
    font-size: 14px; line-height: 1.8; color: var(--text); margin-bottom: 14px;
    padding: 12px; background: var(--surface-3); border-radius: 6px;
  }
  .hl { color: var(--accent); font-weight: 700; background: #ffd60a; padding: 1px 4px; border-radius: 3px; }
  .analysis-steps { font-size: 13px; color: var(--text-2); line-height: 1.8; }
  .analysis-steps p { margin-bottom: 6px; }

  /* ── 抽屉折叠模块 ── */
  .drawer-fold {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }
  .drawer-fold-summary {
    padding: 10px 16px;
    font-size: var(--drawer-font-size-sm, 23px);
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-2);
    cursor: pointer;
    user-select: none;
    list-style: none;
  }
  .drawer-fold-summary::-webkit-details-marker { display: none; }
  .drawer-fold-summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.2s;
    font-size: 10px;
    margin-right: 4px;
  }
  .drawer-fold[open] > .drawer-fold-summary::before { transform: rotate(90deg); }
  .drawer-fold-list { display: flex; flex-direction: column; gap: 8px; }
  .drawer-fold-body { padding: 14px 18px; font-size: var(--drawer-font-size-sm, 23px); line-height: 1.8; }
  .drawer-fold-body h4 { font-size: var(--drawer-font-size, 24px); color: var(--blue); margin-bottom: 8px; margin-top: 16px; }
  .drawer-fold-body h4:first-child { margin-top: 0; }
  .drawer-fold-body ul { padding-left: 18px; margin: 4px 0; }
  .drawer-fold-body li { margin-bottom: 3px; line-height: 1.7; }
  .drawer-fold-body .highlight-box {
    background: #fff9e6; border-left: 3px solid var(--accent); padding: 8px 12px;
    border-radius: 4px; margin: 8px 0; font-weight: 500;
  }

  .migration-list { display: flex; flex-direction: column; gap: 8px; }
  .migration-item {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px; cursor: pointer; transition: all .15s;
    background: var(--surface-2);
  }
  .migration-item:hover { border-color: var(--accent); background: var(--accent-bg); }
  .migration-meta { display: flex; gap: 8px; margin-bottom: 6px; }
  .migration-source {
    font-size: 11px; padding: 2px 6px; background: var(--surface-3);
    border-radius: 3px; color: var(--text-2);
  }
  .migration-passage { font-size: 13px; color: var(--text); line-height: 1.6; }
  .migration-answer {
    margin-top: 6px; font-size: 12px; color: var(--text-3);
    display: flex; gap: 8px;
  }
  .migration-answer-text { color: var(--accent); font-weight: 600; }
  .migration-answer-hint { display: none; }
  .migration-item.show-answer .migration-answer-hint { display: inline; color: var(--text-2); }
  .migration-item.show-answer .migration-answer-text { color: var(--text-2); }

  /* ─── 考点速查：侧边栏+内容区布局 ─── */
  .knowledge-layout { display: flex; gap: 0; min-height: calc(100vh - 52px - 100px); }
  .knowledge-sidebar {
    width: 220px; flex-shrink: 0;
    background: var(--surface); border-right: 1px solid var(--border);
    position: sticky; top: 52px; height: calc(100vh - 52px);
    overflow-y: auto; padding: 16px 0;
    -webkit-overflow-scrolling: touch;
  }
  .knowledge-sidebar-title {
    font-size: 12px; font-weight: 700; color: var(--text-3); padding: 8px 16px 6px;
    text-transform: uppercase; letter-spacing: .5px;
  }
  .knowledge-sidebar-divider { height: 1px; background: var(--border); margin: 8px 12px; }

  .knowledge-view-switch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    margin: 0 12px 12px; padding: 4px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  }
  .knowledge-view-btn {
    border: none; background: transparent; color: var(--text-2);
    border-radius: 6px; padding: 7px 8px; cursor: pointer;
    font-family: inherit; font-size: 12px; font-weight: 650;
  }
  .knowledge-view-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

  /* 搜索框 */
  .knowledge-search-wrap { padding: 0 12px 10px; }
  .knowledge-search-wrap input {
    width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; font-family: inherit; background: var(--surface-2); color: var(--text);
    outline: none; transition: border-color .15s;
  }
  .knowledge-search-wrap input:focus { border-color: var(--accent); background: var(--surface); }
  .knowledge-search-wrap input::placeholder { color: var(--text-3); }
  .search-results { list-style: none; padding: 0; margin: 0; }
  .search-result-item {
    display: block; width: 100%; border: none; background: none;
    padding: 7px 12px; font-size: 11px; color: var(--text-2); cursor: pointer;
    text-align: left; font-family: inherit; line-height: 1.5; transition: background .1s;
    border-left: 3px solid transparent;
  }
  .search-result-item:hover { background: var(--accent-bg); }
  .search-result-item .sr-cat { font-size: 10px; color: var(--text-3); }
  .search-result-item .sr-title { font-weight: 600; font-size: 12px; color: var(--text); }
  .search-result-item .sr-snippet { font-size: 10px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-result-item mark { background: #ffd60a; color: inherit; padding: 0 1px; border-radius: 1px; }
  .search-no-results { padding: 12px; font-size: 12px; color: var(--text-3); text-align: center; }

  /* 手风琴 */
  .knowledge-subsection.collapsed .knowledge-subsection-body,
  .knowledge-subsection.collapsed .sub-desc { display: none; }
  .subsection-toggle {
    cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px;
  }
  .subsection-toggle::before { content: '\25B8'; font-size: 10px; transition: transform .15s; display: inline-block; width: 12px; color: var(--text-3); }
  .knowledge-subsection:not(.collapsed) .subsection-toggle::before { transform: rotate(90deg); }
  .subsection-highlight { animation: highlightPulse 1.5s ease-out; }
  @keyframes highlightPulse {
    0% { background: var(--accent-bg); }
    100% { background: transparent; }
  }

  .knowledge-nav { list-style: none; padding: 0; margin: 0; }
  .knowledge-nav-item {
    display: block; width: 100%; border: none; background: none;
    padding: 8px 16px; font-size: 13px; color: var(--text-2); cursor: pointer;
    text-align: left; transition: all .12s; border-left: 3px solid transparent;
    font-family: inherit; line-height: 1.5;
  }
  .knowledge-nav-item:hover { background: var(--surface-2); color: var(--text); }
  .knowledge-nav-item.active {
    background: var(--accent-bg); color: var(--accent); font-weight: 600;
    border-left-color: var(--accent);
  }
  .knowledge-nav-item .nav-desc { display: block; font-size: 10px; color: var(--text-3); font-weight: 400; margin-top: 1px; }
  .knowledge-nav-item.active .nav-desc { color: var(--accent-light); }
  .knowledge-nav-item.pattern-item { font-size: 12px; padding: 6px 16px; color: var(--blue); }
  .knowledge-nav-item.pattern-item.active { background: var(--blue-bg); color: var(--blue); border-left-color: var(--blue); }

  .knowledge-content {
    flex: 1; min-width: 0; padding: 24px 32px 48px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .knowledge-section { animation: fadeIn .25s ease-out; }
  .knowledge-section-header { margin-bottom: 18px; }
  .knowledge-section-header h2 { font-size: var(--k-font-lg, 22px); font-weight: 700; color: var(--text); margin-bottom: 4px; }
  .knowledge-section-header .section-desc { font-size: var(--k-font-sm, 14px); color: var(--text-2); }
  .knowledge-overview-box {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 18px; margin-bottom: 24px; font-size: var(--k-font-sm, 14px); line-height: 1.8; color: var(--text-2);
  }
  .knowledge-overview-box em { font-style: normal; font-weight: 600; color: var(--text); }

  .knowledge-subsection {
    margin-bottom: 28px; padding-bottom: 24px;
    border-bottom: 1px dashed var(--border);
  }
  .knowledge-subsection:last-child { border-bottom: none; }
  .knowledge-subsection h3 {
    font-size: var(--k-font-base, 16px); font-weight: 700; color: var(--accent); margin-bottom: 4px;
    padding-left: 12px; border-left: 3px solid var(--accent);
  }
  .knowledge-subsection .sub-desc { font-size: var(--k-font-sm, 12px); color: var(--text-3); margin-bottom: 12px; padding-left: 15px; }
  .knowledge-subsection-body { padding-left: 15px; font-size: var(--k-font-sm, 13px); line-height: 1.9; }
  .knowledge-subsection-body h4 { font-size: var(--k-font-base, 14px); color: var(--text); margin: 14px 0 6px; font-weight: 600; }
  .knowledge-subsection-body h4:first-child { margin-top: 4px; }
  .knowledge-subsection-body ul { padding-left: 18px; margin: 4px 0; }
  .knowledge-subsection-body li { margin-bottom: 3px; }
  .knowledge-subsection-body p { margin: 6px 0; }
  .knowledge-map-hero {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: 18px; margin-bottom: 22px; align-items: stretch;
  }
  .knowledge-map-intro,
  .knowledge-path-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow-sm);
  }
  .knowledge-map-intro h2 { font-size: var(--k-font-lg, 24px); margin-bottom: 8px; color: var(--text); }
  .knowledge-map-intro p { color: var(--text-2); line-height: 1.8; font-size: var(--k-font-sm, 14px); margin: 0 0 12px; }
  .knowledge-principles { display: grid; gap: 8px; margin-top: 12px; }
  .knowledge-principle {
    display: flex; gap: 8px; align-items: flex-start;
    color: var(--text-2); font-size: var(--k-font-sm, 13px); line-height: 1.6;
  }
  .knowledge-principle span { color: var(--accent); font-weight: 800; }
  .knowledge-path-panel h3 { font-size: var(--k-font-base, 16px); color: var(--text); margin-bottom: 10px; }
  .knowledge-path-card {
    border: 1px solid var(--border); background: var(--surface-2);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  }
  .knowledge-path-card b { display: block; font-size: var(--k-font-sm, 13px); color: var(--text); margin-bottom: 3px; }
  .knowledge-path-card span { display: block; font-size: 12px; color: var(--text-2); line-height: 1.5; }
  .knowledge-map-grid { display: grid; gap: 18px; }
  .knowledge-root-band {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  }
  .knowledge-root-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
  .knowledge-root-title { display: flex; align-items: center; gap: 10px; }
  .knowledge-root-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
  .knowledge-root-title h3 { font-size: var(--k-font-base, 18px); color: var(--text); margin: 0; }
  .knowledge-root-title p { font-size: var(--k-font-sm, 13px); color: var(--text-2); margin: 2px 0 0; }
  .knowledge-node-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .knowledge-node-card {
    border: 1px solid var(--border); background: var(--surface-2);
    border-radius: 10px; padding: 12px; cursor: pointer; transition: transform .12s, border-color .12s, background .12s;
  }
  .knowledge-node-card:hover { transform: translateY(-1px); border-color: var(--accent); background: var(--accent-bg); }
  .knowledge-node-card h4 { font-size: var(--k-font-base, 14px); color: var(--text); margin: 0 0 5px; }
  .knowledge-node-card p { font-size: var(--k-font-sm, 12px); color: var(--text-2); line-height: 1.55; margin: 0 0 8px; }
  .knowledge-node-tags { display: flex; flex-wrap: wrap; gap: 4px; }
  .knowledge-node-tag {
    font-size: 10px; color: var(--accent); background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 2px 7px;
  }
  .knowledge-node-detail {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
  }
  .knowledge-node-detail h2 { font-size: var(--k-font-lg, 24px); color: var(--text); margin-bottom: 4px; }
  .knowledge-node-detail .node-layer { color: var(--accent); font-size: 12px; font-weight: 700; margin-bottom: 12px; }
  .knowledge-node-detail p { color: var(--text-2); line-height: 1.8; margin: 8px 0; }
  .node-link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .node-link-chip {
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: inherit;
  }
  .node-link-chip:hover { border-color: var(--accent); color: var(--accent); }
  .global-graph-page {
    display: grid;
    gap: 14px;
    padding: 0 0 98px;
    animation: fadeIn .25s ease-out;
  }
  .global-graph-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
  }
  .global-graph-title h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.25;
    font-weight: 950;
  }
  .global-graph-title p {
    margin: 6px 0 0;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.65;
    max-width: 820px;
  }
  .global-graph-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
  .global-graph-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 10px;
    box-shadow: var(--shadow-sm);
  }
  .global-graph-search {
    position: relative;
  }
  .global-graph-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    padding: 0 12px;
    outline: none;
  }
  .global-graph-search input:focus {
    border-color: var(--accent);
    background: var(--surface);
  }
  .global-graph-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: 43px;
    z-index: 40;
    display: none;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .global-graph-search-results.show { display: block; }
  .global-graph-search-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    text-align: left;
    padding: 9px 11px;
    cursor: pointer;
  }
  .global-graph-search-item:last-child { border-bottom: 0; }
  .global-graph-search-item:hover { background: var(--accent-bg); }
  .global-graph-search-item b { display: block; font-size: 14px; }
  .global-graph-search-item span { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
  .global-graph-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 38px;
    align-items: center;
  }
  .global-graph-focus .node-link-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
  }
  .global-graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    min-height: 38px;
  }
  .global-graph-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 750;
  }
  .global-graph-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
  }
  .global-graph-controls {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }
  .global-graph-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 12px;
    min-height: min(760px, calc(100vh - 178px));
  }
  .global-graph-canvas {
    position: relative;
    min-height: 680px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--border) 42%, transparent) 1px, transparent 1px),
      linear-gradient(0deg, color-mix(in srgb, var(--border) 35%, transparent) 1px, transparent 1px),
      radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 30%),
      var(--surface);
    background-size: 48px 48px, 48px 48px, auto, auto;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: grab;
    touch-action: none;
  }
  .global-graph-canvas.dragging { cursor: grabbing; }
  .global-graph-svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 680px;
    user-select: none;
  }
  .global-graph-cluster rect {
    fill: color-mix(in srgb, var(--surface-2) 72%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 8 8;
    opacity: .75;
  }
  .global-graph-cluster text {
    font-size: 18px;
    font-weight: 950;
    fill: var(--text-2);
    pointer-events: none;
  }
  .global-graph-edge path {
    fill: none;
    stroke: color-mix(in srgb, var(--text-3) 34%, transparent);
    stroke-width: 2;
  }
  .global-graph-edge text {
    fill: var(--text-3);
    font-size: 11px;
    font-weight: 750;
    opacity: .72;
    pointer-events: none;
  }
  .global-graph-edge.dim { opacity: .28; }
  .global-graph-edge.active path {
    stroke: var(--accent);
    stroke-width: 3;
  }
  .global-graph-edge.active text { fill: var(--accent); }
  .global-graph-node {
    cursor: pointer;
    transition: opacity .12s;
  }
  .global-graph-node.dim { opacity: .42; }
  .global-graph-node rect {
    fill: var(--surface);
    stroke: var(--border);
    stroke-width: 1.5;
    rx: 8;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,.12));
  }
  .global-graph-node:hover rect {
    stroke: var(--accent);
  }
  .global-graph-node.active rect {
    stroke: var(--accent);
    stroke-width: 3;
    fill: var(--accent-bg);
  }
  .global-graph-node .node-title {
    fill: var(--text);
    font-size: 20px;
    font-weight: 950;
  }
  .global-graph-node .node-subtitle {
    fill: var(--text-2);
    font-size: 14px;
    font-weight: 750;
  }
  .global-graph-node .node-kicker {
    fill: var(--text-3);
    font-size: 11px;
    font-weight: 900;
  }
  .global-graph-node.type-diagnosis rect { stroke: #409cff; }
  .global-graph-node.type-route rect { stroke: #34c759; }
  .global-graph-node.type-category rect { stroke: #af52de; }
  .global-graph-node.type-rule rect { stroke: #ffcc00; }
  .global-graph-node.type-trap rect { stroke: #ff9500; }
  .global-graph-node.type-resource rect { stroke: #ff3b30; }
  .global-graph-inspector {
    min-height: 680px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    overflow: auto;
  }
  .global-graph-inspector h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 21px;
    line-height: 1.25;
  }
  .global-graph-inspector p {
    margin: 8px 0;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.7;
  }
  .global-graph-type {
    display: inline-flex;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--accent);
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 900;
  }
  .global-graph-inspector-section {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed var(--border);
  }
  .global-graph-inspector-section b {
    display: block;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 7px;
  }
  .global-graph-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .global-graph-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 750;
  }
  .global-graph-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .global-graph-stat {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 9px 10px;
  }
  .global-graph-stat strong {
    display: block;
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
  }
  .global-graph-stat span {
    display: block;
    color: var(--text-3);
    font-size: 11px;
    margin-top: 4px;
  }
  .global-graph-empty {
    display: grid;
    place-items: center;
    min-height: 360px;
    color: var(--text-3);
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 20px;
  }
  .global-graph-mini-path {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 2px;
  }
  .global-graph-mini-path span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 750;
  }

  @media (max-width: 980px) {
    .global-graph-head,
    .global-graph-toolbar,
    .global-graph-workbench { grid-template-columns: 1fr; }
    .global-graph-actions,
    .global-graph-controls { justify-content: flex-start; }
    .global-graph-canvas,
    .global-graph-svg,
    .global-graph-inspector { min-height: 420px; }
    .global-graph-workbench { min-height: 0; }
  }
  @media (max-width: 860px) {
    .knowledge-map-hero { grid-template-columns: 1fr; }
    .knowledge-node-grid { grid-template-columns: 1fr; }
  }
  .tip-box {
    background: #fff9e6; border-left: 3px solid var(--accent); padding: 10px 14px;
    border-radius: 4px; margin: 12px 0; font-weight: 500; font-size: var(--k-font-sm, 13px); line-height: 1.7;
  }
  .ref-table {
    width: 100%; border-collapse: collapse; font-size: var(--k-font-sm, 13px); margin: 10px 0;
    border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  }
  .ref-table th { background: var(--surface-3); padding: 7px 12px; text-align: left; font-weight: 600; font-size: var(--k-font-sm, 12px); color: var(--text-2); white-space: nowrap; }
  .ref-table td { padding: 6px 12px; border-top: 1px solid var(--border); vertical-align: top; }
  .ref-table tr:nth-child(even) td { background: var(--surface-2); }

  .drawer-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.25); z-index: 199;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .drawer-overlay.show { opacity: 1; pointer-events: auto; }

  .drawer {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(100vh - 52px); background: var(--surface);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    display: flex; flex-direction: column;
  }
  .drawer.open { transform: translateY(0); }

  .drawer-handle {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 0 6px; cursor: ns-resize; user-select: none;
    touch-action: none;
  }
  .drawer-handle-bar {
    width: 40px; height: 4px; border-radius: 2px; background: #d2d2d7;
  }
  .drawer-handle-hint {
    font-size: 10px; color: var(--text-3); margin-top: 4px;
  }

  .drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px 10px;
  }
  .drawer-q-info { font-size: 14px; font-weight: 600; color: var(--text); }
  .drawer-close {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; font-size: 16px; line-height: 26px;
    text-align: center; color: var(--text-2);
  }
  .drawer-close:hover { background: var(--surface-3); }

  .drawer-tabs {
    display: flex; border-bottom: 1px solid var(--border); padding: 0 20px;
  }
  .drawer-tab {
    padding: 12px 22px; font-size: var(--drawer-font-size-sm, 23px); cursor: pointer; color: var(--text-2);
    border-bottom: 2px solid transparent; transition: all .15s; font-weight: 500;
    user-select: none;
  }
  .drawer-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
  .drawer-tab:hover { color: var(--text); }

  .drawer-content {
    flex: 1; overflow-y: auto; padding: 20px; min-height: 0;
  }

  .analysis-answer-row-lg {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .analysis-answer-lg {
    font-size: 22px; font-weight: 800; color: var(--accent);
    padding: 8px 14px; background: var(--accent-bg); border-radius: 6px;
    display: inline-flex; align-items: center; line-height: 1.35;
  }
  .analysis-answer-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .analysis-tool-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    font-family: inherit;
    font-size: calc(var(--drawer-font-size-sm, 23px) - 7px);
    font-weight: 800;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
  }
  .analysis-tool-btn:hover,
  .analysis-tool-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
  }
  .analysis-tool-btn:active {
    transform: scale(.97);
  }
  .analysis-float-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    display: none;
    width: min(720px, calc(100vw - 56px));
    max-height: min(52vh, 430px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
  }
  .analysis-float-panel.show {
    display: block;
  }
  .analysis-float-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .analysis-float-title {
    color: var(--text-2);
    font-size: calc(var(--drawer-font-size-sm, 23px) - 5px);
    font-weight: 900;
  }
  .analysis-float-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
  }
  .analysis-float-panel .teacher-quick-card {
    margin: 0;
  }
  .analysis-solution-card {
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: var(--drawer-font-size-sm, 23px);
    line-height: 1.75;
  }
  .analysis-solution-card .sol-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
  .analysis-solution-card .sol-chip {
    font-size: 12px; padding: 3px 12px; border: 1px solid var(--border);
    background: var(--surface-3); color: var(--text-3); border-radius: 14px; cursor: pointer;
  }
  body:not(.solution-view-point) .analysis-solution-card .sol-chip-solve,
  body.solution-view-point .analysis-solution-card .sol-chip-point {
    background: var(--accent-bg); color: var(--accent); border-color: var(--accent); font-weight: 700;
  }
  .analysis-solution-card .sol-point { display: none; }
  body.solution-view-point .analysis-solution-card .sol-solve { display: none; }
  body.solution-view-point .analysis-solution-card .sol-point { display: block; }
  .docx-dropzone {
    flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px;
    padding: 16px 18px; border: 2px dashed var(--accent); border-radius: 10px;
    background: var(--accent-bg); color: var(--accent); cursor: pointer; font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
  }
  .docx-dropzone:hover, .docx-dropzone.dragover { background: var(--accent); color: #fff; }
  .docx-dropzone-icon { font-size: 22px; }
  .drop-overlay {
    position: fixed; inset: 0; z-index: 99999; display: none;
    align-items: center; justify-content: center; background: rgba(0,0,0,.45);
  }
  .drop-overlay.show { display: flex; }
  .drop-overlay-inner {
    background: var(--surface); border: 3px dashed var(--accent); border-radius: 16px;
    padding: 44px 64px; font-size: 40px; color: var(--accent); text-align: center; font-weight: 800;
  }
  .drop-overlay-text { font-size: 24px; margin-top: 10px; }
  .error-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .error-cat-chip {
    font-size: 13px; padding: 5px 14px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text-2); border-radius: 16px; cursor: pointer;
  }
  .error-cat-chip:hover { border-color: var(--accent); color: var(--accent); }
  .error-cat-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
  .error-list-source { font-size: 12px; color: var(--text-3); margin-top: 3px; }
  /* 做题决策地图 · 苹果风思维导图画布 */
  .dm-wrap { position: relative; width: 100%; }
  .dm-caption { font-size: 13px; color: var(--text-3); margin-bottom: 12px; letter-spacing: -0.01em; }
  .dm-vp { position: relative; width: 100%; height: 70vh; min-height: 420px; max-height: 760px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; cursor: grab; }
  .dm-vp.drag { cursor: grabbing; }
  .dm-cv { position: absolute; top: 0; left: 0; transform-origin: 0 0; transition: transform .55s cubic-bezier(.22,.61,.36,1); }
  .dm-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
  .dm-node { position: absolute; transform: translate(-50%, -50%); width: 150px; border: 0.5px solid var(--border); border-radius: 16px; padding: 12px 15px; background: var(--surface); color: var(--text); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05); transition: opacity .35s, box-shadow .25s; }
  .dm-node:hover { box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 12px 30px rgba(0,0,0,.10); }
  .dm-node-t { font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
  .dm-node-s { font-size: 12px; color: var(--text-3); margin-top: 3px; font-weight: 400; }
  .dm-node.entry { background: #1d1d1f; border-color: #1d1d1f; }
  .dm-node.entry .dm-node-t { color: #fff; }
  .dm-node.entry .dm-node-s { color: rgba(255,255,255,.6); }
  .dm-node.leaf { width: 128px; padding: 9px 13px; background: var(--surface-2); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
  .dm-node.leaf .dm-node-t { font-size: 13px; font-weight: 500; }
  .dm-node.focus { box-shadow: 0 0 0 3px rgba(10,113,227,.22), 0 16px 42px rgba(0,0,0,.13); z-index: 6; }
  .dm-node.focus .dm-node-t { color: var(--accent); }
  .dm-node.dim { opacity: .3; }
  .dm-tip { display: none; margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
  .dm-node.focus .dm-tip { display: block; }
  .dm-node.leaf .dm-tip { display: block; }   /* 叶子按钮常显：题数/迁移/讲解不再藏在 focus 后 */
  .dm-words { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
  .dm-word-chip { font-size: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 2px 9px; cursor: pointer; background: var(--surface); color: var(--text-2); font-family: inherit; }
  .dm-see { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
  .dm-see button { font-size: 12.5px; font-weight: 500; border-radius: 980px; padding: 7px 16px; cursor: pointer; border: none; background: var(--accent); color: #fff; }
  .dm-see .ghost { background: var(--surface-2); color: var(--accent); }
  .dm-cue { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--accent); font-weight: 500; }
  .dm-node.entry .dm-cue { color: rgba(255,255,255,.7); }
  .dm-elabel { position: absolute; transform: translate(-50%, -50%); background: var(--surface); border: 0.5px solid var(--border); border-radius: 980px; padding: 2px 9px; font-size: 11px; color: var(--text-3); white-space: nowrap; pointer-events: none; }
  .dm-search-wrap { position: relative; margin-bottom: 8px; max-width: 320px; }
  .dm-search-wrap input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 13px; box-sizing: border-box; }
  .dm-search-results { position: absolute; z-index: 20; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; max-height: 240px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
  .dm-search-results:empty { display: none; }
  .dm-search-hit { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: transparent; color: var(--text); cursor: pointer; font-family: inherit; font-size: 13px; }
  .dm-search-hit:hover { background: var(--accent-bg); color: var(--accent); }
  .dm-hud { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; z-index: 8; }
  .dm-hud button { width: 38px; height: 38px; border-radius: 50%; border: 0.5px solid var(--border); background: rgba(250,250,252,.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: var(--text); font-size: 17px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
  .dm-hud .dm-hud-wide { width: auto; border-radius: 980px; padding: 0 18px; font-size: 14px; font-weight: 500; }
  .analysis-sentence-lg {
    font-size: calc(var(--drawer-font-size-lg, 25px) - 2px); line-height: 1.85; color: var(--text); margin-bottom: 12px;
    padding: 12px 14px; background: var(--surface-3); border-radius: 6px;
  }
  .analysis-sentence-zh {
    margin: -4px 0 14px;
    padding: 10px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: var(--accent-bg);
    color: var(--text-2);
    font-size: calc(var(--drawer-font-size-sm, 23px) - 2px);
    line-height: 1.7;
  }
  .analysis-steps-lg { font-size: var(--drawer-font-size-sm, 23px); color: var(--text-2); line-height: 1.75; }
  .analysis-steps-lg p { margin: 0; }

  .teacher-quick-card {
    margin: 10px 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
  }
  .teacher-quick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }
  .teacher-quick-kicker {
    font-size: calc(var(--drawer-font-size-sm, 23px) - 7px);
    font-weight: 800;
    color: var(--text-3);
    letter-spacing: 0;
    flex: 0 0 auto;
  }
  .teacher-quick-title-line {
    font-size: calc(var(--drawer-font-size-sm, 23px) - 1px);
    font-weight: 800;
    color: var(--accent);
    line-height: 1.35;
    text-align: right;
    flex: 1;
  }
  .teacher-quick-lead {
    font-size: var(--drawer-font-size, 24px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 8px;
  }
  .teacher-quick-steps {
    display: grid;
    gap: 6px;
    margin: 0;
  }
  .teacher-quick-step {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;
    font-size: var(--drawer-font-size-sm, 23px);
    line-height: 1.6;
    color: var(--text);
  }
  .teacher-quick-step-no {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
  }
  .teacher-quick-warn {
    margin-top: 8px;
    font-size: calc(var(--drawer-font-size-sm, 23px) - 2px);
    color: var(--orange);
    line-height: 1.5;
  }

  .lesson-card {
    margin: 16px 0 18px;
    padding: 20px 22px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: var(--accent-bg);
  }
  .lesson-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent);
    font-size: var(--drawer-font-size-sm, 23px);
    font-weight: 800;
    margin-bottom: 12px;
  }
  .lesson-card-title {
    font-size: calc(var(--drawer-font-size-lg, 25px) + 8px);
    font-weight: 900;
    color: var(--accent);
    line-height: 1.32;
    margin-bottom: 10px;
  }
  .lesson-card-focus {
    font-size: calc(var(--drawer-font-size, 24px) + 2px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 8px;
  }
  .lesson-card-sub {
    font-size: var(--drawer-font-size-sm, 23px);
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 14px;
  }
  .lesson-path {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
  }
  .lesson-path-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: var(--drawer-font-size-sm, 23px);
    font-weight: 700;
  }
  .lesson-path-chip.current {
    background: #fff3c4;
    border-color: var(--orange);
    color: var(--orange);
  }
  .lesson-guide-steps {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
  }
  .lesson-guide-step {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: var(--drawer-font-size-sm, 23px);
    line-height: 1.7;
    color: var(--text);
  }
  .lesson-guide-step-no {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
  }
  .lesson-wrong-box {
    padding: 12px 14px;
    border-left: 4px solid var(--orange);
    background: #fff9e6;
    border-radius: 6px;
    font-size: var(--drawer-font-size-sm, 23px);
    line-height: 1.65;
    color: var(--orange);
    font-weight: 800;
  }
  .theory-now-card {
    margin-bottom: 18px;
    padding: 20px 22px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: var(--accent-bg);
  }
  .theory-now-title {
    font-size: calc(var(--drawer-font-size-lg, 25px) + 6px);
    font-weight: 900;
    color: var(--accent);
    line-height: 1.35;
    margin-bottom: 10px;
  }
  .theory-now-list {
    margin: 0 0 0 1.1em;
    padding: 0;
    font-size: var(--drawer-font-size-sm, 23px);
    line-height: 1.8;
    color: var(--text);
  }

  .migration-card {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    margin-bottom: 12px; cursor: pointer; transition: all .15s;
  }
  .migration-card:hover { border-color: var(--accent); }
  .migration-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: var(--surface-2);
    border-bottom: 1px solid var(--surface-3);
  }
  .migration-card-source {
    font-size: calc(var(--drawer-font-size-sm, 23px) - 6px); padding: 3px 9px; background: var(--surface-3);
    border-radius: 4px; color: var(--text-2);
  }
  .migration-card-tag {
    font-size: calc(var(--drawer-font-size-sm, 23px) - 6px); padding: 3px 8px; border-radius: 3px;
    background: var(--accent-bg); color: var(--accent); font-weight: 600;
  }
  .migration-card-sentence {
    padding: 14px 16px; font-size: var(--drawer-font-size, 24px); line-height: 2; color: var(--text);
  }
  .migration-card-sentence .blank-hl {
    display: inline-block; min-width: 44px; text-align: center;
    padding: 2px 6px; border-bottom: 2px dashed var(--accent);
    background: #fff9e6; border-radius: 3px; font-weight: 700; color: var(--accent);
  }
  .migration-card-body {
    display: none; padding: 14px 16px; border-top: 1px solid var(--border);
    font-size: var(--drawer-font-size-sm, 23px); line-height: 1.8; color: var(--text-2);
  }
  .migration-card.open .migration-card-body { display: block; }
  .migration-card-body .ans { font-weight: 700; color: var(--accent); }

  body.teaching-mode {
    overflow: hidden;
  }
  body.teaching-mode header,
  body.teaching-mode #mainDock,
  body.teaching-mode .classroom-switcher,
  body.teaching-mode .context-sidebar,
  body.teaching-mode .sidebar-edge-trigger,
  body.teaching-mode #syncStatus {
    display: none !important;
  }
  body.teaching-mode .drawer,
  body.teaching-mode .drawer-overlay {
    display: none !important;
  }

  .teaching-stage {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    background: var(--bg);
    color: var(--text);
  }
  .teaching-stage.open {
    display: flex;
    flex-direction: column;
  }
  .teaching-stage:fullscreen,
  .teaching-stage:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
  }
  .teaching-stage-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 clamp(16px, 3vw, 44px) 122px;
  }
  .teaching-stage-shell {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 18px;
    padding-bottom: 26px;
  }
  .teaching-stage-topbar {
    position: sticky;
    top: 0;
    z-index: 1225;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 0 12px;
    background: linear-gradient(to bottom, var(--bg) 72%, rgba(245,245,247,0));
  }
  [data-theme="dark"] .teaching-stage-topbar {
    background: linear-gradient(to bottom, var(--bg) 72%, rgba(28,28,30,0));
  }
  .teaching-stage-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 16px;
    font-weight: 700;
    min-width: 0;
  }
  .teaching-stage-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
  }
  .teaching-stage-meta .source {
    max-width: min(44vw, 620px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
  }
  .teaching-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
    align-items: start;
    gap: 18px;
  }
  .teaching-stage-grid.focus-content {
    grid-template-columns: 1fr;
  }
  .teaching-stage-grid.focus-content .teaching-question-panel {
    display: none;
  }
  .teaching-stage-grid.focus-content .teaching-content-panel {
    width: min(1500px, 100%);
    margin: 0 auto;
  }
  .teaching-question-panel,
  .teaching-content-panel {
    min-width: 0;
  }
  .teaching-question-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: clamp(18px, 2.5vw, 28px);
  }
  .teaching-question-line {
    font-size: clamp(27px, 2.7vw, 38px);
    line-height: 1.8;
    font-weight: 650;
  }
  .teaching-question-line .blank-hl {
    display: inline-block;
    min-width: 74px;
    text-align: center;
    padding: 0 10px;
    border-bottom: 3px dashed var(--accent);
    border-radius: 4px;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 900;
    cursor: pointer;
    user-select: none;
  }
  .teaching-question-line .blank-hl.revealed {
    border-bottom-style: solid;
  }
  .teaching-question-line .hl {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 900;
  }
  .teaching-question-folds {
    display: grid;
    gap: 10px;
    margin-top: 12px;
  }
  .teaching-fold {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    overflow: hidden;
  }
  .teaching-fold summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 50px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
  }
  .teaching-fold summary::-webkit-details-marker { display: none; }
  .teaching-fold summary::after {
    content: '›';
    color: var(--text-3);
    font-size: 20px;
    transition: transform .18s ease;
  }
  .teaching-fold[open] summary::after {
    transform: rotate(90deg);
  }
  .teaching-fold-body {
    padding: 0 14px 14px;
    color: var(--text-2);
    font-size: clamp(18px, 1.55vw, 23px);
    line-height: 1.7;
    font-weight: 650;
  }
  .teaching-content-panel {
    display: grid;
    gap: 12px;
  }
  .teaching-content-panel .teacher-quick-card,
  .teaching-content-panel .analysis-solution-card,
  .teaching-content-panel .knowledge-section,
  .teaching-content-panel .knowledge-node-detail {
    margin: 0;
    padding: clamp(18px, 2vw, 26px);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .teaching-content-panel .teacher-quick-card:first-child {
    margin-top: 0;
  }
  .teaching-content-panel .teacher-quick-head {
    align-items: flex-start;
  }
  .teaching-content-panel .teacher-quick-title-line {
    text-align: left;
  }
  .teaching-content-panel .teacher-quick-kicker {
    padding-top: 3px;
  }
  .teaching-content-panel .knowledge-section,
  .teaching-content-panel .knowledge-node-detail {
    width: 100%;
  }
  .teaching-tab-title {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .teaching-tab-kicker {
    color: var(--text-3);
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 4px;
  }
  .teaching-tab-heading {
    color: var(--accent);
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.3;
    font-weight: 900;
  }
  .teaching-tab-sub {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.5;
    font-weight: 650;
  }
  .teaching-guide-summary {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: clamp(19px, 1.6vw, 24px);
    line-height: 1.7;
    font-weight: 720;
  }
  .teaching-guide-summary strong {
    color: var(--accent);
  }
  .teaching-knowledge-map .knowledge-map-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  }
  .teaching-knowledge-focus {
    border: 2px solid var(--accent);
    background: var(--accent-bg);
  }
  .teaching-migration-source-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-3);
  }
  .teaching-migration-source-tabs button {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    font-family: inherit;
    font-size: 16px;
    font-weight: 850;
    cursor: pointer;
  }
  .teaching-migration-source-tabs button.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
  }
  .teaching-migration-source-tabs .count {
    margin-left: 4px;
    color: var(--text-3);
    font-weight: 750;
  }
  .teaching-migration-scroll {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .teaching-migration-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
    gap: clamp(14px, 2vw, 28px);
    align-items: center;
    min-height: 142px;
    padding: clamp(18px, 2.1vw, 30px) clamp(16px, 2.4vw, 34px);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    scroll-margin-top: 84px;
  }
  .teaching-migration-row:last-child {
    border-bottom: 0;
  }
  .teaching-migration-index {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-3);
    font-weight: 850;
  }
  .teaching-migration-index strong {
    color: var(--accent);
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    font-weight: 950;
  }
  .teaching-migration-source {
    font-size: 13px;
    line-height: 1.35;
  }
  .teaching-migration-type {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 850;
    width: fit-content;
  }
  .teaching-migration-row.is-error .teaching-migration-type {
    background: var(--accent-bg);
    color: var(--accent);
  }
  .teaching-migration-type.is-real {
    background: var(--green-bg);
    color: var(--green);
  }
  .teaching-migration-type.is-mock {
    background: var(--orange-bg);
    color: var(--orange);
  }
  .teaching-migration-main {
    display: grid;
    gap: 12px;
    min-width: 0;
  }
  .teaching-migration-sentence {
    color: var(--text);
    font-size: clamp(25px, 2.35vw, 38px);
    line-height: 1.65;
    font-weight: 760;
  }
  .teaching-migration-sentence .blank-hl {
    display: inline-block;
    min-width: 68px;
    text-align: center;
    padding: 0 10px;
    border-bottom: 3px dashed var(--accent);
    border-radius: 4px;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 900;
    cursor: pointer;
    user-select: none;
  }
  .teaching-migration-sentence .blank-hl.revealed {
    border-bottom-style: solid;
  }
  .teaching-migration-note {
    color: var(--text-2);
    font-size: clamp(16px, 1.25vw, 20px);
    line-height: 1.55;
    font-weight: 650;
  }
  .teaching-migration-note strong {
    color: var(--text);
  }
  .teaching-migration-show-all {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    font-weight: 600;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: all .15s;
  }
  .teaching-migration-show-all:hover { background: var(--accent); color: #fff; }

  .teaching-dock {
    position: fixed;
    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 1210;
    width: min(1360px, calc(100vw - 20px));
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(28,28,30,.92);
    box-shadow: 0 18px 56px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
  }
  .teaching-dock-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .teaching-question-rail {
    flex: 1;
    min-width: 180px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px;
  }
  .teaching-question-rail::-webkit-scrollbar {
    display: none;
  }
  .teaching-dock button {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    min-height: 54px;
    padding: 0 15px;
    background: rgba(255,255,255,0.06);
    color: #f5f5f7;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .teaching-dock button:hover {
    background: rgba(255,255,255,0.12);
  }
  .teaching-dock button:active {
    transform: scale(.96);
  }
  .teaching-dock button.active,
  .teaching-dock button.primary {
    background: #f5f5f7;
    border-color: #f5f5f7;
    color: #1d1d1f;
  }
  .teaching-dock button.danger {
    background: rgba(255,59,48,.88);
    border-color: rgba(255,59,48,.95);
    color: #fff;
  }
  .teaching-dock button.return {
    background: rgba(255,214,10,.18);
    border-color: rgba(255,214,10,.42);
    color: #ffd60a;
    min-width: 48px;
    font-size: 24px;
    font-weight: 950;
  }
  .teaching-q-btn {
    min-width: 48px;
    padding: 0 11px !important;
    font-size: 20px !important;
    font-weight: 950 !important;
  }
  .teaching-popover {
    position: fixed;
    inset: 0;
    z-index: 1230;
    width: auto;
    max-height: none;
    overflow: hidden;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 42px);
    border: 0;
    border-radius: 0;
    background: rgba(0,0,0,.42);
    box-shadow: none;
  }
  .teaching-popover.show {
    display: flex;
  }
  .teaching-popover-panel {
    width: min(900px, 100%);
    max-height: min(82vh, 760px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
  }
  .teaching-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px 14px;
  }
  .teaching-popover-title {
    color: var(--text);
    font-size: 20px;
    font-weight: 950;
  }
  .teaching-popover-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-family: inherit;
    font-size: 20px;
    font-weight: 850;
    cursor: pointer;
  }
  .teaching-exam-year {
    margin: 10px 4px 8px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 900;
  }
  .teaching-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
  }
  .teaching-menu-btn {
    width: 100%;
    min-height: 62px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 750;
    text-align: left;
    padding: 10px 14px;
    cursor: pointer;
  }
  .teaching-menu-btn.active {
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
  }
  .teaching-menu-sub {
    display: block;
    margin-top: 3px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 600;
  }

  @media (max-width: 760px) {
    .teaching-stage-main {
      padding: 0 12px 228px;
    }
    .teaching-stage-grid {
      grid-template-columns: 1fr;
    }
    .teaching-migration-row {
      grid-template-columns: 1fr;
      min-height: 0;
    }
    .teaching-migration-index {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }

    .teaching-stage-topbar {
      align-items: flex-start;
    }
    .teaching-stage-meta .source {
      max-width: calc(100vw - 118px);
    }
    .teaching-question-line {
      font-size: 24px;
    }
    .teaching-dock {
      align-items: stretch;
      flex-wrap: wrap;
      min-height: 124px;
      border-radius: 18px;
    }
    .teaching-question-rail {
      order: -1;
      flex-basis: 100%;
    }
    .teaching-dock button {
      min-height: 52px;
      padding: 0 12px;
      font-size: 15px;
    }
    .teaching-popover {
      padding: 12px;
    }
    .teaching-exam-grid {
      grid-template-columns: 1fr;
    }
  }

  .error-import-toggle {
    display: inline-block; padding: 8px 18px; font-size: 14px; font-weight: 600;
    color: #fff; background: var(--accent); border: none; border-radius: 6px;
    cursor: pointer; margin-bottom: 16px;
  }
  .error-import-toggle:hover { background: var(--accent-light); }
  .error-import-form {
    display: none; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
  }
  .release-marker {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 10px; margin: 0 0 12px;
    border: 1px solid var(--accent-light); border-radius: 6px;
    background: var(--accent-bg); color: var(--accent);
    font-size: 12px; font-weight: 700; letter-spacing: 0;
  }
  .import-upgrade-card {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
    margin: 12px 0 16px; padding: 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface);
  }
  .import-upgrade-step {
    padding: 10px 12px; border-radius: 6px; background: var(--surface-2);
    border: 1px solid var(--surface-3);
  }
  .import-upgrade-step b {
    display: block; color: var(--text); font-size: 13px; margin-bottom: 4px;
  }
  .import-upgrade-step span {
    display: block; color: var(--text-2); font-size: 12px; line-height: 1.6;
  }
  .error-import-form.show { display: block; }
  .error-import-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
  .error-import-form textarea, .error-import-form input, .error-import-form select {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; font-family: inherit;
    margin-bottom: 12px; background: var(--surface-2);
  }
  .error-import-form textarea { min-height: 80px; resize: vertical; }
  .error-import-btns { display: flex; gap: 8px; justify-content: flex-end; }
  .error-import-btns button {
    padding: 6px 16px; border-radius: 6px; font-size: 13px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface);
  }
  .error-import-btns button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
  .error-import-btns button.primary:hover { background: var(--accent-light); }
  .error-list-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px;
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; cursor: pointer; transition: all .15s;
  }
  .error-list-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
  .error-list-left { flex: 1; min-width: 0; }
  .error-list-sentence { font-size: var(--font-base, 24px); line-height: 1.8; color: var(--text); }
  .error-list-sentence-truncated {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis;
  }
  .error-list-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
  .error-list-delete {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; font-size: 14px; line-height: 22px;
    text-align: center; color: var(--text-3); flex-shrink: 0;
  }
  .error-list-delete:hover { background: var(--red-bg); color: var(--red); border-color: var(--red); }
  .error-empty { text-align: center; color: var(--text-3); font-size: 14px; padding: 48px 0; }

  .prep-list-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px;
    cursor: pointer; transition: all .18s;
  }
  .prep-list-item:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
  .prep-list-title { font-size: var(--font-base, 24px); font-weight: 700; color: var(--text); margin-bottom: 6px; }
  .prep-list-preview { font-size: var(--font-sm, 21px); color: var(--text-2); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .prep-list-meta { font-size: 12px; color: var(--text-3); margin-top: 8px; display: flex; gap: 12px; align-items: center; }
  .prep-list-delete {
    font-size: 12px; color: var(--red); cursor: pointer; background: none; border: none;
    padding: 2px 8px; border-radius: 4px;
  }
  .prep-list-delete:hover { background: var(--red-bg); }
  .prep-list-rename {
    font-size: 12px; color: var(--text-3); cursor: pointer; background: none; border: none;
    padding: 2px 8px; border-radius: 4px;
  }
  .prep-list-rename:hover { background: var(--surface-3); color: var(--accent); }
  .bulk-select-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .bulk-select-bar.show { display: flex; }
  .bulk-select-info {
    font-size: 12px;
    color: var(--text-2);
  }
  .bulk-select-actions {
    display: flex;
    gap: 8px;
  }
  .bulk-select-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
  }
  .bulk-select-actions button.primary {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
  }
  .bulk-item-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .drawer-nav-btn {
    width: 26px; height: 26px; border: 1px solid var(--border);
    border-radius: 4px; background: var(--surface); cursor: pointer;
    font-size: 12px; line-height: 24px; text-align: center; padding: 0;
    color: var(--text-2); transition: all .15s;
  }
  .drawer-nav-btn:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

  .answer-filled {
    font-weight: 700; color: var(--green); display: inline-block;
    min-width: 52px; text-align: center; padding: 0.1em 0.4em; margin: 0 2px;
    border-bottom: 2px solid var(--green);
    background: var(--green-bg); border-radius: 3px;
    font-size: 0.85em; vertical-align: baseline;
    cursor: pointer; transition: all .15s;
  }
  .answer-filled:hover,
  .answer-filled.highlight {
    background: var(--accent-bg); color: var(--accent); border-bottom-color: var(--accent);
  }

  .category-stats {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
    padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: var(--font-sm, 21px); align-items: center;
  }
  .category-stats-label { color: var(--text-3); font-size: var(--font-sm, 21px); margin-right: 4px; }
  .category-stats-tag {
    padding: 2px 8px; border-radius: 4px; font-size: var(--font-sm, 21px); font-weight: 600;
    cursor: pointer; transition: all .15s;
  }
  .category-stats-tag:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

  .passage-box p.paragraph-active {
    background: var(--accent-bg); border-left: 3px solid var(--accent);
    padding-left: 14px; border-radius: 4px; margin-left: -4px;
    transition: background .2s;
  }

  @media (max-width: 960px) {
    .grid-11 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .classroom-switcher { top: 56px; }
    .classroom-switcher-group { flex: 1 1 220px; }
    .classroom-switcher select { flex: 1; min-width: 0; max-width: none; }
    .classroom-progress { width: 100%; margin-left: 0; }
  }

  /* ============== 紧凑模式（白板/投影）============== */
  body.compact header { height: 38px; padding: 0 14px; }
  body.compact .logo { font-size: 14px; }
  body.compact .nav-btn { padding: 3px 10px; font-size: 12px; }
  body.compact .header-font-ctrl { gap: 2px; }
  body.compact .header-font-ctrl > span { font-size: 10px; }
  body.compact .page { padding: 10px; }
  body.compact .page-title { font-size: 18px; margin-bottom: 2px; }
  body.compact .page-desc { font-size: 13px; margin-bottom: 12px; }
  body.compact .source-info { margin-bottom: 6px; gap: 4px; }
  body.compact .source-tag { font-size: 11px; padding: 1px 6px; }
  body.compact .source-count { font-size: 11px; }
  body.compact .source-switch-btn { padding: 1px 7px; font-size: 11px; }
  body.compact .classroom-switcher { top: 46px; padding: 6px 8px; gap: 6px; }
  body.compact .classroom-switcher select { height: 30px; font-size: 12px; }
  body.compact .classroom-icon-btn,
  body.compact .classroom-action-btn { height: 30px; font-size: 12px; }
  body.compact .classroom-icon-btn { width: 30px; line-height: 28px; }
  body.compact .passage-box { padding: 14px 18px; margin-bottom: 6px; }
  body.compact .passage-box p { margin-bottom: 10px; }
  body.compact .hint-text { display: none; }
  body.compact .category-stats { display: none; }
  body.compact .practice-layout { min-height: auto; padding-bottom: 16px; padding: 10px; }
  body.compact .context-sidebar { width: 180px; }
  body.compact .context-sidebar-title { font-size: 11px; padding: 4px 8px 8px; }
  body.compact .context-sidebar-item { padding: 4px 8px; font-size: 11px; }
  body.compact .context-sidebar-year { padding: 6px 8px 1px; font-size: 9px; }
  body.compact .left-panel { padding-left: 0; }
  body.compact .category-section { margin-bottom: 14px; }
  body.compact .category-section-title { font-size: 15px; margin-bottom: 6px; }
  body.compact .card { padding: 12px 14px; }
  body.compact .grid-11 { gap: 8px; }
  body.compact .font-ctrl-btn { width: 20px; height: 20px; font-size: 11px; line-height: 18px; }
  body.compact .dock { padding: 4px 6px 6px; gap: 0; border-radius: 16px; bottom: 8px; }
  body.compact .dock-item { width: 40px; height: 40px; border-radius: 12px; }
  body.compact .dock-item { font-size: 20px; }

  /* ============== 套卷侧边栏 ============== */


  /* ============== 模块选择页（登录后默认）============== */
  body.in-modules .header-font-ctrl,
  body.in-modules #syncStatus { display: none !important; }
  body.in-modules #page-modules { display: block !important; }
  body.in-modules .page:not(#page-modules) { display: none !important; }

  #page-modules { max-width: clamp(960px, calc(100% - 320px), 2200px); margin: 0 auto; padding: 24px 24px 80px; animation: fadeIn .4s ease; }
  #page-practice { max-width: none; padding: 0; }
  #page-knowledge { max-width: none; padding: 0; }

  /* ── 欢迎页 Hero ── */
  .welcome-hero {
    text-align: center;
    padding: 80px 24px 56px;
    background:
      radial-gradient(ellipse at top left, rgba(184,148,47,0.12) 0%, transparent 55%),
      radial-gradient(ellipse at top right, rgba(45,106,79,0.08) 0%, transparent 55%),
      linear-gradient(180deg, var(--accent-bg) 0%, transparent 100%);
    border-radius: 16px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
  }
  .welcome-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 20% 80%, rgba(139,105,20,0.04) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(106,76,147,0.04) 0%, transparent 50%);
    pointer-events: none;
  }
  .welcome-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(184,148,47,0.3);
    margin-bottom: 24px;
    font-weight: 600;
    position: relative;
    z-index: 1;
  }
  .welcome-hero h1 {
    font-size: 44px;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -1px;
    line-height: 1.2;
    font-weight: 700;
    position: relative;
    z-index: 1;
  }
  .welcome-hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .welcome-hero .welcome-sub {
    font-size: 17px;
    color: var(--text-2);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.75;
    position: relative;
    z-index: 1;
  }
  .welcome-cta {
    display: flex; justify-content: center; gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
  }
  .welcome-btn {
    padding: 13px 32px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease;
  }
  .welcome-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
  .welcome-btn:active { transform: translateY(0); }
  .welcome-btn.primary {
    background: var(--btn-primary-bg, var(--accent));
    color: var(--btn-primary-text, #fff);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .welcome-btn.primary:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
    opacity: 0.92;
  }
  .welcome-btn.secondary { background: var(--surface); color: var(--text); }
  .welcome-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

  /* ── 段落 ── */
  .welcome-section { margin-bottom: 56px; }
  .welcome-section h2 {
    font-size: 24px;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -.3px;
    font-weight: 700;
  }
  .welcome-section .welcome-section-sub {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 22px;
    line-height: 1.7;
  }
  .welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }
  .welcome-feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 22px 20px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
  }
  .welcome-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border-color: var(--accent-light);
  }
  .welcome-feature-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: inline-flex;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: var(--accent-bg);
    border-radius: 10px;
  }
  .welcome-feature-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -.2px;
  }
  .welcome-feature-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
  }

  /* ── 三步上手（时间线版）── */
  .welcome-steps { list-style: none; counter-reset: step; padding: 0; }
  .welcome-steps li {
    counter-increment: step;
    padding: 16px 16px 16px 64px;
    margin-bottom: 12px;
    position: relative;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.75;
  }
  .welcome-steps li b { color: var(--text); }
  .welcome-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 12px;
    width: 32px; height: 32px;
    background: var(--btn-primary-bg, var(--accent));
    color: var(--btn-primary-text, #fff);
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  /* ── 作者私语 ── */
  .welcome-author {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 30px;
    margin-bottom: 48px;
    position: relative;
  }
  .welcome-author::before {
    content: '✦';
    position: absolute;
    top: 20px; right: 24px;
    color: var(--accent-light);
    font-size: 24px;
    opacity: 0.5;
  }
  .welcome-author h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 700;
  }
  .welcome-author p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.85;
    margin-bottom: 10px;
  }
  .welcome-author p:last-child { margin-bottom: 0; }
  .welcome-author b { color: var(--text); }

  /* ── 早期版本声明 / 反馈卡片 ── */
  .welcome-disclaimer {
    background: linear-gradient(135deg, var(--accent-bg) 0%, var(--surface-2) 100%);
    border: 1px solid var(--accent-light);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 48px;
  }
  .welcome-disclaimer h3 {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 700;
  }
  .welcome-disclaimer p {
    font-size: 14px;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 10px;
  }
  .welcome-disclaimer ul {
    list-style: none;
    padding-left: 0;
    margin: 14px 0 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .welcome-disclaimer li {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    background: var(--surface);
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
  }
  .welcome-disclaimer code {
    background: transparent;
    padding: 0;
    border: 0;
    font-size: 13px;
    color: var(--text);
  }
  .welcome-disclaimer a { color: var(--accent); text-decoration: none; }
  .welcome-disclaimer a:hover { text-decoration: underline; }

  .welcome-footer-cta { text-align: center; padding: 24px 0 8px; }
  .welcome-footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 36px;
    line-height: 1.7;
  }

  /* ── 模块选择页 ── */
  .modules-hero {
    text-align: center;
    padding: 56px 24px 40px;
    margin-bottom: 32px;
  }
  .modules-hero .greeting {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 8px;
    letter-spacing: 1px;
  }
  .modules-hero h1 {
    font-size: 32px;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -.5px;
    font-weight: 700;
  }
  .modules-hero p {
    font-size: 15px;
    color: var(--text-2);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.75;
  }
  .modules-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: clamp(560px, calc(100% - 32px), 1856px);
    margin: 0 auto 48px;
  }
  .modules-grid .module-card {
    flex: 0 1 296px;
    min-width: 280px;
  }
  .module-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 24px 22px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
  }
  .module-card.available { cursor: pointer; }
  .module-card.available:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.08);
    border-color: var(--accent);
  }
  .module-card.available::after {
    content: '→';
    position: absolute;
    bottom: 18px; right: 22px;
    font-size: 22px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .2s, transform .2s;
  }
  .module-card.available:hover::after { opacity: 1; transform: translateX(0); }
  .module-card.coming { opacity: 0.65; cursor: not-allowed; }
  .module-card-badge {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    font-weight: 700;
  }
  .module-card-badge.live { background: var(--green-bg); color: var(--green); }
  .module-card-badge.soon { background: var(--surface-3); color: var(--text-3); }
  .module-card-icon {
    font-size: 32px;
    margin-bottom: 14px;
    display: inline-flex;
    width: 56px; height: 56px;
    align-items: center; justify-content: center;
    background: var(--accent-bg);
    border-radius: 14px;
  }
  .module-card.coming .module-card-icon { background: var(--surface-3); }
  .module-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -.2px;
  }
  .module-card-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 8px;
  }
  .module-card-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
  }
  .modules-footer {
    text-align: center;
    padding: 28px 24px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
  }
  .modules-footer p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.8;
  }
  .modules-footer a { color: var(--accent); text-decoration: none; }
  .modules-footer a:hover { text-decoration: underline; }

  /* ============== 引导浮层 ============== */
  .onboard-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
  }
  .onboard-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 460px;
    width: 100%;
    padding: 32px 28px 22px;
    animation: fadeIn .25s ease;
  }
  .onboard-step-label {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .onboard-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
  }
  .onboard-body {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.85;
    margin-bottom: 22px;
  }
  .onboard-body b { color: var(--text); }
  .onboard-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
  .onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .2s; }
  .onboard-dot.active { background: var(--accent); }
  .onboard-actions { display: flex; justify-content: space-between; align-items: center; }
  .onboard-btn {
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .onboard-btn.ghost { background: none; color: var(--text-3); }
  .onboard-btn.ghost:hover { color: var(--text-2); }
  .onboard-btn.primary { background: var(--accent); color: #fff; }
  .onboard-btn.primary:hover { background: var(--accent-light); }

/* ── AI 解析加载遮罩 ── */
.ai-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44,36,22,.35);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
}
.ai-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 44px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  min-width: 300px;
  max-width: 420px;
}
.ai-card-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 20px;
}
.ai-card-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.ai-card-desc {
  font-size: 13px; color: var(--text-2);
  line-height: 1.5;
}
.ai-card-cancel {
  margin-top: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 6px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-2);
}
.ai-card-cancel:hover { background: var(--surface-3); }
.docx-upload-btn {
  background: var(--green) !important;
  color: #fff !important;
  border: 1px solid var(--green) !important;
}
.docx-upload-btn:hover { background: #248a3d !important; }

/* ── Word 导入格式演示：真实文档效果 ── */
.import-demo-popover {
  position: fixed; z-index: 300;
  width: 600px; max-width: 94vw;
  background: #f0f0f2; border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
  padding: 16px; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
  max-height: 80vh; overflow-y: auto;
}
.import-demo-popover.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* 模拟 Word 纸张 */
.word-doc-page {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.04);
  padding: 32px 36px;
  font-family: 'Times New Roman', 'STSong', 'SimSun', serif;
  font-size: 10.5px;
  line-height: 1.9;
  color: #1d1d1f;
  border-radius: 1px;
}
.word-doc-page .wd-p {
  margin: 0 0 2px 0;
  font: 10.5px 'Times New Roman', 'STSong', 'SimSun', serif;
  color: #1d1d1f;
}
.word-doc-page .wd-title { font: 10.5px 'Times New Roman', 'STSong', 'SimSun', serif; }
.word-doc-page .wd-blue { color: #007aff; }
.word-doc-page .wd-blank { text-decoration: underline; }
.word-doc-page .wd-justify { text-align: justify; }
.word-doc-page .wd-more {
  text-align: center; color: #aeaeb2; font: 10px 'PingFang SC', -apple-system, sans-serif;
  margin-top: 10px; border-top: 1px dashed #e5e5ea; padding-top: 8px;
}

/* ====== macOS 风格 Dock ====== */
.dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 6px 8px;
  background: var(--dock-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid var(--dock-border);
  border-radius: 20px;
  box-shadow: var(--dock-shadow-outer), var(--dock-shadow-inner);
}
.dock-item {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  color: var(--dock-item-color);
  transition: all .28s cubic-bezier(.22,.61,.36,1);
  -webkit-tap-highlight-color: transparent;
  transform-origin: bottom center;
  font-size: 24px; line-height: 1;
}
.dock-item:hover {
  transform: scale(1.22);
  color: var(--dock-item-hover-color);
  background: var(--dock-item-hover-bg);
  /* 相邻元素也跟着放大 */
}
.dock-item:hover + .dock-item { transform: scale(1.10); }
.dock-item:has(+ .dock-item:hover) { transform: scale(1.10); }
.dock-item:active { transform: scale(0.92); }
/* 标签提示 */
.dock-item::after {
  content: attr(data-label);
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px; font-weight: 500;
  color: var(--dock-label-color);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  letter-spacing: 0.2px;
}
.dock-item:hover::after { opacity: 1; }
/* 激活指示点 */
.dock-item.active .dock-dot {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--dock-dot-color);
}
.dock-item.dock-back {
  display: none;
  font-size: 26px;
  font-weight: 800;
}
.dock-item.dock-back.show {
  display: flex;
}
.dock-item.dock-back {
  color: var(--accent);
}
.dock-item.dock-back:hover {
  color: var(--accent);
  background: var(--accent-bg);
}
.dock-divider.dock-back-divider {
  display: none;
}
.dock-divider.dock-back-divider.show {
  display: block;
}
.dock-divider {
  width: 0.5px;
  background: var(--dock-divider-color);
  margin: 8px 6px 12px;
  align-self: stretch;
}

.feedback-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 230;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 10px 14px; box-shadow: var(--shadow-md);
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.feedback-fab:hover { background: var(--surface-2); transform: translateY(-1px); }
.feedback-panel label {
  display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px;
}
.feedback-panel select,
.feedback-panel input,
.feedback-panel textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  background: var(--input-bg); color: var(--text); font-family: inherit;
  font-size: 14px; padding: 9px 10px;
}
.feedback-panel textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.feedback-panel select:focus,
.feedback-panel input:focus,
.feedback-panel textarea:focus { outline: none; border-color: var(--accent); }

@media (max-width: 480px) {
  .feedback-fab { right: 12px; bottom: 12px; }
}

[data-theme="dark"] .context-sidebar:hover { box-shadow: 8px 0 40px rgba(0,0,0,0.4), 0 0 0 0.5px rgba(255,255,255,0.08); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
