*{box-sizing:border-box}body{margin:0;background:#f7f8fa;color:#111827;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.app{height:100dvh;max-width:1080px;margin:auto;display:flex;flex-direction:column}header{display:flex;align-items:center;gap:12px;padding:22px 34px;border-bottom:1px solid #e5e7eb;background:#fff}h1{font-size:16px;font-weight:650;margin:0 0 5px}header p{margin:0;color:#6b7280;font-size:12px}.avatar,.intro-icon{display:grid;place-items:center;background:#eaf1ff;color:#1f6feb;border-radius:14px;font-size:23px;font-weight:700;width:46px;height:46px;position:relative}.avatar span{position:absolute;bottom:0;right:0;width:10px;height:10px;background:#28b77b;border:2px solid white;border-radius:50%}.guest{margin-left:auto;color:#64748b;background:#f5f6f8;border:1px solid #e5e7eb;border-radius:20px;padding:6px 11px;font-size:11px}main{flex:1;overflow:auto;padding:28px 42px;scroll-behavior:smooth}.date{text-align:center;font-size:11px;color:#94a3b8;margin-bottom:28px}#intro{text-align:center;padding:clamp(25px,12vh,130px) 0 24px}.intro-icon{margin:0 auto 22px;width:60px;height:60px;border-radius:18px}h2{font-size:27px;letter-spacing:-.7px;font-weight:600}#intro p{font-size:14px;line-height:1.8;color:#7b8493}.suggestions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:28px}button{font:inherit;cursor:pointer}.suggestions button{border:1px solid #e0e5ed;background:white;padding:12px 17px;border-radius:10px;color:#4b5563;font-size:12px}.suggestions button:hover{border-color:#1f6feb;color:#1f6feb}.message{display:flex;margin:18px 0}.message-user{justify-content:flex-end}.bubble{position:relative;max-width:84%;padding:12px 15px 23px;border-radius:10px;font-size:13.5px;line-height:1.55;overflow-wrap:anywhere;box-shadow:0 1px 2px #0f172a14;background:white;border:1px solid #e5e7eb;min-width:85px;border-bottom-left-radius:3px}.message-user .bubble{background:#1f6feb;color:white;border-color:#1f6feb;max-width:74%;border-radius:10px 10px 3px 10px}.bubble::after{content:"";position:absolute;bottom:0;left:-7px;width:9px;height:12px;background:white;clip-path:polygon(100% 0,100% 100%,0 100%)}.message-user .bubble::after{left:auto;right:-7px;background:#1f6feb;clip-path:polygon(0 0,100% 100%,0 100%)}.body{white-space:pre-wrap}.bubble time{position:absolute;right:12px;bottom:6px;font-size:10px;color:#94a3b8}.message-user time{color:#ffffffc9}.bubble pre{white-space:pre-wrap;background:#111827;color:#e5e7eb;padding:12px;border-radius:6px;overflow:auto}.bubble a{color:inherit;text-decoration:underline}.bubble strong{font-weight:650}#thinking{align-items:center;gap:9px;padding:10px 0;color:#6b7280;font-size:13px}#thinking:not([hidden]){display:flex}.thinking-label{background:linear-gradient(90deg,#9ca3af,#111827,#9ca3af);background-size:200% auto;background-clip:text;color:transparent;animation:shimmer 1.8s linear infinite}.dots{display:flex;gap:3px}.dots i{height:5px;width:5px;border-radius:50%;background:#6b7280;animation:bounce 1.4s infinite}.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}footer{padding:16px 34px max(14px,env(safe-area-inset-bottom));background:#f7f8fa}form{display:flex;align-items:flex-end;gap:12px;background:white;border:1px solid #dfe4ec;border-radius:16px;padding:12px 13px 12px 18px;box-shadow:0 3px 15px #0f172a05}textarea{resize:none;flex:1;min-height:28px;max-height:150px;border:0;outline:0;padding:5px 0;background:transparent;color:#111827;font:14px/1.5 inherit;font-family:inherit;font-size:14px;line-height:1.5}textarea::placeholder{color:#9ca3af}#send{border:0;border-radius:10px;width:36px;height:36px;background:#1f6feb;color:#fff;font-size:25px}button:disabled{opacity:.45;cursor:default}.hint{text-align:center;color:#9ca3af;font-size:10px;margin:10px 0 0}#error{color:#b42318;font-size:13px;margin:0 0 10px}#retry{border:0;background:transparent;color:#1f6feb;margin-bottom:10px}button:focus-visible,textarea:focus-visible{outline:2px solid #1f6feb;outline-offset:3px}@keyframes shimmer{to{background-position:-200% center}}@keyframes bounce{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}@media(max-width:600px){header{padding:18px}main{padding:22px}.guest{font-size:10px}footer{padding:12px 15px max(14px,env(safe-area-inset-bottom))}h2{font-size:23px}.bubble{max-width:92%}.message-user .bubble{max-width:84%}.hint{font-size:9px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
.header-title{min-width:0;flex:1}.header-title p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.settings-button{flex-shrink:0;border:1px solid #e0e5ed;border-radius:9px;background:#fff;padding:9px 13px;color:#475569;font-size:12px}.settings-button:hover{background:#f3f6fb}dialog{width:min(460px,calc(100% - 28px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #e5e7eb;border-radius:20px;padding:28px;box-shadow:0 24px 80px #0f172a26}dialog::backdrop{background:#17223855;backdrop-filter:blur(3px)}#settings-form{display:block;padding:0;border:0;box-shadow:none;border-radius:0}.settings-heading{display:flex;align-items:center;justify-content:space-between}.eyebrow{font-size:9px;font-weight:700;letter-spacing:1.5px;color:#1f6feb}.settings-heading h2{margin:8px 0 0;font-size:25px}#close-settings{border:0;background:#f4f6f8;width:30px;height:30px;border-radius:50%;color:#64748b;font-size:23px}.settings-description{color:#64748b;font-size:13px;line-height:1.6;margin:16px 0 22px}#settings label{display:block;font-size:12px;font-weight:600;color:#334155;margin:15px 0 7px}#settings input{width:100%;font:13px inherit;font-family:inherit;font-size:13px;border:1px solid #dce2ea;border-radius:9px;padding:12px;color:#111827;background:white}#settings input:focus{outline:2px solid #c0d6ff;border-color:#1f6feb}.section-divider{border-top:1px solid #e9edf2;margin-top:23px;padding-top:18px;font-size:9px;letter-spacing:1.3px;color:#94a3b8;font-weight:700}details{margin-top:17px;font-size:12px;color:#64748b}summary{cursor:pointer}.field-help,.privacy-note{font-size:11px;color:#8290a3;line-height:1.6}.privacy-note{padding:12px;background:#f7f9fc;border-radius:8px;margin-top:22px}.settings-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:20px}.settings-actions button{border:0;border-radius:9px;padding:12px 16px;font-size:12px}#connect{background:#1f6feb;color:white}#disconnect{background:#f1f4f8;color:#64748b}#settings-error{font-size:12px;color:#b42318;line-height:1.6}#settings-form[aria-busy="true"]{opacity:.7}

.image-link{display:block;max-width:650px;min-width:180px}.chat-image{display:block;max-width:100%;width:auto;height:auto;max-height:70vh;object-fit:contain;border-radius:7px}.chat-image[hidden],.image-error[hidden]{display:none}.image-error{display:block;padding:20px;color:#b42318;font-size:13px}.message:has(.chat-image) .bubble{max-width:min(84%,700px)}
