#pwt-chat {
    --pwt-chat-dock: env(safe-area-inset-bottom, 0px);
    --pwt-chat-surface: #12101b;
    position: fixed;
    z-index: 9990;
    inset: auto max(14px, env(safe-area-inset-right, 0px)) calc(var(--pwt-chat-dock) + 14px) auto;
    color: #fff;
    font: 400 15px/1.45 Inter, system-ui, sans-serif;
    text-align: left;
    isolation: isolate;
}
#pwt-chat *, #pwt-chat *::before { box-sizing: border-box; }
#pwt-chat [hidden] { display: none !important; }
#pwt-chat button, #pwt-chat input { font: inherit; letter-spacing: normal; text-transform: none; }
#pwt-chat button { cursor: pointer; }
#pwt-chat :focus-visible { outline: 2px solid #00c5d8; outline-offset: 2px; }
#pwt-chat .pwt-chat-launch {
    display: grid; place-items: center;
    width: 54px; height: 54px; min-width: 44px; padding: 0;
    border: 1px solid #9a76e3; border-radius: 50%;
    background: linear-gradient(140deg, #442182, #105762);
    color: #fff; box-shadow: 0 7px 23px #05070a70;
}
#pwt-chat .pwt-chat-launch svg { width: 28px; height: 28px; }
#pwt-chat .pwt-chat-panel {
    position: absolute; right: 0; bottom: 64px; display: flex; flex-direction: column;
    width: min(355px, calc(100vw - 28px));
    max-height: min(480px, calc(100vh - var(--pwt-chat-dock) - 94px));
    max-height: min(480px, calc(100dvh - var(--pwt-chat-dock) - 94px));
    background: var(--pwt-chat-surface); border: 1px solid #74529e; border-radius: 16px;
    overflow: hidden; box-shadow: 0 14px 42px #05070aa0;
}
#pwt-chat .pwt-chat-header {
    display: flex; gap: 10px; align-items: center; justify-content: space-between;
    background: linear-gradient(130deg, #442182, #143540); padding: 12px 12px 12px 15px;
}
#pwt-chat .pwt-chat-brand span { display: block; color: #d9eff6; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
#pwt-chat h2 { color: #fff; margin: 4px 0 0; font: 650 17px/1.2 Inter, system-ui, sans-serif; }
#pwt-chat .pwt-chat-close {
    flex: 0 0 44px; height: 44px; padding: 0; color: #fff;
    border: 0; border-radius: 8px; background: transparent; font-size: 25px;
}
#pwt-chat .pwt-chat-log { overflow: auto; min-height: 50px; padding: 12px 13px; overscroll-behavior: contain; }
#pwt-chat .pwt-chat-message {
    margin: 0 12px 9px 0; width: fit-content; max-width: 94%; padding: 8px 11px;
    border-radius: 2px 12px 12px 12px; background: #292238; color: #fff;
    font: inherit; font-size: 14px; overflow-wrap: anywhere;
}
#pwt-chat .pwt-chat-visitor { margin: 0 0 9px auto; border-radius: 12px 2px 12px 12px; background: #3d2460; }
#pwt-chat .pwt-chat-message a { color: #8de8f2; text-decoration: underline; text-underline-offset: 2px; }
#pwt-chat .pwt-chat-topics {
    display: flex; flex-wrap: wrap; gap: 5px; max-height: 126px; overflow: auto; padding: 5px 12px 8px;
}
#pwt-chat .pwt-chat-topics button {
    background: #201a2e; color: #f4eefe; border: 1px solid #695586; border-radius: 16px;
    min-height: 36px; padding: 4px 9px; font-size: 12px;
}
#pwt-chat .pwt-chat-compose { display: flex; gap: 7px; margin: 0; padding: 10px 12px; border-top: 1px solid #46375b; }
#pwt-chat .pwt-chat-compose input {
    flex: 1; width: 0; min-width: 0; margin: 0; padding: 7px 10px; border-radius: 7px;
    border: 1px solid #695586; background: #0d0b12; color: #fff; font-size: 16px;
}
#pwt-chat .pwt-chat-compose input::placeholder { color: #bdb2cc; }
#pwt-chat .pwt-chat-compose button {
    margin: 0; padding: 6px 11px; min-height: 44px; border: 1px solid #9a76e3; border-radius: 7px;
    color: #fff; background: #442182; font-weight: 650;
}
#pwt-chat .pwt-chat-header,
#pwt-chat .pwt-chat-topics,
#pwt-chat .pwt-chat-compose { flex: 0 0 auto; }
#pwt-chat .pwt-chat-log { flex: 1 1 auto; }
