:root{
  --bg:#FFFFFF; --surface:#F5F6F8; --surface-2:#EEF0F4; --border:#E3E6EC; --border-strong:#C9CEDA;
  --text:#12151C; --text-2:#3D4453; --muted:#5E6676; --faint:#8A91A0;
  --primary:#3555D8; --primary-soft:#EDF1FD; --primary-text:#2743B8;
  --success:#1F8A5B; --success-soft:#E8F5EE;
  --warn:#9A6200; --warn-soft:#FFF6D6;
  --danger:#C23B32; --danger-soft:#FDECEA;
  --r1:8px; --r2:12px;
  --sh1:0 1px 2px rgba(18,21,28,.06); --sh2:0 8px 24px rgba(18,21,28,.10);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--font);font-size:16px;line-height:1.6;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:var(--primary-text)}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}
svg.lucide{width:16px;height:16px;stroke-width:1.5;flex:none}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* buttons & inputs */
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:var(--r1);background:var(--primary);color:#fff;font-weight:600;font-size:15px;box-shadow:var(--sh1);transition:filter .15s ease-out;white-space:nowrap}
.btn-primary:hover:not(:disabled){filter:brightness(1.06)}
.btn-sec{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 12px;border-radius:var(--r1);border:1px solid var(--border);font-size:14px;font-weight:500;background:var(--bg);white-space:nowrap;text-decoration:none;color:var(--text)}
.btn-sec:hover:not(:disabled){background:var(--surface)}
.btn-danger{color:var(--danger)}
.icon-btn{width:36px;height:36px;border-radius:var(--r1);display:grid;place-items:center;color:var(--text-2);flex:none}
.icon-btn:hover{background:var(--surface)}
.ghost{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border-radius:var(--r1);font-size:14px;color:var(--text-2)}
.ghost:hover{background:var(--surface)}
.input{height:40px;padding:0 12px;border:1px solid var(--border);border-radius:var(--r1);background:var(--bg);width:100%;font-size:16px}
.input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}
.lang{display:flex;border:1px solid var(--border);border-radius:var(--r1);overflow:hidden;font-size:13px;flex:none}
.lang button{padding:4px 8px;color:var(--muted)}
.lang button[aria-pressed=true]{background:var(--text);color:#fff}
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* login */
.login{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 16px;background:var(--surface)}
.login-top{width:100%;max-width:400px;display:flex;justify-content:flex-end}
.login-card{width:100%;max-width:400px;background:var(--bg);border:1px solid var(--border);border-radius:var(--r2);box-shadow:var(--sh2);padding:32px;display:flex;flex-direction:column;gap:24px}
.login-card h1{font-size:25px;line-height:1.2;font-weight:650}
.login-card p{color:var(--muted);font-size:15px;margin-top:8px}
.login-card form{display:flex;flex-direction:column;gap:12px}
.login-card label{font-size:14px;font-weight:500}
.code-input{letter-spacing:.4em;font-size:20px;text-align:center;font-family:var(--mono)}
.form-err{color:var(--danger);font-size:14px}
.form-note{color:var(--muted);font-size:14px}
.linkish{color:var(--primary-text);font-size:14px;font-weight:500}
.linkish:disabled{color:var(--muted);opacity:1}

/* layout */
.app{display:grid;grid-template-columns:264px minmax(0,1fr) 400px;height:100vh;height:100dvh}
.app.no-preview{grid-template-columns:264px minmax(0,1fr)}
.side{background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:16px 12px;gap:24px;min-height:0}
.brand{display:flex;align-items:center;gap:8px;padding:0 8px;font-weight:650;font-size:16px}
.brand-mark{width:28px;height:28px;border-radius:var(--r1);flex:none;display:block}
.search{display:flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:var(--r1);background:var(--bg);border:1px solid var(--border);color:var(--muted)}
.search input{border:0;outline:none;background:none;font-size:14px;width:100%;color:var(--text)}
.side-tasks{display:flex;flex-direction:column;min-height:0;flex:1}
.nav-label{font-size:13px;color:var(--muted);padding:0 8px;margin-bottom:4px;font-weight:500}
.task-list{display:flex;flex-direction:column;gap:2px;overflow:auto;min-height:0}
.task{display:flex;flex-direction:column;padding:8px;border-radius:var(--r1);text-align:left;transition:background .15s ease-out;text-decoration:none;color:inherit}
.task:hover{background:var(--surface-2)}
.task.active{background:var(--bg);box-shadow:var(--sh1)}
.task-title{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:6px}
.task-meta{font-size:13px;color:var(--muted)}
.dot{width:8px;height:8px;border-radius:50%;background:var(--primary);flex:none;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}
.side-empty{font-size:14px;color:var(--muted);padding:8px}
.side-foot{display:flex;flex-direction:column;gap:12px}
.quota{padding:12px;border-radius:var(--r1);background:var(--bg);border:1px solid var(--border);font-size:13px;color:var(--muted)}
.quota b{color:var(--text);font-weight:600}
.bar{height:4px;border-radius:2px;background:var(--surface-2);margin-top:8px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--primary)}
.bar.warn i{background:var(--warn)}
.bar.full i{background:var(--danger)}
.side-link{display:flex;align-items:center;gap:8px;padding:8px;border-radius:var(--r1);font-size:14px;color:var(--text-2);text-decoration:none}
.side-link:hover,.side-link.active{background:var(--surface-2)}
.me{display:flex;align-items:center;gap:8px;padding:0 4px}
.side-row{display:flex;align-items:center;gap:8px}
.side-row .side-link{flex:1}
.side-row .lang{margin-left:auto}
.avatar{width:32px;height:32px;border-radius:50%;background:#D9E0FB;color:var(--primary-text);display:grid;place-items:center;font-size:13px;font-weight:600;flex:none}
.me-text{min-width:0;flex:1}
.me-name{font-size:14px;font-weight:500;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-org{font-size:13px;color:var(--muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.main{display:flex;flex-direction:column;min-width:0;min-height:0}
.topbar{display:flex;align-items:center;gap:12px;height:56px;padding:0 24px;border-bottom:1px solid var(--border);flex:none}
.topbar h1{font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.only-mobile{display:none}
.experts{display:flex;gap:8px;padding:12px 24px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none;flex:none}
.experts::-webkit-scrollbar{display:none}
.expert{display:flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--border);font-size:14px;color:var(--text-2);white-space:nowrap;flex:none;transition:border-color .15s ease-out,background .15s ease-out}
.expert:hover{border-color:var(--border-strong)}
.expert[aria-pressed=true]{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-text);font-weight:500}

.thread{flex:1;overflow:auto;padding:32px 24px}
.thread-inner{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:32px}
.empty{max-width:560px;margin:8vh auto 0;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}
.empty .big-ic{width:48px;height:48px;border-radius:var(--r2);background:var(--primary-soft);color:var(--primary);display:grid;place-items:center}
.empty .big-ic svg.lucide{width:24px;height:24px}
.empty h2{font-size:25px;line-height:1.2;font-weight:650}
.empty p{color:var(--muted)}
.msg-user{align-self:flex-end;max-width:85%;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.bubble{background:var(--surface);border-radius:var(--r2);padding:12px 16px;white-space:pre-wrap;word-break:break-word}
.chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.file-chip{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--r1);font-size:14px;background:var(--bg);max-width:100%;color:inherit;text-decoration:none}
.file-chip span.n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-chip .ext{font-size:12px;font-weight:600;color:var(--success);background:var(--success-soft);padding:0 6px;border-radius:4px;line-height:20px;flex:none;text-transform:uppercase}
.file-chip .x{color:var(--muted);display:grid;place-items:center}
.msg-ai{display:flex;flex-direction:column;gap:12px;min-width:0}
.ai-head{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.ai-badge{width:24px;height:24px;border-radius:6px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center}
.ai-badge svg.lucide{width:14px;height:14px}
.ai-head .role{font-weight:400;color:var(--muted)}
.steps{border:1px solid var(--border);border-radius:var(--r1);font-size:14px;color:var(--text-2)}
.steps summary{list-style:none;display:flex;align-items:center;gap:8px;padding:8px 12px;cursor:pointer}
.steps summary::-webkit-details-marker{display:none}
.steps summary .chev{margin-left:auto;color:var(--muted);transition:transform .15s ease-out}
.steps[open] summary .chev{transform:rotate(180deg)}
.steps ol{list-style:none;padding:0 12px 12px 12px;display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:14px}
.steps li{display:flex;align-items:center;gap:8px;min-width:0}
.steps li span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-steps .step-now{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.live-steps .step-now.fresh{animation:step-in .2s ease-out}
.live-steps .step-n{flex:none;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.live-steps summary .chev{margin-left:0}
@keyframes step-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.live-steps .step-now.fresh{animation:none}}
.ok{color:var(--success)} .bad{color:var(--danger)} .wip{color:var(--primary)}
.md{max-width:68ch;word-break:break-word}
.md>*+*{margin-top:12px}
.md ul,.md ol{padding-left:24px}
.md li+li{margin-top:4px}
.md h1,.md h2,.md h3{font-size:16px;font-weight:650;line-height:1.4}
.md code{font-family:var(--mono);font-size:14px;background:var(--surface);padding:1px 4px;border-radius:4px}
.md pre{background:var(--surface);padding:12px;border-radius:var(--r1);overflow-x:auto}
.md pre code{background:none;padding:0}
.md table{border-collapse:collapse;font-size:14px;display:block;overflow-x:auto;max-width:100%}
.md th,.md td{border:1px solid var(--border);padding:6px 10px;text-align:left}
.md th{background:var(--surface)}
.md blockquote{border-left:3px solid var(--border);padding-left:12px;color:var(--text-2)}
.caret::after{content:"";display:inline-block;width:8px;height:16px;background:var(--primary);vertical-align:-2px;margin-left:2px;animation:pulse 1s steps(1) infinite}
.notice{display:flex;gap:8px;align-items:flex-start;padding:12px;border-radius:var(--r1);font-size:14px;background:var(--danger-soft);color:var(--danger)}
.notice.neutral{background:var(--surface);color:var(--text-2)}
.status-line{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted)}
.artifacts{display:flex;flex-direction:column;gap:8px}
.artifact{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:var(--r2);background:var(--bg);box-shadow:var(--sh1);max-width:420px;width:100%;text-align:left;transition:border-color .15s ease-out}
.artifact:hover{border-color:var(--border-strong)}
/* 回复下面那排小图标：灰色线条图标，没有文字；点过的赞/踩、正在朗读的高亮 */
.reply-actions{display:flex;gap:2px;margin:-4px 0 0 -7px}
.reply-actions .ra{width:32px;height:32px;display:grid;place-items:center;border:0;background:none;border-radius:var(--r1);color:var(--faint);cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}
.reply-actions .ra:hover{background:var(--surface);color:var(--text-2)}
.reply-actions .ra.on{color:var(--primary)}
.reply-actions .ra svg{width:17px;height:17px}
.artifact[aria-current=true]{border-color:var(--primary)}
.art-icon{width:40px;height:40px;border-radius:var(--r1);background:var(--success-soft);color:var(--success);display:grid;place-items:center;flex:none}
.art-icon svg.lucide{width:20px;height:20px}
.art-text{min-width:0;flex:1}
.art-name{font-size:15px;font-weight:600;line-height:1.3;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.art-meta{font-size:13px;color:var(--muted)}
.art-go{color:var(--muted)}

.composer-wrap{padding:16px 24px 24px;flex:none}
.composer{max-width:720px;margin:0 auto;border:1px solid var(--border);border-radius:var(--r2);box-shadow:var(--sh2);background:var(--bg);padding:12px;transition:border-color .15s ease-out}
.composer.drag{border-color:var(--primary);background:var(--primary-soft)}
.composer .chips{justify-content:flex-start;margin-bottom:8px}
.composer textarea{width:100%;border:0;resize:none;outline:none;font-size:16px;line-height:1.6;min-height:52px;max-height:240px;padding:4px;background:none}
.composer textarea::placeholder{color:var(--faint)}
.comp-row{display:flex;align-items:center;gap:8px}
.send{margin-left:auto;width:36px;height:36px;border-radius:var(--r1);background:var(--primary);color:#fff;display:grid;place-items:center}
.send.stop{background:var(--text)}
.hint{max-width:720px;margin:8px auto 0;font-size:13px;color:var(--muted);text-align:center}

/* preview */
.preview{border-left:1px solid var(--border);display:flex;flex-direction:column;min-height:0;background:var(--bg);min-width:0}
.pv-head{display:flex;align-items:center;gap:8px;height:56px;padding:0 16px;border-bottom:1px solid var(--border);flex:none}
.tabs{display:flex;gap:4px}
.tab{height:32px;padding:0 12px;border-radius:var(--r1);font-size:14px;color:var(--muted)}
.tab[aria-selected=true]{background:var(--surface);color:var(--text);font-weight:500}
.pv-body{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0}
.pv-file{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.pv-file .nm{min-width:0}
.pv-file b{font-size:15px;font-weight:600;display:block;word-break:break-all;line-height:1.4}
.pv-file span{font-size:13px;color:var(--muted);display:block}
.sheet-tabs{display:flex;gap:4px;overflow-x:auto}
.sheet{border:1px solid var(--border);border-radius:var(--r1);overflow:auto;max-height:60vh}
.sheet table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
.sheet th,.sheet td{padding:6px 10px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis}
.sheet th{background:var(--surface);font-weight:600;color:var(--text-2);position:sticky;top:0}
.sheet tr:last-child td{border-bottom:0}
.pv-note{font-size:13px;color:var(--muted)}
.pv-img{max-width:100%;border:1px solid var(--border);border-radius:var(--r1);background:repeating-conic-gradient(#F5F6F8 0 25%,#fff 0 50%) 0 0/16px 16px}
.pv-frame{width:100%;height:65vh;border:1px solid var(--border);border-radius:var(--r1);background:#fff}
.pv-text{font-family:var(--mono);font-size:13px;white-space:pre-wrap;word-break:break-word;background:var(--surface);padding:12px;border-radius:var(--r1)}
.pv-empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;color:var(--muted);font-size:14px;padding:48px 16px}
.pv-empty svg.lucide{width:24px;height:24px}
.file-row{display:flex;align-items:center;gap:8px;padding:8px;font-size:14px;border-radius:var(--r1);width:100%;text-align:left}
.file-row:hover{background:var(--surface)}
.file-row[aria-current=true]{background:var(--primary-soft)}
.file-row .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-row .sz{font-size:13px;color:var(--muted);flex:none}
.files-group h3{font-size:13px;color:var(--muted);font-weight:500;margin:0 0 4px 8px}
.files-group+.files-group{margin-top:16px}
.skeleton{background:linear-gradient(90deg,var(--surface) 25%,var(--surface-2) 50%,var(--surface) 75%);background-size:200% 100%;animation:shimmer 1.2s ease-in-out infinite;border-radius:var(--r1);height:16px}
@keyframes shimmer{to{background-position:-200% 0}}

/* admin */
.admin{flex:1;overflow:auto;padding:32px 24px}
.admin-inner{max-width:960px;margin:0 auto;display:flex;flex-direction:column;gap:32px}
.admin h2{font-size:20px;font-weight:650;line-height:1.3}
.admin .sub{color:var(--muted);font-size:14px;margin-top:4px}
.stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stat{border:1px solid var(--border);border-radius:var(--r2);padding:16px}
.stat span{font-size:13px;color:var(--muted)}
.stat b{display:block;font-size:25px;font-weight:650;line-height:1.3;font-variant-numeric:tabular-nums}
.add-form{display:grid;grid-template-columns:2fr 1.4fr 1fr 1fr auto;gap:8px;align-items:end}
.add-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.add-form select{height:40px;border:1px solid var(--border);border-radius:var(--r1);padding:0 8px;background:var(--bg)}
.table-wrap{border:1px solid var(--border);border-radius:var(--r2);overflow-x:auto}
.members{border-collapse:collapse;width:100%;font-size:14px}
.members th,.members td{padding:12px 16px;border-bottom:1px solid var(--border);text-align:left;white-space:nowrap}
.members th{font-size:13px;color:var(--muted);font-weight:500;background:var(--surface)}
.members tr:last-child td{border-bottom:0}
.members .who b{font-weight:500;display:block}
.members .who span{color:var(--muted);font-size:13px}
.members .num{font-variant-numeric:tabular-nums}
.limit-input{width:88px;height:32px;border:1px solid var(--border);border-radius:var(--r1);padding:0 8px;font-size:14px}
.pill{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:500;background:var(--surface);color:var(--text-2)}
.pill.on{background:var(--success-soft);color:var(--success)}
.pill.off{background:var(--danger-soft);color:var(--danger)}
.pill.admin{background:var(--primary-soft);color:var(--primary-text)}

/* toast */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--text);color:#fff;padding:10px 16px;border-radius:var(--r1);font-size:14px;box-shadow:var(--sh2);z-index:50;max-width:calc(100vw - 32px)}

.scrim{display:none}
@media (max-width:1180px){
  .app,.app.no-preview{grid-template-columns:240px minmax(0,1fr)}
  .preview{position:fixed;inset:0;z-index:20;border:0;transform:translateY(8px);opacity:0;pointer-events:none;transition:opacity .2s ease-out,transform .2s ease-out}
  .preview.open{transform:none;opacity:1;pointer-events:auto}
  .pv-close{display:grid}
}
@media (min-width:1181px){ .pv-close-m{display:none} }
@media (max-width:760px){
  .app,.app.no-preview{grid-template-columns:minmax(0,1fr)}
  .side{position:fixed;inset:0 auto 0 0;width:min(300px,86vw);z-index:10;box-shadow:var(--sh2);transform:translateX(-100%);transition:transform .2s ease-out;visibility:hidden}
  .side.open{transform:none;visibility:visible}
  .scrim{display:block;position:fixed;inset:0;background:rgba(18,21,28,.32);z-index:9;opacity:0;pointer-events:none;transition:opacity .2s ease-out}
  .side.open+.scrim{opacity:1;pointer-events:auto}
  .only-mobile{display:grid}
  .topbar{padding:0 8px 0 4px;gap:4px}
  .experts{padding:12px 16px}
  .thread{padding:24px 16px}
  .composer-wrap{padding:12px 16px 16px}
  .msg-user{max-width:92%}
  .hint{display:none}
  .admin{padding:24px 16px}
  .stat{padding:12px}
  .stat b{font-size:20px}
  .add-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .add-form label:first-child{grid-column:1/-1}
  .add-form .btn-primary{grid-column:1/-1}
  .login-card{padding:24px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* desktop: folders (只在桌面版出现) */
.icon-btn.sm{width:28px;height:28px}
.folders{display:flex;flex-direction:column;gap:4px}
.folders-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:0;padding-right:0}
.folder-list{list-style:none;display:flex;flex-direction:column;gap:2px;max-height:180px;overflow:auto}
.folder{display:flex;align-items:center;gap:4px;border-radius:var(--r1)}
.folder:hover{background:var(--surface-2)}
.folder .icon-btn.sm{opacity:0;color:var(--muted)}
.folder:hover .icon-btn.sm,.folder .icon-btn.sm:focus-visible{opacity:1}
.folder-open{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:6px 8px;font-size:14px;text-align:left;color:var(--text-2)}
.folder-open .nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.folder.missing .folder-open{color:var(--faint)}
.folder .tag{font-size:12px;color:var(--warn);flex:none}
.folder-empty{display:flex;align-items:flex-start;gap:8px;padding:8px;border:1px dashed var(--border-strong);border-radius:var(--r1);font-size:13px;line-height:1.5;color:var(--muted);text-align:left}
.folder-empty:hover{background:var(--surface-2);color:var(--text-2)}

/* desktop: change plan */
.plan{border:1px solid var(--border);border-radius:var(--r2);background:var(--bg);box-shadow:var(--sh1);display:flex;flex-direction:column}
.plan-head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--border);font-size:15px}
.plan-head .ok{color:var(--success)}
.plan-head .linkish{margin-left:auto}
.plan-sum{padding:12px 16px 0;font-size:14px;color:var(--text-2)}
.ops{list-style:none;max-height:360px;overflow:auto;padding:8px}
.op-row{display:flex;align-items:flex-start;gap:12px;padding:8px;border-radius:var(--r1);cursor:pointer}
.op-row:hover{background:var(--surface)}
.op.off .op-text{opacity:.5}
.op-row input{margin-top:4px;width:16px;height:16px;accent-color:var(--primary);flex:none}
.op-kind{flex:none;min-width:72px;font-size:12px;font-weight:500;line-height:24px;height:24px;padding:0 8px;border-radius:999px;background:var(--surface);color:var(--text-2);text-align:center}
.op-kind.k-trash{background:var(--danger-soft);color:var(--danger)}
.op-kind.k-mkdir,.op-kind.k-place{background:var(--primary-soft);color:var(--primary-text)}
.op-text{flex:1;min-width:0;display:flex;flex-direction:column;font-size:14px;line-height:1.5}
.op-main{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.op-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:13px}
.op-why{color:var(--faint);font-size:13px}
.op-err{color:var(--danger);font-size:13px}
.pill.st-done{background:var(--success-soft);color:var(--success)}
.pill.st-failed{background:var(--danger-soft);color:var(--danger)}
.pill.st-undone{background:var(--primary-soft);color:var(--primary-text)}
.op .pill{flex:none;margin-top:0}
.plan-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--border)}
.plan-note{font-size:13px;color:var(--muted);margin-left:auto}
.op.done .op-row{cursor:default}
.op.done .op-row:hover{background:none}

/* 弹窗（桌面版反馈问题） */
.modal-scrim{position:fixed;inset:0;background:rgba(18,21,28,.32);display:grid;place-items:center;padding:16px;z-index:50}
.modal{width:100%;max-width:440px;background:var(--bg);border-radius:var(--r2);box-shadow:var(--sh2);padding:24px;display:flex;flex-direction:column;gap:12px}
.modal h2{font-size:20px;font-weight:650;line-height:1.25}
.modal .sub{font-size:14px;color:var(--muted)}
.modal textarea.input{height:auto;padding:8px 12px;resize:vertical;line-height:1.5}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.composer-off{max-width:720px;margin:0 auto}
.pv-actions{display:flex;align-items:center;gap:8px;flex:none}
.side.drop{box-shadow:inset 0 0 0 2px var(--primary);background:var(--primary-soft)}

/* 开关 */
.switch{position:relative;display:inline-flex;width:36px;height:20px;flex:none;cursor:pointer}
.switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.switch i{width:100%;height:100%;border-radius:999px;background:var(--border-strong);transition:background .15s ease-out;position:relative}
.switch i::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s ease-out}
.switch input:checked+i{background:var(--success)}
.switch input:checked+i::after{transform:translateX(16px)}
.switch input:focus-visible+i{outline:2px solid var(--primary);outline-offset:2px}

/* 后台：改动记录 / 反馈 */
.admin-sec{display:flex;flex-direction:column;gap:12px}
.log-list{border:1px solid var(--border);border-radius:var(--r1);overflow:hidden}
.log+.log{border-top:1px solid var(--border)}
.log summary{list-style:none;display:flex;align-items:center;gap:12px;padding:10px 12px;cursor:pointer;font-size:14px;min-width:0}
.log summary::-webkit-details-marker{display:none}
.log summary:hover{background:var(--surface)}
.log-when{color:var(--muted);font-size:13px;flex:none;width:88px}
.log-who{font-weight:500;flex:none;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.log-what{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-2)}
.log-num{color:var(--muted);font-size:13px;flex:none}
.log-ops{list-style:none;padding:4px 12px 12px;display:flex;flex-direction:column;gap:6px;font-size:13px}
.log-ops li{display:flex;align-items:center;gap:8px;min-width:0}
.log-path{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--mono);font-size:12px}
.log-st{color:var(--muted);flex:none}
.log-pre{margin:0 12px 12px;max-height:280px;overflow:auto;font-size:12px}
@media (max-width:700px){.log-when,.log-num{display:none}}

/* 后台：专家 / 技能 */
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.xp-row{display:flex;align-items:center;gap:12px;padding:10px 12px}
.xp-row+.xp-row{border-top:1px solid var(--border)}
.xp-row.off{opacity:.55}
.xp-text{flex:1;min-width:0;display:flex;flex-direction:column}
.xp-text b{font-weight:600;font-size:14px}
.xp-text span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal.wide{max-width:560px;max-height:calc(100vh - 32px);overflow:auto}
.form-col{display:flex;flex-direction:column;gap:12px}
.form-col label,.field{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:500}
.form-col textarea.input{height:auto;padding:8px 12px;resize:vertical;line-height:1.5;font-weight:400}
.icon-pick{display:flex;flex-wrap:wrap;gap:4px}
.icon-pick [aria-checked=true]{background:var(--primary-soft);color:var(--primary-text);box-shadow:inset 0 0 0 1px var(--primary)}
.skill-pick{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r1);max-height:220px;overflow:auto}
.skill-opt{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;padding:8px 10px;font-weight:400!important;cursor:pointer}
.skill-opt+.skill-opt{border-top:1px solid var(--border)}
.skill-opt input{margin-top:3px;accent-color:var(--primary)}
.skill-opt span{display:flex;flex-direction:column;min-width:0}
.skill-opt b{font-weight:600}
.skill-opt small{font-size:12px;color:var(--muted);line-height:1.4}
.skill-md{max-height:60vh;overflow:auto;white-space:pre-wrap}
.admin-sec.pending h3{font-size:16px;font-weight:650}

/* 定时 */
.icon-btn.on{color:var(--primary)}
.sc-ic{color:var(--primary);width:13px;height:13px}
.sc-tag{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted)}
.sc-tag svg.lucide{width:12px;height:12px}
/* 任务来源：云端 / Mac（同步） */
.src-ic{display:inline-flex;flex:none}
.src-ic .sc-ic{color:var(--muted)}
.form-row{display:flex;gap:12px;flex-wrap:wrap}
.form-row>label{flex:1;min-width:120px}
.form-row>label[hidden]{display:none}
.row-label{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;font-weight:500}
.row-label input[type=checkbox]:not([role=switch]){margin-top:4px;accent-color:var(--primary)}
.row-label span{display:flex;flex-direction:column}
.row-label small{font-size:12px;color:var(--muted);font-weight:400;line-height:1.4}
select.input{appearance:auto}

/* 操作电脑 */
.control-card{max-width:560px}
.control-body{width:100%;text-align:left;margin-top:8px}
.perm{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--r1);color:var(--warn)}
.perm+.perm{margin-top:6px}
.perm.ok{color:var(--success)}
.perm span{flex:1;display:flex;flex-direction:column;color:var(--text);font-weight:400}
.perm b{font-weight:600}
.perm small{font-size:12px;color:var(--muted)}
.app-list{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r1)}
.app-row{display:flex;align-items:center;gap:8px;padding:6px 8px;font-weight:400}
.app-row+.app-row{border-top:1px solid var(--border)}
.app-row span{font-weight:500}
.app-row small{flex:1;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- 11-20 改版：侧栏导航、首页、专家/定时/资料库（照 WorkBuddy 布局） ---------- */
.side-nav{display:flex;flex-direction:column;gap:2px}
.nav-item{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:var(--r1);font-size:14px;color:var(--text-2);text-decoration:none;transition:background .15s ease-out}
.nav-item svg.lucide{color:var(--muted)}
.nav-item:hover{background:var(--surface-2)}
.nav-item.active{background:var(--bg);box-shadow:var(--sh1);color:var(--text);font-weight:600}
.nav-item.active svg.lucide{color:var(--primary)}
.nav-count{margin-left:auto;font-size:12px;color:var(--faint);font-weight:400}
.side-tasks .search{margin:4px 0 8px;height:32px}
.task-title .tt{overflow:hidden;text-overflow:ellipsis}
.me .icon-btn{width:32px;height:32px}

.pop{position:fixed;z-index:60;min-width:220px;max-width:min(380px,calc(100vw - 16px));background:var(--bg);border:1px solid var(--border);border-radius:12px;box-shadow:var(--sh2);padding:6px}
.menu{display:flex;flex-direction:column}
.menu-item{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:8px;font-size:14px;color:var(--text);text-decoration:none;width:100%;text-align:left}
.menu-item:hover{background:var(--surface-2)}
.menu-item svg.lucide,.menu-row>svg.lucide{color:var(--muted)}
.menu-row{display:flex;align-items:center;gap:10px;padding:6px 10px;font-size:14px}
.menu-row .lang{margin-left:auto}
.menu-sep,.pop-sep{height:1px;background:var(--border);margin:4px 6px}
.pop-body{width:340px;max-width:100%}
.pop-h{font-size:12px;font-weight:600;color:var(--faint);padding:8px 10px 6px}
.pop-opt{display:flex;align-items:center;gap:2px;padding:2px 4px;border-radius:8px}
.pop-opt:hover{background:var(--surface-2)}
.pop-opt .icon-btn{opacity:.6}
.pop-opt:hover .icon-btn,.pop-opt .icon-btn:focus-visible{opacity:1}
.pop-check{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:6px;cursor:pointer}
.pop-check input{accent-color:var(--primary);width:16px;height:16px;flex:none}
.pop-check svg.lucide{color:var(--muted)}
.pop-txt{display:flex;flex-direction:column;min-width:0}
.pop-txt b{font-size:14px;font-weight:500}
.pop-txt small{font-size:12px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pop-opt.missing b{color:var(--muted)}
.pop-opt.add{width:100%;gap:10px;padding:8px 10px;font-size:14px;color:var(--primary-text)}
.pop-opt.add svg.lucide{color:var(--primary)}
.rules .rule{display:flex;gap:10px;padding:8px 10px;font-size:13px;line-height:1.55;color:var(--text-2)}
.rules .rule svg.lucide{color:var(--success);margin-top:2px}

.composer-shell{max-width:720px;margin:0 auto;border-radius:16px;background:var(--surface);border:1px solid var(--border)}
.composer-shell .composer{max-width:none;border-color:var(--border);box-shadow:var(--sh1)}
.tray{display:flex;align-items:center;gap:4px;padding:6px 8px;min-width:0}
.tray-btn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:8px;font-size:13px;color:var(--text-2);min-width:0}
.tray-btn:hover,.tray-btn[aria-expanded=true]{background:var(--surface-2)}
.tray-btn svg.lucide{width:15px;height:15px;color:var(--muted)}
.tray-btn .cv{width:13px;height:13px;color:var(--faint)}
.tray-btn .lbl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.tray-btn.warn,.tray-btn.warn svg.lucide{color:var(--warn)}
.tray-note{margin-left:auto;font-size:12px;color:var(--faint);white-space:nowrap}

.topbar.bare{border-bottom:0}
@media (min-width:761px){.app:not(.desk) .topbar.bare{display:none}}
.home{flex:1;overflow:auto;padding:0 24px}
.home-inner{max-width:760px;margin:12vh auto 48px;display:flex;flex-direction:column}
.home-title{font-size:31px;line-height:1.2;font-weight:650;text-align:center;letter-spacing:-.01em}
.home-sub{text-align:center;color:var(--muted);font-size:15px;margin-top:8px}
.home-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:32px 0 16px}
.home-composer{padding:0}
.home .composer,.home .composer-shell{max-width:none}
.home .composer textarea{min-height:76px}
.home-ex{margin-top:32px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.home-ex-h{font-size:12px;font-weight:600;color:var(--faint)}
.ex-chip{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:6px 14px;border-radius:999px;border:1px solid var(--border);font-size:14px;color:var(--text-2);text-align:left;line-height:1.4;transition:border-color .15s ease-out}
.ex-chip:hover{border-color:var(--border-strong);color:var(--text)}
.ex-chip svg.lucide{width:14px;height:14px;color:var(--faint)}
.home .control-card{margin-top:32px}

.page{flex:1;min-height:0;display:flex}
.page-col{flex:1;min-width:0;overflow:auto;padding:24px 32px 32px}
.page-head{display:flex;align-items:flex-end;gap:16px;padding-bottom:16px}
.page-head h2{font-size:25px;line-height:1.2;font-weight:650}
.page-head p{font-size:14px;color:var(--muted);margin-top:6px;max-width:720px;line-height:1.55}
.page-head>:last-child:not(:first-child){margin-left:auto;flex:none}
.page-tools{display:flex;align-items:center;gap:12px;padding-bottom:16px;flex-wrap:wrap}
.page-search{width:260px;height:34px;background:var(--surface)}
.page-count{margin-left:auto;font-size:13px;color:var(--faint)}
.seg{display:inline-flex;background:var(--surface-2);border-radius:10px;padding:3px}
.seg button{height:30px;padding:0 14px;border-radius:8px;font-size:13px;color:var(--text-2);white-space:nowrap}
.seg button[aria-selected=true]{background:var(--bg);box-shadow:var(--sh1);font-weight:600;color:var(--text)}
.page-side{width:380px;flex:none;border-left:1px solid var(--border);overflow:auto;padding:24px;display:flex;flex-direction:column;gap:16px;background:var(--bg)}
.page-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:64px 16px}
.page-empty .big-ic{width:48px;height:48px;border-radius:var(--r2);background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;margin-bottom:4px}
.page-empty .big-ic svg.lucide{width:24px;height:24px}
.page-empty b{font-size:17px;font-weight:600}
.page-empty p{color:var(--muted);font-size:14px;max-width:420px}
.page-empty .btn-sec{margin-top:8px}
.page-note{display:flex;gap:8px;align-items:flex-start;margin-top:16px;font-size:13px;color:var(--muted);line-height:1.5}
.page-note svg.lucide{width:15px;height:15px;color:var(--faint);margin-top:2px}
.badge{display:inline-flex;align-items:center;font-size:11px;font-weight:500;padding:1px 6px;border-radius:4px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.badge.mac{background:var(--primary-soft);color:var(--primary-text)}
.badge.ok{background:var(--success-soft);color:var(--success)}

.xp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}
.xp-card{display:flex;gap:12px;padding:16px;border-radius:var(--r2);border:1px solid var(--border);background:var(--bg);text-align:left;align-items:flex-start;transition:border-color .15s ease-out}
.xp-card:hover{border-color:var(--border-strong)}
.xp-card[aria-pressed=true]{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.xp-ic{width:40px;height:40px;border-radius:10px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;flex:none}
.xp-ic svg.lucide{width:20px;height:20px}
.xp-ic.lg{width:48px;height:48px;border-radius:12px}
.xp-ic.lg svg.lucide{width:24px;height:24px}
.xpc-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.xpc-text b{font-size:15px;font-weight:600;display:flex;align-items:center;gap:6px}
.xpc-intro{font-size:13px;color:var(--muted);line-height:1.5}
.xpc-text small{font-size:12px;color:var(--faint)}
.xd-top{display:flex;gap:12px;align-items:center}
.xd-top h3{font-size:20px;font-weight:650;line-height:1.25}
.xd-top small{font-size:13px;color:var(--muted)}
.xd-lead{font-size:14px;line-height:1.6;color:var(--text-2)}
.xd-sec{display:flex;flex-direction:column;gap:8px}
.xd-h{font-size:12px;font-weight:600;color:var(--faint)}
.tags{display:flex;gap:6px;flex-wrap:wrap}
.tags span{font-size:13px;padding:3px 8px;border-radius:6px;background:var(--surface-2);color:var(--text-2)}
.xd-ex{display:flex;flex-direction:column;gap:6px}
.xd-ex button{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:8px;background:var(--surface);font-size:14px;color:var(--text-2);text-align:left;line-height:1.45}
.xd-ex button:hover:not(:disabled){background:var(--surface-2);color:var(--text)}
.xd-ex button svg.lucide{width:14px;height:14px;color:var(--faint);margin-left:auto;flex:none}
.xd-foot{margin-top:auto;padding-top:8px}
.xd-foot .btn-primary{width:100%;text-decoration:none}
.sk-list{display:flex;flex-direction:column;gap:8px}
.sk-row{display:flex;gap:12px;padding:14px 16px;border-radius:var(--r2);border:1px solid var(--border);background:var(--bg);align-items:flex-start}
.sk-ic{width:36px;height:36px;border-radius:9px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-weight:650;font-size:15px;flex:none}
.sk-text{min-width:0}
.sk-text b{font-size:15px;font-weight:600;display:flex;align-items:center;gap:6px}
.sk-text p{font-size:13px;color:var(--muted);margin-top:4px;line-height:1.5}
.sk-text small{display:block;font-size:12px;color:var(--faint);margin-top:6px}

.sc-list{border:1px solid var(--border);border-radius:var(--r2);background:var(--bg);overflow:hidden}
.sc-row{display:flex;align-items:center;gap:16px;padding:14px 16px}
.sc-row+.sc-row{border-top:1px solid var(--border)}
.sc-ic{width:36px;height:36px;border-radius:9px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;flex:none}
.sc-row.off .sc-ic{background:var(--surface-2);color:var(--faint)}
.sc-main{flex:1;min-width:0;color:inherit;text-decoration:none}
.sc-main b{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-row.off .sc-main b{color:var(--muted)}
.sc-main:hover b{color:var(--primary-text)}
.sc-main small{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin-top:2px}
.sc-main small svg.lucide{width:13px;height:13px}
.sc-when{width:190px;flex:none}
.sc-when b{display:block;font-size:14px;font-weight:500}
.sc-when small{font-size:13px;color:var(--muted)}
.sc-last{width:220px;flex:none;display:flex;gap:6px;align-items:flex-start;font-size:13px;color:var(--muted);line-height:1.45}
.sc-last svg.lucide{width:15px;height:15px;color:var(--success);margin-top:1px}
.sc-last.bad,.sc-last.bad svg.lucide{color:var(--warn)}

.lib-table{border:1px solid var(--border);border-radius:var(--r2);background:var(--bg);overflow:hidden}
.lib-tr{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(0,1.6fr) 88px 80px 104px;gap:12px;align-items:center;padding:0 16px;min-height:56px;width:100%;text-align:left;font-size:14px}
.lib-tr+.lib-tr{border-top:1px solid var(--border)}
.lib-tr.head{min-height:36px;font-size:12px;font-weight:600;color:var(--faint);background:var(--surface)}
button.lib-tr:hover{background:var(--surface)}
button.lib-tr[aria-selected=true]{background:var(--primary-soft)}
.lib-name{display:flex;align-items:center;gap:10px;min-width:0}
.fi{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;flex:none}
.fi.x{background:var(--success-soft);color:var(--success)}
.fi.i{background:var(--primary-soft);color:var(--primary)}
.fi.d{background:var(--warn-soft);color:var(--warn)}
.lib-nt{display:flex;flex-direction:column;min-width:0}
.lib-nt b{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lib-nt small{font-size:12px;color:var(--faint)}
.lib-task{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lib-where{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--muted)}
.lib-where svg.lucide{width:13px;height:13px}
.lib-tr .num{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.lib-pv{padding:0;gap:0;width:420px}
.lp-h{padding:16px 20px;border-bottom:1px solid var(--border)}
.lp-h b{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lp-h small{font-size:13px;color:var(--muted)}
.lp-acts{display:flex;gap:8px;padding:12px 20px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.lp-acts .btn-primary{height:36px;font-size:14px;text-decoration:none}
.lib-pv .pv-content{padding:16px 20px;flex:none;overflow:visible}
.lp-src{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 20px 20px;padding:12px;border-radius:8px;background:var(--surface);font-size:13px;color:var(--muted);text-decoration:none}
.lp-src b{color:var(--text);font-weight:500}
.lp-src .go{display:inline-flex;align-items:center;gap:4px;color:var(--primary-text);white-space:nowrap}
.lp-src .go svg.lucide{width:14px;height:14px}

@media (max-width:1180px){.page-side{width:340px}.lib-pv{width:360px}}
@media (max-width:1000px){
  .page{flex-direction:column;overflow:auto}
  .page-col{overflow:visible;flex:none}
  .page-side,.lib-pv{width:auto;border-left:0;border-top:1px solid var(--border);overflow:visible}
  .xd-foot{margin-top:8px}
}
@media (max-width:760px){
  .home{padding:0 16px}
  .home-inner{margin-top:4vh}
  .home-title{font-size:25px}
  .home-chips{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;margin:24px -16px 12px;padding:0 16px}
  .home-chips::-webkit-scrollbar{display:none}
  .tray-note{display:none}
  .page-col{padding:8px 16px 24px}
  .page-head{flex-wrap:wrap}
  .page-head>:last-child:not(:first-child){margin-left:0}
  .page-search{width:100%}
  .xp-grid{grid-template-columns:minmax(0,1fr)}
  .sc-row{flex-wrap:wrap;gap:8px 12px}
  .sc-main{flex-basis:calc(100% - 48px)}
  .sc-when,.sc-last{width:auto;flex:1 1 40%;padding-left:48px}
  .sc-last{padding-left:0}
  .lib-tr{grid-template-columns:minmax(0,1fr) 72px}
  .lib-tr>:nth-child(2),.lib-tr>:nth-child(3),.lib-tr>:nth-child(4){display:none}
}

.sc-last.none svg.lucide{color:var(--faint)}
.lp-src-t{min-width:0;overflow-wrap:anywhere}
.xpc-intro{white-space:normal}

/* 照 WorkBuddy 实际页面调整：大标签、三列卡片、右侧抽屉、定时模板 */
.tabs-head{align-items:center;flex-wrap:wrap}
.page-tabs{display:flex;gap:24px}
.page-tabs button{display:flex;align-items:center;gap:8px;font-size:22px;font-weight:650;color:var(--faint);padding:4px 0}
.page-tabs button svg.lucide{width:22px;height:22px}
.page-tabs button[aria-selected=true]{color:var(--text)}
.page-tabs button:hover{color:var(--text-2)}
.tabs-head .page-search{margin-left:auto}
.page-lead{font-size:14px;color:var(--muted);margin:-4px 0 20px;line-height:1.55}
.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-content:start}
.xp-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.xp-tags span{font-size:12px;padding:2px 8px;border-radius:6px;background:var(--surface);color:var(--muted)}
.sk-card{display:flex;gap:12px;padding:16px;border-radius:var(--r2);border:1px solid var(--border);background:var(--bg);align-items:flex-start}
.drawer-scrim{position:fixed;inset:0;z-index:40;background:rgba(18,21,28,.28);display:flex;justify-content:flex-end;animation:fadeIn .15s ease-out}
.drawer{width:min(420px,100vw);height:100%;background:var(--bg);box-shadow:var(--sh2);display:flex;flex-direction:column;animation:slideIn .2s ease-out}
.drawer-head{display:flex;justify-content:flex-end;padding:12px 12px 0}
.drawer-body{flex:1;overflow:auto;padding:0 24px 24px}
.drawer-foot{padding:16px 24px 24px;border-top:1px solid var(--border)}
.drawer-foot .btn-primary{width:100%;text-decoration:none}
.xp-detail{display:flex;flex-direction:column;gap:16px}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideIn{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
.tpl-sec{margin-top:40px}
.tpl-sec h3{font-size:16px;font-weight:600;margin-bottom:12px}
.tpl-card{display:flex;gap:12px;padding:14px 16px;border-radius:var(--r2);border:1px solid var(--border);background:var(--bg);text-align:left;align-items:flex-start;transition:border-color .15s ease-out}
.tpl-card:hover{border-color:var(--border-strong)}
.tpl-ic{width:32px;height:32px;border-radius:8px;background:var(--surface);color:var(--muted);display:grid;place-items:center;flex:none}
.tpl-ic svg.lucide{width:16px;height:16px}
.tpl-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.tpl-text b{font-size:15px;font-weight:600}
.tpl-text small{font-size:13px;color:var(--muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:1180px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .card-grid{grid-template-columns:minmax(0,1fr)}
  .page-tabs button{font-size:19px}
  .tabs-head .page-search{margin-left:0;width:100%}
}
/* 提问卡（ask_user）：输入框位置换成选择卡；回复里显示问的是什么 */
.asked{display:flex;flex-direction:column;gap:4px}
.asked-decided{color:var(--muted);font-size:14px}
.asked-q{display:flex;gap:8px;align-items:flex-start;font-weight:600}
.asked-q svg{flex:none;margin-top:3px;color:var(--primary)}
.asked-wait{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:14px}
.ask-card{max-width:720px;margin:0 auto;border:1px solid var(--border);border-radius:var(--r2);box-shadow:var(--sh2);background:var(--bg);padding:16px 12px 12px}
.ask-head{display:flex;gap:8px;align-items:flex-start;padding:0 4px 12px}
.ask-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.ask-decided{color:var(--muted);font-size:14px;line-height:1.5}
.ask-q{font-weight:600;line-height:1.5}
.ask-head .icon-btn{width:32px;height:32px;margin-top:-4px}
.ask-opts{list-style:none;padding:0;margin:0;display:flex;flex-direction:column}
.ask-opts li+li{border-top:1px solid var(--border)}
.ask-opt{width:100%;display:flex;align-items:center;gap:12px;padding:12px 8px;border-radius:var(--r1);text-align:left;transition:background .15s ease-out}
.ask-opt:hover,.ask-opt:focus-visible{background:var(--surface)}
.ask-n{flex:none;width:24px;height:24px;border-radius:6px;border:1px solid var(--border);display:grid;place-items:center;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.ask-l{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ask-lbl{color:var(--text)}
.ask-desc{color:var(--muted);font-size:13px}
.ask-go{flex:none;color:var(--faint);opacity:0;transition:opacity .15s ease-out}
.ask-opt:hover .ask-go,.ask-opt:focus-visible .ask-go,.ask-opts li:first-child .ask-go{opacity:1}
.ask-other{display:flex;align-items:center;gap:12px;padding:8px 8px 0;margin-top:4px;border-top:1px solid var(--border);color:var(--faint)}
.ask-input{flex:1;min-width:0;border:0;outline:none;background:none;font-size:15px;padding:8px 0;color:var(--text)}
.ask-input::placeholder{color:var(--faint)}
.wait-pill{flex:none;margin-left:auto;font-size:12px;line-height:1;padding:4px 8px;border-radius:999px;background:var(--text);color:var(--bg)}
.asked-q{flex-wrap:wrap}
.asked-opts{flex-basis:100%;padding-left:24px;font-weight:400;color:var(--muted);font-size:14px}
/* 历史会话：悬停出删除按钮 */
.task{position:relative}
.task-del{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:var(--r1);display:grid;place-items:center;color:var(--muted);background:var(--surface-2);opacity:0;pointer-events:none;transition:opacity .15s ease-out}
.task:hover .task-del,.task:focus-within .task-del,.task-del:focus-visible{opacity:1;pointer-events:auto}
.task-del:hover{color:var(--danger,#C23B32)}
.task:hover .wait-pill{visibility:hidden}
@media (hover:none){.task-del{opacity:1;pointer-events:auto;background:none}.task{padding-right:36px}}
/* 回复里的图片：缩略图并排，点了在右边预览放大 */
.artifacts-wrap{display:flex;flex-direction:column;gap:12px}
.art-imgs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:600px}
.art-imgs.one{grid-template-columns:minmax(0,280px)}
.art-img{display:flex;flex-direction:column;gap:4px;text-align:left;min-width:0;border-radius:var(--r2)}
.art-img-box{display:block;aspect-ratio:2/3;border-radius:var(--r2);overflow:hidden;background:var(--surface);border:1px solid var(--border);transition:border-color .15s ease-out}
.art-img-box img{width:100%;height:100%;object-fit:contain;display:block}
.art-img:hover .art-img-box,.art-img[aria-current="true"] .art-img-box{border-color:var(--primary)}
.art-img-name{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:480px){.art-imgs{grid-template-columns:repeat(2,minmax(0,1fr))}}
.notice-btn{margin-left:auto;flex:none;height:30px;align-self:center}
/* 后台：品牌素材 */
.brand-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px;align-items:start}
.brand-tile{display:flex;flex-direction:column;justify-content:flex-start;gap:8px;min-width:0}
.brand-box{width:100%;aspect-ratio:1;border-radius:var(--r2);border:1px solid var(--border);background:var(--surface) repeating-conic-gradient(var(--surface-2) 0 25%,transparent 0 50%) 0 0/16px 16px;display:grid;place-items:center;overflow:hidden;padding:12px;transition:border-color .15s ease-out}
.brand-box img{max-width:100%;max-height:100%;object-fit:contain}
.brand-box.brand-none{background:var(--bg);border-style:dashed;color:var(--muted)}
.brand-box:hover{border-color:var(--primary)}
.brand-empty{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:14px}
.brand-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.brand-meta b{font-size:14px}
.brand-meta small{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-acts{display:flex;gap:12px;font-size:13px}
.linkish.danger{color:var(--danger)}
.brand-notes{width:100%;resize:vertical;font:inherit;line-height:1.6}
/* 设置 → 记忆 */
.mem-list ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r2);max-height:360px;overflow:auto}
.mem-row{display:flex;align-items:center;gap:12px;padding:8px 8px 8px 12px}
.mem-row+.mem-row{border-top:1px solid var(--border)}
.mem-text{flex:1;min-width:0;line-height:1.5;word-break:break-word}
.mem-src{flex:none;font-size:12px;color:var(--muted)}
.mem-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 16px;color:var(--muted);text-align:center;border:1px dashed var(--border);border-radius:var(--r2)}
.mem-add{display:flex;gap:8px}
.mem-add .input{flex:1;min-width:0}
.mem-count{margin-right:auto;font-size:13px;color:var(--muted);align-self:center;font-variant-numeric:tabular-nums}
/* 点“踩”后的理由框；后台回复评价 */
.fb-pop{width:320px;max-width:calc(100vw - 32px);padding:16px;display:flex;flex-direction:column;gap:8px}
.fb-pop .sub{font-size:13px}
.fb-chips{display:flex;flex-wrap:wrap;gap:8px}
.fb-chip{height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--border);font-size:14px;background:var(--bg)}
.fb-chip[aria-checked="true"]{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-text)}
.fb-pop textarea{width:100%;resize:vertical;font:inherit;font-size:14px}
.fb-foot{display:flex;justify-content:flex-end;gap:8px}
.fb-note{display:flex;align-items:center;gap:12px;padding:8px 12px;font-size:14px;min-width:0}
.fb-note+.fb-note{border-top:1px solid var(--border)}
.fb-note-x{flex:1;min-width:0;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bad-num{color:var(--danger);font-weight:600}
/* 模板：首页“常用”；用户消息悬停“存为模板” */
.home-tpl{display:flex;flex-direction:column;gap:8px;margin-top:24px}
.tpl-chips{display:flex;flex-wrap:wrap;gap:8px}
.tpl-chip{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:999px;background:var(--bg);max-width:100%;transition:border-color .15s ease-out}
.tpl-chip:hover{border-color:var(--primary)}
.tpl-use{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 4px 0 14px;font-size:14px;min-width:0}
.tpl-use:last-child{padding-right:14px}
.tpl-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.tpl-tag{font-size:11px;padding:2px 6px;border-radius:999px;background:var(--primary-soft);color:var(--primary-text);flex:none}
.tpl-del{width:28px;height:28px;margin-right:4px;border-radius:999px;display:grid;place-items:center;color:var(--faint);opacity:0;transition:opacity .15s ease-out}
.tpl-chip:hover .tpl-del,.tpl-del:focus-visible{opacity:1}
@media (hover:none){.tpl-del{opacity:1}}
.msg-user{position:relative}
.bubble-act{align-self:flex-end;display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);padding:2px 6px;border-radius:var(--r1);opacity:0;transition:opacity .15s ease-out}
.msg-user:hover .bubble-act,.bubble-act:focus-visible{opacity:1}
.bubble-act:hover{color:var(--primary-text);background:var(--surface)}
.bubble-act svg{width:14px;height:14px}
@media (hover:none){.bubble-act{opacity:1}}
.check-row{flex-direction:row !important;align-items:center;gap:8px;font-weight:400 !important}
/* 后台：公司资料 */
.kb-list{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r2);overflow:hidden}
.kb-row{display:flex;align-items:center;gap:12px;padding:8px 8px 8px 12px;min-width:0}
.kb-row+.kb-row{border-top:1px solid var(--border)}
.kb-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.kb-meta{flex:none;font-size:13px;color:var(--muted)}
.kb-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--muted);font-size:14px;width:100%}
.kb-empty:hover{color:var(--primary-text);background:var(--surface)}
/* 后台：行业专家模板 */
.xt-list{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r2)}
.xt-row{display:flex;align-items:flex-start;gap:12px;padding:12px}
.xt-row+.xt-row{border-top:1px solid var(--border)}
.xt-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.xt-text span{font-size:14px;color:var(--text-2);line-height:1.5}
.xt-text small{font-size:13px;color:var(--muted)}
.xt-row .btn-sec,.xt-row .pill{flex:none;align-self:center}
/* 完全访问 */
.tray-btn.fa-on{color:var(--danger);background:var(--danger-soft)}
.fa-row{display:flex;align-items:center;gap:10px;padding:4px 0}
.fa-row.on>svg{color:var(--danger)}
.fa-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.fa-txt small{font-size:12px;color:var(--muted)}
.fa-consent ul{margin:4px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:2px;font-size:14px;color:var(--text-2)}
.fa-box{padding:12px;border-radius:var(--r1);background:var(--surface)}
.fa-box b{font-size:14px}
.fa-ack{padding-top:4px}
.btn-danger-fill{background:var(--danger) !important;border-color:var(--danger) !important}
.btn-danger-fill:disabled{opacity:.45}
.fa-cell{display:flex;align-items:center;gap:8px}
.fa-pill{background:var(--danger-soft) !important;color:var(--danger) !important}
.eng-select{height:32px;border:1px solid var(--border);border-radius:var(--r1);padding:0 8px;background:var(--bg);font:inherit;font-size:14px}
