html{color-scheme:light}body{font-family:PingFang SC,Hiragino Sans GB,Microsoft YaHei,Noto Sans SC,sans-serif;background:#f5f7fb}#root{min-height:100vh}:root{--bg: #eef2f7;--panel: #ffffff;--panel-border: #dbe3ee;--sidebar: #f7f9fc;--text: #18222f;--muted: #6e7b8c;--accent: #2f6bff;--accent-soft: #e8f0ff;--bubble-self: #dce9ff;--shadow: 0 10px 30px rgba(23, 35, 56, .08)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;min-width:320px;color:var(--text);background:linear-gradient(180deg,#f4f7fb,#edf2f8);overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:320px minmax(0,1fr);height:100vh;overflow:hidden}.chat-sidebar{display:flex;flex-direction:column;border-right:1px solid var(--panel-border);background:var(--sidebar);min-height:0;overflow:hidden}.sidebar-header{padding:28px 24px 20px;border-bottom:1px solid var(--panel-border)}.sidebar-header h1{margin:0 0 12px;font-size:1.5rem;letter-spacing:-.03em}.sidebar-user{display:flex;align-items:center;gap:12px;color:var(--muted)}.sidebar-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;background:#d8e1ef;flex-shrink:0}.sidebar-user-meta{min-width:0;display:flex;flex-direction:column;gap:4px}.sidebar-user-meta strong{color:var(--text)}.search-trigger{width:100%;margin-top:16px;border:1px solid var(--panel-border);border-radius:12px;padding:12px 14px;color:var(--muted);background:#fff;outline:none}.search-trigger:focus{border-color:#a8c4ff;box-shadow:0 0 0 3px #2f6bff1f}.chat-list{flex:1;min-height:0;overflow-y:auto;padding:14px 12px}.chat-list-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid transparent;background:transparent;border-radius:14px;padding:14px 12px;text-align:left;color:inherit}.chat-list-item:hover{background:#2f6bff0f}.chat-list-item.active{background:var(--panel);border-color:#cfe0ff;box-shadow:var(--shadow)}.chat-list-main{min-width:0;display:flex;flex-direction:column;gap:4px}.chat-list-main strong{font-size:.98rem}.chat-list-main span,.chat-list-tag,.stage-meta span,.sidebar-user span{color:var(--muted);font-size:.85rem}.chat-list-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-list-tag{flex-shrink:0}.composer-panel textarea{width:100%;border:1px solid var(--panel-border);border-radius:12px;background:#fff;color:var(--text);outline:none}.chat-stage{display:flex;flex-direction:column;background:#fff;min-width:0;min-height:0;height:100vh;overflow:hidden}.chat-stage-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px 28px 18px;border-bottom:1px solid var(--panel-border);background:#ffffffeb;flex-shrink:0}.chat-stage-header h2{margin:0 0 6px;font-size:1.35rem}.chat-stage-header p{margin:0;color:var(--muted)}.stage-meta{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.stage-meta span{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:999px;background:#f5f8fd}.message-stage{flex:1;min-height:0;overflow-y:auto;padding:24px 28px;background:linear-gradient(180deg,#f4f8fde6,#fffffff0 22%),#fff}.message-empty{display:grid;place-items:center;min-height:100%;color:var(--muted)}.message-row{display:flex;margin-bottom:14px}.message-row.mine{justify-content:flex-end}.message-card{max-width:min(680px,78%);padding:12px 14px;border:1px solid var(--panel-border);border-radius:16px;background:var(--panel);box-shadow:0 4px 16px #1723380a}.message-row.mine .message-card{background:var(--bubble-self);border-color:#c7dafe}.message-card header{display:flex;align-items:center;gap:12px;margin-bottom:6px}.message-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#d8e1ef;flex-shrink:0}.message-meta{display:flex;align-items:baseline;gap:12px}.message-card strong{font-size:.9rem}.message-card time{color:var(--muted);font-size:.8rem}.message-card p{margin:0;line-height:1.55;white-space:pre-wrap;word-break:break-word}.message-image{display:block;max-width:min(320px,100%);max-height:320px;border-radius:12px;object-fit:cover;background:#f3f6fb}.message-image-block{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.message-file{display:flex;flex-direction:column;gap:6px}.message-file strong{font-size:.95rem}.message-file span{color:var(--muted);font-size:.84rem}.attachment-action{border:1px solid #cfe0ff;border-radius:10px;padding:8px 12px;color:var(--accent);background:#f7faff}.attachment-action:hover{background:#edf4ff}.attachment-action:disabled{cursor:not-allowed;color:var(--muted);background:#f3f6fb;border-color:var(--panel-border)}.file-input{display:none}.composer-panel{display:flex;flex-direction:column;gap:12px;padding:18px 28px 24px;border-top:1px solid var(--panel-border);background:#fff;flex-shrink:0}.composer-panel textarea{min-height:112px;resize:none;padding:14px 16px}.composer-panel textarea:focus{border-color:#a8c4ff;box-shadow:0 0 0 3px #2f6bff1f}.composer-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px}.composer-buttons{display:flex;gap:10px}.ghost-button,.primary-button{border:1px solid var(--panel-border);border-radius:12px;padding:10px 16px;background:#fff}.primary-button{border-color:var(--accent);background:var(--accent);color:#fff}.error-banner{border-radius:12px;padding:10px 12px;color:#a33a46;background:#fff1f3;border:1px solid #f3c7cf}.search-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;display:grid;place-items:start center;padding:96px 20px 24px;background:#11182747;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.search-modal{width:min(720px,100%);max-height:min(72vh,760px);display:flex;flex-direction:column;border:1px solid rgba(207,224,255,.9);border-radius:22px;background:#fffffffa;box-shadow:0 24px 80px #0f172a2e;overflow:hidden}.search-modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px 14px;border-bottom:1px solid var(--panel-border)}.search-close-button{border:1px solid var(--panel-border);border-radius:10px;padding:8px 12px;background:#fff}.search-modal-input{margin:16px 20px 0;border:1px solid var(--panel-border);border-radius:14px;padding:14px 16px;outline:none}.search-modal-input:focus{border-color:#a8c4ff;box-shadow:0 0 0 3px #2f6bff1f}.search-status{margin:12px 20px 0;padding:10px 12px;border-radius:12px;color:#42607b;background:#f3f7fd;border:1px solid #d9e6f7;font-size:.9rem;line-height:1.5}.search-status-error{color:#a33a46;background:#fff1f3;border-color:#f3c7cf}.search-results{flex:1;min-height:0;overflow-y:auto;padding:14px 12px 16px}.search-empty{display:grid;place-items:center;min-height:160px;color:var(--muted)}.search-result-item{width:100%;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border:1px solid transparent;border-radius:16px;background:transparent;padding:14px 12px;text-align:left}.search-result-item:hover{background:#2f6bff0f;border-color:#d8e6ff}.search-result-main{min-width:0;display:flex;flex-direction:column;gap:4px}.search-result-main strong{display:flex;align-items:center;gap:8px;font-size:.96rem}.search-source{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-size:.72rem;font-weight:600}.search-source.local{color:#2f6bff;background:#e8f0ff}.search-source.cloud{color:#0b7a53;background:#e6f7ef}.search-result-main span,.search-result-item time{color:var(--muted);font-size:.82rem}.search-result-main p{margin:4px 0 0;color:var(--text);line-height:1.5;white-space:pre-wrap;word-break:break-word}.ghost-button:disabled,.primary-button:disabled,.chat-list-item:disabled{opacity:.55;cursor:not-allowed}@media (max-width: 960px){body{overflow:auto}.app-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr;height:auto;min-height:100vh;overflow:visible}.chat-sidebar{border-right:0;border-bottom:1px solid var(--panel-border);overflow:visible}.chat-list{max-height:260px}.chat-stage{height:auto;min-height:0}.chat-stage-header,.message-stage,.composer-panel{padding-left:18px;padding-right:18px}.composer-actions{flex-direction:column;align-items:stretch}.composer-buttons{justify-content:flex-end}.search-modal-backdrop{padding-top:48px}}
