:root { color-scheme: dark; --bg:#07111f; --panel:#0e1d31e8; --line:#8eafd02b; --text:#edf7ff; --muted:#91a6bd; --cyan:#39d4d8; --violet:#8b7cff; --danger:#ff8192; font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--text); background:radial-gradient(circle at 10% 0,#1b596633,transparent 32rem),radial-gradient(circle at 90% 10%,#5545a833,transparent 35rem),#050b14; }
button,input,select,textarea { font:inherit; } button { cursor:pointer; }
.app { width:min(1600px,calc(100% - 28px)); margin:auto; padding:20px 0 28px; }
header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
h1,h2,p { margin-top:0; } h1 { margin-bottom:0; font-size:1.35rem; } h2 { margin-bottom:7px; }
.eyebrow { margin-bottom:4px; color:var(--cyan); font-size:.65rem; font-weight:900; letter-spacing:.17em; }
.header-actions { display:flex; align-items:center; gap:12px; } .header-actions a { color:#cce2f5; text-decoration:none; padding:9px 13px; border:1px solid var(--line); border-radius:10px; }
.status { color:var(--muted); font-size:.8rem; }.status.online { color:var(--cyan); }
.card { border:1px solid var(--line); border-radius:18px; background:var(--panel); box-shadow:0 20px 60px #0005; backdrop-filter:blur(18px); }
.connect { display:grid; grid-template-columns:1fr minmax(340px,.8fr); gap:28px; max-width:900px; margin:12vh auto 0; padding:36px; }.connect p { margin-bottom:0; color:var(--muted); line-height:1.5; }
.connect form { display:flex; gap:9px; align-self:center; }.error { min-height:1em; color:var(--danger); grid-column:2; font-size:.78rem; }
input,select,textarea { width:100%; color:var(--text); border:1px solid #8eafd039; border-radius:10px; outline:none; background:#030a13b8; } input,select { min-height:43px; padding:0 12px; } textarea { padding:13px; resize:vertical; }
input:focus,select:focus,textarea:focus { border-color:var(--cyan); box-shadow:0 0 0 3px #39d4d81a; }
button { min-height:42px; padding:0 16px; color:#031216; border:0; border-radius:10px; font-weight:850; background:linear-gradient(135deg,var(--cyan),#9ffff3); }.ghost { color:#c8d8e7; border:1px solid var(--line); background:#ffffff0b; }.small { min-height:30px; padding:0 9px; font-size:.72rem; }
.workspace { display:grid; grid-template-columns:250px minmax(420px,1fr) minmax(300px,.7fr); gap:12px; min-height:calc(100vh - 94px); }.hidden { display:none!important; }
.sidebar,.editor { padding:18px; overflow:hidden; }.sidebar label,.toolbar label { display:block; margin-bottom:7px; color:var(--muted); font-size:.72rem; font-weight:800; }
.tree-head { display:flex; align-items:center; justify-content:space-between; margin-top:22px; }.path { margin:8px 0; padding:7px 9px; overflow:hidden; color:var(--cyan); border-radius:8px; background:#39d4d80c; font: .7rem ui-monospace,monospace; text-overflow:ellipsis; white-space:nowrap; }
.file-list { display:grid; gap:4px; max-height:calc(100vh - 300px); overflow:auto; }.file { display:flex; align-items:center; gap:7px; width:100%; min-height:33px; padding:0 8px; overflow:hidden; color:#d9e8f5; background:transparent; font-size:.76rem; text-align:left; white-space:nowrap; text-overflow:ellipsis; }.file:hover { background:#ffffff0b; }.file.directory::before { content:"▸"; color:var(--cyan); }.file.file-item::before { content:"·"; color:var(--muted); }
.command-note { display:grid; gap:5px; margin-top:18px; color:var(--muted); font-size:.68rem; }.command-note strong { color:#ccdceb; }.command-note span { line-height:1.5; }
.chat { display:flex; flex-direction:column; min-height:0; overflow:hidden; }.toolbar { display:flex; align-items:end; justify-content:space-between; gap:14px; padding:16px 18px; border-bottom:1px solid var(--line); }.toolbar>div { width:min(380px,70%); }
.messages { flex:1; min-height:300px; padding:20px; overflow:auto; }.welcome { padding:16px; color:var(--muted); border:1px dashed var(--line); border-radius:12px; }.welcome p { margin:6px 0 0; line-height:1.55; }
.message { max-width:85%; margin-bottom:13px; padding:12px 14px; border-radius:13px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }.message.user { margin-left:auto; background:#39d4d81a; }.message.assistant { background:#8b7cff17; }.message.system { max-width:100%; color:var(--muted); border:1px solid var(--line); background:#ffffff08; font-size:.78rem; }
.composer { display:grid; grid-template-columns:1fr auto; gap:9px; padding:14px; border-top:1px solid var(--line); }.composer textarea { min-height:74px; }.composer button { align-self:stretch; }
.editor { display:flex; flex-direction:column; }.editor-head { min-height:57px; }.editor-head strong { overflow-wrap:anywhere; }.editor textarea { flex:1; min-height:400px; resize:none; font: .76rem/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
.approval { max-width:100%; margin:10px 0 16px; padding:14px; border:1px solid #ffd36b55; border-radius:13px; background:#ffd36b0d; }.approval strong { color:#ffd987; }.approval pre { max-height:230px; overflow:auto; white-space:pre-wrap; color:#dce8f2; font-size:.72rem; }.approval>div { display:flex; gap:8px; }.approval .ghost { color:#f5c2ca; }
@media(max-width:1100px){.workspace{grid-template-columns:220px 1fr}.editor{display:none}} @media(max-width:720px){.app{width:calc(100% - 16px);padding-top:10px}.connect{grid-template-columns:1fr;padding:24px}.error{grid-column:1}.workspace{grid-template-columns:1fr}.sidebar{display:none}.composer{grid-template-columns:1fr}.header-actions .status{display:none}}

#project-form { display: grid; gap: 8px; margin-top: 16px; }
#project-name { min-width: 0; width: 100%; box-sizing: border-box; }
#project-select { margin-bottom: 8px; }

#connect-form { display:grid; grid-template-columns:1fr; gap:8px; max-width:400px; }
#account-panel { margin: 16px 0; padding:24px; } #key-form { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.account-row { display:flex; justify-content:space-between; gap:12px; padding:10px 0; align-items:center; }
#new-api-key { width:100%; } #share-form { display:grid; gap:8px; padding-top:12px; }
#share-panel { padding:12px 0; border-bottom:1px solid #263952; } summary { cursor:pointer; }
.run-status { padding:10px 20px; font-size:12px; color:#88a6bc; border-bottom:1px solid #24354b; }
.message { white-space:normal; } .message-meta { display:flex; gap:12px; align-items:center; margin-bottom:12px; font-size:12px; color:#94a9bd; }
.message-meta time { margin-left:auto; font-size:11px; } .message.user .markdown,.message.system .markdown { white-space:pre-wrap; }
.markdown { line-height:1.7; overflow-wrap:anywhere; } .markdown p { margin:8px 0; } .markdown h2,.markdown h3,.markdown h4 { margin:20px 0 10px; line-height:1.4; }
.markdown ul,.markdown ol { padding-left:24px; } .markdown code { background:#081426; border-radius:4px; padding:2px 5px; }
.code-block { margin:14px 0; border:1px solid #2a415a; border-radius:10px; overflow:hidden; background:#081426; }
.code-bar { padding:6px 12px; display:flex; justify-content:space-between; align-items:center; color:#91a8c1; font-size:12px; }
.code-bar button { padding:4px 10px; font-size:11px; } .code-block pre { padding:14px; margin:0; overflow:auto; white-space:pre; }
.code-block code { padding:0; } .markdown a { color:#5ddbd4; } .markdown blockquote { border-left:3px solid #58b6b4; padding-left:12px; margin-left:0; color:#b5c6d7; }
.table-scroll { overflow:auto; } .markdown table { border-collapse:collapse; width:100%; margin:12px 0; } .markdown th,.markdown td { border:1px solid #314257; padding:8px 12px; text-align:left; }
@media(max-width:700px){.header-actions{flex-wrap:wrap}.message{max-width:100%}.account-row{flex-wrap:wrap}}
@media(max-width:720px){.sidebar{display:block}.workspace{min-height:auto}.chat{min-height:70vh}.file-list{max-height:220px}.header-actions{gap:6px}.header-actions button{padding:0 8px;font-size:12px}.connect{grid-template-columns:minmax(0,1fr)}}

.theme-control{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.theme-control select{width:122px;min-height:35px;font-size:12px}
.experience{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px}.history-panel{padding:16px;min-width:0;align-self:start;position:sticky;top:12px;max-height:calc(100vh - 100px);overflow:auto}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:4px}.history-heading h2{font-size:14px;margin:0}.history-heading button{font-size:10px;padding:0 6px}#history-status{font-size:11px;color:var(--muted);margin-top:12px;line-height:1.6}
.history-item{display:block;width:100%;text-align:left;color:var(--text);background:transparent;padding:12px 8px;border-radius:9px;overflow-wrap:anywhere;font-size:12px;line-height:1.5;margin:4px 0}.history-item small{display:block;color:var(--muted);font-size:10px;margin-top:6px}.history-item:hover{background:#ffffff0c}.history-item.selected{background:#39d4d818;box-shadow:inset 3px 0 var(--cyan)}
.experience .workspace{grid-template-columns:210px minmax(300px,1fr) minmax(230px,.6fr);min-width:0}.experience .workspace.chat-only{grid-template-columns:minmax(0,1fr)}.chat-only>.sidebar,.chat-only>.editor{display:none}.chat-only>.chat{max-width:980px;width:100%;justify-self:center}
.mode-bar{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;border-bottom:1px solid var(--line);gap:12px}.mode-bar [role=tablist]{display:flex;gap:4px;padding:4px;background:#0003;border-radius:12px}.mode-bar [role=tab]{background:transparent;color:var(--muted);min-height:32px;padding:0 15px}.mode-bar [aria-selected=true]{background:var(--cyan);color:#052122}.mode-bar>span{font-size:11px;color:var(--muted)}
:root[data-theme=light]{color-scheme:light;--bg:#f2f6fa;--panel:#ffffffed;--line:#d4dee8;--text:#172c40;--muted:#536c82;--cyan:#087f84;--violet:#6251b9;--danger:#b32145}
[data-theme=light] body{background:radial-gradient(circle at 0 0,#d9f4ef88,transparent 35rem),#f2f6fa;color:var(--text)}[data-theme=light] .card{box-shadow:0 12px 35px #19314b0b}
[data-theme=light] input,[data-theme=light] select,[data-theme=light] textarea{background:#fff;border-color:#bacbd9;color:var(--text)}[data-theme=light] button{background:#d2f1ec;color:#075d60}[data-theme=light] button.ghost,[data-theme=light] .header-actions a{background:#fff;color:#33546e;border-color:var(--line)}
[data-theme=light] .message.assistant{background:#eeecfb}[data-theme=light] .message.user{background:#dff3f0}[data-theme=light] .message.system{background:#f4f7fa;color:#4b6479}[data-theme=light] .message-meta{color:#5d6b83}
[data-theme=light] .code-block,[data-theme=light] .markdown code{background:#f6f8fc;color:#162e44}[data-theme=light] .code-block{border-color:#cbd8e4}[data-theme=light] .code-bar{color:#526d85}[data-theme=light] .markdown th,[data-theme=light] .markdown td{border-color:#c7d3e0}
[data-theme=light] .markdown a{color:#066e8c}[data-theme=light] .markdown blockquote{color:#4e6079}[data-theme=light] .file{background:transparent;color:#29485f}[data-theme=light] .file:hover{background:#e2ecf4}[data-theme=light] .command-note strong{color:#29485f}
[data-theme=light] .run-status,[data-theme=light] #share-panel{border-color:var(--line);color:#526b83}[data-theme=light] .approval{background:#fff7df;border-color:#ddbd61}[data-theme=light] .approval strong,[data-theme=light] .approval pre{color:#634819}
[data-theme=light] .history-item{background:transparent;color:var(--text)}[data-theme=light] .history-item.selected{background:#e0f2ef}[data-theme=light] .mode-bar [role=tablist]{background:#edf2f6}[data-theme=light] .mode-bar [role=tab]{background:transparent;color:#526b83}[data-theme=light] .mode-bar [aria-selected=true]{background:#087f84;color:white}
@media(max-width:1300px){.experience{grid-template-columns:180px minmax(0,1fr)}.experience .workspace{grid-template-columns:200px minmax(280px,1fr)}.experience .editor{display:none}}
@media(max-width:850px){.experience{grid-template-columns:1fr}.history-panel{position:static;max-height:230px}.experience .workspace{grid-template-columns:1fr}.history-heading{justify-content:flex-start;gap:16px}#history-list{display:flex;gap:6px;overflow:auto}.history-item{min-width:150px;max-width:190px}.mode-bar{flex-wrap:wrap}.theme-control select{width:95px}.header-actions{flex-wrap:wrap}.experience .chat{min-height:65vh}}
/* Keep the app inside the viewport; only panel contents can scroll. */
html,body{height:100%;min-height:0;overflow:hidden}
.app{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;padding-bottom:14px;overflow:hidden;position:relative}
.app>header{flex:none;min-width:0}
.app>.experience{flex:1;min-height:0;overflow:hidden;grid-template-rows:minmax(0,1fr)}
.experience .workspace{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
.experience .chat{height:100%;min-height:0;min-width:0;overflow:hidden}
.chat>.mode-bar,.chat>.toolbar,.chat>.run-status,.chat>.composer{flex:none}
.chat>.messages{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.composer textarea{resize:none;min-height:60px;max-height:120px;overflow:auto}
.experience .history-panel{height:100%;max-height:none;min-height:0;position:static;align-self:stretch;display:flex;flex-direction:column;overflow:hidden}
.history-heading,#history-status{flex:none}
#history-list{min-height:0;overflow:auto;overscroll-behavior:contain}
.experience .sidebar{min-height:0;overflow:auto;overscroll-behavior:contain}
.experience .editor{min-height:0}.editor textarea{min-height:0;overflow:auto}
#account-panel{position:absolute;z-index:5;top:70px;left:0;right:0;max-height:calc(100% - 90px);overflow:auto;margin:0}
.connect{min-height:0;overflow:auto;flex-shrink:1}
@media(max-width:850px){
  .app{padding-top:10px;padding-bottom:8px}.app>header{gap:8px;margin-bottom:8px;flex-wrap:wrap}
  .app>.experience{grid-template-rows:auto minmax(0,1fr);gap:8px}
  .experience .history-panel{height:auto;max-height:115px;padding:8px 12px}
  #history-status{margin:4px 0;font-size:10px}#history-list{flex:1}.history-item{margin:0;padding:6px 8px}
  .experience .workspace{grid-template-rows:minmax(0,.4fr) minmax(0,1fr);gap:8px}
  .experience .workspace.chat-only{grid-template-rows:minmax(0,1fr)}
  .experience .sidebar{padding:10px}.experience .chat{min-height:0}
  .mode-bar{padding:6px 10px;gap:4px}.toolbar{padding:6px 10px}.run-status{padding:6px 10px}
  .composer{grid-template-columns:minmax(0,1fr) auto;padding:8px}.composer textarea{min-height:52px;height:60px;padding:8px}
  .messages{padding:10px}.mode-bar>span{display:none}
}

/* Shared selection bar and collapsible side panels. */
.app{width:calc(100% - 28px)}
.agent-controls{display:flex;align-items:center;gap:10px;flex:none;padding:8px 12px;margin-bottom:12px;flex-wrap:wrap}
.agent-controls .mode-bar,.agent-controls .toolbar{border:0;padding:0;gap:8px}
.agent-controls .mode-bar>span{display:none}
.agent-controls .toolbar{flex:1;align-items:center;min-width:230px}
.agent-controls .toolbar>div{display:flex;align-items:center;gap:8px;width:auto;flex:1;max-width:420px}
.agent-controls .toolbar label{white-space:nowrap;margin:0;font-size:12px;color:var(--muted)}
.agent-controls select{min-width:100px;min-height:36px}.agent-controls #clear-button{min-height:36px}
.panel-toggles{display:flex;gap:6px;flex-wrap:wrap}.panel-toggles [aria-pressed=true]{border-color:var(--cyan);color:var(--cyan)}
.app>.experience{display:flex;width:100%;align-self:center;gap:12px;min-width:0}
.experience .history-panel{width:190px;flex:0 0 190px}
.experience .workspace{display:flex;flex:1;min-width:0;gap:12px}
.experience .sidebar{width:210px;flex:0 0 210px}
.experience .editor{display:flex;width:260px;flex:0 0 260px}
.experience .chat{flex:1;min-width:0;max-width:none;width:auto}
.panel-hidden{display:none!important}
.app>.experience.focused-chat{width:80vw;max-width:100%}
@media(max-width:1000px){.experience .history-panel{width:150px;flex-basis:150px}.experience .sidebar{width:170px;flex-basis:170px}.experience .editor{width:190px;flex-basis:190px}}
@media(max-width:850px){
 .agent-controls{gap:6px;padding:6px 8px;margin-bottom:8px}.panel-toggles{gap:4px}.panel-toggles button{min-height:26px;font-size:10px}
 .agent-controls .toolbar{min-width:180px}.agent-controls .toolbar label{display:none}.agent-controls #clear-button{padding:0 8px;font-size:11px}
 .app>.experience{flex-direction:column;gap:8px}.experience .history-panel{width:100%;flex:0 1 auto;max-height:100px}
 .experience .workspace{flex-wrap:wrap;gap:8px;align-content:stretch}
 .experience .sidebar,.experience .editor{flex:1 1 40%;width:auto;height:25%;min-height:0}
 .experience .chat{flex:1 1 100%;height:auto;order:1}
 .app>.experience.focused-chat{width:80vw}
}

.mfa-settings{display:grid;gap:10px;margin-top:18px}.mfa-settings label{display:grid;gap:6px}.mfa-settings img{max-width:100%;height:auto;background:white}.mfa-settings code,.mfa-settings pre{overflow-wrap:anywhere;white-space:pre-wrap}.mfa-settings p{font-size:12px;line-height:1.6;margin:0}.mfa-actions{display:flex;flex-wrap:wrap;gap:8px}.mfa-settings [hidden]{display:none!important}

#security-dialog{width:min(620px,90vw);max-height:85vh;overflow:auto;border:1px solid #64748b;border-radius:14px;padding:24px;background:var(--panel,#182131);color:var(--text,#e5e7eb)}#security-dialog::backdrop{background:#0009}.security-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}#security-dialog .mfa-settings{display:grid;gap:10px}#security-dialog input{width:100%;box-sizing:border-box}


.experience .usage-panel{width:250px;flex:0 0 250px;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.usage-panel h2{font-size:16px}.usage-panel .muted{font-size:12px;line-height:1.6;color:var(--muted);margin:0}.usage-stat{padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.usage-stat p{font-size:12px;line-height:1.6;margin:7px 0}.usage-panel.panel-hidden{display:none!important}#user-menu.hidden{display:none!important}#toggle-user-menu{margin-left:auto;white-space:nowrap}@media(max-width:850px){.experience .usage-panel{width:100%;flex:0 1 auto;max-height:220px}}

#user-header.hidden{display:none!important}.usage-stat progress{width:100%;height:10px;accent-color:var(--cyan)}

.attachment-controls{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.attachment-controls .muted{font-size:11px;color:var(--muted)}#attachment-list{width:100%;max-height:90px;overflow:auto}#attachment-list>div{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:10px}.attachment-controls .error:empty{display:none}.message-attachment{margin-top:12px;border:1px solid var(--line);border-radius:8px;padding:10px}.message-attachment summary{cursor:pointer;overflow-wrap:anywhere}.message-attachment pre{max-height:260px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}

.chat{position:relative}.chat.file-drag-over{outline:2px dashed var(--cyan);outline-offset:-4px}.chat.file-drag-over::after{content:"여기에 파일을 놓아 첨부하세요";position:absolute;inset:10px;z-index:20;display:grid;place-items:center;border-radius:12px;background:var(--panel);color:var(--text);font-size:18px;font-weight:700;pointer-events:none;border:2px dashed var(--cyan)}

#team-dialog{width:min(720px,94vw);max-height:85vh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:24px}#team-dialog::backdrop{background:#0009}.team-role{border:1px solid var(--line);border-radius:10px;padding:12px;margin:12px 0;display:grid;gap:8px}.team-role label{display:grid;gap:5px}.team-role input:not([type=checkbox]),.team-role select,.team-role textarea{width:100%}#team-summary{font-size:12px;overflow-wrap:anywhere}#team-dialog p{font-size:13px;line-height:1.6}

/* Gemini-inspired simple view. Detailed layout and its preferences remain intact. */
.simple-only{display:none!important}
body.simple-mode{background:#131314;--panel:#1e1f20;--text:#e3e3e3;--muted:#a8a9ae;--line:#454746;--cyan:#a8c7fa}
[data-theme=light] body.simple-mode{background:#fff;--panel:#f0f4f9;--text:#1f1f1f;--muted:#5f6368;--line:#d9dce1;--cyan:#0b57d0}
.simple-mode .app{width:100%;max-width:none;padding:14px 24px 20px}
.simple-mode .simple-only{display:block!important}
.simple-mode #agent-controls{border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;padding:0;gap:12px;min-height:48px;margin-bottom:12px}
.simple-mode #agent-controls .panel-toggles,.simple-mode #agent-controls .toolbar label,.simple-mode #toggle-user-menu{display:none!important}
.simple-mode .simple-brand{font-size:21px;font-weight:500;margin-right:8px}
.simple-mode #agent-controls .toolbar{min-width:160px;flex:1}.simple-mode #agent-controls .toolbar>div{max-width:260px}
.simple-mode #agent-controls select{background:transparent;border:0;color:var(--text);font-size:14px}
.simple-mode button.ghost{background:transparent;border-color:transparent;color:var(--text);font-weight:500;border-radius:24px}
.simple-mode button.ghost:hover{background:var(--panel)}
.simple-mode .mode-bar [role=tablist]{background:var(--panel);border-radius:24px}.simple-mode .mode-bar [role=tab]{border-radius:24px;font-weight:500}.simple-mode .mode-bar [aria-selected=true]{background:#a8c7fa;color:#062e6f}
.simple-mode #user-header,.simple-mode #history-panel,.simple-mode #project-tools,.simple-mode #file-preview,.simple-mode #usage-panel{display:none!important}
.simple-mode .app>.experience,.simple-mode .app>.experience.focused-chat{width:100%;gap:0;flex-direction:row}
.simple-mode .experience .workspace{display:flex;flex-wrap:nowrap;gap:0;height:100%}
.simple-mode .experience .chat{border:0;box-shadow:none;background:transparent;backdrop-filter:none;height:100%;width:100%;max-width:860px;margin:auto;flex:1}
.simple-mode .run-status{border:0;padding:4px 20px;font-size:11px;min-height:24px;color:var(--muted)}
.simple-mode .messages{padding:24px 20px;scrollbar-width:thin}
.simple-mode .message{line-height:1.8;font-size:15px;margin-bottom:28px}
.simple-mode .message.assistant{background:transparent;max-width:100%;padding:8px 0}
.simple-mode .message.user{background:var(--panel);border-radius:24px;padding:14px 22px;max-width:85%;width:fit-content}
.simple-mode .message-meta{color:var(--muted);font-size:11px}.simple-mode .message.user .message-meta{display:none}
.simple-mode .composer{border:1px solid var(--line);border-radius:28px;background:var(--panel);padding:16px 20px;gap:8px;margin:8px 12px 0;grid-template-columns:1fr auto}
.simple-mode .composer textarea{grid-column:1/-1;grid-row:1;background:transparent;border:0;box-shadow:none;color:var(--text);font-size:16px;min-height:64px;height:72px;padding:8px 0}
.simple-mode .attachment-controls{grid-column:1;grid-row:2;min-width:0}.simple-mode .attachment-controls>.muted{display:none}.simple-mode #attach-button{border-radius:50px;font-weight:500}.simple-mode #attachment-list:empty{display:none}
.simple-mode #send-button{grid-row:2;grid-column:2;border-radius:24px;background:#a8c7fa;color:#062e6f;min-width:60px;align-self:end}
.simple-mode #simple-welcome{display:none!important}.simple-mode .chat:has(#messages:empty) #simple-welcome{display:flex!important;flex:1;min-height:0;overflow:auto;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:24px}
.simple-mode .chat:has(#messages:empty) #messages{display:none}.simple-mode #simple-welcome>span{font-size:40px;color:#82b4ff}.simple-mode #simple-welcome h2{font-size:clamp(24px,3.5vw,40px);font-weight:500;letter-spacing:-1px;margin:16px 0;background:linear-gradient(90deg,#82b4ff,#b8a0ee,#e6a7a7);background-clip:text;color:transparent}.simple-mode #simple-welcome p{color:var(--muted);font-size:14px}.simple-mode #simple-welcome>div{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:24px}.simple-mode [data-suggestion]{background:transparent;border:1px solid var(--line);color:var(--text);font-weight:400;border-radius:24px}
.simple-mode.simple-history-open #history-panel{display:flex!important;position:absolute;z-index:10;left:12px;top:78px;bottom:16px;width:280px;height:auto;max-height:none;flex-direction:column;background:var(--panel);border:0;border-radius:20px;padding:20px;box-shadow:0 10px 40px #0003}.simple-mode #history-list{display:block}.simple-mode .history-item{min-width:0;max-width:none;font-size:13px}.simple-mode .history-item.selected{background:#a8c7fa20;box-shadow:none;border-radius:24px}
.simple-mode.simple-account-open #user-header,.simple-mode.simple-account-open #user-header.hidden{display:flex!important;position:absolute;z-index:12;right:20px;top:78px;background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:20px;max-width:340px;flex-wrap:wrap}.simple-mode #user-header>div:first-child{display:none}.simple-mode #user-menu,.simple-mode #user-menu.hidden{display:flex!important;flex-wrap:wrap;gap:12px}
.simple-mode.simple-project-open #project-tools{display:block!important;position:absolute;z-index:10;right:12px;top:78px;bottom:16px;width:300px;height:auto;max-height:none;overflow:auto;background:var(--panel);border-radius:20px;box-shadow:0 10px 40px #0003}.simple-mode:has(#mode-chat[aria-selected=true]) #simple-project{display:none!important}
@media(max-width:700px){.simple-mode .app{padding:8px 8px 12px}.simple-mode #agent-controls{gap:4px;flex-wrap:wrap}.simple-mode .simple-brand{font-size:17px}.simple-mode #agent-controls button{font-size:12px;padding:0 10px;min-height:34px}.simple-mode #agent-controls .toolbar{order:2;flex-basis:100%;min-width:0}.simple-mode .experience .chat{height:100%;order:0}.simple-mode .composer{margin:4px 0 0;padding:12px 16px}.simple-mode .messages{padding:12px 8px}.simple-mode #simple-welcome{padding:12px}.simple-mode #simple-welcome>div{margin-top:8px}.simple-mode.simple-history-open #history-panel,.simple-mode.simple-project-open #project-tools,.simple-mode.simple-account-open #user-header{top:108px;max-width:calc(100vw - 24px)}}

/* Attachment previews share the picker, paste and drop pipeline. */
#attachment-list{display:flex;gap:10px;max-height:160px;overflow:auto;padding:5px 2px;width:100%;flex-basis:100%;scrollbar-width:thin}
#attachment-list:empty{display:none}
#attachment-list>.attachment-tile{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex:0 0 112px;min-width:0;gap:3px;border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:7px;color:var(--text)}
.attachment-thumbnail{display:block;width:96px;height:72px;object-fit:cover;border-radius:8px;background:#8882}
.attachment-file-icon{height:72px;display:grid;place-items:center;font-size:32px;background:#8881;border-radius:8px}
.attachment-filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.attachment-tile small{font-size:10px;color:var(--muted)}
#attachment-list .attachment-remove{position:absolute;right:2px;top:2px;width:26px;height:26px;min-height:26px;padding:0;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--text);font-size:19px;line-height:1}
#attachment-list .attachment-remove:hover{background:var(--danger);color:white}
.sent-image-thumbnail{display:block;max-height:240px;max-width:100%;width:auto;object-fit:contain;border-radius:12px;margin:10px 0}
.image-attachment{width:fit-content;max-width:100%}.image-attachment summary{font-size:12px}

@media(max-height:650px){#attachment-list{max-height:125px}.attachment-thumbnail,.attachment-file-icon{height:48px}}

/* Use 80% of the viewport for the conversation and its composer. */
.simple-mode .experience .chat{width:80vw;max-width:80vw;flex:0 1 80vw}
.simple-mode .message.assistant{width:100%;max-width:100%}
.simple-mode #simple-usage{font-size:12px;line-height:1.5;color:var(--muted);padding:6px 12px;border-radius:20px;background:var(--panel);max-width:440px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.simple-mode .experience .chat{width:100%;max-width:100%;flex:1}.simple-mode #simple-usage{order:3;width:100%;max-width:none;padding:4px 10px;font-size:11px}.simple-mode.simple-history-open #history-panel,.simple-mode.simple-project-open #project-tools,.simple-mode.simple-account-open #user-header{top:150px}}

/* Simple view scrolls with the document; the composer stays within reach. */
.attach-plus{display:none}
html:has(body.simple-mode){height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;scroll-padding-bottom:var(--composer-space,120px)}
body.simple-mode{height:auto;min-height:100dvh;overflow:visible}
.simple-mode .app{height:auto;min-height:100dvh;overflow:visible;padding-bottom:var(--composer-space,120px)}
.simple-mode #agent-controls{position:sticky;top:0;z-index:8;background:var(--bg);padding:8px 0;margin-top:-8px}
body.simple-mode{--bg:#131314}[data-theme=light] body.simple-mode{--bg:#fff}
.simple-mode .app>.experience,.simple-mode .experience .workspace{overflow:visible;min-height:0;height:auto;flex:1}
.simple-mode .experience .chat{overflow:visible;min-height:0;height:auto;align-self:stretch;margin:0 auto}
.simple-mode .chat>.messages{overflow:visible;flex:none;min-height:0;height:auto;overscroll-behavior:auto}
.simple-mode .chat:has(#messages:empty) #simple-welcome{overflow:visible;min-height:45vh;flex:none}
.simple-mode .composer{position:fixed;z-index:9;left:50%;bottom:16px;transform:translateX(-50%);width:50vw;max-width:calc(100vw - 32px);margin:0;padding:12px 14px;grid-template-columns:36px minmax(0,1fr) auto;gap:8px;align-items:end;box-shadow:0 8px 32px #0002}
.simple-mode .composer #prompt{grid-column:2;grid-row:1;min-height:28px;max-height:200px;height:28px;line-height:28px;padding:0;align-self:center;resize:none}
.simple-mode .composer .attachment-controls{display:contents}
.simple-mode .composer #attach-button{grid-column:1;grid-row:1;width:36px;height:36px;min-height:36px;padding:0;display:grid;place-items:center;align-self:end}
.simple-mode .attach-plus{display:block;font-size:28px;line-height:1;font-weight:300}.simple-mode .attach-label{display:none}
.simple-mode .composer #send-button{grid-row:1;grid-column:3;min-height:36px;height:36px;min-width:52px;padding:0 12px}
.simple-mode .composer #attachment-list{grid-row:2;grid-column:1/-1;max-height:150px}.simple-mode .composer #attachment-error{grid-row:3;grid-column:1/-1;margin:0}
.simple-mode #simple-history svg{display:block}
.simple-mode.simple-history-open #history-panel,.simple-mode.simple-project-open #project-tools,.simple-mode.simple-account-open #user-header,.simple-mode.simple-account-open #user-header.hidden{position:fixed;z-index:12}
.simple-mode #account-panel{position:fixed;z-index:13;top:80px;left:20px;right:20px;max-height:calc(100dvh - 100px)}
@media(max-width:900px){.simple-mode .composer{width:calc(100vw - 32px)}}
@media(max-width:700px){.simple-mode .composer{bottom:10px;max-width:calc(100vw - 20px);width:calc(100vw - 20px);padding:10px}.simple-mode .experience .chat{width:100%;max-width:100%}.simple-mode #agent-controls{padding-top:8px}.simple-mode .chat:has(#messages:empty) #simple-welcome{min-height:40vh}}

/* A persistent off-canvas panel animates in both directions. */
.simple-mode #history-panel,.simple-mode.simple-history-open #history-panel{display:flex!important;position:fixed;z-index:20;inset:0 auto 0 0;width:280px;max-width:85vw;height:100dvh;max-height:none;padding:20px 16px;border:0;border-radius:0;background:var(--panel);transform:translateX(-100%);visibility:hidden;pointer-events:none;box-shadow:none;transition:transform 240ms cubic-bezier(.2,.8,.2,1),visibility 240ms;overflow:hidden}
.simple-mode.simple-history-open #history-panel{transform:translateX(0);visibility:visible;pointer-events:auto;box-shadow:12px 0 36px #0002}
.simple-mode #history-panel .history-heading{justify-content:flex-start;gap:10px}.simple-mode #slide-close{font-size:28px;width:32px;min-height:32px;padding:0}.simple-mode #history-panel #new-conversation{margin-left:auto}.simple-mode #history-list{overflow:auto;flex:1}
/* Match the conversation column to the fixed composer width. */
.simple-mode .experience .chat{width:50vw;max-width:50vw;flex:0 1 50vw}
.simple-mode .chat>.messages{padding:24px 0}.simple-mode .run-status{padding-left:0;padding-right:0}
.simple-mode .message.assistant{margin:0 0 32px;padding:0;background:transparent;border:0;white-space:normal;font-size:16px;line-height:1.8}
.simple-mode .message.assistant .message-meta{margin-bottom:12px;font-size:12px;font-weight:500}.simple-mode .message.assistant .message-meta time{display:none}
.simple-mode .message.assistant .markdown{white-space:normal;line-height:1.8;letter-spacing:.005em}
.simple-mode .markdown p{margin:0 0 1em}.simple-mode .markdown p:last-child{margin-bottom:0}.simple-mode .markdown h2,.simple-mode .markdown h3,.simple-mode .markdown h4{font-weight:650;letter-spacing:-.02em;line-height:1.4;margin:1.5em 0 .65em}.simple-mode .markdown h2{font-size:1.5em}.simple-mode .markdown h3{font-size:1.25em}.simple-mode .markdown h4{font-size:1.1em}
.simple-mode .markdown ul,.simple-mode .markdown ol{margin:0 0 1.25em;padding-left:1.6em}.simple-mode .markdown li{padding-left:.3em;margin:.35em 0}.simple-mode .markdown strong{font-weight:650}
.simple-mode .markdown code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.88em;background:var(--panel);color:var(--text);padding:.15em .35em;border-radius:5px}
.simple-mode .code-block{border:1px solid var(--line);background:var(--panel);border-radius:14px;margin:20px 0}.simple-mode .code-bar{padding:9px 14px;color:var(--muted);background:#8881}.simple-mode .code-bar button{background:transparent;color:var(--text);font-weight:400;min-height:26px}.simple-mode .code-block pre{font-size:14px;line-height:1.65;padding:18px}.simple-mode .code-block code{padding:0;background:transparent}
.simple-mode .markdown blockquote{border-left:3px solid var(--line);color:var(--muted);margin:1.2em 0;padding:0 1em}.simple-mode .markdown th,.simple-mode .markdown td{border:0;border-bottom:1px solid var(--line);padding:12px 16px;line-height:1.6}.simple-mode .markdown th{font-weight:600;background:var(--panel)}.simple-mode .table-scroll{border:1px solid var(--line);border-radius:12px;margin:20px 0}.simple-mode .markdown table{margin:0}
#thinking-indicator{display:flex;align-items:center;gap:12px;padding:12px 20px 24px;color:var(--muted);font-size:13px;flex:none}#thinking-indicator[hidden]{display:none!important}.simple-mode #thinking-indicator{padding-left:0}
.thinking-dots{display:inline-flex;align-items:center;gap:5px;height:20px}.thinking-dots i{width:7px;height:7px;border-radius:50%;background:currentColor;animation:thinking-bounce 1.2s ease-in-out infinite}.thinking-dots i:nth-child(2){animation-delay:.16s}.thinking-dots i:nth-child(3){animation-delay:.32s}
@keyframes thinking-bounce{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}
@media(prefers-reduced-motion:reduce){.simple-mode #history-panel{transition:none}.thinking-dots i{animation:none;opacity:.7}}
@media(max-width:900px){.simple-mode .experience .chat{width:calc(100vw - 32px);max-width:calc(100vw - 32px);flex:0 1 calc(100vw - 32px)}}
@media(max-width:700px){.simple-mode .experience .chat{width:calc(100vw - 20px);max-width:calc(100vw - 20px);flex:0 1 calc(100vw - 20px)}.simple-mode .message.assistant{font-size:15px}.simple-mode #history-panel,.simple-mode.simple-history-open #history-panel{top:0}}
/* Desktop off-canvas navigation reserves space instead of covering the chat. */
@media(min-width:901px){
 body.simple-mode{--navigation-width:0px}
 body.simple-mode.simple-history-open{--navigation-width:280px}
 .simple-mode .app{width:calc(100% - var(--navigation-width));margin-left:var(--navigation-width);margin-right:0;transition:width 240ms cubic-bezier(.2,.8,.2,1),margin-left 240ms cubic-bezier(.2,.8,.2,1)}
 .simple-mode .composer{left:calc(50% + var(--navigation-width)/2);width:min(50vw,calc(100vw - var(--navigation-width) - 48px));transition:left 240ms cubic-bezier(.2,.8,.2,1),width 240ms cubic-bezier(.2,.8,.2,1)}
 .simple-mode .experience .chat{width:min(50vw,calc(100vw - var(--navigation-width) - 48px));max-width:min(50vw,calc(100vw - var(--navigation-width) - 48px));flex-basis:min(50vw,calc(100vw - var(--navigation-width) - 48px))}
 .simple-mode.simple-history-open #history-panel{box-shadow:none;border-right:1px solid var(--line)}
}
@media(prefers-reduced-motion:reduce){.simple-mode .app,.simple-mode .composer{transition:none}}

/* Reserve the navigation column at every viewport size, including narrow windows. */
body.simple-mode{--sidebar-size:min(260px,42vw);--navigation-width:0px;--content-space:calc(100vw - var(--navigation-width));--chat-width:min(50vw,calc(var(--content-space) - 48px))}
body.simple-mode.simple-history-open{--navigation-width:var(--sidebar-size)}
.simple-mode .app{width:calc(100% - var(--navigation-width));margin-left:var(--navigation-width);margin-right:0;padding-left:16px;padding-right:16px;transition:width 240ms cubic-bezier(.2,.8,.2,1),margin-left 240ms cubic-bezier(.2,.8,.2,1)}
.simple-mode .composer{left:calc(50% + var(--navigation-width)/2);width:var(--chat-width);max-width:var(--chat-width);transition:left 240ms cubic-bezier(.2,.8,.2,1),width 240ms cubic-bezier(.2,.8,.2,1)}
.simple-mode .experience .chat{width:var(--chat-width);max-width:var(--chat-width);flex:0 1 var(--chat-width)}
.simple-mode #history-panel,.simple-mode.simple-history-open #history-panel{width:var(--sidebar-size);max-width:var(--sidebar-size);padding:16px 12px;border-right:1px solid var(--line);box-shadow:none;background:var(--panel)}
.simple-mode #history-panel .history-heading{display:grid;grid-template-columns:1fr 32px;gap:16px 8px;align-items:center}
.simple-mode .sidebar-brand{font-size:19px;letter-spacing:-.3px;font-weight:650}.simple-mode #slide-close{grid-column:2;grid-row:1}
.simple-mode #history-panel #new-conversation{grid-column:1/-1;grid-row:2;margin:0;text-align:left;font-size:15px;min-height:42px;padding:8px 12px;border-radius:10px;background:#8882}
.simple-mode #history-panel .history-heading h2{grid-column:1/-1;grid-row:3;color:var(--muted);font-size:13px;font-weight:500;margin-top:8px}
.simple-mode #history-status{font-size:12px;margin:8px 8px 12px;line-height:1.6}
.simple-mode #history-panel .history-item{font-size:16px;font-weight:500;line-height:1.55;padding:12px 10px;margin:3px 0;border-radius:10px;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.simple-mode #history-panel .history-item small{font-size:12px;font-weight:400;margin-top:4px}.simple-mode #history-panel .history-item:hover{background:#8882}
@media(max-width:900px){body.simple-mode{--chat-width:calc(var(--content-space) - 24px)}.simple-mode .app{padding-left:8px;padding-right:8px}.simple-mode #agent-controls .toolbar{min-width:0;flex-basis:100%}.simple-mode #agent-controls .toolbar>div{min-width:0;max-width:100%}.simple-mode #agent-controls select{min-width:0}.simple-mode #simple-usage{max-width:100%}}
@media(max-width:500px){.simple-mode #history-panel,.simple-mode.simple-history-open #history-panel{padding:12px 8px}.simple-mode .sidebar-brand{font-size:16px}.simple-mode #history-panel .history-item{font-size:15px;padding:10px 6px}.simple-mode .composer{padding:8px;gap:4px;grid-template-columns:28px minmax(0,1fr) auto}.simple-mode .composer #attach-button{width:28px}.simple-mode .composer #send-button{min-width:38px;padding:0 6px;font-size:11px}.simple-mode #simple-welcome{padding:12px 0}}
@media(prefers-reduced-motion:reduce){.simple-mode .app,.simple-mode .composer{transition:none}}

/* Keep navigation inside the workspace without changing the main column. */
body.simple-mode,body.simple-mode.simple-history-open{--navigation-width:0px;--content-space:100vw;--chat-width:50vw}
.simple-mode .app,.simple-mode.simple-history-open .app{width:100%;margin-left:0;margin-right:0;transition:none}
.simple-mode .experience .workspace{position:relative;isolation:isolate;min-height:max(220px,calc(100dvh - var(--workspace-top,90px) - var(--composer-space,110px)));overflow:visible}
.simple-mode .composer,.simple-mode.simple-history-open .composer{left:50%;width:var(--chat-width);max-width:var(--chat-width);transition:none}
.simple-mode .experience .chat{width:var(--chat-width);max-width:var(--chat-width);flex:0 0 var(--chat-width)}
.simple-mode #workspace>#history-panel,.simple-mode.simple-history-open #workspace>#history-panel{position:absolute;inset:0 auto auto 0;top:0;left:0;bottom:auto;height:100%;max-height:calc(100dvh - var(--workspace-top,90px) - 16px);width:var(--sidebar-size);max-width:var(--sidebar-size);z-index:10;border-radius:12px;border:1px solid var(--line);transform:translateX(-105%);visibility:hidden;pointer-events:none;transition:transform 240ms cubic-bezier(.2,.8,.2,1),visibility 240ms}
.simple-mode.simple-history-open #workspace>#history-panel{transform:translateX(0);visibility:visible;pointer-events:auto}
@media(max-width:900px){body.simple-mode,body.simple-mode.simple-history-open{--chat-width:calc(100vw - 24px)}}
@media(max-width:700px){body.simple-mode,body.simple-mode.simple-history-open{--chat-width:calc(100vw - 20px)}}
@media(prefers-reduced-motion:reduce){.simple-mode #workspace>#history-panel{transition:none}}

/* Fixed workspace navigation; only the lower conversation container shifts. */
body.simple-mode{--navigation-width:0px;--sidebar-size:260px;--chat-width:min(50vw,calc(100vw - var(--navigation-width) - 48px));--sidebar-bg:#171717;--bg:#212121;background:var(--bg);--panel:#303030;--line:#ffffff16;--text:#ececec;--muted:#a5a5a5}
body.simple-mode.simple-history-open{--navigation-width:276px;--chat-width:min(50vw,calc(100vw - var(--navigation-width) - 48px))}
[data-theme=light] body.simple-mode{--sidebar-bg:#f9f9f9;--bg:#fff;--panel:#f4f4f4;--line:#00000012;--text:#202123;--muted:#6b6b6b;background:var(--bg)}
.simple-mode .experience .workspace{box-sizing:border-box;padding-left:var(--navigation-width);transition:padding-left 240ms cubic-bezier(.2,.8,.2,1)}
.simple-mode .composer,.simple-mode.simple-history-open .composer{left:calc(50% + var(--navigation-width)/2);width:var(--chat-width);max-width:var(--chat-width);transition:left 240ms cubic-bezier(.2,.8,.2,1),width 240ms cubic-bezier(.2,.8,.2,1)}
.simple-mode .experience .chat{width:var(--chat-width);max-width:var(--chat-width);flex:0 0 var(--chat-width);transition:width 240ms cubic-bezier(.2,.8,.2,1)}
.simple-mode #workspace>#history-panel,.simple-mode.simple-history-open #workspace>#history-panel{position:fixed;top:var(--sidebar-top,80px);bottom:12px;left:12px;height:auto;max-height:none;width:var(--sidebar-size);max-width:var(--sidebar-size);border:0;border-right:1px solid var(--line);border-radius:12px;background:var(--sidebar-bg);padding:14px 10px;box-shadow:none;overflow:hidden}
.simple-mode #history-panel .history-heading{gap:14px 8px}.simple-mode .sidebar-brand{font-size:17px;font-weight:600;letter-spacing:-.2px}.simple-mode #history-panel #new-conversation{background:transparent;border:1px solid var(--line);font-weight:500;font-size:15px;min-height:42px}.simple-mode #history-panel #new-conversation:hover{background:#8882}
.simple-mode #history-panel .history-item{font-size:16px;line-height:1.5;padding:11px 10px;margin:2px 0;border-radius:9px;font-weight:400}.simple-mode #history-panel .history-item.selected{background:#8882;box-shadow:none}.simple-mode #history-panel .history-item small{font-size:12px;color:var(--muted)}
.simple-mode #history-status{font-size:11px;opacity:.85}.simple-mode #history-list{scrollbar-width:thin;scrollbar-color:#8886 transparent;padding-right:2px}
@media(max-width:900px){body.simple-mode,body.simple-mode.simple-history-open{--sidebar-size:min(240px,40vw);--chat-width:calc(100vw - var(--navigation-width) - 24px)}body.simple-mode.simple-history-open{--navigation-width:calc(var(--sidebar-size) + 12px)}.simple-mode #workspace>#history-panel,.simple-mode.simple-history-open #workspace>#history-panel{left:4px}}
@media(prefers-reduced-motion:reduce){.simple-mode .experience .workspace,.simple-mode .experience .chat,.simple-mode .composer{transition:none}}

/* The requested sidebar gradient is shared by light and dark themes. */
.simple-mode #workspace>#history-panel,.simple-mode.simple-history-open #workspace>#history-panel{background:linear-gradient(to bottom, #8a2be2, #120d21);color:#fff;--text:#fff;--muted:#e2d6f1;--line:#ffffff30}
.simple-mode #history-panel .sidebar-brand,.simple-mode #history-panel .history-item,.simple-mode #history-panel button.ghost{color:#fff}
.simple-mode #history-panel .history-heading h2,.simple-mode #history-panel #history-status,.simple-mode #history-panel .history-item small{color:#e2d6f1}
.simple-mode #history-panel #new-conversation{background:#ffffff0f;border-color:#ffffff30}.simple-mode #history-panel .history-item.selected,.simple-mode #history-panel .history-item:hover,.simple-mode #history-panel #new-conversation:hover{background:#ffffff20}
/* Account security dialog: scoped to the web agent. */
#security-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--line);border-radius:22px;background:var(--bg);box-shadow:0 24px 90px #0006;scrollbar-width:thin;scrollbar-color:#8886 transparent;overscroll-behavior:contain}
#security-dialog::backdrop{background:#080b146b;backdrop-filter:blur(5px)}
#security-dialog .security-heading{position:sticky;top:0;z-index:2;margin:0;padding:22px 28px;background:var(--bg);border-bottom:1px solid var(--line);align-items:center}
#security-dialog .security-heading h2{font-size:21px;letter-spacing:-.5px;margin:0 0 5px;font-weight:700}
#security-dialog .security-heading p{font-size:13px;color:var(--muted);margin:0;line-height:1.5}
#security-dialog #security-close{flex:none;min-height:36px;padding:0 14px;border-radius:10px;font-size:13px;color:var(--text);background:var(--panel);font-weight:500}
#security-dialog>section.mfa-settings{margin:20px 24px;padding:24px;gap:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel);min-width:0}
#security-dialog section h2{font-size:16px;line-height:1.5;letter-spacing:-.3px;margin:0;font-weight:650}
#security-dialog section h3{font-size:15px;margin:0;font-weight:650}
#security-dialog .mfa-settings p{font-size:13px;line-height:1.65;color:var(--muted)}
#security-dialog .mfa-settings label{gap:8px;font-size:13px;font-weight:550;color:var(--text);min-width:0}
#security-dialog input{height:44px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:0 13px;background:var(--bg);color:var(--text);font-size:14px;font-weight:400}
#security-dialog input::placeholder{color:var(--muted);opacity:.8}
#security-dialog input:focus-visible{border-color:var(--violet);box-shadow:0 0 0 3px #8b7cff22}
#security-dialog button{font-size:13px;font-weight:600;min-height:40px;padding:9px 16px;line-height:1.5;justify-self:start;max-width:100%;white-space:normal}
#security-dialog button:focus-visible{outline:2px solid var(--violet);outline-offset:3px}
#security-dialog #password-change-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px;margin:4px 0 0}
#security-dialog #password-change-form>label:first-child,#security-dialog #password-change-form>label:nth-child(4){grid-column:1/-1}
#security-dialog #password-change-submit{grid-column:1/-1;justify-self:end;margin-top:2px}
#security-dialog .error{grid-column:1/-1;color:var(--danger);min-height:0}
#security-dialog .error:empty{display:none}
#security-dialog [data-status]{justify-self:start;border:1px solid var(--line);background:var(--bg);padding:5px 10px;border-radius:8px;font-size:12px;color:var(--text)}
#security-dialog .mfa-actions{gap:10px;padding-top:4px}
#security-dialog [data-disable],#security-dialog [data-revoke-devices]{color:var(--danger);border:1px solid var(--line);background:transparent}
#security-dialog [data-regenerate],#security-dialog [data-download]{color:var(--text);border:1px solid var(--line);background:var(--bg)}
#security-dialog [data-enrollment],#security-dialog [data-recovery]{padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--bg);display:grid;gap:12px;min-width:0}
#security-dialog [data-qr]{width:200px;height:200px;padding:8px;border-radius:12px;justify-self:center}
#security-dialog code,#security-dialog pre{font-size:13px;line-height:1.7;max-width:100%;overflow-wrap:anywhere;margin:0}
#security-dialog #user-mfa>section{display:grid;gap:12px;margin-top:8px;padding-top:22px;border-top:1px solid var(--line);min-width:0}
#security-dialog [data-devices]{list-style:none;margin:0;padding:0;display:grid;gap:8px}
#security-dialog [data-devices] li{padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font-size:12px;line-height:1.7;overflow-wrap:anywhere;color:var(--text)}
#security-dialog [data-devices]:empty::after{content:'등록된 신뢰 기기가 없습니다.';padding:16px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:13px;text-align:center}
@media(max-width:560px){#security-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:16px}#security-dialog .security-heading{padding:18px}#security-dialog>section.mfa-settings{margin:14px 12px;padding:18px;gap:14px}#security-dialog #password-change-form{grid-template-columns:minmax(0,1fr)}#security-dialog #password-change-submit{justify-self:stretch}#security-dialog .mfa-actions{display:grid;grid-template-columns:1fr}#security-dialog .mfa-actions button{width:100%}}

/* Readable assistant answers and compact source references. */
.message.assistant .markdown{font-weight:400;line-height:1.85;letter-spacing:0;word-break:normal;overflow-wrap:anywhere}
.message.assistant .markdown p{margin:0 0 1.15em}
.message.assistant .markdown strong{font-weight:600}
.message.assistant .markdown h2,.message.assistant .markdown h3,.message.assistant .markdown h4{font-weight:650;line-height:1.45;margin:1.6em 0 .75em;letter-spacing:-.02em}
.message.assistant .markdown h2{font-size:1.35em}.message.assistant .markdown h3{font-size:1.18em}
.message.assistant .markdown ul,.message.assistant .markdown ol{margin:.6em 0 1.25em;padding-left:1.5em}
.message.assistant .markdown li{padding-left:.25em;margin:.6em 0}
.markdown hr{height:0;border:0;border-top:1px solid var(--line,#80808040);margin:1.7em 0}
.markdown a.citation{display:inline-flex;align-items:center;justify-content:center;vertical-align:baseline;min-width:22px;height:20px;padding:0 6px;margin:0 3px;border:1px solid var(--line,#80808040);border-radius:6px;background:#8882;color:inherit;text-decoration:none;font-size:11px;font-weight:500;line-height:1;white-space:nowrap}
.markdown a.citation:hover{background:#8884;text-decoration:none}.markdown a.citation:focus-visible{outline:2px solid var(--cyan,#39d4d8);outline-offset:2px}
.message.assistant .markdown>:first-child{margin-top:0}.message.assistant .markdown>:last-child{margin-bottom:0}
.message.assistant .markdown td{vertical-align:top;font-weight:400;line-height:1.75}.message.assistant .markdown th{vertical-align:top;line-height:1.6}.message.assistant .markdown td em{color:var(--muted);font-size:.94em}

/* The sign-in page has its own light palette; account themes stay unchanged. */
html:has(#connect-panel:not(.hidden)){height:auto;min-height:100%;overflow-y:auto;color-scheme:light}
body:has(#connect-panel:not(.hidden)){height:auto;min-height:100dvh;overflow:auto;background:radial-gradient(ellipse at 10% 10%,#e2f4ee 0,transparent 45%),radial-gradient(ellipse at 95% 90%,#ede9fa 0,transparent 40%),#f7f9fc;color:#203b3a;--text:#203b3a;--muted:#687b7c;--danger:#b42338;color-scheme:light}
body:has(#connect-panel:not(.hidden)) .app{width:min(1180px,calc(100% - 64px));height:auto;min-height:100dvh;padding:30px 0 40px;overflow:visible;display:flex;flex-direction:column}
body:has(#connect-panel:not(.hidden)) #user-header{display:flex!important;position:static;margin:0 0 32px;padding:0;flex-shrink:0;background:none;border:0;box-shadow:none}
body:has(#connect-panel:not(.hidden)) #user-header h1{font-size:22px;letter-spacing:-.8px;color:#163e3b}
body:has(#connect-panel:not(.hidden)) #user-header .eyebrow{color:#537975;font-size:9px;letter-spacing:2px;margin-bottom:5px}
body:has(#connect-panel:not(.hidden)) #toggle-user-menu,body:has(#connect-panel:not(.hidden)) #connection{display:none}
body:has(#connect-panel:not(.hidden)) #user-menu{display:flex!important}
body:has(#connect-panel:not(.hidden)) #user-menu a{color:#4c6665;font-size:13px;background:#ffffffa3;border:1px solid #dce7e5;border-radius:999px;padding:9px 17px}
body:has(#connect-panel:not(.hidden)) #user-menu a:hover{background:#fff;border-color:#7ca69e}
#connect-panel{width:100%;max-width:1030px;grid-template-columns:1.05fr 1fr;gap:0;padding:0;margin:auto;overflow:hidden;border:1px solid #fff;border-radius:28px;background:#fff;box-shadow:0 24px 80px #244d4510,0 2px 8px #244d4505;backdrop-filter:none;flex-shrink:0}
#connect-panel .login-story{position:relative;display:flex;flex-direction:column;min-width:0;padding:48px 40px 32px;background:linear-gradient(145deg,#e1f3eb,#eff6f1 58%,#e6eef7);overflow:hidden}
#connect-panel .login-badge{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:8px 12px;border:1px solid #ffffffb3;border-radius:999px;background:#ffffff70;color:#416a60;font-size:10px;font-weight:700;letter-spacing:1.5px}
#connect-panel .login-badge>span{font-size:16px;line-height:1}
#connect-panel .login-story h2{font-size:clamp(28px,3vw,38px);font-weight:750;letter-spacing:-1.8px;line-height:1.42;margin:28px 0 17px;color:#1e4842;word-break:keep-all}
#connect-panel .login-story h2>span{color:#62a496}
#connect-panel .login-story p{color:#58766c;font-size:14px;line-height:1.9;word-break:keep-all}
#connect-panel .login-art{position:relative;min-height:200px;flex:1;margin:12px 0;display:grid;place-items:center}
#connect-panel .login-orbit{position:absolute;width:210px;height:210px;border:1px solid #b6d4c766;border-radius:50%}
#connect-panel .orbit-two{width:150px;height:150px;border-style:dashed;transform:rotate(24deg)}
#connect-panel .login-art-core{display:grid;place-items:center;width:95px;height:95px;border-radius:28px;transform:rotate(-9deg);font-size:58px;color:#397e6f;background:linear-gradient(140deg,#fff,#d6e9e0);box-shadow:10px 18px 32px #38624f15,inset 0 0 0 1px #fff}
#connect-panel .login-art-note{position:absolute;display:flex;align-items:center;gap:10px;padding:12px 15px;border:1px solid #fff;border-radius:13px;background:#ffffffdf;box-shadow:0 8px 24px #3456460b;color:#4b6c64;font-size:12px;white-space:nowrap}
#connect-panel .login-art-note>span{color:#438974;font-size:20px}
#connect-panel .note-chat{top:12px;left:0;transform:rotate(-6deg)}
#connect-panel .note-work{bottom:10px;right:0;transform:rotate(5deg)}
#connect-panel .login-features{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;margin-top:20px;color:#537268;font-size:11px}
#connect-panel .login-features>span::before{content:'·';margin-right:7px;color:#7eaa9b}
#connect-panel .login-fields{padding:48px 46px 28px;min-width:0}
#connect-panel .login-kicker{color:#59877b;font-size:10px;font-weight:800;letter-spacing:2px;margin:0 0 10px}
#connect-panel .login-heading h2{font-size:27px;letter-spacing:-1px;color:#203b3a;margin-bottom:10px}
#connect-panel .login-heading>p:last-child{font-size:13px;color:#758383;line-height:1.7}
#connect-panel #connect-form{display:flex;flex-direction:column;gap:18px;margin:28px 0 0}
#connect-panel .login-field{display:flex;flex-direction:column;gap:8px}
#connect-panel label{color:#415654;font-size:13px;font-weight:650;line-height:1.5}
#connect-panel .login-optional{color:#647873;font-size:11px;font-weight:400;margin-left:5px}
#connect-panel input:not([type=checkbox]){height:48px;min-height:48px;background:#f9fbfa;color:#203b3a;border:1px solid #dfe8e3;border-radius:11px;padding:0 14px;font-size:14px;transition:border-color .15s,box-shadow .15s}
#connect-panel input::placeholder{color:#7f8e89;font-size:13px}
#connect-panel input:focus-visible{border-color:#488e7a;box-shadow:0 0 0 3px #488e7a20;outline:0;background:#fff}
#connect-panel .login-remember{display:flex;align-items:flex-start;gap:10px;font-size:12px;font-weight:450;cursor:pointer;margin:0}
#connect-panel .login-remember input{width:16px;height:16px;min-height:16px;flex:0 0 16px;padding:0;margin:2px 0 0;accent-color:#2d7563}
#connect-panel .login-remember small{display:block;margin-top:4px;color:#74817d;font-size:11px}
#connect-panel .login-submit{display:flex;align-items:center;justify-content:center;gap:12px;height:49px;background:#286b5b;color:#fff;border:1px solid #286b5b;border-radius:11px;font-size:14px;font-weight:650;box-shadow:0 5px 12px #286b5b14;transition:background .15s}
#connect-panel .login-submit:hover{background:#205b4d}
#connect-panel .login-submit:focus-visible{outline:3px solid #8bc6b6;outline-offset:3px}
#connect-panel .login-submit>span{font-size:19px;font-weight:400}
#connect-panel #connect-error{color:#b42338;font-size:12px;line-height:1.65;margin:12px 0 0;min-height:0;overflow-wrap:anywhere}
#connect-panel #connect-error:empty{display:none}
#connect-panel .login-help{font-size:11px;text-align:center;line-height:1.8;color:#798680;margin:22px 0 0;padding-top:18px;border-top:1px solid #edf1ee;word-break:keep-all}
@media(max-width:760px){body:has(#connect-panel:not(.hidden)) .app{width:calc(100% - 32px);padding:22px 0 28px}body:has(#connect-panel:not(.hidden)) #user-header{margin-bottom:24px}#connect-panel{max-width:460px;grid-template-columns:1fr;border-radius:22px}#connect-panel .login-story{padding:25px 26px}#connect-panel .login-story h2{font-size:26px;margin:17px 0 10px;letter-spacing:-1px}#connect-panel .login-story p{font-size:12px}#connect-panel .login-art,#connect-panel .login-features{display:none}#connect-panel .login-fields{padding:28px 26px}#connect-panel .login-heading h2{font-size:23px}#connect-panel #connect-form{margin-top:22px;gap:16px}}
@media(prefers-reduced-motion:reduce){#connect-panel input,#connect-panel .login-submit{transition:none}}
