:root{--teal:#0d9488;--blue:#0369a1;--bg:#f0fdfa;--card:#fff;--text:#0f172a;--muted:#64748b}
*{box-sizing:border-box;margin:0}
html,body{height:100%}
body{font-family:system-ui,-apple-system,"Segoe UI","Noto Sans Devanagari",sans-serif;background:var(--bg);color:var(--text);display:flex;flex-direction:column}
.top{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:linear-gradient(90deg,var(--teal),var(--blue));color:#fff}
.brand{display:flex;gap:10px;align-items:center}
.brand h1{font-size:1.2rem}.brand small{opacity:.9}
.logo{background:#fff;color:var(--teal);width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-weight:700;font-size:1.3rem}
.pill{background:#fff;color:var(--blue);border:0;border-radius:99px;padding:8px 16px;font-weight:600;cursor:pointer}
.chat-wrap{flex:1;display:flex;flex-direction:column;width:100%;max-width:820px;margin:0 auto;padding:12px;min-height:0}
.chat{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:6px 2px}
.msg{max-width:88%;padding:12px 14px;border-radius:16px;line-height:1.55;white-space:pre-wrap;word-wrap:break-word;box-shadow:0 1px 3px #0001}
.msg.user{align-self:flex-end;background:var(--teal);color:#fff;border-bottom-right-radius:4px}
.msg.bot{align-self:flex-start;background:var(--card);border-bottom-left-radius:4px}
.msg img{max-width:200px;border-radius:10px;display:block;margin-bottom:6px}
.badge{display:inline-block;font-size:.75rem;font-weight:600;padding:3px 10px;border-radius:99px;margin-bottom:8px}
.badge.local{background:#dcfce7;color:#166534}
.badge.deep{background:#dbeafe;color:#1e40af}
.disclaimer{margin-top:10px;font-size:.78rem;color:var(--muted);border-top:1px dashed #cbd5e1;padding-top:6px}
.emergency{align-self:stretch;max-width:100%;background:#fef2f2;border:2px solid #dc2626;color:#7f1d1d;padding:14px;border-radius:14px}
.emergency h3{margin-bottom:6px}
.call{display:inline-block;margin-top:10px;background:#dc2626;color:#fff;text-decoration:none;padding:10px 18px;border-radius:99px;font-weight:700}
.typing{color:var(--muted);font-style:italic}
.preview{position:relative;width:fit-content;margin:6px 0}
.preview img{max-height:90px;border-radius:10px;border:2px solid var(--teal)}
.preview button{position:absolute;top:-8px;right:-8px;border:0;background:#dc2626;color:#fff;border-radius:50%;width:24px;height:24px;cursor:pointer}
.hidden{display:none}
.composer{display:flex;gap:8px;align-items:center;background:#fff;padding:8px;border-radius:99px;box-shadow:0 2px 8px #0002}
.composer input[type=text]{flex:1;border:0;outline:0;font-size:1rem;padding:8px;background:transparent;min-width:0}
.icon-btn{border:0;background:#ccfbf1;border-radius:50%;width:40px;height:40px;display:grid;place-items:center;cursor:pointer;font-size:1.1rem}
.icon-btn.rec{background:#fecaca;animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.5}}
.send{border:0;background:var(--blue);color:#fff;padding:10px 18px;border-radius:99px;font-weight:600;cursor:pointer}
.tts{font-size:.85rem;color:var(--muted);margin:8px 6px 0;cursor:pointer}
footer{text-align:center;font-size:.8rem;color:#fff;background:#134e4a;padding:10px 12px}
footer small{opacity:.8}
@media(max-width:480px){.send{padding:10px 12px}.msg{max-width:94%}}
