:root{color-scheme:dark;font-family:ui-sans-serif,system-ui,-apple-system,"Apple SD Gothic Neo",sans-serif;background:#0c1424;color:#edf4ff}
*{box-sizing:border-box} body{margin:0;background:radial-gradient(ellipse at top left,#182944,#0c1424 65%);min-height:100vh}
main{width:min(870px,100% - 30px);margin:0 auto;padding:36px 0 60px}
header{margin-bottom:26px}h1{font-size:clamp(26px,5vw,38px);letter-spacing:-.045em;margin:7px 0 10px}
.eyebrow{color:#65d6cd;font-size:12px;letter-spacing:.12em;font-weight:800}
.muted{color:#93a5c0}.hint{color:#98acc6;font-size:13px;line-height:1.55;margin:8px 0 13px}
.panel{background:#14223a;border:1px solid #28415f;border-radius:18px;padding:20px;margin-bottom:16px;box-shadow:0 6px 22px #070d1b55}
.heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 15px}
h2{margin:0;font-size:16px;font-weight:800}button,input,textarea,select{font:inherit}button{background:#45c9c3;color:#072029;border:0;padding:11px 16px;border-radius:10px;font-weight:800;cursor:pointer;white-space:nowrap}
button:hover{filter:brightness(1.08)}button:disabled{cursor:not-allowed;opacity:.4}
.secondary{background:#2b4361;color:#eff8ff}.tag{font-size:11px;border-radius:25px;padding:6px 11px;background:#293953;color:#cddfff}
.inputs,.chatForm,.actions{display:flex;gap:10px;align-items:stretch}.inputs input{flex:1;min-width:0}
input,textarea,select{border:1px solid #435b79;background:#0d192d;color:#eaf4ff;border-radius:11px;padding:12px;outline:none;min-width:0}
input:focus,textarea:focus,select:focus{border-color:#4cc6c0}textarea{width:100%;resize:vertical;min-height:70px}
.statusGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.status{background:#0f1c30;border:1px solid #293f5e;padding:14px;border-radius:12px;min-width:0}
.status strong,.status small{display:block;overflow-wrap:anywhere;margin-top:8px}.status small{color:#b4c5da}
.chatLog{background:#0e1b2e;border:1px solid #263c58;border-radius:12px;padding:15px;min-height:160px;max-height:470px;overflow:auto;display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.bubble{white-space:pre-wrap;overflow-wrap:anywhere;max-width:91%;padding:11px 13px;font-size:14px;line-height:1.6;border-radius:12px}
.bubble.assistant{background:#243854;align-self:flex-start}.bubble.user{background:#245b60;align-self:flex-end}
.bubble.tool{background:#162b41;align-self:flex-start;border:1px dashed #456481;font-family:ui-monospace,monospace;font-size:11px}
.modelBar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:8px}
.modelPicker{flex:1;min-width:190px}
.modelPicker label{display:block;font-size:12px;font-weight:700;color:#b4c5da;margin-bottom:7px}
.modelPicker select{width:100%;min-height:46px;cursor:pointer}
.modelPicker select:disabled{opacity:.6;cursor:not-allowed}
.thinkSwitch{display:flex;align-items:center;gap:9px;cursor:pointer;min-height:46px;padding:0 6px;font-size:13px}
.thinkSwitch input{width:19px;height:19px;min-width:19px;accent-color:#45c9c3}
.chatForm textarea{flex:1}.details{background:#0c192a;border-radius:12px;padding:16px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:#bfd6ee;max-height:350px;overflow:auto}
footer{font-size:12px;text-align:center;color:#7991ae;margin-top:25px}
@media(max-width:590px){main{padding-top:24px}.panel{padding:15px}.inputs,.actions{flex-wrap:wrap}.inputs input{flex-basis:100%}.actions button{flex:1;white-space:normal}.heading{align-items:flex-start}.statusGrid{grid-template-columns:1fr}.chatForm{flex-direction:column}.chatForm button{width:100%}}


.mcpFields{display:flex;flex-direction:column;gap:10px}
.mcpFields label{font-size:13px;color:#bdd2ec;font-weight:700}
.mcpFields select{width:100%;font:inherit;padding:11px;border:1px solid #435b79;border-radius:10px;background:#0d192d;color:#edf4ff}
.mcpFields pre{margin:2px 0 8px;max-height:300px}
.mcpFields input,.mcpFields textarea{width:100%}
#mcpResult{max-height:540px;overflow:auto}
#mcpCount{font-size:12px}

.chatActions{display:flex;gap:8px;align-items:stretch}
.chatActions button{min-width:64px}
.stopButton{background:#773443;color:#fff}
@media(max-width:590px){.chatActions{width:100%}.chatActions button{width:50%}}
