.unf-chat-root {
    position: relative;
    z-index: 5000;
    font-family: inherit;
    color: var(--ink, #26384d)
}
.unf-chat-root [hidden] {
    display: none !important
}
.unf-chat-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 5001;
    width: 68px;
    height: 68px;
    padding: 4px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 50%;
    background: linear-gradient(145deg,var(--navy-2,#0d3159),var(--navy,#061d3b));
    box-shadow: 0 16px 38px rgba(6,29,59,.3);
    cursor: pointer;
    transition: transform .2s ease,box-shadow .2s ease
}
.unf-chat-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 42px rgba(6,29,59,.36)
}
.unf-chat-launcher:focus-visible,
.unf-chat-panel button:focus-visible,
.unf-chat-panel input:focus-visible,
.unf-chat-panel textarea:focus-visible {
    outline: 3px solid var(--gold,#c9975b);
    outline-offset: 2px
}
.unf-chat-launcher img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%
}
.unf-chat-launcher-badge {
    position: absolute;
    right: -3px;
    top: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--wine,#8a263f);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1
}
.unf-chat-panel {
    position: fixed;
    right: 22px;
    bottom: 100px;
    z-index: 5002;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    width: min(390px,calc(100vw - 28px));
    height: min(600px,calc(100vh - 130px));
    min-height: 410px;
    overflow: hidden;
    border: 1px solid rgba(201,151,91,.42);
    border-radius: 22px;
    background: var(--paper,#fffaf4);
    box-shadow: 0 24px 66px rgba(6,29,59,.28)
}
.unf-chat-panel.is-dragging {
    box-shadow: 0 30px 78px rgba(6,29,59,.38)
}
.unf-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 9px 10px 9px 14px;
    color: #fff;
    background: linear-gradient(125deg,var(--navy,#061d3b),var(--navy-2,#0d3159));
    cursor: grab;
    touch-action: none
}
.unf-chat-panel.is-dragging .unf-chat-header {
    cursor: grabbing
}
.unf-chat-header-copy {
    min-width: 0;
    flex: 1
}
.unf-chat-header-copy strong {
    display: block;
    overflow: hidden;
    font-family: Georgia,"Times New Roman",serif;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap
}
.unf-chat-presence {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: rgba(255,255,255,.82);
    font-size: .72rem
}
.unf-chat-presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9fe0b7;
    box-shadow: 0 0 0 3px rgba(159,224,183,.16)
}
.unf-chat-header-actions {
    display: flex;
    gap: 4px
}
.unf-chat-icon-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #49617d;
    cursor: pointer;
    font-size: 1rem
}
.unf-chat-icon-button:hover {
    background: rgba(255,255,255,.2)
}
.unf-chat-body {
    position: relative;
    display: flex;
    min-height: 0;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% 10%,rgba(232,180,193,.22),transparent 26%),
        linear-gradient(180deg,#fffaf4,#fbf2e8)
}
.unf-chat-notice {
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(232,211,198,.9);
    color: var(--muted,#687484);
    background: rgba(255,255,255,.66);
    font-size: .7rem;
    line-height: 1.35;
    text-align: center
}
.unf-chat-messages {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(138,38,63,.42) transparent
}
.unf-chat-empty {
    display: grid;
    min-height: 100%;
    place-content: center;
    gap: 8px;
    padding: 22px;
    color: var(--muted,#687484);
    text-align: center
}
.unf-chat-empty img {
    width: 78px;
    height: 78px;
    margin: 0 auto;
    object-fit: contain
}
.unf-chat-empty strong {
    color: var(--navy,#061d3b);
    font-family: Georgia,"Times New Roman",serif;
    font-weight: 500
}
.unf-chat-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 11px
}
.unf-chat-message.is-own {
    align-items: flex-end
}
.unf-chat-message-meta {
    display: flex;
    align-items: baseline;
    gap: 7px;
    max-width: 88%;
    margin: 0 4px 4px;
    color: var(--muted,#687484);
    font-size: .68rem
}
.unf-chat-message-author {
    padding: 0;
    overflow: hidden;
    border: 0;
    color: var(--wine,#8a263f);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap
}
.unf-chat-message-author:hover {
    text-decoration: underline
}
.unf-chat-message-bubble {
    max-width: 88%;
    padding: 9px 11px;
    border: 1px solid rgba(232,211,198,.95);
    border-radius: 15px 15px 15px 5px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 5px 14px rgba(17,36,61,.07);
    overflow-wrap: anywhere;
    white-space: pre-wrap
}
.unf-chat-message.is-own .unf-chat-message-bubble {
    border-color: rgba(13,49,89,.22);
    border-radius: 15px 15px 5px 15px;
    color: #fff;
    background: linear-gradient(140deg,var(--navy-2,#0d3159),var(--navy,#061d3b))
}
.unf-chat-reply-quote {
    display: block;
    margin: 0 0 7px;
    padding: 6px 8px;
    border-left: 3px solid var(--pink,#e8b4c1);
    border-radius: 6px;
    color: var(--muted,#687484);
    background: rgba(251,242,232,.86);
    font-size: .7rem;
    line-height: 1.3
}
.unf-chat-message.is-own .unf-chat-reply-quote {
    color: #fff;
    background: #344f70
}
.unf-chat-message-text {
    margin: 0;
    font-size: .86rem;
    line-height: 1.45
}
.unf-chat-message-reply {
    margin: 4px 4px 0;
    padding: 2px 0;
    border: 0;
    color: var(--muted,#687484);
    background: transparent;
    cursor: pointer;
    font-size: .66rem
}
.unf-chat-message-reply:hover {
    color: var(--wine,#8a263f);
    text-decoration: underline
}
.unf-chat-footer {
    border-top: 1px solid var(--border,#e8d3c6);
    background: rgba(255,250,244,.98)
}
.unf-chat-status {
    min-height: 22px;
    margin: 0;
    padding: 5px 12px 0;
    color: var(--muted,#687484);
    font-size: .7rem;
    line-height: 1.25
}
.unf-chat-status.is-error {
    color: #9b2338
}
.unf-chat-join {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    padding: 8px 10px 11px
}
.unf-chat-join label {
    grid-column: 1/-1;
    color: var(--navy,#061d3b);
    font-size: .72rem;
    font-weight: 700
}
.unf-chat-legal {
    grid-column: 1/-1;
    margin: -3px 0 0;
    color: var(--muted,#687484);
    font-size: .64rem;
    line-height: 1.35
}
.unf-chat-legal a {
    color: var(--wine,#8a263f);
    font-weight: 700
}
.unf-chat-join input,
.unf-chat-composer textarea {
    width: 100%;
    border: 1px solid var(--border,#e8d3c6);
    border-radius: 12px;
    color: var(--ink,#26384d);
    background: #fff;
    font: inherit
}
.unf-chat-join input {
    min-width: 0;
    padding: 10px 11px
}
.unf-chat-primary-button {
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    color: #fff;
    background: var(--wine,#8a263f);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 800
}
.unf-chat-primary-button:disabled {
    cursor: not-allowed;
    opacity: .55
}
.unf-chat-reply-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 10px 0;
    padding: 7px 8px;
    border-left: 3px solid var(--pink,#e8b4c1);
    border-radius: 8px;
    color: var(--muted,#687484);
    background: rgba(232,180,193,.13);
    font-size: .68rem
}
.unf-chat-reply-preview span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}
.unf-chat-reply-preview button {
    border: 0;
    color: var(--wine,#8a263f);
    background: transparent;
    cursor: pointer;
    font-weight: 800
}
.unf-chat-composer {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: end;
    gap: 7px;
    padding: 8px 10px 10px
}
.unf-chat-composer textarea {
    min-height: 42px;
    max-height: 110px;
    padding: 10px 11px;
    resize: none;
    line-height: 1.35
}
.unf-chat-emoji-toggle,
.unf-chat-send-button,
.unf-chat-leave-button {
    border: 0;
    cursor: pointer;
    font: inherit
}
.unf-chat-emoji-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--navy,#061d3b);
    background: rgba(232,180,193,.22);
    font-size: 1.1rem
}
.unf-chat-send-button {
    min-width: 64px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    color: #fff;
    background: var(--navy-2,#0d3159);
    font-size: .76rem;
    font-weight: 800
}
.unf-chat-send-button:disabled,
.unf-chat-emoji-toggle:disabled {
    cursor: not-allowed;
    opacity: .5
}
.unf-chat-emoji-picker {
    display: grid;
    grid-template-columns: repeat(8,1fr);
    gap: 3px;
    margin: 0 10px 2px;
    padding: 7px;
    border: 1px solid var(--border,#e8d3c6);
    border-radius: 12px;
    background: #fff
}
.unf-chat-emoji-picker button {
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 1.05rem
}
.unf-chat-emoji-picker button:hover {
    background: var(--cream,#fbf2e8)
}
.unf-chat-member-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px 8px;
    color: var(--muted,#687484);
    font-size: .66rem
}
.unf-chat-leave-button {
    padding: 3px 0;
    color: var(--wine,#8a263f);
    background: transparent;
    font-size: .66rem;
    font-weight: 800
}
.unf-chat-unread-dot {
    position: absolute;
    right: 14px;
    bottom: 12px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--wine,#8a263f)
}
body.unf-chat-dragging {
    user-select: none
}
@media (max-width:640px) {
    .unf-chat-root .unf-chat-launcher {
        right: 14px;
        bottom: 14px;
        width: 62px;
        height: 62px
    }
    .unf-chat-root .unf-chat-panel {
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        top: 8px !important;
        width: auto;
        height: auto;
        min-height: 0;
        border-radius: 18px
    }
    .unf-chat-root .unf-chat-header {
        cursor: default;
        touch-action: auto
    }
    .unf-chat-message-bubble,
    .unf-chat-message-meta {
        max-width: 94%
    }
}
@media (prefers-reduced-motion:reduce) {
    .unf-chat-root > .unf-chat-launcher {
        transition: none
    }
}
