#support-chat-root { color:#eee; background:#111; border:1px solid #544816; border-radius:16px; padding:14px; margin:16px auto; max-width:640px; font:14px/1.5 sans-serif; }
#support-chat-root summary {cursor:pointer;padding:8px;font-weight:bold;}
#support-chat-root .sc-history {display:flex;flex-direction:column;gap:8px;overflow:auto;height:260px;max-height:40dvh;}
#support-chat-root .sc-message {white-space:pre-wrap;overflow-wrap:anywhere;max-width:88%;border-radius:14px;padding:10px 14px;margin:3px;}
#support-chat-root .sc-user {align-self:flex-end;background:#514611;}
#support-chat-root .sc-admin {align-self:flex-start;background:#222;}
#support-chat-root time {display:block;text-align:right;font-size:10px;opacity:.7;}
#support-chat-root a {display:block;color:#ffd700;}
#support-chat-root select,#support-chat-root textarea,#support-chat-root input {display:block;box-sizing:border-box;max-width:100%;width:100%;background:#222;color:#fff;border:1px solid #544816;border-radius:10px;padding:10px;margin:8px 0;font-size:16px;}
#support-chat-root button {border:0;border-radius:10px;padding:12px 20px;background:#ffd700;color:#111;cursor:pointer;min-height:44px;}
#support-chat-root .sc-error {color:#ffbbad;overflow-wrap:anywhere;}

#support-chat-root[data-floating] {position:fixed;right:16px;bottom:16px;z-index:1000;width:min(380px,calc(100vw - 32px));box-sizing:border-box;margin:0;max-height:calc(100dvh - 32px);overflow:auto;}

#support-chat-root summary {list-style:none;}
#support-chat-root summary::-webkit-details-marker {display:none;}
#support-chat-root[data-floating]:not(:has(details[open])) {width:60px;height:60px;padding:0;border:0;border-radius:50%;background:#ffd700;color:#000;overflow:visible;box-shadow:0 4px 20px #ffd7004d;}
#support-chat-root[data-floating] details:not([open]) summary {display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:60px;height:60px;padding:0;font-size:24px;}
#support-chat-root[data-floating] details:not([open]) summary span {display:none;}
#support-chat-root .sc-attach {position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;cursor:pointer;font-size:24px;border:1px solid #544816;border-radius:10px;vertical-align:middle;}
#support-chat-root .sc-attach input {position:absolute;inset:0;opacity:0;cursor:pointer;margin:0;padding:0;height:100%;}
#support-chat-root .sc-attach:focus-within {outline:2px solid #ffd700;outline-offset:2px;}
#support-chat-root .sc-files {display:inline-block;max-width:65%;overflow-wrap:anywhere;vertical-align:middle;margin:8px;}
#support-chat-root button:disabled {opacity:.5;cursor:wait;}

/* Site palette: gold actions and client bubbles, charcoal conversation panel. */
#support-chat-root {border-color:#705d00;border-top:3px solid #ffd700;background:#111;color:#f5f5f5;box-shadow:0 8px 32px #0008;}
#support-chat-root summary {color:#ffd700;}
#support-chat-root .sc-user {background:#ffd700;color:#111;}
#support-chat-root .sc-user a {color:#111;text-decoration:underline;}
#support-chat-root .sc-admin {background:#262626;color:#f5f5f5;}
#support-chat-root select:focus,#support-chat-root textarea:focus {outline:2px solid #ffd700;outline-offset:1px;}
#support-chat-root button:hover:not(:disabled) {background:#ffe44d;}
#support-chat-root[data-floating] details:not([open]) summary {color:#000;}

#support-chat-root { --sc-accent:#ffd700;--sc-on-accent:#111; }

/* Guest draft and Telegram handoff reuse the authenticated support widget. */
#support-chat-root [hidden] {display:none!important;}
#support-chat-root details[open] summary {display:flex;align-items:center;gap:8px;}
#support-chat-root .sc-close {margin-left:auto;font-size:24px;line-height:1;}
#support-chat-root .sc-brand {font-size:12px;opacity:.65;margin:0 8px 12px;}
#support-chat-root .sc-auth {border:1px solid var(--sc-accent);border-radius:12px;padding:12px;margin:10px 0;}
#support-chat-root .sc-auth p {margin:0 0 10px;}
#support-chat-root .sc-auth p:last-child {margin:10px 0 0;font-size:12px;opacity:.8;}
#support-chat-root .sc-auth-link {background:var(--sc-accent);color:var(--sc-on-accent);border-radius:10px;padding:12px;text-align:center;font-weight:700;text-decoration:none;}
#support-chat-root .sc-file-hint {font-size:12px;opacity:.65;margin:6px 0;}
#support-chat-root .sc-pending small {display:block;margin-top:6px;font-size:11px;opacity:.7;}
#support-chat-root .sc-reset {background:transparent;color:inherit;border:1px solid currentColor;padding:10px 14px;margin-top:8px;}
#support-chat-root textarea {min-height:80px;resize:vertical;}
#support-chat-root[data-floating] {right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));max-height:calc(var(--sc-viewport-height,100dvh) - 32px);overscroll-behavior:contain;}
#support-chat-root .sc-history:empty {height:90px;}
#support-chat-root .sc-history {height:220px;max-height:30dvh;}
#support-chat-root .sc-send {margin-top:6px;}
#support-chat-root .sc-reset:hover:not(:disabled) {background:#ffffff18;}
@media(max-width:480px){
    #support-chat-root[data-floating] {right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:calc(100vw - 16px);max-height:calc(var(--sc-viewport-height,100dvh) - 16px);padding:12px;}
    #support-chat-root[data-floating]:not(:has(details[open])) {width:52px;height:52px;padding:0;}
    #support-chat-root[data-floating] details:not([open]) summary {width:52px;height:52px;}
    #support-chat-root .sc-history {max-height:24dvh;}
}

#support-chat-root .sc-history:has(.sc-pending) {height:auto;min-height:80px;max-height:160px;}
#support-chat-root textarea {font-family:inherit;}
