/* 经纶小学数学工作站 · 全站样式 */
:root{
  --bg:#f3f4f6;--surface:#fff;--surface2:#f9fafb;--border:#e5e7eb;--border2:#d1d5db;
  --text:#1f2937;--muted:#6b7280;--muted2:#9ca3af;
  --accent:#2563eb;--accent-h:#1d4ed8;--accent-bg:#eaf1fe;--sel:#e3edfd;--sel-border:#b8cff5;
  --danger:#dc2626;--danger-bg:#fee2e2;--ok:#16a34a;--ok-bg:#dcfce7;--warn:#d97706;--warn-bg:#fef3c7;
  --r:8px;--r2:12px;--sh:0 1px 2px rgba(0,0,0,.05);--sh2:0 8px 30px rgba(0,0,0,.12);
  --font:system-ui,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Microsoft YaHei",monospace;
  --serif:"Noto Serif CJK SC","Source Han Serif SC","Songti SC","SimSun",serif;
  --g1:#f59e0b;--g2:#f97316;--g3:#10b981;--g4:#0ea5e9;--g5:#6366f1;--g6:#8b5cf6;--g0:#9ca3af;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:var(--font);font-size:14px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit;color:inherit}
h1{font-size:22px;margin:0 0 4px}h2{font-size:18px;margin:0 0 12px}h3{font-size:15px;margin:0 0 8px}
small,.muted{color:var(--muted)}
::selection{background:var(--sel)}

/* 顶栏 */
.topbar{position:sticky;top:0;z-index:50;height:56px;display:flex;align-items:center;gap:8px;padding:0 20px;background:var(--surface);border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;color:var(--text);margin-right:16px}.brand:hover{text-decoration:none}
.logo{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:9px;background:linear-gradient(135deg,#1d4ed8,#7c3aed);color:#fff;font-weight:700;font-size:17px;font-family:var(--serif);box-shadow:0 2px 6px rgba(37,99,235,.35)}
.brand-name{letter-spacing:.5px}
.eyebrow{font-size:11.5px;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted2);font-weight:600;margin-bottom:4px}
.gdot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--g0);flex:none}
.gdot.g1,.tl-dot.g1{background:var(--g1)}.gdot.g2,.tl-dot.g2{background:var(--g2)}.gdot.g3,.tl-dot.g3{background:var(--g3)}.gdot.g4,.tl-dot.g4{background:var(--g4)}.gdot.g5,.tl-dot.g5{background:var(--g5)}.gdot.g6,.tl-dot.g6{background:var(--g6)}
.tabs{display:flex;gap:4px}
.tab{padding:7px 14px;border-radius:999px;color:var(--muted);font-weight:500}.tab:hover{background:var(--surface2);color:var(--text);text-decoration:none}.tab.active{background:var(--accent-bg);color:var(--accent)}
.spacer{flex:1}
.ver{color:var(--muted2);font-size:12px;margin-left:10px}
.user{position:relative}
.avatar{width:34px;height:34px;border-radius:50%;border:0;background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff;font-weight:700;cursor:pointer;font-size:15px}
.user .menu{display:none;position:absolute;right:0;top:42px;min-width:170px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--sh2);padding:6px;z-index:60}
.user.open .menu{display:block}
.menu-name{padding:8px 10px;font-weight:600;border-bottom:1px solid var(--border);margin-bottom:4px}
.user .menu a{display:block;padding:8px 10px;border-radius:6px;color:var(--text)}.user .menu a:hover{background:var(--surface2);text-decoration:none}

/* 版心 */
.main{max-width:1180px;margin:0 auto;padding:22px 24px 60px}
.main-wide{padding:0}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.page-head p{margin:2px 0 0;color:var(--muted)}

