:root{color-scheme:light;--bg:#f6f7f4;--surface:#ffffff;--surface-strong:#f0f4ee;--text:#17211f;--muted:#66736f;--line:#d8ded7;--primary:#136f63;--primary-strong:#0f574e;--accent:#c9552f;--danger:#b42318;--danger-strong:#8f1c13;--warning:#9a6700;--shadow:0 18px 50px rgba(31,43,38,0.12)}*{box-sizing:border-box}body,html{margin:0;min-height:100%}body{background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;line-height:1.5}button,input,textarea{font:inherit}a,button{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid rgba(19,111,99,.35);outline-offset:2px}.auth-shell{min-height:100dvh;display:grid;place-items:center;padding:24px}.auth-panel{width:min(100%,430px);background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:28px}.brand-mark{width:52px;height:52px;display:grid;place-items:center;border-radius:8px;background:var(--surface-strong);color:var(--primary);margin-bottom:18px}.app-header h1,.auth-panel h1,.empty-state h2{margin:0;letter-spacing:0}.auth-panel h1{font-size:30px}.auth-subtitle{color:var(--muted);margin:8px 0 24px}.segmented-control{display:grid;grid-template-columns:1fr 1fr;grid-gap:4px;gap:4px;padding:4px;border:1px solid var(--line);border-radius:8px;background:#f8faf7;margin-bottom:20px}.segmented-control button{min-height:44px;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}.segmented-control button.active{background:var(--surface);color:var(--text);box-shadow:0 2px 10px rgba(31,43,38,.08)}.auth-form,.composer{display:grid;grid-gap:16px;gap:16px}label{display:grid;grid-gap:8px;gap:8px;color:var(--text);font-weight:650}input,textarea{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);padding:12px 14px}input{min-height:48px}textarea{min-height:124px;resize:vertical}.copy-button,.danger-button,.icon-button,.primary-button,.secondary-button{min-height:44px;border:0;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;transition:background-color .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease}.primary-button{background:var(--primary);color:#ffffff;padding:0 18px;font-weight:750}.primary-button:hover{background:var(--primary-strong)}.copy-button,.secondary-button{background:var(--surface-strong);padding:0 16px}.copy-button,.icon-button,.secondary-button{color:var(--text);border:1px solid var(--line)}.icon-button{width:44px;background:var(--surface);flex:0 0 auto}button:disabled{cursor:not-allowed;opacity:.48}.form-error{margin:0;color:var(--danger);font-weight:650}.app-shell{min-height:100dvh;display:grid;grid-template-rows:auto 1fr;padding:20px;grid-gap:16px;gap:16px}.app-shell.dragging:after{content:"松开以上传文件";position:fixed;inset:16px;display:grid;place-items:center;border:2px dashed var(--primary);border-radius:8px;background:rgba(246,247,244,.86);color:var(--primary);font-size:22px;font-weight:800;z-index:20;pointer-events:none}.app-header{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1180px;width:100%;margin:0 auto}.app-header h1{font-size:28px}.eyebrow{margin:0 0 2px;color:var(--muted);font-size:13px;font-weight:700}.header-actions,.status-cluster{display:flex;align-items:center;gap:10px}.status-pill{min-height:36px;display:inline-flex;align-items:center;gap:6px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-weight:700}.status-pill.online{color:var(--primary)}.message-menu,.system-status{position:relative}.system-status-button{min-height:44px;display:flex;align-items:stretch;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);cursor:pointer}.system-status-button:hover,.system-status-button[aria-expanded=true]{background:var(--surface-strong)}.system-metric{min-width:98px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 10px;color:var(--muted);white-space:nowrap;font-size:13px}.system-metric+.system-metric{border-left:1px solid var(--line)}.system-metric strong{color:var(--text);font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.system-metric.temperature{min-width:76px}.system-metric.temperature.warning,.system-metric.temperature.warning strong{color:var(--warning)}.system-metric.temperature.danger,.system-metric.temperature.danger strong{color:var(--danger)}.system-status-popover{position:absolute;z-index:40;top:calc(100% + 8px);right:0;width:min(320px,calc(100vw - 28px));padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.status-detail-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}.status-detail-heading span{color:var(--muted);font-size:12px}.system-status-popover dl{display:grid;grid-gap:10px;gap:10px;margin:12px 0 0}.system-status-popover dl div{display:flex;justify-content:space-between;gap:16px}.system-status-popover dt{color:var(--muted)}.system-status-popover dd{margin:0;text-align:right;font-weight:700;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.workspace{width:min(100%,1180px);margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-gap:16px;gap:16px;min-height:0}.message-list{min-height:0;height:calc(100dvh - 112px);overflow:auto;display:flex;flex-direction:column;gap:12px;padding-right:4px}.empty-state{min-height:100%;display:grid;place-items:center;align-content:center;text-align:center;grid-gap:10px;gap:10px;color:var(--muted);border:1px dashed var(--line);border-radius:8px;background:rgba(255,255,255,.55);padding:24px}.empty-state h2{color:var(--text);font-size:22px}.empty-state p{margin:0;max-width:360px}.message-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:14px;display:grid;grid-gap:12px;gap:12px}.composer-actions,.file-row,.message-meta,.message-meta span{display:flex;align-items:center}.message-meta{justify-content:space-between;gap:10px;color:var(--muted);font-size:13px;font-weight:700}.message-meta span{gap:6px}.message-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:16px}.file-block{display:grid;grid-gap:12px;gap:12px}.file-block img{width:100%;max-height:360px;object-fit:contain;background:#eef1ec;border-radius:8px;border:1px solid var(--line)}.file-row{justify-content:space-between;gap:12px}.file-row span,.file-row strong{display:block}.file-row strong{overflow-wrap:anywhere}.file-row span{color:var(--muted);font-size:13px}.expired-label{color:var(--danger);font-weight:750}.copy-button{justify-self:start;min-width:112px}.message-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.message-menu-popover{position:absolute;z-index:30;right:0;bottom:calc(100% + 8px);width:144px;padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 12px 32px rgba(31,43,38,.16)}.delete-menu-item{width:100%;min-height:44px;display:flex;align-items:center;gap:10px;padding:0 12px;border:0;border-radius:6px;background:transparent;color:var(--danger);font-weight:700;cursor:pointer}.delete-menu-item:focus-visible,.delete-menu-item:hover{background:#fff1f0}.dialog-backdrop{position:fixed;z-index:100;inset:0;display:grid;place-items:center;padding:20px;background:rgba(23,33,31,.52)}.confirm-dialog{position:relative;width:min(100%,440px);padding:24px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.dialog-close{position:absolute;top:12px;right:12px;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}.dialog-close:hover{background:var(--surface-strong);color:var(--text)}.dialog-danger-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:8px;background:#fff1f0;color:var(--danger)}.confirm-dialog h2{margin:16px 48px 8px 0;font-size:21px;letter-spacing:0}.confirm-dialog p{margin:0;color:var(--muted)}.confirm-dialog .dialog-error{margin-top:12px;color:var(--danger);font-weight:650}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.danger-button{padding:0 18px;background:var(--danger);color:#ffffff;font-weight:750}.danger-button:hover{background:var(--danger-strong)}.spinner{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.composer{align-self:start;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px;box-shadow:0 12px 32px rgba(31,43,38,.08)}.composer-actions{justify-content:space-between;gap:10px}@media (max-width:860px){.app-shell{padding:14px}.app-header{align-items:flex-start}.status-pill{font-size:0;width:44px;justify-content:center;padding:0}.metric-label{display:none}.workspace{grid-template-columns:1fr}.message-list{height:auto;min-height:44dvh;max-height:58dvh;padding-right:0}.composer{position:-webkit-sticky;position:sticky;bottom:12px}}@media (max-width:520px){.auth-shell{padding:14px}.auth-panel{padding:20px}.app-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;width:100%}.app-header h1{font-size:22px}.header-actions{display:contents}.header-actions>.icon-button{grid-column:2;grid-row:1}.status-cluster{grid-column:1/-1;grid-row:2;width:100%;gap:8px}.status-pill{width:44px;flex:0 0 44px}.system-status{min-width:0;flex:1 1}.system-status-button{width:100%}.system-metric{min-width:0;flex:1 1;padding-inline:6px;gap:4px}.system-metric.temperature{min-width:0}.system-status-popover{right:0}.composer-actions{display:grid;grid-template-columns:1fr 1fr}.composer .secondary-button,.primary-button{width:100%;padding-inline:10px}.confirm-dialog{padding:20px}.dialog-actions{display:grid;grid-template-columns:1fr 1fr}.dialog-actions .danger-button,.dialog-actions .secondary-button{width:100%;padding-inline:10px}}@media (prefers-reduced-motion:reduce){*,:after,:before{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}