:root{--green:#075e54;--teal:#128c7e;--bg:#efeae2;--out:#d9fdd3;--in:#fff;--ink:#111b21;--muted:#54656f}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#d1d7db;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink)}
.app{max-width:560px;height:100dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--bg);box-shadow:0 0 24px rgba(0,0,0,.12)}
.topbar{display:flex;align-items:center;gap:12px;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top));background:var(--green);color:#fff}
.avatar{width:40px;height:40px;border-radius:50%;background:#fff;color:var(--green);display:grid;place-items:center;font-weight:700;font-size:20px;flex:none}
.who h1{font-size:17px;margin:0;font-weight:600;line-height:1.2}
.who .demo{font-weight:400;opacity:.85}
.who p{margin:2px 0 0;font-size:13px;opacity:.85}
.chat{flex:1;overflow-y:auto;padding:12px 10px 6px;background-color:var(--bg);background-image:radial-gradient(rgba(0,0,0,.035) 1px,transparent 1px);background-size:18px 18px}
.notice{margin:2px auto 12px;max-width:92%;background:#fff5c4;color:#3b3b2f;font-size:12.5px;line-height:1.4;padding:7px 10px;border-radius:8px;text-align:center}
.msg{display:flex;margin:4px 0}
.msg.user{justify-content:flex-end}
.bubble{max-width:84%;padding:7px 9px 18px;border-radius:8px;font-size:15px;line-height:1.38;white-space:pre-wrap;overflow-wrap:anywhere;position:relative;box-shadow:0 1px .5px rgba(11,20,26,.13)}
.bot .bubble{background:var(--in);border-top-left-radius:0}
.user .bubble{background:var(--out);border-top-right-radius:0}
.bubble a{color:#027eb5;text-decoration:underline}
.time{position:absolute;right:8px;bottom:3px;font-size:11px;color:var(--muted)}
.bubble.wait{color:var(--muted);font-style:italic}
.typing span{display:inline-block;width:7px;height:7px;margin:0 2px;border-radius:50%;background:#8696a0;animation:b 1.2s infinite}
.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}
@keyframes b{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.chips{display:flex;gap:6px;overflow-x:auto;padding:6px 8px;background:var(--bg);scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid #c9d1d4;background:#fff;color:var(--green);border-radius:16px;padding:7px 12px;font-size:13.5px;cursor:pointer}
.chip:focus-visible,#send:focus-visible,textarea:focus-visible{outline:3px solid #25d366;outline-offset:2px}
.composer{display:flex;align-items:flex-end;gap:8px;padding:6px 8px;padding-bottom:max(8px,env(safe-area-inset-bottom));background:#f0f2f5}
textarea{flex:1;resize:none;border:none;border-radius:20px;padding:10px 14px;font:inherit;font-size:16px;line-height:1.3;max-height:120px;background:#fff;color:var(--ink)}
#send{flex:none;width:44px;height:44px;border:none;border-radius:50%;background:var(--teal);color:#fff;display:grid;place-items:center;cursor:pointer}
#send:disabled{opacity:.5;cursor:default}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
