.xh-chat{position:fixed;right:20px;bottom:20px;z-index:3000;font-family:var(--sans,system-ui,sans-serif);color:#f2f2f2}
.xh-chat .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.xh-chat *{box-sizing:border-box}.xh-chat [hidden]{display:none!important}
.xh-chat-toggle{display:flex;align-items:center;gap:10px;position:relative;border:1px solid #515151;border-radius:999px;background:#f2f2f2;color:#101010;padding:11px 17px;box-shadow:0 12px 35px #0006;font:600 13px var(--sans,system-ui,sans-serif);cursor:pointer}
.xh-chat-toggle:hover{background:#fff}.xh-chat-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.xh-chat-badge{display:grid;place-items:center;min-width:19px;height:19px;padding:0 4px;border-radius:50%;background:#bf4c4c;color:white;font-size:10px}
.xh-chat-panel{position:absolute;right:0;bottom:62px;display:flex;flex-direction:column;width:min(380px,calc(100vw - 24px));height:min(590px,calc(100dvh - 100px));overflow:hidden;border:1px solid #484848;border-radius:14px;background:#141414;box-shadow:0 24px 65px #0009}
.xh-chat-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none;padding:17px 18px;background:#1e1e1e;border-bottom:1px solid #333}.xh-chat-header div{display:grid;gap:4px}.xh-chat-header strong{font-size:16px}.xh-chat-header span{font-size:11px;color:#bdbdbd}.xh-chat-close{border:0;background:transparent;color:#ddd;font-size:26px;line-height:1;cursor:pointer}
.xh-chat-intro{display:grid;gap:4px;padding:13px 18px;border-bottom:1px solid #292929;background:#171717}.xh-chat-intro strong{font-size:13px}.xh-chat-intro span{font-size:11px;color:#aaa}
.xh-chat-log{display:flex;flex-direction:column;gap:11px;flex:1;overflow-y:auto;padding:17px 14px;scroll-behavior:smooth}.xh-chat-placeholder{margin:auto;color:#999;font-size:12px;text-align:center}
.xh-chat-message{max-width:88%;padding:10px 12px;border:1px solid #383838;border-radius:11px;background:#242424;overflow-wrap:anywhere}.xh-chat-message.is-visitor{align-self:flex-end;background:#ededed;color:#161616;border-color:#ededed}.xh-chat-message.is-staff{align-self:flex-start}.xh-chat-message p{margin:0;font-size:13px;line-height:1.6;white-space:pre-wrap}.xh-chat-message small{display:block;margin-top:7px;font-size:10px;color:#aaa}.xh-chat-message.is-visitor small{color:#626262}
.xh-chat-older{align-self:center;margin:5px;border:0;background:transparent;color:#cfcfcf;font-size:11px;text-decoration:underline;cursor:pointer}.xh-chat-notice{margin:0;padding:9px 14px;background:#312b21;color:#e3d2a8;font-size:11px}
.xh-chat-form{flex:none;border-top:1px solid #343434;padding:12px 14px 14px;background:#181818}.xh-chat-profile{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.xh-chat input,.xh-chat textarea{width:100%;min-height:0!important;padding:8px 10px!important;border:1px solid #464646!important;border-radius:6px!important;background:#101010!important;color:#f2f2f2!important;font:12px var(--sans,system-ui,sans-serif)!important}.xh-chat textarea{resize:vertical;min-height:56px!important;max-height:120px}.xh-chat input:focus,.xh-chat textarea:focus{outline:2px solid #888;outline-offset:1px}.xh-chat-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:7px}.xh-chat-actions span{font-size:10px;color:#929292}.xh-chat-actions button{flex:none;border:0;border-radius:5px;background:#eee;color:#111;padding:8px 14px;font:600 12px var(--sans,system-ui,sans-serif);cursor:pointer}.xh-chat-actions button:disabled{opacity:.5;cursor:wait}.xh-chat-error{min-height:0;margin:5px 0 0;color:#f0aaaa;font-size:11px}.xh-chat-error:empty{display:none}
.xh-chat-message a{display:block;margin-top:7px}.xh-chat-message a:first-child{margin-top:0}.xh-chat-message img{display:block;max-width:100%;max-height:230px;border-radius:6px;object-fit:contain}
.xh-chat-tools{display:flex;align-items:center;gap:9px;margin-top:5px}.xh-chat-tools span{font-size:10px;color:#929292}.xh-chat-tools .xh-chat-attach{border:1px solid #555;border-radius:5px;background:#282828;color:#eee;padding:5px 8px;font-size:11px;cursor:pointer}.xh-chat-tools .xh-chat-attach:hover{background:#363636}.xh-chat-preview{display:flex;align-items:center;gap:8px;margin-top:8px;padding:7px;border:1px solid #444;border-radius:6px;background:#222}.xh-chat-preview img{width:42px;height:42px;object-fit:cover;border-radius:4px}.xh-chat-preview span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.xh-chat-preview button{border:0;background:transparent;color:#ddd;font-size:11px;text-decoration:underline;cursor:pointer}
@media(max-width:520px){.xh-chat{right:12px;bottom:12px}.xh-chat-panel{bottom:58px;width:calc(100vw - 24px);height:min(600px,calc(100dvh - 82px))}.xh-chat-toggle{padding:11px 14px}}
