:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b1020; color: #edf2ff; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 15% 0%, #243a73 0, transparent 35rem), #0b1020; }
button, textarea, input { font: inherit; }
.app-shell { min-height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
header { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .02em; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: #84a8ff; box-shadow: 0 0 18px #84a8ff; }
.text-button { border: 0; background: transparent; color: #bfcaff; cursor: pointer; padding: 8px; }
.messages { flex: 1; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding: 14px 0 24px; }
.message { display: flex; gap: 10px; max-width: 92%; align-items: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: #26386a; color: #dfe7ff; font-size: 11px; font-weight: 800; }
.user .avatar { background: #3561c9; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; padding: 11px 14px; border-radius: 15px; background: #17203b; }
.user .bubble { background: #3561c9; border-bottom-right-radius: 4px; }
.assistant .bubble { border-bottom-left-radius: 4px; }
.pending .bubble { color: #b7c2e9; font-style: italic; }
.composer { display: flex; align-items: flex-end; gap: 10px; background: rgba(23, 32, 59, .94); border: 1px solid #2c3a61; border-radius: 18px; padding: 8px 9px 8px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
textarea { flex: 1; resize: none; max-height: 144px; border: 0; outline: 0; background: transparent; color: inherit; line-height: 1.45; padding: 8px 0; }
textarea::placeholder { color: #8b98bd; }
#send { border: 0; width: 38px; height: 38px; border-radius: 13px; background: #7d9cff; color: #071127; cursor: pointer; font-size: 23px; line-height: 1; }
#send:disabled { opacity: .5; cursor: wait; }
dialog { width: min(90vw, 340px); border: 1px solid #34456f; border-radius: 18px; background: #131c35; color: #edf2ff; padding: 22px; box-shadow: 0 20px 60px #0009; }
dialog::backdrop { background: #030713aa; backdrop-filter: blur(5px); }
dialog h1 { margin: 0 0 8px; font-size: 20px; }
dialog p { margin: 0 0 16px; color: #b8c3e8; line-height: 1.5; font-size: 14px; }
dialog input, dialog button { width: 100%; border-radius: 10px; padding: 11px 12px; }
dialog input { border: 1px solid #3e507d; background: #0b1020; color: inherit; outline: 0; margin-bottom: 10px; }
dialog button { border: 0; background: #7d9cff; color: #071127; font-weight: 700; cursor: pointer; }
@media (min-width: 760px) { .app-shell { padding-left: 24px; padding-right: 24px; } .messages { padding-top: 28px; } }
