*{box-sizing:border-box}#app,body,html{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#0f172a;color:#e2e8f0}#app{display:flex;flex-direction:column}.top{padding:12px 14px;background:#111827;border-bottom:1px solid #1f2937;font-weight:600}.top small{display:block;font-weight:400;color:#94a3b8;font-size:12px;margin-top:4px}.msgs{flex:1;overflow-y:auto;padding:12px}.row{display:flex;margin-bottom:10px;align-items:flex-end;gap:8px}.row.me{justify-content:flex-end}.avatar{width:32px;height:32px;border-radius:50%;flex:0 0 32px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;position:relative;overflow:hidden}.avatar-img{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.av-agent{background:#2563eb}.av-player{background:#f59e0b}.bubble{max-width:78%;padding:8px 12px;border-radius:12px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word}.bubble small{display:block;opacity:.55;font-size:11px;margin-bottom:2px}.pic{display:block;max-width:220px;border-radius:8px;margin-top:4px}.row.me .bubble{background:#2563eb;color:#fff;border-bottom-right-radius:4px}.row.them .bubble{background:#1f2937;border-bottom-left-radius:4px}.row.sys{justify-content:center}.row.sys .bubble{background:transparent;color:#64748b;font-size:12px}.bar{display:flex;gap:8px;padding:10px;background:#111827}.bar input{flex:1;padding:10px 12px;background:#1f2937;outline:none}.bar button,.bar input{border:0;border-radius:8px;color:#fff}.bar button{background:#2563eb;padding:0 16px;font-weight:600}.bar button.ghost{background:#1f2937}.bar button.full{flex:1;height:40px}.err{color:#f87171;padding:8px 14px;font-size:13px}