.table-chat{position:fixed;right:18px;bottom:var(--chat-bottom,calc(150px + env(safe-area-inset-bottom,0px)));z-index:65;font:16px/1.4 system-ui,sans-serif;color:#f6f2e9;max-width:calc(100vw - 24px)}
.table-chat [hidden],.table-chat[hidden]{display:none!important}
.table-chat button{font:inherit;color:inherit;cursor:pointer;border:1px solid #788367;border-radius:10px;background:#23342d;min-height:44px;padding:8px 14px}
.table-chat button:focus-visible,.table-chat textarea:focus-visible{outline:2px solid #e4c48d;outline-offset:3px}
.table-chat button:disabled{cursor:default;opacity:.55}
.table-chat-toggle{display:flex;align-items:center;gap:9px;box-shadow:0 4px 16px #0008}
.table-chat-unread{display:inline-grid;place-items:center;min-width:24px;padding:0 5px;border-radius:20px;background:#e4c48d;color:#18251f;font-size:13px;font-weight:700}
.table-chat-panel{width:340px;max-width:calc(100vw - 24px);max-height:min(420px,calc(100dvh - 190px));display:flex;flex-direction:column;background:#111e19;border:1px solid #657052;border-radius:14px;box-shadow:0 10px 35px #000a;overflow:hidden}
.table-chat-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;border-bottom:1px solid #35483a;flex-shrink:0}
.table-chat-panel h2{margin:0;font-size:17px;font-weight:650}
.table-chat-panel>header button{border:0;background:transparent;font-size:26px;width:44px;padding:0}
.table-chat-messages{margin:0;padding:12px;list-style:none;overflow:auto;overscroll-behavior:contain;flex:1 1 200px;min-height:50px;scrollbar-width:thin}
.table-chat-message{padding:8px 10px;margin:0 0 8px;border-radius:10px;background:#23372c;overflow-wrap:anywhere}
.table-chat-message.is-own{background:#344432;border:1px solid #61704a}
.table-chat-message>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:13px;color:#d5ddcf}
.table-chat-message strong{font-size:14px}
.table-chat-message time{white-space:nowrap;font-size:11px;color:#a7b4a1}
.table-chat-message p{white-space:pre-wrap;margin:4px 0 0;font-size:16px;line-height:1.45}
.table-chat-empty{padding:12px 3px;color:#bec8b9;font-size:14px}
.table-chat-form{padding:10px 12px;border-top:1px solid #35483a;flex-shrink:0}
.table-chat-form label{display:block;font-size:13px;font-weight:650;margin-bottom:4px}
.table-chat-form textarea{box-sizing:border-box;display:block;width:100%;min-height:54px;max-height:90px;resize:none;background:#182b20;color:#fff;border:1px solid #718068;border-radius:8px;padding:8px;font:16px/1.35 system-ui,sans-serif}
.table-chat-form textarea:disabled{opacity:.65}
.table-chat-form-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:5px}
.table-chat-counter{font-size:12px;color:#bdc8b7}
.table-chat-form-actions button{background:#e4c48d;color:#1b271f;border-color:#e4c48d;min-height:44px;padding:5px 16px;font-weight:700}
.table-chat-status{margin:5px 0 0;font-size:11px;color:#bdc8b7;line-height:1.3}
@media(max-width:700px){.table-chat{right:10px;bottom:var(--chat-bottom,calc(180px + env(safe-area-inset-bottom,0px)))}.table-chat-panel{max-height:var(--chat-mobile-height,45dvh)}.table-chat-panel>header{padding:2px 9px}.table-chat-form{padding:6px 9px}.table-chat-form label{display:none}.table-chat-form textarea{min-height:43px;height:43px}.table-chat-messages{min-height:30px;padding:8px}.table-chat-message{padding:6px 8px}.table-chat-status{font-size:10px}}
@media(orientation:landscape) and (max-height:540px){.table-chat{right:10px;bottom:var(--chat-bottom,calc(100px + env(safe-area-inset-bottom,0px)))}.table-chat-panel{max-height:65dvh}.table-chat-panel>header{padding:0 8px}.table-chat-form{padding:4px 8px}.table-chat-form label,.table-chat-status{display:none}.table-chat-form textarea{min-height:38px;height:38px}.table-chat-form-actions{margin-top:3px}.table-chat-form-actions button{padding:3px 14px}.table-chat-messages{min-height:25px;padding:6px}}
.table-chat.is-keyboard-open .table-chat-panel{max-height:var(--chat-mobile-height,45dvh)}
.table-chat.is-keyboard-open .table-chat-status{display:none}
