*{box-sizing:border-box}:root{color-scheme:dark}html,body{height:100%;margin:0}body{background:#0b1020;color:#e5e7eb;font-family:system-ui,sans-serif;overflow:hidden}.app{height:100dvh;display:flex;flex-direction:column}header{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;background:#111827;border-bottom:1px solid #374151}header #status{margin-left:12px;font-size:.82rem;color:#9ca3af}.headright{display:flex;align-items:center;gap:10px}#summary,#perf{color:#9ca3af;font-size:.82rem}.settings{flex:0 0 auto;max-width:980px;width:calc(100% - 28px);margin:10px auto 0;background:#111827;border:1px solid #374151;border-radius:12px;padding:12px}.settings[hidden]{display:none}.row,.grid,.actions{display:flex;gap:10px}.row label,.grid>*{flex:1}.row button{align-self:end;margin-bottom:10px}label{display:block;color:#cbd5e1;font-size:.88rem;margin-bottom:8px}input,select,textarea,button{font:inherit;color:#f9fafb;background:#0f172a;border:1px solid #4b5563;border-radius:8px;padding:8px}label>input,label>select,label>textarea{width:100%;margin-top:4px}textarea{resize:vertical}button{background:#2563eb;border-color:#2563eb;font-weight:650;cursor:pointer}.secondary{background:#1f2937;border-color:#4b5563}button:disabled{opacity:.5}.tools{flex:0 0 auto;width:min(980px,calc(100% - 28px));margin:8px auto;display:flex;align-items:center;gap:10px}.tools #perf{margin-left:auto}.chatwrap{position:relative;flex:1 1 auto;min-height:0;width:min(980px,calc(100% - 28px));margin:0 auto;border:1px solid #263244;border-radius:12px;background:#0d1424;overflow:hidden}#chat{height:100%;overflow-y:auto;padding:12px;scroll-behavior:auto}.msg{max-width:88%;padding:10px 12px;margin:8px 0;border-radius:13px;line-height:1.45;overflow-wrap:anywhere}.msg.user{margin-left:auto;background:#1d4ed8}.msg.assistant{background:#1f2937}.msg.thinking{background:#312e81;color:#ddd6fe}.role{display:block;font-size:.7rem;opacity:.65;margin-bottom:4px}.body{white-space:pre-wrap}.body pre{overflow:auto;background:#060914;padding:9px;border-radius:7px;white-space:pre}.body code{font-family:monospace}#newContent{position:absolute;right:16px;bottom:14px;border-radius:20px;box-shadow:0 4px 18px #0008}.composer{flex:0 0 auto;width:min(980px,calc(100% - 28px));margin:8px auto 10px}.composer textarea{width:100%;max-height:22vh}.actions{justify-content:flex-end;margin-top:6px}#diag{padding:8px;margin-bottom:6px;border:1px solid #b91c1c;border-radius:8px;background:#450a0a;color:#fecaca;font-size:.84rem}@media(max-width:650px){header{padding:8px}.headright #summary{display:none}.settings,.tools,.chatwrap,.composer{width:calc(100% - 14px)}.grid,.row{flex-direction:column}.row button{align-self:stretch}.msg{max-width:96%}}
/* V1.3: temporary space lets each new user turn be framed at the top. */
.turn-spacer{height:calc(100% - 5.5rem);min-height:180px;pointer-events:none}

/* V1.4 — two explicit modes: configuration / chat */
.configactions{display:flex;justify-content:flex-end;margin-top:4px}
body.chat-mode .settings{display:none!important}
body.config-mode .tools,body.config-mode .chatwrap,body.config-mode .composer{display:none!important}
body.config-mode .app{overflow:auto}
body.config-mode header{position:sticky;top:0;z-index:5}
body.chat-mode .chatwrap{flex:1 1 auto}
body.chat-mode .tools{margin-top:6px;margin-bottom:6px}
