:root{color-scheme:light;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#eef2ff;color:#0f172a}*{box-sizing:border-box}html,body,#root{min-height:100%}body{margin:0;background:linear-gradient(180deg,#f8faff,#eef2ff)}button,input,select,textarea{font:inherit}button{border:0;border-radius:16px;padding:.85rem 1rem;background:#295dff;color:#fff;cursor:pointer;transition:transform .12s ease,opacity .12s ease,background .12s ease}button:active{transform:scale(.985)}button[disabled]{cursor:not-allowed;opacity:.7}button.ghost{background:#eef2ff;color:#295dff}button.danger{background:#cf3342}button.active{background:#295dff;color:#fff}button.busy{opacity:.8}input,select,textarea{width:100%;border:1px solid #d7e0f0;border-radius:14px;padding:.8rem .9rem;background:#fff}textarea{resize:vertical}.password-input-shell{display:flex;align-items:center;gap:10px;border:1px solid #d7e0f0;border-radius:14px;padding:0 10px 0 .9rem;background:#fff}.password-input-shell:focus-within{border-color:#295dff;box-shadow:0 0 0 4px #295dff24}.password-input-shell input{border:0;box-shadow:none;padding-left:0;padding-right:0;background:transparent}.password-input-shell input:focus-visible{box-shadow:none}.password-toggle{width:40px;min-width:40px;height:40px;padding:0;border-radius:12px;background:transparent;color:#5b687f}.password-toggle:hover,.password-toggle:focus-visible{background:#eef2ff;color:#295dff}.password-toggle svg{width:18px;height:18px}pre,code{font-family:SFMono-Regular,ui-monospace,monospace}pre{margin:0;overflow-x:auto;white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e2e8f0;border-radius:16px;padding:.85rem}h1,h2,h3,p{margin:0}label{display:flex;flex-direction:column;gap:8px}.auth-shell,.app-shell{width:min(760px,calc(100vw - 20px));margin:0 auto}.auth-shell{padding:18px 0 84px;display:flex;flex-direction:column;gap:14px}.app-shell{padding:14px 0 96px}.page-body,.tab-panel,.stack{display:flex;flex-direction:column;gap:14px}.card{background:#ffffffeb;border:1px solid rgba(216,225,242,.9);border-radius:22px;padding:18px;box-shadow:0 12px 34px #0f172a0f;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.auth-hero{padding:22px 18px}.topbar{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.row{display:flex;gap:10px;align-items:center}.space-between{justify-content:space-between}.align-start{align-items:flex-start}.compact-gap{gap:6px}.eyebrow,.muted{color:#5b687f}.text-small{font-size:.86rem}.error-text{color:#b3261e;font-size:.9rem}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:.35rem .7rem;background:#eef2ff;color:#295dff;font-size:.86rem}.pill.warning,.pill.running,.pill.awaiting_confirmation{background:#fff4d6;color:#8a6000}.pill.completed{background:#e7faee;color:#11783f}.pill.failed{background:#fdecec;color:#b3261e}.pending-banner{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.tabbar{position:fixed;left:50%;bottom:12px;transform:translate(-50%);width:min(760px,calc(100vw - 20px));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:10px;background:#fffffff0;border:1px solid rgba(216,225,242,.95);border-radius:22px;box-shadow:0 12px 34px #0f172a1f;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.message-list,.activity-list{display:flex;flex-direction:column;gap:12px}.message-turn{display:flex;flex-direction:column;gap:8px}.message-bubble{border-radius:18px;padding:14px;border:1px solid #d7e0f0}.user-bubble{background:#f4f7ff}.assistant-bubble{background:#fff}.assistant-bubble.error-state{border-color:#efb0b7}.message-label{font-weight:700}.message-answer{white-space:pre-wrap;line-height:1.6}.timeline-list{display:flex;flex-direction:column;gap:10px}.timeline-entry{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #d7e0f0;border-radius:16px;background:#f8fbff}.timeline-entry.started,.timeline-entry.info{border-color:#c5d5fb;background:#f6f9ff}.timeline-entry.completed{border-color:#c4e1cf;background:#f5fcf7}.timeline-entry.waiting{border-color:#f1d48a;background:#fffaf0}.timeline-entry.failed{border-color:#efb0b7;background:#fff6f7}.timeline-command,.timeline-details,.timeline-output{margin:0}.timeline-command,.timeline-output{font-family:ui-monospace,SFMono-Regular,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.timeline-details{white-space:pre-wrap;line-height:1.6}.timeline-output{white-space:pre-wrap;line-height:1.5;background:#f0f4fb;border-radius:12px;padding:10px 12px;overflow:auto}.suggestion-list,.chip-grid{display:flex;gap:8px;flex-wrap:wrap}.suggestion-chip,.chip-button{border-radius:999px}.suggestion-chip{display:inline-flex;align-items:center;padding:.4rem .7rem;background:#eff5ff;color:#2348a5;font-size:.85rem}.activity-item{width:100%;text-align:left;padding:14px;border-radius:16px;border:1px solid #d7e0f0;background:#fff;color:inherit}.activity-item-button{width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left}.segmented-control{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.empty-state{border:1px dashed #c4d1ea;border-radius:18px;padding:18px;text-align:center;color:#5b687f;background:#f9fbff}.inline-check{display:flex;flex-direction:row;align-items:center;gap:8px}.inline-check input{width:18px;height:18px}.inline-copy{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline-copy code{display:block;width:100%;background:#f3f6fc;border-radius:12px;padding:10px 12px;word-break:break-all}.qr-card{display:flex;justify-content:center;align-items:center;border:1px dashed #c6d4eb;border-radius:18px;padding:18px;background:#f9fbff}.qr-image{width:min(220px,100%);height:auto;border-radius:12px}.qr-placeholder{color:#5b687f}.error-banner{color:#b3261e;background:#fff1f3;border:1px solid #efb0b7;border-radius:14px;padding:10px 12px}.action-receipt-list{display:flex;flex-direction:column;gap:10px}.action-receipt{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #d7e0f0;border-radius:16px;background:#f8fbff}.action-receipt.awaiting_confirmation{border-color:#f1d48a;background:#fffaf0}.action-receipt.failed{border-color:#efb0b7;background:#fff6f7}.small-button{padding:.65rem .85rem}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a5c;display:flex;align-items:flex-end;justify-content:center;padding:12px;z-index:40;overscroll-behavior:contain}.sheet{width:min(760px,calc(100vw - 20px));max-height:86vh;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-bottom-left-radius:18px;border-bottom-right-radius:18px}.toast{position:fixed;left:50%;bottom:96px;transform:translate(-50%);width:min(760px,calc(100vw - 20px));border-radius:18px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:60;box-shadow:0 14px 32px #0f172a26}.toast.info{background:#1d4ed8;color:#fff}.toast.success{background:#11783f;color:#fff}.toast.error{background:#b3261e;color:#fff}.auth-setup{padding-bottom:90px}@media (min-width: 860px){.app-shell,.auth-shell,.tabbar,.sheet,.toast{width:min(900px,calc(100vw - 32px))}.page-body{min-height:60vh}}.wrap-row{flex-wrap:wrap}.mode-chip{display:inline-flex;align-items:center}.task-messages-card{min-height:46vh}.task-item{border:1px solid #d7e0f0;border-radius:16px;padding:14px;background:#fff}.task-item.active{border-color:#295dff;box-shadow:inset 0 0 0 1px #295dff33}.task-item-actions{margin-top:12px}.segmented-control-3{grid-template-columns:repeat(3,1fr)}.break-all{word-break:break-all}.wrap-mobile{flex-wrap:wrap}.button-link{display:inline-flex;align-items:center;justify-content:center;border-radius:16px;padding:.85rem 1rem;background:#295dff;color:#fff;text-decoration:none}.portfolio-list{display:flex;flex-direction:column;gap:12px}.portfolio-entry{border:1px solid #d7e0f0;border-radius:18px;padding:14px;background:#fbfcff}.portfolio-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}@media (max-width: 640px){.portfolio-grid{grid-template-columns:minmax(0,1fr)}}.chat-hero-card{gap:14px}.task-context-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.task-context-card{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #d7e0f0;border-radius:16px;background:#fbfcff}.mode-pill.plan{background:#f4f0ff;color:#5b3bd1}.mode-pill.execute{background:#eef8f1;color:#0f7a3b}.subtle-pill{background:#f1f4fa;color:#4c5b74}.context-warning,.live-status-card{border-radius:16px;padding:12px 14px}.context-warning{border:1px solid #f1d48a;background:#fffaf0;color:#6b4a00}.live-status-card{border:1px dashed #c5d5fb;background:#f6f9ff}.message-feedback-stack{display:flex;flex-direction:column;gap:12px;margin-bottom:10px}.path-line{margin:0;word-break:break-all}.task-item-meta{margin:6px 0}@media (max-width: 640px){.task-context-grid{grid-template-columns:minmax(0,1fr)}}.app-shell-chat{width:min(1320px,calc(100vw - 24px));height:100dvh;display:flex;flex-direction:column}.app-shell-chat .tabbar{width:min(1320px,calc(100vw - 24px))}.page-body-chat{flex:1 1 auto;min-height:0;gap:0;overflow:hidden}.chat-workbench{display:grid;grid-template-columns:minmax(280px,320px) minmax(0,1fr);gap:16px;flex:1 1 auto;min-height:0}.chat-sidebar{display:flex;flex-direction:column;gap:16px;min-height:0;overflow:hidden;background:linear-gradient(180deg,#f9fbfffa,#f1f5fff5)}.chat-sidebar-header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.chat-sidebar-copy,.chat-workspace-copy{max-width:720px}.chat-sidebar-copy h3,.chat-workspace-copy h2,.chat-empty-copy h3{letter-spacing:-.03em}.chat-sidebar-empty{margin-top:4px}.chat-task-list{display:flex;flex-direction:column;gap:12px;flex:1 1 auto;min-height:0;overflow:auto;padding-right:4px;scrollbar-gutter:stable}.chat-task-item{display:flex;flex-direction:column;gap:12px;background:#f9fbfff5}.chat-task-button{display:flex;flex-direction:column;gap:8px}.chat-task-button strong{line-height:1.4}.chat-task-preview{color:#5b687f;font-size:.9rem;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-task-item .task-item-actions{margin-top:0;justify-content:flex-end}.danger-button{background:#fff1f3;color:#b3261e}.danger-button:hover:not(:disabled){background:#ffe3e7}.chat-workspace-stage{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px;min-height:0}.chat-workspace-header{display:flex;flex-direction:column;gap:14px}.chat-workspace-copy h2{font-size:clamp(1.32rem,2.3vw,1.9rem)}.chat-status-strip{display:flex;flex-wrap:wrap;gap:8px}.chat-task-details{border-top:1px solid #e1e8f4;padding-top:14px}.chat-task-details-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;font-weight:700}.chat-task-details-summary::-webkit-details-marker{display:none}.chat-task-details-summary:after{content:"展开";color:#5b687f;font-size:.86rem;font-weight:500}.chat-task-details[open] .chat-task-details-summary:after{content:"收起"}.chat-task-details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.chat-task-detail-item{display:flex;flex-direction:column;gap:6px;padding:14px;border:1px solid #d9e3f4;border-radius:18px;background:#fbfcff}.chat-task-warning{margin-top:14px;border:1px solid #f1d48a;border-radius:16px;padding:12px 14px;background:#fffaf0;color:#6b4a00}.chat-scroll-surface{display:flex;flex-direction:column;gap:14px;min-height:0;overflow:auto;padding:20px;background:#ffffffe6;scrollbar-gutter:stable}.chat-empty-panel{width:100%;margin:auto}.chat-empty-state{display:grid;gap:22px;justify-items:center;align-content:center;min-height:100%;margin:auto 0;padding:clamp(16px,4vh,40px) 4px}.chat-empty-state-compact{gap:14px}.chat-empty-copy{max-width:560px;text-align:center}.chat-empty-copy p{line-height:1.7}.chat-quick-grid{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.chat-quick-card{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:150px;padding:16px;border:1px solid #d9e3f4;border-radius:18px;background:linear-gradient(180deg,#fbfdff,#f4f8ff);color:inherit;text-align:left}.chat-quick-card:hover{transform:translateY(-1px);background:linear-gradient(180deg,#fff,#edf4ff)}.chat-quick-card strong{font-size:.98rem}.chat-quick-card span,.chat-quick-card p{color:#5b687f}.chat-quick-card p{line-height:1.6}.chat-composer-card{display:flex;flex-direction:column;gap:14px;flex-shrink:0;padding:16px 18px calc(16px + env(safe-area-inset-bottom,0px))}.chat-composer-input-shell{border:1px solid #d7e0f0;border-radius:18px;background:#fff;padding:14px 16px;transition:border-color .12s ease,box-shadow .12s ease}.chat-composer-input-shell:focus-within{border-color:#295dff85;box-shadow:0 0 0 4px #295dff1a}.chat-composer-input-shell textarea{min-height:108px;border:0;border-radius:0;padding:0;background:transparent;box-shadow:none;resize:none}.chat-composer-input-shell textarea:focus-visible{box-shadow:none}.chat-composer-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap}.chat-composer-meta{display:flex;align-items:flex-end;gap:12px;flex:1 1 320px;min-width:0;flex-wrap:wrap}.chat-toolbar-field{min-width:220px;max-width:320px}.chat-toolbar-field span{font-size:.8rem;font-weight:700;color:#5b687f}.chat-composer-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.chat-message-list{padding-right:2px}.chat-task-sheet{width:min(560px,calc(100vw - 20px));gap:16px}.chat-task-sheet .chat-task-list{overflow:visible;padding-right:0}.mobile-only-inline{display:none}@media (max-width: 1080px){.chat-workbench{grid-template-columns:minmax(0,1fr)}.chat-sidebar{display:none}.mobile-only-inline{display:flex}.chat-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 860px){.app-shell-chat,.app-shell-chat .tabbar,.chat-task-sheet{width:min(calc(100vw - 20px),100%)}.chat-task-details-grid{grid-template-columns:minmax(0,1fr)}.chat-composer-toolbar,.chat-composer-meta,.chat-composer-actions{align-items:stretch}}@media (max-width: 640px){.app-shell-chat{width:calc(100vw - 20px)}.page-body-chat{overflow:hidden}.chat-workspace-stage{gap:12px}.chat-workspace-header,.chat-scroll-surface,.chat-composer-card{padding:16px}.chat-quick-grid{grid-template-columns:minmax(0,1fr)}.chat-toolbar-field{min-width:0;width:100%;max-width:none}.chat-composer-actions{width:100%}.chat-composer-actions button{flex:1 1 0}.chat-composer-input-shell textarea{min-height:92px}}
