*{box-sizing:border-box}
html,body{margin:0}
body{background:radial-gradient(ellipse at 50% 0,#1b2850,#090d16 55%) fixed;color:#edf3ff;font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
main{max-width:760px;margin:auto;padding:14px 14px 70px}
header{display:flex;justify-content:space-between;color:#bfcaff;font-size:13px;padding:4px 2px}
#avatarBox{text-align:center;padding:8px 0}
#avatar{width:170px;height:170px}
.muted{color:#9aa8bd;font-size:13px}.small{font-size:12px;color:#9aa8bd;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.err{color:#ff9d9d;font-size:13px;min-height:1em}
nav{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px}
nav button{flex:0 0 auto;background:#161f33;color:#bfcaff;border:1px solid #29364c}
nav button.on{background:#8b9cff;color:#080d1b}
textarea,input[type=text],input[type=password],input:not([type]){width:100%;background:#0b1220;color:#edf3ff;border:1px solid #35445e;border-radius:12px;padding:12px;font:inherit}
textarea{resize:vertical}
button{border:0;border-radius:11px;padding:11px 15px;background:#8b9cff;color:#080d1b;font:inherit;font-weight:700;cursor:pointer}
button.secondary{background:#202c43;color:#edf3ff;border:1px solid #35445e}
button.danger{background:#ff8d8d}
button:disabled{opacity:.5}
.row{display:flex;gap:8px;margin:8px 0;align-items:center;flex-wrap:wrap}.row input:not([type=checkbox]){flex:1;min-width:0}
.card,.task,.mem{background:#111827e8;border:1px solid #29364c;border-radius:15px;padding:13px;margin:10px 0}
.log{display:flex;flex-direction:column;gap:8px;max-height:46vh;overflow-y:auto;margin-bottom:8px}
.msg{padding:10px 12px;border-radius:14px;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:15px}
.msg.user{align-self:flex-end;background:#2a3a78}.msg.ai{align-self:flex-start;background:#1a2438;border:1px solid #29364c}
.badge{font-size:12px;padding:2px 8px;border-radius:99px;background:#202c43}
.s-completed{background:#1d5a3a}.s-failed{background:#6a2530}.s-running{background:#3b4a9a}.s-waiting_confirmation{background:#7a5a1a}.s-cancelled{background:#3a3f4c}
.task .head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.task .prompt{font-weight:600;margin:6px 0;overflow-wrap:anywhere}
.result{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;font-size:14px;margin-top:6px}
details{margin-top:6px;font-size:12px;color:#9aa8bd}
pre{background:#0b1220;border:1px solid #29364c;border-radius:12px;padding:12px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.file{padding:10px 4px;border-bottom:1px solid #29364c;cursor:pointer;display:flex;justify-content:space-between}
.overlay{position:fixed;inset:0;background:#090d16f2;display:flex;align-items:center;justify-content:center;z-index:10}
.overlay[hidden],[hidden]{display:none!important}
.login{width:min(360px,90vw)}
.login input,.login button{width:100%;margin-top:10px}
#statusInfo{white-space:pre-wrap;line-height:1.6}
