:root{--brand: #2563eb;--brand-dark: #1d4ed8;--bg: #fff;--muted: #64748b;--line: #e2e8f0;--soft: #f1f5f9;--danger: #dc2626}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;background:transparent}body{font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#0f172a}button,input,textarea{font:inherit}:focus-visible{outline:2px solid var(--brand);outline-offset:2px}[hidden]{display:none!important}.root{height:100%;position:relative}.launcher{position:absolute;right:8px;bottom:8px;width:56px;height:56px;border-radius:50%;border:0;background:var(--brand);color:#fff;cursor:pointer;display:grid;place-items:center;box-shadow:0 4px 14px #2563eb66}.launcher:hover{background:var(--brand-dark)}.badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}.panel{display:flex;flex-direction:column;height:100%;background:var(--bg);overflow:hidden}.web .panel{border-radius:14px;box-shadow:0 8px 30px #0f172a40}.page{background:var(--soft)}.page .panel{max-width:720px;margin:0 auto}.page header{justify-content:flex-start;gap:6px}header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;padding-top:max(12px,env(safe-area-inset-top));background:var(--brand);color:#fff}header h1{margin:0;font-size:16px}button.icon{background:transparent;border:0;color:inherit;width:36px;height:36px;border-radius:8px;cursor:pointer;display:grid;place-items:center}button.icon:hover{background:#94a3b833}header button.icon:focus-visible{outline-color:#fff}button.primary{background:var(--brand);color:#fff;border:0;border-radius:8px;padding:10px 16px;font-weight:600;cursor:pointer}button.primary:hover:not(:disabled){background:var(--brand-dark)}button.primary:disabled{opacity:.5;cursor:not-allowed}button.link{background:none;border:0;padding:0;color:var(--brand);cursor:pointer;text-decoration:underline}.hint{color:var(--muted);text-align:center;padding:12px;margin:0}.hint.center{margin:auto}.prechat{display:flex;flex-direction:column;gap:6px;padding:16px;overflow-y:auto}.prechat-intro{margin:0 0 6px}.prechat label{font-weight:600;margin-top:6px}.prechat input{padding:10px;border:1px solid var(--line);border-radius:8px;font-size:16px}.prechat input[aria-invalid=true]{border-color:var(--danger)}.prechat button.primary{margin-top:12px}.field-error,.form-error{color:var(--danger);font-size:12px;margin:0}.turnstile{margin-top:8px;min-height:65px}.chat{display:flex;flex-direction:column;flex:1;min-height:0}.messages{flex:1;overflow-y:auto;padding:12px;background:var(--soft);overscroll-behavior:contain}.messages ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.older{display:block;margin:0 auto 8px;font-size:12px}.msg{display:flex;flex-direction:column;max-width:82%}.msg.mine{align-self:flex-end;align-items:flex-end}.msg.theirs{align-self:flex-start;align-items:flex-start}.msg.system{align-self:center;max-width:90%;color:var(--muted);font-size:12px;text-align:center}.sender{font-size:11px;color:var(--muted);margin:0 4px 2px}.bubble{padding:8px 12px;border-radius:14px;background:#fff;border:1px solid var(--line);overflow-wrap:anywhere}.mine .bubble{background:var(--brand);border-color:var(--brand);color:#fff}.bubble p{margin:0;white-space:pre-wrap}.bubble img{display:block;max-width:100%;max-height:220px;border-radius:8px}.bubble img+p,.bubble .media+p{margin-top:6px}.bubble video.media{display:block;width:240px;max-width:100%;max-height:260px;border-radius:8px;background:#000}.bubble audio.media{display:block;width:240px;max-width:100%;height:40px}.bubble a.doc{color:inherit;font-weight:600;text-decoration:underline}.meta{font-size:11px;color:var(--muted);margin:2px 4px 0}.failed{color:var(--danger)}.notice{margin:0;padding:6px 12px;background:#fef2f2;color:var(--danger);font-size:12px}.composer{display:flex;align-items:flex-end;gap:6px;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}.composer .icon{color:var(--muted);flex:none}.composer .icon:hover{background:var(--soft)}.composer textarea{flex:1;resize:none;max-height:96px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:16px}.composer .send{flex:none}.turnstile iframe{max-width:100%}
