:root{--bg: #ffffff;--panel: #f7f7f8;--border: #e5e5e7;--accent: #2563eb;--user-text: #ffffff;--asst: #f1f1f3;--asst-text: #111111;--muted: #8a8a8f}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#111;background:var(--bg)}.app{display:flex;flex-direction:column;height:100%;max-width:820px;margin:0 auto;border-left:1px solid var(--border);border-right:1px solid var(--border)}.settings{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--panel);flex-wrap:wrap}.brand{font-weight:600}.controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.controls label{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--muted)}.controls select,.controls input{font-size:13px;padding:4px 6px;border:1px solid var(--border);border-radius:6px}.controls input[type=number]{width:72px}.newchat{padding:6px 12px;border:1px solid var(--border);background:#fff;border-radius:6px;cursor:pointer}.newchat:hover{background:#efefef}.messages{flex:1;overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:12px}.empty{margin:auto;color:var(--muted)}.bubble-row{display:flex}.bubble-row.user{justify-content:flex-end}.bubble-row.assistant{justify-content:flex-start}.bubble{max-width:75%;padding:10px 14px;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.bubble.user{background:var(--accent);color:var(--user-text);border-bottom-right-radius:4px}.bubble.assistant{background:var(--asst);color:var(--asst-text);border-bottom-left-radius:4px}.typing{letter-spacing:2px;color:var(--muted);animation:blink 1.2s infinite}@keyframes blink{0%,to{opacity:.3}50%{opacity:1}}.composer{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--border);background:var(--panel)}.composer textarea{flex:1;resize:none;font:inherit;padding:10px 12px;border:1px solid var(--border);border-radius:10px;min-height:42px;max-height:160px}.composer button{padding:0 18px;border:none;background:var(--accent);color:#fff;border-radius:10px;cursor:pointer;font-weight:600}.composer button:disabled{opacity:.5;cursor:not-allowed}