/* 按钮 */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:var(--r);border:1px solid var(--border2);background:var(--surface);color:var(--text);cursor:pointer;line-height:1.3;white-space:nowrap;transition:background .12s,border-color .12s;user-select:none}
.btn:hover{background:var(--surface2);text-decoration:none}.btn:active{transform:translateY(0.5px)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-h)}
.btn.danger{color:var(--danger);border-color:#fca5a5}.btn.danger:hover{background:var(--danger-bg)}
.btn.ghost{border-color:transparent;background:transparent}.btn.ghost:hover{background:var(--surface2)}
.btn.sm{padding:4px 10px;font-size:13px}.btn.lg{padding:10px 20px;font-size:15px}
.btn:disabled,.btn[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
.btn .ico{width:16px;height:16px;display:inline-block}
.btn .ico svg{width:16px;height:16px;display:block}

/* 表单 */
.field{margin-bottom:14px}
.field label,label.lbl{display:block;font-weight:600;margin-bottom:6px}
.field .hint{margin-top:5px;font-size:13px;color:var(--muted)}
input[type=text],input[type=password],input[type=number],input[type=search],select,textarea{width:100%;padding:8px 11px;border:1px solid var(--border2);border-radius:var(--r);background:var(--surface);outline:none;transition:border-color .12s,box-shadow .12s}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
textarea{min-height:170px;resize:vertical;line-height:1.55}
select{appearance:auto}
.row{display:flex;gap:14px;flex-wrap:wrap}.row>*{flex:1;min-width:160px}
.seg{display:inline-flex;border:1px solid var(--border2);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.seg button{border:0;background:transparent;padding:7px 14px;cursor:pointer;color:var(--muted);border-right:1px solid var(--border)}
.seg button:last-child{border-right:0}.seg button.on{background:var(--accent-bg);color:var(--accent);font-weight:600}
.switch,.field .switch,.field label.switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;user-select:none;font-weight:400;margin:0}
.switch i{width:38px;height:22px;border-radius:999px;background:#cbd5e1;position:relative;transition:background .15s}
.switch i::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch input{display:none}.switch input:checked+i{background:var(--accent)}.switch input:checked+i::after{left:19px}

/* 卡片、表格、标签 */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:18px 20px;margin-bottom:16px;box-shadow:var(--sh)}
.card h3{margin-top:0}
.table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);overflow:hidden}
.table th{position:sticky;top:0;background:var(--surface2);text-align:left;font-weight:600;color:var(--muted);padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px;user-select:none}
.table td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.table tr.link{cursor:pointer}.table tr.link:hover td{background:var(--surface2)}
.pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1.4;white-space:nowrap}
.pill.queued,.pill.preparing{background:var(--warn-bg);color:#92400e}.pill.running{background:#dbeafe;color:#1e40af}
.pill.done{background:var(--ok-bg);color:#166534}.pill.failed{background:var(--danger-bg);color:#991b1b}.pill.cancelled{background:#e5e7eb;color:#374151}
.pill.running::before{content:"";width:8px;height:8px;border-radius:50%;background:#2563eb;animation:pulse 1.2s infinite}
@keyframes pulse{0%,100%{opacity:.35}50%{opacity:1}}
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-size:12.5px;color:var(--muted)}
.chip b{color:var(--text);font-weight:600}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip .x{cursor:pointer;color:var(--muted2);margin-left:2px;font-size:14px;line-height:1}.chip .x:hover{color:var(--danger)}
.notice{padding:10px 14px;border-radius:var(--r);margin:10px 0}.notice.err{background:var(--danger-bg);color:#991b1b}.notice.ok{background:var(--ok-bg);color:#166534}.notice.info{background:var(--accent-bg);color:#1e40af}
.empty{padding:36px 20px;text-align:center;color:var(--muted)}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#9ca3af;margin-right:6px}.dot.on{background:var(--ok)}
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.filters .chipbtn{padding:5px 12px;border-radius:999px;border:1px solid var(--border2);background:var(--surface);cursor:pointer;color:var(--muted)}
.filters .chipbtn.on{background:var(--accent-bg);border-color:var(--sel-border);color:var(--accent);font-weight:600}
.filters input[type=search]{width:240px;margin-left:auto}
.stat{display:flex;gap:18px;flex-wrap:wrap}.stat .n{font-size:22px;font-weight:700}.stat .l{font-size:12px;color:var(--muted)}
pre{white-space:pre-wrap;word-break:break-word;margin:0;font-family:var(--mono);font-size:13px;line-height:1.55}
pre.log{background:#0f172a;color:#e2e8f0;padding:14px 16px;border-radius:var(--r2);max-height:60vh;overflow:auto}
pre.text{background:var(--surface);border:1px solid var(--border);padding:14px 16px;border-radius:var(--r2);max-height:70vh;overflow:auto;font-family:var(--font);font-size:14.5px}
pre.answer{background:var(--surface);border:1px solid var(--border);padding:16px 18px;border-radius:var(--r2);font-family:var(--font);font-size:15px;line-height:1.7}
.ico{display:inline-block;vertical-align:-3px}.ico svg{width:20px;height:20px;display:block}

/* 弹窗 / 提示 / 右键菜单 */
.overlay{position:fixed;inset:0;background:rgba(15,23,42,.35);display:grid;place-items:center;z-index:100;animation:fade .12s}
@keyframes fade{from{opacity:0}to{opacity:1}}
.dialog{width:min(520px,92vw);background:var(--surface);border-radius:14px;box-shadow:var(--sh2);padding:20px 22px;animation:pop .14s}
.dialog.wide{width:min(760px,94vw)}
@keyframes pop{from{transform:scale(.97);opacity:0}to{transform:none;opacity:1}}
.dialog h3{font-size:16px;margin:0 0 12px}
.dialog .body{max-height:60vh;overflow:auto}
.dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.toasts{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:8px;z-index:120}
.toast{background:#111827;color:#fff;padding:10px 14px;border-radius:10px;box-shadow:var(--sh2);font-size:13.5px;max-width:380px;animation:pop .14s}
.toast.err{background:#991b1b}.toast.ok{background:#166534}
.toast .bar{height:4px;background:rgba(255,255,255,.25);border-radius:2px;margin-top:8px;overflow:hidden}.toast .bar i{display:block;height:100%;background:#fff;width:0;transition:width .2s}
.ctx{position:fixed;z-index:110;min-width:180px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--sh2);padding:5px;animation:pop .1s}
.ctx button{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;text-align:left;padding:7px 10px;border-radius:6px;cursor:pointer}
.ctx button:hover{background:var(--surface2)}.ctx button.danger{color:var(--danger)}.ctx button:disabled{opacity:.4;cursor:default}
.ctx hr{border:0;border-top:1px solid var(--border);margin:4px 2px}
.ctx .k{margin-left:auto;color:var(--muted2);font-size:12px}

/* 目录树 */
.tree{font-size:13.5px;user-select:none}
.tree .node{display:flex;align-items:center;gap:4px;padding:4px 6px;border-radius:6px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tree .node:hover{background:var(--surface2)}.tree .node.on{background:var(--sel);color:var(--accent);font-weight:600}
.tree .node.drop{outline:2px dashed var(--accent);outline-offset:-2px}
.tree .tw{width:16px;text-align:center;color:var(--muted2);font-size:10px;flex:0 0 16px}
.tree .kids{margin-left:14px;display:none}.tree .open>.kids{display:block}
.tree .ico svg{width:18px;height:18px}

/* 资源管理器 */
.explorer{display:grid;grid-template-columns:236px 1fr;grid-template-rows:auto auto 1fr auto;height:calc(100vh - 56px);background:var(--surface)}
.ex-toolbar{grid-column:1/3;display:flex;align-items:center;gap:6px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--surface);flex-wrap:wrap}
.ex-toolbar .sep{width:1px;height:22px;background:var(--border);margin:0 4px}
.ex-toolbar input[type=search]{width:220px;margin-left:auto}
.ex-toolbar .btn{border-color:transparent}.ex-toolbar .btn:hover{border-color:var(--border2)}
.ex-side{grid-row:2/4;border-right:1px solid var(--border);padding:10px 8px;overflow:auto;background:var(--surface2)}
.ex-side .sec{font-size:12px;color:var(--muted2);padding:6px 8px 2px;text-transform:uppercase;letter-spacing:.04em}
.ex-addr{display:flex;align-items:center;gap:4px;padding:6px 10px;border-bottom:1px solid var(--border)}
.ex-addr .crumbs{flex:1;display:flex;align-items:center;gap:2px;border:1px solid var(--border);border-radius:var(--r);padding:4px 8px;min-height:32px;overflow:hidden;background:var(--surface)}
.ex-addr .crumbs a{color:var(--text);padding:2px 6px;border-radius:5px;white-space:nowrap}.ex-addr .crumbs a:hover{background:var(--surface2);text-decoration:none}
.ex-addr .crumbs .sep{color:var(--muted2)}
.ex-main{overflow:auto;position:relative;outline:none}
.ex-main.dragover::after{content:"松开鼠标，上传到当前文件夹";position:absolute;inset:8px;border:2px dashed var(--accent);border-radius:12px;background:rgba(37,99,235,.06);display:grid;place-items:center;color:var(--accent);font-weight:600;font-size:16px;pointer-events:none}
.ex-list{width:100%;border-collapse:collapse}
.ex-list th{position:sticky;top:0;background:var(--surface);text-align:left;font-weight:500;color:var(--muted);padding:7px 10px;border-bottom:1px solid var(--border);font-size:12.5px;cursor:pointer;user-select:none;z-index:2}
.ex-list th:hover{color:var(--text)}.ex-list th .arrow{color:var(--muted2);margin-left:4px;font-size:10px}
.ex-list td{padding:5px 10px;border-bottom:1px solid #f1f3f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:0}
.ex-list td.name{max-width:none;width:52%}.ex-list td.c-time{width:170px}.ex-list td.c-type{width:120px;color:var(--muted)}.ex-list td.c-size{width:110px;text-align:right;color:var(--muted)}
.ex-list tr{cursor:default}.ex-list tr:hover td{background:var(--surface2)}
.ex-list tr.sel td{background:var(--sel)}.ex-list tr.sel:hover td{background:#d9e6fb}
.ex-list tr.drop td{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}
.ex-list .name .ico{margin-right:8px}
.ex-list .name input{padding:2px 6px;width:min(420px,80%);border:1px solid var(--accent);border-radius:5px;outline:none;box-shadow:0 0 0 3px var(--accent-bg)}
.ex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:6px;padding:12px}
.ex-grid .item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;border-radius:10px;cursor:default;text-align:center;border:1px solid transparent}
.ex-grid .item:hover{background:var(--surface2)}.ex-grid .item.sel{background:var(--sel);border-color:var(--sel-border)}
.ex-grid .item.drop{border-color:var(--accent);background:var(--accent-bg)}
.ex-grid .big{width:64px;height:64px;display:grid;place-items:center}.ex-grid .big svg{width:56px;height:56px}
.ex-grid .big img{max-width:64px;max-height:64px;border-radius:6px;object-fit:cover;box-shadow:var(--sh)}
.ex-grid .nm{font-size:12.5px;line-height:1.3;max-height:2.6em;overflow:hidden;word-break:break-all}
.ex-status{grid-column:1/3;display:flex;gap:18px;align-items:center;padding:5px 14px;border-top:1px solid var(--border);font-size:12.5px;color:var(--muted);background:var(--surface2)}
.ex-status .spacer{flex:1}
.usage{display:flex;align-items:center;gap:8px}
.bar{height:6px;width:150px;background:var(--border);border-radius:999px;overflow:hidden;display:inline-block}.bar i{display:block;height:100%;background:var(--accent)}.bar i.warn{background:var(--danger)}
.ex-empty{padding:60px 20px;text-align:center;color:var(--muted)}
.ex-empty .big{font-size:40px;margin-bottom:8px}
.ex-side .quota{padding:10px 8px;font-size:12.5px;color:var(--muted)}
.scope-switch{display:flex;gap:4px;margin:2px 4px 10px;background:var(--border);border-radius:8px;padding:3px}
.scope-switch a{flex:1;text-align:center;padding:5px 6px;border-radius:6px;color:var(--muted);font-size:13px;font-weight:500}
.scope-switch a:hover{text-decoration:none;color:var(--text)}.scope-switch a.on{background:var(--surface);color:var(--accent);box-shadow:var(--sh)}
.pill.ro{background:#e5e7eb;color:#374151}.pill.rw{background:var(--ok-bg);color:#166534}
.pill.note{background:var(--warn-bg);color:#92400e}

/* 阅读器 */
.reader{display:grid;grid-template-columns:150px 1fr 340px;grid-template-rows:48px 1fr;height:calc(100vh - 56px);background:var(--bg);overflow:hidden}
.reader.nopanel{grid-template-columns:150px 1fr 0}
.reader.nothumbs{grid-template-columns:0 1fr 340px}.reader.nopanel.nothumbs{grid-template-columns:0 1fr 0}
.rd-bar{grid-column:1/4;display:flex;align-items:center;gap:8px;padding:0 12px;background:var(--surface);border-bottom:1px solid var(--border);overflow:hidden}
.rd-bar .title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}
.rd-bar .sep{width:1px;height:22px;background:var(--border);margin:0 2px}
.rd-bar input.pno{width:52px;text-align:center;padding:4px 6px;border:1px solid var(--border2);border-radius:6px}
.rd-bar .zoomv{min-width:44px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
.rd-bar .btn.on{background:var(--accent-bg);color:var(--accent);border-color:var(--sel-border)}
.rd-bar .badge{display:inline-block;min-width:18px;padding:0 5px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;line-height:18px;margin-left:4px}
.rd-thumbs{overflow:auto;background:var(--surface);border-right:1px solid var(--border);padding:10px 8px}
.rd-thumb{margin:0 auto 10px;width:120px;cursor:pointer;text-align:center;color:var(--muted);font-size:11px}
.rd-thumb img{display:block;width:120px;min-height:40px;background:#fff;border:2px solid transparent;border-radius:4px;box-shadow:var(--sh)}
.rd-thumb.on img{border-color:var(--accent)}.rd-thumb:hover img{border-color:var(--sel-border)}
.rd-main{overflow:auto;position:relative;outline:none}
.rd-pages{display:flex;flex-direction:column;align-items:center;gap:16px;padding:16px 24px 60px}
.rd-page{position:relative;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 6px 20px rgba(0,0,0,.06);flex:none}
.rd-page img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.rd-page .rd-pno{position:absolute;right:6px;bottom:4px;font-size:11px;color:var(--muted2);pointer-events:none}
.rd-layer{position:absolute;inset:0}
.reader.adding .rd-layer{cursor:crosshair;touch-action:none}
.rd-mark{position:absolute;transform:translate(-50%,-50%);width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.25);cursor:pointer;z-index:2}
.rd-mark.pin.team{background:#d97706}
.rd-mark.rect{transform:none;width:auto;height:auto;border-radius:4px;background:rgba(37,99,235,.14);border:2px solid var(--accent);display:block;color:inherit;font-weight:normal;box-shadow:none}
.rd-mark.rect.team{background:rgba(217,119,6,.14);border-color:#d97706}
.rd-mark.rect b{position:absolute;left:-2px;top:-2px;transform:translate(-50%,-50%);width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.rd-mark.rect.team b{background:#d97706}
.rd-mark.on{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
.rd-mark.draft{border-style:dashed;background:rgba(37,99,235,.08);pointer-events:none}
.rd-pop{position:absolute;z-index:5;width:340px;max-width:calc(100vw - 32px);background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh2);padding:12px 14px;font-size:13.5px;cursor:default}
.rd-pop .hd{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.rd-pop .av{width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff;font-weight:700;display:grid;place-items:center;font-size:12px;flex:none}
.rd-pop .who{font-weight:600}.rd-pop .when{color:var(--muted2);font-size:12px}
.rd-pop .txt{white-space:pre-wrap;word-break:break-word;line-height:1.55;margin:4px 0 8px}
.rd-pop .acts{display:flex;gap:10px;font-size:12.5px;margin-bottom:8px}.rd-pop .acts a{cursor:pointer}
.rd-pop .reply{padding:8px 0 4px;border-top:1px solid var(--border)}
.rd-pop textarea{width:100%;min-height:72px;resize:vertical;padding:8px 10px;border:1px solid var(--border2);border-radius:8px;font-size:13.5px;line-height:1.5}
.rd-pop .row{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
.rd-pop select{padding:5px 8px;border:1px solid var(--border2);border-radius:6px}
.rd-pop .x{position:absolute;right:8px;top:8px;border:0;background:none;color:var(--muted);cursor:pointer;font-size:16px;line-height:1}
.rd-pop.sheet{position:fixed;left:8px;right:8px;bottom:8px;width:auto;max-height:70vh;overflow:auto}
.vis{display:inline-block;padding:1px 7px;border-radius:999px;font-size:11px;background:#e5e7eb;color:#374151}.vis.team{background:var(--warn-bg);color:#92400e}
.rd-panel{background:var(--surface);border-left:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden;min-width:0}
.rd-panel .ph{padding:10px 12px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:8px}
.rd-panel .seg{display:inline-flex;border:1px solid var(--border2);border-radius:8px;overflow:hidden}
.rd-panel .seg button{border:0;background:var(--surface);padding:5px 12px;cursor:pointer;color:var(--muted)}.rd-panel .seg button.on{background:var(--accent-bg);color:var(--accent)}
.rd-panel .chips{display:flex;gap:6px;flex-wrap:wrap}
.rd-panel .chips button{border:1px solid var(--border2);background:var(--surface);border-radius:999px;padding:3px 10px;font-size:12px;cursor:pointer;color:var(--muted)}.rd-panel .chips button.on{background:var(--accent-bg);color:var(--accent);border-color:var(--sel-border)}
.rd-panel .pl{overflow:auto;flex:1;padding:8px}
.rd-note{padding:10px 10px 8px;border:1px solid var(--border);border-radius:10px;margin-bottom:8px;cursor:pointer;background:var(--surface)}
.rd-note:hover{border-color:var(--sel-border);background:var(--surface2)}.rd-note.on{border-color:var(--accent);background:var(--sel)}
.rd-note .hd{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-bottom:4px}
.rd-note .hd b{color:var(--text)}.rd-note .hd .pg{margin-left:auto;color:var(--accent);white-space:nowrap}
.rd-note .txt{white-space:pre-wrap;word-break:break-word;line-height:1.5;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.rd-note .ft{font-size:12px;color:var(--muted2);margin-top:4px}
.rd-panel .empty{color:var(--muted);text-align:center;padding:30px 12px;font-size:13px;line-height:1.7}
.rd-panel .old{margin:8px;padding:8px 10px;border-radius:8px;background:var(--warn-bg);color:#92400e;font-size:12.5px;line-height:1.5}
.rd-wait{display:grid;place-items:center;height:100%;color:var(--muted);text-align:center;line-height:1.8}
.rd-wait .big{font-size:40px}
.spin{display:inline-block;width:22px;height:22px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* 知识库 */
.kb{display:grid;grid-template-columns:290px 1fr;grid-template-rows:52px 1fr;height:calc(100vh - 56px);overflow:hidden;background:#f7f4ee}
.kb-top{grid-column:1/3;display:flex;align-items:center;gap:8px;padding:0 14px;background:var(--surface);border-bottom:1px solid var(--border)}
.kb-home{display:flex;align-items:center;gap:6px;font-weight:700;color:var(--text);white-space:nowrap;margin-right:6px}.kb-home:hover{text-decoration:none}
.kb-top input.kb-q{width:auto;flex:1 1 320px;min-width:160px;max-width:560px;padding:7px 12px;border:1px solid var(--border2);border-radius:999px;font-size:14px}
.kb-top select.kb-scope{width:auto;flex:none;padding:6px 8px;border:1px solid var(--border2);border-radius:8px;background:var(--surface)}
.kb-ver{font-size:12px;white-space:nowrap}
.kb-side{overflow:auto;background:var(--surface);border-right:1px solid var(--border);padding:8px 6px 30px;font-size:13.5px}
.kb-side .sec{padding:6px 8px;font-size:11.5px;color:var(--muted2);letter-spacing:.5px}
.kb-book{display:flex;align-items:center;gap:7px;padding:7px 8px;border-radius:8px;cursor:pointer;user-select:none}.kb-book:hover{background:var(--surface2)}.kb-book.cur b{color:var(--accent)}
.kb-book .tw,.kb-unit .tw{width:14px;color:var(--muted2);font-size:11px;text-align:center}
.kb-units{margin:0 0 6px 8px;border-left:1px solid var(--border);padding-left:4px}
.kb-unit{display:flex;align-items:center;gap:6px;padding:5px 6px;border-radius:6px;cursor:pointer;color:var(--text);user-select:none}.kb-unit:hover{background:var(--surface2)}
.kb-les{display:flex;align-items:center;gap:8px;padding:4px 6px 4px 22px;border-radius:6px;cursor:pointer;color:var(--muted);font-size:13px}.kb-les:hover{background:var(--surface2);color:var(--text)}.kb-les.on{background:var(--accent-bg);color:var(--accent)}
.kb-les .no{display:inline-block;min-width:20px;text-align:right;font-size:11px;color:var(--muted2);font-variant-numeric:tabular-nums}.kb-les.doc{color:var(--muted2);font-size:12.5px}
.kb-main{overflow:auto;outline:none}
.kb-wrap{max-width:980px;margin:0 auto;padding:22px 28px 80px}
.kb-wrap h1{font-size:26px;margin-bottom:6px;font-family:var(--serif);letter-spacing:.5px}
.kb-h2{font-size:15px;color:var(--muted);font-weight:600;margin:26px 0 10px;letter-spacing:.5px}
.kb-hero{background:linear-gradient(135deg,#fffdf7,#fff 60%,#f3f7ff);border:1px solid var(--border);border-radius:16px;padding:28px 30px 22px;box-shadow:var(--sh)}
.kb-hero h1{font-size:30px;margin:2px 0 8px}.kb-hero p{margin:0 0 16px;color:var(--muted);max-width:700px;line-height:1.7}
.kb-hero-search{display:flex;gap:8px;max-width:720px}.kb-hero-search input{width:auto;flex:1;padding:10px 16px;border-radius:999px;font-size:15px;border:1px solid var(--border2);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}
.kb-hero-chips{margin-top:12px;display:flex;flex-wrap:wrap;gap:6px 10px;font-size:13px}.kb-hero-chips a{color:var(--accent)}
.kb-books{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.kb-bcard{display:flex;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:12px;color:var(--text);box-shadow:var(--sh);transition:box-shadow .15s,transform .15s}
.kb-bcard:hover{text-decoration:none;box-shadow:var(--sh2);transform:translateY(-2px)}
.kb-bcard .meta{min-width:0}.kb-bcard .big{font-size:20px;font-weight:700;font-family:var(--serif)}.kb-bcard .small{font-size:12px;line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.kb-bcard .nums{margin-top:6px;color:var(--muted);font-size:12.5px}
.cover{width:64px;height:88px;flex:none;border-radius:6px;overflow:hidden;background:var(--surface2);box-shadow:0 1px 3px rgba(0,0,0,.15);border-left:4px solid var(--g0);position:relative}
.cover img{width:100%;height:100%;object-fit:cover;display:block}.cover .nocover{display:grid;place-items:center;height:100%;font-family:var(--serif);font-weight:700;color:#fff;font-size:18px}
.cover.g1{border-left-color:var(--g1)}.cover.g2{border-left-color:var(--g2)}.cover.g3{border-left-color:var(--g3)}.cover.g4{border-left-color:var(--g4)}.cover.g5{border-left-color:var(--g5)}.cover.g6{border-left-color:var(--g6)}
.cover.g1 .nocover{background:var(--g1)}.cover.g2 .nocover{background:var(--g2)}.cover.g3 .nocover{background:var(--g3)}.cover.g4 .nocover{background:var(--g4)}.cover.g5 .nocover{background:var(--g5)}.cover.g6 .nocover{background:var(--g6)}.cover.g0 .nocover{background:var(--g0)}
.cover.lg{width:120px;height:166px;border-radius:8px}
.kb-recent{display:flex;flex-wrap:wrap;gap:8px}.kb-recent a{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:6px 12px;font-size:13px;color:var(--text)}.kb-recent a:hover{border-color:var(--sel-border);text-decoration:none}
.kb-howto{margin-top:26px}.kb-tips{margin:0;padding-left:18px;line-height:1.8;color:var(--muted)}
.kb-bookhead{display:flex;gap:22px;align-items:flex-start;margin-bottom:18px}.kb-bookhead .info p{margin:2px 0}
.kb-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.kb-unitcard{padding:14px 18px;margin-bottom:12px}.kb-unitcard .uh{display:flex;align-items:center;gap:10px;margin-bottom:10px}.kb-unitcard .uh h3{margin:0;font-size:16px}
.uno{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:13px;background:var(--g0)}
.uno.g1{background:var(--g1)}.uno.g2{background:var(--g2)}.uno.g3{background:var(--g3)}.uno.g4{background:var(--g4)}.uno.g5{background:var(--g5)}.uno.g6{background:var(--g6)}
.kb-lchips{display:flex;flex-wrap:wrap;gap:8px}
.lchip{display:inline-flex;align-items:center;gap:7px;padding:6px 10px 6px 8px;border:1px solid var(--border);border-radius:10px;background:var(--surface2);color:var(--text);font-size:13px}
.lchip:hover{text-decoration:none;border-color:var(--sel-border);background:var(--accent-bg)}
.lchip .no{min-width:20px;text-align:center;font-size:11px;color:var(--muted2);background:var(--surface);border-radius:6px;padding:1px 4px}.lchip .pg{font-size:11.5px;color:var(--muted)}
.lchip .cnt{display:inline-flex;gap:3px}.lchip .cnt i{font-style:normal;font-size:10.5px;padding:0 5px;border-radius:999px}.lchip .cnt i.K{background:#e8f4ee;color:#0e7a52}.lchip .cnt i.E{background:#faeeea;color:#c2543f}.lchip .cnt i.T{background:#efecfa;color:#6d5bd0}
.kb-crumb{font-size:13px;color:var(--muted);margin-bottom:6px}
.kb-unitnav{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}.kb-unitnav .uc{font-size:12.5px;padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--muted)}.kb-unitnav .uc:hover{text-decoration:none;color:var(--text)}.kb-unitnav .uc.on{background:var(--text);color:#fff;border-color:var(--text)}
.kb-lhead{margin-bottom:14px}
.kb-lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:0;align-items:start}
.kb-minitoc{position:sticky;top:12px;margin:22px 20px 0 0;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:10px 12px;font-size:12.5px;max-height:calc(100vh - 100px);overflow:auto}
.kb-minitoc .mt-h{font-weight:600;color:var(--muted);margin-bottom:6px}.kb-minitoc .mt-k{font-weight:600;margin:8px 0 2px;font-size:12px}.kb-minitoc .mt-k.K{color:#0e7a52}.kb-minitoc .mt-k.E{color:#c2543f}.kb-minitoc .mt-k.T{color:#6d5bd0}
.kb-minitoc .mt-i{display:flex;gap:6px;color:var(--text);padding:3px 0;line-height:1.4}.kb-minitoc .mt-i:hover{color:var(--accent);text-decoration:none}.kb-minitoc .mt-i .no{color:var(--muted2);font-size:11px;min-width:22px;font-variant-numeric:tabular-nums}
.kb-anchor{display:flex;gap:16px;align-items:flex-start;margin-bottom:18px}.kb-anchor .kb-fm{flex:1;margin:0}
.kb-pagethumb{flex:none;width:170px;display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;text-align:center}
.kb-pagethumb img{width:100%;border:1px solid var(--border);border-radius:8px;box-shadow:var(--sh2);background:#fff}.kb-pagethumb:hover{text-decoration:none;color:var(--accent)}
.kb-fm{padding:12px 16px;font-size:13.5px}.kb-fm .row{display:flex;gap:12px;padding:4px 0;border-bottom:1px dashed var(--border)}.kb-fm .row:last-child{border-bottom:0}.kb-fm .k{flex:none;width:92px;color:var(--muted)}.kb-fm .v{white-space:pre-wrap;word-break:break-word}
.kb-sec{margin-bottom:22px}.kb-sec h2{display:flex;align-items:center;gap:8px;font-size:16px;padding:6px 10px;border-radius:8px;margin-bottom:10px}
.kb-sec h2 .cnt{font-size:12px;background:rgba(0,0,0,.06);border-radius:999px;padding:1px 8px;font-weight:500}
.kb-sec.K h2{background:#e8f4ee;color:#0e7a52}.kb-sec.E h2{background:#faeeea;color:#c2543f}.kb-sec.T h2{background:#efecfa;color:#6d5bd0}
.kb-pt{background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--border2);border-radius:10px;padding:12px 16px;margin-bottom:10px;transition:box-shadow .3s}
.kb-pt.K{border-left-color:#0e7a52}.kb-pt.E{border-left-color:#c2543f}.kb-pt.T{border-left-color:#6d5bd0}
.kb-pt.flash{box-shadow:0 0 0 4px rgba(37,99,235,.25)}
.pt-head{display:flex;align-items:flex-start;gap:8px;margin-bottom:6px}.pt-head h3{margin:0;font-size:15px;flex:1;line-height:1.5}
.pt-no{flex:none;font-size:11.5px;font-weight:700;padding:2px 7px;border-radius:6px;background:var(--surface2);color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums}
.kb-pt.K .pt-no{background:#e8f4ee;color:#0e7a52}.kb-pt.E .pt-no{background:#faeeea;color:#c2543f}.kb-pt.T .pt-no{background:#efecfa;color:#6d5bd0}
.pt-copy{border:0;background:none;color:var(--muted2);cursor:pointer;padding:2px;border-radius:6px}.pt-copy:hover{background:var(--surface2);color:var(--text)}
.pt-field{display:grid;grid-template-columns:72px 1fr;gap:8px;padding:5px 0;font-size:13.5px;line-height:1.7}.pt-field .lb{color:var(--muted);font-weight:600}.pt-field .tx p{margin:0 0 4px}.pt-field .tx ul{margin:0;padding-left:18px}.pt-field .tx li{margin:1px 0}
.kb-src{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px;font-size:12px}.kb-src .chip{padding:1px 8px}
.kb-agree{display:inline-block;font-size:11.5px;padding:1px 8px;border-radius:999px;background:var(--surface2);color:var(--muted);white-space:nowrap}.kb-agree.core{background:#fdf3dc;color:#b98a1c;font-weight:600}
.kb-kind{display:inline-block;font-size:11.5px;padding:1px 8px;border-radius:999px;white-space:nowrap}.kb-kind.K{background:#e8f4ee;color:#0e7a52}.kb-kind.E{background:#faeeea;color:#c2543f}.kb-kind.T{background:#efecfa;color:#6d5bd0}
.kb-pager{display:flex;justify-content:space-between;gap:12px;margin-top:10px}.kb-pager a{display:flex;flex-direction:column;gap:2px;padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);min-width:180px}.kb-pager a:hover{text-decoration:none;border-color:var(--sel-border)}.kb-pager a small{color:var(--muted)}.kb-pager .pg-next{text-align:right;margin-left:auto}
.kb-filters{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0 14px}.kb-filters .sep{width:1px;height:18px;background:var(--border)}
.fchip{border:1px solid var(--border2);background:var(--surface);border-radius:999px;padding:3px 11px;font-size:12.5px;cursor:pointer;color:var(--muted)}.fchip.on{background:var(--accent-bg);color:var(--accent);border-color:var(--sel-border)}
.kb-group{display:flex;align-items:center;gap:8px;margin:18px 0 8px;font-size:14px}
.kb-hit{padding:10px 14px;margin-bottom:8px;cursor:pointer;border-left:4px solid var(--border2)}.kb-hit:hover{border-color:var(--sel-border);box-shadow:var(--sh2)}
.kb-hit.K{border-left-color:#0e7a52}.kb-hit.E{border-left-color:#c2543f}.kb-hit.T{border-left-color:#6d5bd0}
.kb-hit .hh{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);flex-wrap:wrap}.kb-hit .ht{font-weight:600;margin:4px 0 2px;font-size:14.5px}.kb-hit .hs{font-size:13px;color:var(--muted);line-height:1.6}.kb-hit .hid{font-size:11px;color:var(--muted2);margin-top:4px;font-family:var(--mono)}
mark{background:#fde68a;color:inherit;padding:0 1px;border-radius:2px}
.kb-lhits{display:flex;flex-direction:column;gap:4px}.lhit{font-size:13.5px;display:flex;align-items:center;gap:6px}
.kb-timeline{margin-top:14px;position:relative}.kb-timeline::before{content:"";position:absolute;left:8px;top:8px;bottom:8px;width:2px;background:var(--border)}
.tl-row{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:12px 0 12px 0}.tl-row.first .tl-book b{color:var(--accent)}
.tl-book{padding-top:2px;font-size:16px;font-family:var(--serif);position:relative;padding-left:26px}
.tl-dot{position:absolute;left:3px;top:8px;width:12px;height:12px;border-radius:50%;background:var(--g0);box-shadow:0 0 0 3px #f7f4ee}
.tl-lessons{display:flex;flex-wrap:wrap;gap:8px}
.tl-les{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-size:13px}.tl-les:hover{text-decoration:none;border-color:var(--sel-border);box-shadow:var(--sh)}
.tl-les.named{border-color:var(--accent);background:var(--accent-bg)}.tl-les .u{color:var(--muted);font-size:12px}.tl-les .n{background:var(--surface2);border-radius:999px;padding:0 7px;font-size:11.5px;color:var(--muted)}.tl-les .tag{font-size:11px;color:var(--accent)}
.kb-doc{padding:16px 22px;line-height:1.75;font-size:14px}.kb-doc h2,.kb-doc h3,.kb-doc h4{margin:14px 0 6px}.kb-doc pre{font-size:12.5px}
@media (max-width:1200px){.kb-lesson-layout{grid-template-columns:1fr}.kb-minitoc{display:none}}
@media (max-width:900px){.kb{grid-template-columns:0 1fr}.kb-side{display:none}.kb-top input.kb-q{max-width:none}.kb-ver{display:none}.kb-anchor{flex-direction:column}.kb-pagethumb{width:140px}.kb-bookhead{flex-direction:column}}

/* AI 助手悬浮球与面板 */
.as-ball{position:fixed;right:22px;bottom:22px;width:60px;height:60px;border-radius:50%;background:#fff;box-shadow:0 6px 24px rgba(0,0,0,.18),0 0 0 1px rgba(0,0,0,.04);cursor:pointer;z-index:80;display:grid;place-items:center;transition:transform .15s}
.as-ball:hover{transform:translateY(-2px) scale(1.04)}.as-ball img,.as-ball svg{width:46px;height:46px;pointer-events:none}
.as-ball .dot{position:absolute;right:2px;top:2px;width:12px;height:12px;border-radius:50%;background:var(--ok);border:2px solid #fff;display:none}.as-ball.unread .dot{display:block}
.as-panel{position:fixed;right:22px;bottom:92px;width:400px;max-width:calc(100vw - 32px);height:min(640px,calc(100vh - 120px));background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--sh2);z-index:81;display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:aspop .16s ease-out}
@keyframes aspop{from{transform:scale(.92);opacity:0}to{transform:none;opacity:1}}
.as-head{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border);background:linear-gradient(135deg,#fff7d6,#fff)}
.as-head img,.as-head svg{width:34px;height:34px}.as-head .nm{font-weight:700}.as-head .st{font-size:12px;color:var(--muted)}
.as-head .x,.as-head .nw{border:0;background:none;color:var(--muted);cursor:pointer;font-size:13px;padding:4px 6px;border-radius:6px}.as-head .x:hover,.as-head .nw:hover{background:rgba(0,0,0,.05);color:var(--text)}
.as-msgs{flex:1;overflow:auto;padding:12px 12px 6px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.as-msg{max-width:88%;padding:9px 12px;border-radius:14px;font-size:13.5px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.as-msg.u{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:4px}
.as-msg.a{align-self:flex-start;background:var(--surface);border:1px solid var(--border);border-bottom-left-radius:4px}
.as-msg.a a{color:var(--accent)}.as-msg.a code{font-family:var(--mono);font-size:12.5px;background:var(--surface2);padding:0 4px;border-radius:4px}.as-msg.a pre{white-space:pre-wrap;background:var(--surface2);padding:8px 10px;border-radius:8px;margin:4px 0;font-size:12.5px}
.as-msg.a ul,.as-msg.a ol{margin:2px 0;padding-left:18px}.as-msg.a p{margin:0 0 4px}.as-msg.a h4{margin:6px 0 2px;font-size:14px}
.as-tool{align-self:flex-start;font-size:12px;color:var(--muted);padding:2px 10px;display:flex;align-items:center;gap:6px}.as-tool .spin{width:12px;height:12px;border-width:2px}
.as-hint{padding:6px 12px 8px;display:flex;gap:6px;flex-wrap:wrap;background:var(--bg)}.as-hint button{border:1px solid var(--border2);background:var(--surface);border-radius:999px;padding:3px 10px;font-size:12px;cursor:pointer;color:var(--muted)}.as-hint button:hover{color:var(--accent);border-color:var(--sel-border)}
.as-input{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--border);background:var(--surface)}
.as-input textarea{flex:1;resize:none;min-height:40px;max-height:120px;padding:9px 12px;border:1px solid var(--border2);border-radius:12px;font-size:13.5px;line-height:1.5}
.as-input button{flex:none;width:40px;height:40px;border-radius:12px;border:0;background:var(--accent);color:#fff;cursor:pointer;display:grid;place-items:center}.as-input button:disabled{opacity:.5;cursor:default}
.as-welcome{text-align:center;color:var(--muted);font-size:13px;padding:20px 10px;line-height:1.7}.as-welcome img,.as-welcome svg{width:72px;height:72px}
@media (max-width:600px){.as-panel{right:8px;left:8px;width:auto;bottom:84px;height:calc(100vh - 100px)}.as-ball{right:14px;bottom:14px}}
@media (max-width:900px){
  .reader,.reader.nopanel,.reader.nothumbs{grid-template-columns:0 1fr 0}
  .rd-thumbs{display:none}
  .rd-panel{position:fixed;right:0;top:56px;bottom:0;width:min(360px,92vw);z-index:40;box-shadow:var(--sh2);transform:translateX(100%);transition:transform .2s}
  .reader:not(.nopanel) .rd-panel{transform:none}
  .rd-bar .hide-sm{display:none}
}
.acl-list{max-height:300px;overflow:auto;border:1px solid var(--border);border-radius:8px;padding:6px 10px;background:var(--surface2)}
.acl-list label{display:flex;align-items:center;gap:8px;margin:0;padding:5px 0;font-weight:400;border-bottom:1px solid #eef2f7}
.viewtoggle button{padding:5px 8px}
.progress{height:6px;background:var(--border);border-radius:999px;overflow:hidden}.progress i{display:block;height:100%;width:0;background:var(--accent);transition:width .2s}

/* 队列页 */
.jobs td.title{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.jobs .who{display:inline-flex;align-items:center;gap:6px}.jobs .who i{width:22px;height:22px;border-radius:50%;background:#e0e7ff;color:#3730a3;display:inline-grid;place-items:center;font-style:normal;font-size:12px;font-weight:700}
.accounts{display:flex;gap:10px;flex-wrap:wrap}
.acct-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px;margin-top:14px}
.acct-card{border:1px solid var(--border);border-radius:10px;padding:12px 14px;background:var(--surface2)}
.acct-card.limited{border-color:#fca5a5;background:#fff7f7}.acct-card.busy{border-color:var(--sel-border);background:#f5f9ff}
.ac-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ac-head b{white-space:nowrap}.ac-head .spacer{flex:1}.ac-state{font-size:12.5px;color:var(--muted);white-space:nowrap}
.acct-card.limited .ac-state{color:var(--danger);font-weight:600}
.ac-row{margin-top:6px;font-size:13px}.ac-foot{margin-top:8px;font-size:11.5px;line-height:1.4}

/* 任务页 */
.job-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.job-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.tabbar{display:flex;gap:2px;border-bottom:1px solid var(--border);margin:18px 0 14px}
.tabbar button{border:0;background:transparent;padding:9px 14px;cursor:pointer;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:500}
.tabbar button.on{color:var(--accent);border-bottom-color:var(--accent)}
.tabbar button .n{margin-left:6px;background:var(--surface2);border:1px solid var(--border);border-radius:999px;padding:0 7px;font-size:11px;color:var(--muted)}
.tabpane{display:none}.tabpane.on{display:block}
.filelist{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);overflow:hidden}
.filelist li{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--border)}.filelist li:last-child{border-bottom:0}
.filelist li .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filelist li small{width:80px;text-align:right}
.livebar{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px}

/* 任务对话 */
.thread{display:flex;flex-direction:column;gap:14px}
.turn{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:14px 16px;box-shadow:var(--sh)}
.turn-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;font-size:13px}
.bubble{margin-top:8px}.bubble .lbl{font-size:12px;color:var(--muted);margin-bottom:4px;font-weight:600}
pre.ptxt{background:var(--surface2);border:1px solid var(--border);padding:10px 12px;border-radius:10px;font-family:var(--font);font-size:14px;line-height:1.6;color:#334155}
pre.atxt{background:#fff;border:1px solid var(--border);padding:12px 14px;border-radius:10px;font-family:var(--font);font-size:15px;line-height:1.7}
pre.clamp{max-height:150px;overflow:hidden;position:relative}
.changes{margin-top:10px;font-size:13px;background:var(--surface2);border:1px dashed var(--border2);border-radius:10px;padding:10px 12px}
ul.chg{margin:6px 0 0;padding-left:0;list-style:none;columns:2;column-gap:20px}ul.chg li{font-size:12.5px;margin:2px 0;break-inside:avoid}
ul.chg li i{font-style:normal;font-size:11px;padding:0 5px;border-radius:4px;margin-right:2px}
ul.chg li.add i{background:var(--ok-bg);color:#166534}ul.chg li.mod i{background:var(--warn-bg);color:#92400e}ul.chg li.del i{background:var(--danger-bg);color:#991b1b}
.followup{margin-top:18px;border-color:var(--sel-border);background:#f7faff}
.radio-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rc{border:1px solid var(--border2);border-radius:10px;padding:12px 14px;cursor:pointer;background:var(--surface)}
.rc b{display:block;margin-bottom:4px}.rc small{display:block;line-height:1.5}.rc.on{border-color:var(--accent);background:var(--accent-bg);box-shadow:0 0 0 3px var(--accent-bg)}
@media(max-width:720px){.radio-cards{grid-template-columns:1fr}ul.chg{columns:1}}

/* 新建任务页 */
.dropzone{border:2px dashed var(--border2);border-radius:var(--r2);padding:22px;text-align:center;color:var(--muted);background:var(--surface2);cursor:pointer;transition:all .12s}
.dropzone:hover,.dropzone.over{border-color:var(--accent);background:var(--accent-bg);color:var(--accent)}
.effort{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.effort label{border:1px solid var(--border2);border-radius:var(--r);padding:9px 10px;cursor:pointer;background:var(--surface);margin:0;font-weight:500}
.effort label small{display:block;font-weight:400;margin-top:2px}
.effort label.on{border-color:var(--accent);background:var(--accent-bg);color:var(--accent)}.effort input{display:none}
.stickybar{position:sticky;bottom:0;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);border-top:1px solid var(--border);padding:12px 0;display:flex;align-items:center;gap:14px;margin-top:8px}
.picker{display:grid;grid-template-columns:200px 1fr;gap:0;border:1px solid var(--border);border-radius:var(--r);overflow:hidden;height:380px}
.picker .ps{border-right:1px solid var(--border);overflow:auto;padding:8px;background:var(--surface2)}
.picker .pm{overflow:auto}
.picker .pm .crumbs{padding:6px 10px;border-bottom:1px solid var(--border);font-size:13px;color:var(--muted);display:flex;gap:4px;flex-wrap:wrap}
.picker .pm .crumbs a{color:var(--text)}
.picker .pm label{display:flex;align-items:center;gap:8px;padding:6px 12px;margin:0;font-weight:400;cursor:pointer;border-bottom:1px solid #f1f3f5}
.picker .pm label:hover{background:var(--surface2)}.picker .pm label.dir{cursor:pointer}
.picker .pm label .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 登录页 */
.auth{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:900px;margin:30px auto}
.auth .card{margin:0}
@media(max-width:820px){.auth{grid-template-columns:1fr}.effort{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){
  .explorer{grid-template-columns:1fr}.ex-side{display:none}.ex-toolbar{grid-column:1}.ex-status{grid-column:1}
  .ex-list td.c-time,.ex-list td.c-type,.ex-list th.c-time,.ex-list th.c-type{display:none}
  .tabs{display:none}.main{padding:16px 14px}.picker{grid-template-columns:1fr}.picker .ps{display:none}
  .table td.hide,.table th.hide{display:none}
}

/* 工作台 */
.hm-hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;flex-wrap:wrap;margin-bottom:18px}
.hm-hero h1{font-size:28px;font-family:var(--serif);margin:2px 0 6px}
.hm-quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;flex:1;max-width:820px}
.qk{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);box-shadow:var(--sh);transition:transform .12s,box-shadow .12s}
.qk:hover{text-decoration:none;transform:translateY(-2px);box-shadow:var(--sh2)}.qk .ico{width:20px;height:20px;color:var(--accent)}.qk .ico svg{width:20px;height:20px}.qk img{width:24px;height:24px}
.qk b{font-size:14px;margin-top:4px}.qk small{color:var(--muted);font-size:12px}
.qk.primary{background:linear-gradient(135deg,#2563eb,#4f46e5);border-color:transparent;color:#fff}.qk.primary .ico,.qk.primary small{color:rgba(255,255,255,.85)}
.hm-row{margin-bottom:16px}.hm-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.hm-card{margin:0;padding:16px 18px}.hm-ct{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.hm-ct h3{margin:0}
.hm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px}
.stat{display:flex;flex-direction:column;align-items:center;padding:12px 8px;border-radius:12px;background:var(--surface2);color:var(--text);border:1px solid var(--border)}.stat:hover{text-decoration:none;border-color:var(--sel-border)}
.stat b{font-size:26px;line-height:1.1;font-variant-numeric:tabular-nums}.stat span{font-size:12px;color:var(--muted);margin-top:4px}
.stat.run b{color:var(--accent)}.stat.que b{color:var(--warn)}.stat.ok b{color:var(--ok)}
.hm-accts{display:flex;flex-wrap:wrap;gap:8px}.hm-acct{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-size:12.5px}.hm-acct.limited{border-color:#fca5a5;background:#fff7f7}
.hm-list{display:flex;flex-direction:column}.hm-item{display:flex;align-items:center;gap:10px;padding:8px 4px;border-bottom:1px solid var(--border);color:var(--text);font-size:13.5px}.hm-item:last-child{border-bottom:0}.hm-item:hover{text-decoration:none;background:var(--surface2)}
.hm-item .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hm-item .ico{width:18px;height:18px;flex:none}.hm-item .ico svg{width:18px;height:18px}
.hm-shelf{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 8px}.hm-book{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--text);font-size:12.5px;flex:none}.hm-book:hover{text-decoration:none;color:var(--accent)}
.hm-book .cover{width:78px;height:106px}
.hm-search{display:flex;gap:8px;margin-bottom:10px}.hm-search input{width:auto;flex:1;border-radius:999px;padding:9px 16px}
.hm-chips{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:13px}
@media (max-width:820px){.hm-cols{grid-template-columns:1fr}.hm-stats{grid-template-columns:repeat(2,1fr)}}

/* 教材书架 */
.shelf{margin-bottom:26px}.shelf-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}.shelf-head h2{margin:0;font-family:var(--serif)}
.shelf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
.book{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px 12px;background:var(--surface);border:1px solid var(--border);border-radius:14px;color:var(--text);box-shadow:var(--sh);transition:transform .12s,box-shadow .12s}
.book:hover{text-decoration:none;transform:translateY(-3px);box-shadow:var(--sh2)}
.book .cover{width:112px;height:154px;border-radius:6px}
.bk-label{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:13px}.bk-label b{font-size:16px;font-family:var(--serif)}
.bk-tags .tag{font-size:11px;padding:2px 8px;border-radius:999px;background:var(--surface2);color:var(--muted2);border:1px solid var(--border)}.bk-tags .tag.haskb{background:var(--accent-bg);color:var(--accent);border-color:var(--sel-border)}

/* 登录页品牌 */
.auth-hero{display:flex;align-items:center;gap:20px;max-width:900px;margin:34px auto 0;padding:0 4px}
.auth-hero img{width:86px;height:86px;background:#fff;border-radius:50%;box-shadow:var(--sh2);padding:8px}
.auth-hero h1{font-size:30px;font-family:var(--serif);margin:0 0 4px}.auth-hero p{margin:0}
@media (max-width:600px){.auth-hero{flex-direction:column;text-align:center}}
