.hx-chat{max-width:860px;margin:0 auto;border:1px solid #d9dde6;background:#fff;display:flex;flex-direction:column;min-height:560px}
.hx-chat-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e6e9f0;background:#071a3d;color:#fff}
.hx-chat-head h2{margin:0;font-size:20px;letter-spacing:-.01em;color:#fff}
.hx-chat-head p{margin:4px 0 0;font-size:13px;color:#c9d3ea}
.hx-status{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;padding:6px 10px;border:1px solid rgba(255,255,255,.35);color:#c9d3ea;white-space:nowrap}
.hx-status.on{color:#8be0b0;border-color:#8be0b0}
.hx-status.off{color:#ffb3a8;border-color:#ffb3a8}
.hx-tabs{display:flex;border-bottom:1px solid #e6e9f0}
.hx-tabs button{flex:1;appearance:none;background:#fff;border:0;border-bottom:3px solid transparent;padding:14px 12px;font:inherit;font-size:14px;font-weight:700;letter-spacing:.04em;color:#5b6475;cursor:pointer}
.hx-tabs button[aria-selected="true"]{color:#01257e;border-bottom-color:#01257e}
.hx-tabs button:focus-visible,.hx-chat button:focus-visible,.hx-chat input:focus-visible,.hx-chat select:focus-visible,.hx-chat textarea:focus-visible{outline:3px solid #7aa2ff;outline-offset:2px}
.hx-project-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 24px;background:#eef1f8;font-size:13px;color:#1b2b55}
.hx-project-bar button{appearance:none;background:none;border:0;font:inherit;font-size:13px;font-weight:700;color:#01257e;text-decoration:underline;cursor:pointer}
.hx-log{flex:1;overflow-y:auto;padding:24px;display:flex;flex-direction:column;gap:12px;min-height:280px;max-height:460px;background:#f7f8fb}
.hx-msg{display:flex}
.hx-bubble{max-width:82%;padding:12px 16px;font-size:15px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.hx-user{justify-content:flex-end}.hx-user .hx-bubble{background:#01257e;color:#fff}
.hx-bot .hx-bubble{background:#fff;border:1px solid #d9dde6;color:#16203a}
.hx-wait .hx-bubble{color:#8a93a6}
.hx-system{justify-content:center}.hx-system .hx-bubble{max-width:92%;background:#fff7e0;border:1px solid #f0d98a;color:#5a4500;font-size:13px;text-align:center}
.hx-gate{padding:24px;display:grid;gap:14px;border-top:1px solid #e6e9f0;background:#fff}
.hx-gate[hidden],.hx-chat [hidden]{display:none!important}
.hx-gate h3{margin:0;font-size:16px}
.hx-gate p{margin:0;font-size:14px;color:#4a5368;line-height:1.5}
.hx-gate form{display:flex;gap:10px;flex-wrap:wrap}
.hx-gate input,.hx-gate select{flex:1 1 240px;min-width:0;padding:13px 14px;border:1px solid #b8c0d0;background:#fff;font:inherit;font-size:15px;border-radius:0;appearance:none}
.hx-gate select{background-image:linear-gradient(45deg,transparent 50%,#444 50%),linear-gradient(135deg,#444 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px;background-repeat:no-repeat;padding-right:34px}
.hx-btn{appearance:none;border:0;background:#01257e;color:#fff;font:inherit;font-size:14px;font-weight:700;letter-spacing:.04em;padding:13px 22px;cursor:pointer}
.hx-btn:disabled{background:#9aa5c2;cursor:not-allowed}
.hx-btn.ghost{background:#fff;color:#01257e;border:1px solid #01257e}
.hx-gate-msg{min-height:20px;font-size:13px;color:#2a4a8f}
.hx-gate-msg.err{color:#a3261a}
.hx-compose{display:flex;gap:10px;padding:16px 24px;border-top:1px solid #e6e9f0;background:#fff}
.hx-compose textarea{flex:1;min-width:0;resize:none;height:52px;padding:14px;border:1px solid #b8c0d0;font:inherit;font-size:15px;border-radius:0}
.hx-compose textarea:disabled{background:#f0f1f5}
.hx-note{padding:12px 24px 18px;font-size:12px;line-height:1.5;color:#6a7284;background:#fff}
.hx-chips{display:flex;flex-wrap:wrap;gap:8px;padding:12px 24px 0;background:#fff;border-top:1px solid #e6e9f0}
.hx-chip{appearance:none;background:#fff;border:1px solid #01257e;color:#01257e;font:inherit;font-size:13px;font-weight:600;padding:8px 12px;cursor:pointer}
.hx-chip:hover{background:#eef1f8}
@media(max-width:620px){.hx-chips{padding:12px 16px 0}
  .hx-chat{min-height:0;border-left:0;border-right:0}
  .hx-chat-head{padding:16px}.hx-log{padding:16px;max-height:380px}
  .hx-bubble{max-width:92%}.hx-gate,.hx-compose{padding:16px}.hx-note,.hx-project-bar{padding-left:16px;padding-right:16px}
  .hx-compose{flex-direction:column}.hx-btn{width:100%}
}
