.live-chat-launch {
    width: 100%;
    margin-top: 18px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

.live-chat-open {
    position: relative;
    z-index: 21;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(225, 38, 29, 0.55);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #e1261d, #8f1510);
    box-shadow: 0 12px 32px rgba(225, 38, 29, 0.22);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.live-chat-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 42px rgba(225, 38, 29, 0.32);
}

.live-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    background: rgba(0, 0, 0, 0.58);
}

.live-chat-overlay.is-open {
    display: block;
}

.live-chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: min(430px, 100vw);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(102%);
    transition: transform 0.28s ease;
    color: #fff;
    background: #080808;
    border-left: 1px solid rgba(225, 38, 29, 0.28);
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.55);
}

.live-chat-panel.is-open,
[data-live-chat].is-open .live-chat-panel {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.live-chat-header {
    flex: 0 0 auto;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(225, 38, 29, 0.18), rgba(8, 8, 8, 0));
}

.live-chat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.live-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.live-chat-title-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(225, 38, 29, 0.18);
    border: 1px solid rgba(225, 38, 29, 0.3);
    color: #ff5a51;
}

.live-chat-title strong {
    display: block;
    font-size: 17px;
}

.live-chat-title span {
    display: block;
    margin-top: 2px;
    color: #a3a3a3;
    font-size: 12px;
}

.live-chat-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.live-chat-rules {
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #d6d6d6;
    font-size: 12px;
    line-height: 1.45;
}

.live-chat-pinned {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 8px;
    border: 1px solid rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.1);
    color: #ffe08a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.live-chat-pinned::before {
    content: 'Anuncio';
    display: inline-flex;
    margin-right: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
    font-size: 11px;
}

.live-chat-pinned.hidden {
    display: none;
}

.live-chat-live {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 11px;
    border-radius: 8px;
    border: 1px solid rgba(225, 38, 29, 0.26);
    background: rgba(225, 38, 29, 0.1);
}

.live-chat-live-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff5a51;
    font-size: 10px;
    font-weight: 900;
}

.live-chat-live-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.live-chat-live strong,
.live-chat-live small {
    display: block;
}

.live-chat-live strong {
    margin-top: 3px;
    font-size: 14px;
}

.live-chat-live small {
    margin-top: 2px;
    color: #bdbdbd;
    font-size: 12px;
}

.live-chat-listeners {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e5e5;
    font-size: 11px;
    font-weight: 800;
}

.live-chat-identity {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-chat-nick-toggle {
    display: none;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(225, 38, 29, 0.32);
    border-radius: 8px;
    background: rgba(225, 38, 29, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.live-chat-nick-toggle i {
    color: #ff6259;
    font-size: 12px;
}

.live-chat-name-field {
    flex: 1;
    min-width: 0;
}

.live-chat-name-field span {
    display: block;
    margin: 0 0 6px;
    color: #d7d7d7;
    font-size: 12px;
    font-weight: 800;
}

.live-chat-identity input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #141414;
    color: #fff;
    padding: 0 12px;
    outline: none;
}

.live-chat-save-name {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e1261d;
    color: #fff;
}

.live-chat-save-name:disabled,
.live-chat-save-name.is-locked {
    cursor: not-allowed;
    opacity: 0.55;
    background: #3a3a3a;
}

.live-chat-identity input:disabled {
    color: #bdbdbd;
    background: #101010;
    cursor: not-allowed;
}

.live-chat-name-confirm {
    flex: 1 0 100%;
    margin-top: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(225, 38, 29, 0.28);
    border-radius: 8px;
    background: rgba(225, 38, 29, 0.08);
    color: #f4f4f4;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.live-chat-name-confirm.hidden {
    display: none;
}

.live-chat-name-confirm.is-confirmed {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.09);
    color: #bbf7d0;
}

.live-chat-name-confirm.is-error {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
}

.live-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-chat-poll {
    flex: 0 0 auto;
    margin: 0 16px 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(225, 38, 29, 0.28);
    background: #111;
}

.live-chat-poll.hidden {
    display: none;
}

.live-chat-poll-head span {
    display: block;
    color: #ff5a51;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.live-chat-poll-head strong {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.25;
}

.live-chat-poll-options {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.live-chat-poll-options button {
    position: relative;
    min-height: 34px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 9px;
    border-radius: 8px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: left;
}

.live-chat-poll-options button i {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 0;
    background: rgba(225, 38, 29, 0.26);
}

.live-chat-poll-options button span,
.live-chat-poll-options button em {
    position: relative;
    z-index: 1;
    font-style: normal;
    font-weight: 800;
}

.live-chat-poll-options button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-chat-poll-options button em {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    gap: 5px;
    font-size: 13px;
}

.live-chat-poll-options button em small {
    color: #bdbdbd;
    font-size: 10px;
    font-weight: 700;
}

.live-chat-poll-options button.is-voted {
    border-color: rgba(250, 204, 21, 0.38);
}

.live-chat-poll-options button:disabled {
    cursor: default;
    opacity: 0.9;
}

.live-chat-poll-total {
    margin-top: 6px;
    color: #a3a3a3;
    font-size: 10px;
}

.live-chat-empty {
    margin: auto;
    max-width: 260px;
    text-align: center;
    color: #8f8f8f;
    font-size: 14px;
}

.live-chat-message {
    max-width: 88%;
    align-self: flex-start;
}

.live-chat-message.is-me {
    align-self: flex-end;
}

.live-chat-bubble {
    padding: 10px 12px;
    border-radius: 8px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-chat-message.is-me .live-chat-bubble {
    background: rgba(225, 38, 29, 0.17);
    border-color: rgba(225, 38, 29, 0.28);
}

.live-chat-message.is-private .live-chat-bubble {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
}

.live-chat-message.is-featured .live-chat-bubble {
    border-color: rgba(250, 204, 21, 0.5);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.14), rgba(23, 23, 23, 0.95));
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.12);
}

.live-chat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: #bdbdbd;
    font-size: 11px;
    font-weight: 800;
}

.live-chat-badge {
    color: #facc15;
}

.live-chat-role-label,
.live-chat-featured-label {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.16);
    color: #facc15;
    font-size: 10px;
}

.live-chat-featured-label {
    background: rgba(225, 38, 29, 0.16);
    color: #ff7b73;
}

.live-chat-text {
    overflow-wrap: anywhere;
    color: #f8f8f8;
    font-size: 14px;
    line-height: 1.45;
}

.live-chat-composer {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 8, 0.96);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.28);
}

.live-chat-inline-reactions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.live-chat-inline-reactions::before {
    content: 'Reacciones';
    color: #a3a3a3;
    font-size: 12px;
    font-weight: 800;
    margin-right: 2px;
}

.live-chat-inline-reactions button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.live-chat-inline-reactions .live-chat-like {
    border-color: rgba(225, 38, 29, 0.55);
    background: rgba(225, 38, 29, 0.18);
}

.live-chat-quick-emojis {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    max-height: 68px;
    overflow-y: auto;
    padding-right: 2px;
}

.live-chat-quick-emojis button,
.live-chat-reactions button {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 18px;
}

.live-chat-quick-emojis button {
    width: 32px;
    height: 32px;
}

.live-chat-reactions .live-chat-like {
    width: 44px;
    height: 44px;
    border-color: rgba(225, 38, 29, 0.55);
    background: rgba(225, 38, 29, 0.18);
    box-shadow: 0 8px 26px rgba(225, 38, 29, 0.28);
    font-size: 22px;
}

.live-chat-form {
    display: flex;
    gap: 8px;
}

.live-chat-form input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #141414;
    color: #fff;
    padding: 0 12px;
    outline: none;
}

.live-chat-form button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e1261d;
    color: #fff;
}

.live-chat-back-radio {
    display: none;
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid rgba(225, 38, 29, 0.4);
    background: rgba(225, 38, 29, 0.12);
    color: #fff;
    font-weight: 800;
}

.live-chat-reactions {
    position: fixed;
    right: 448px;
    bottom: 34px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.live-chat-panel.is-open + .live-chat-reactions {
    display: flex;
}

.live-chat-float {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    font-size: 28px;
    animation: liveChatFloat 1.2s ease-out forwards;
}

.live-chat-heart {
    position: fixed;
    z-index: 10002;
    pointer-events: none;
    font-size: 25px;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
    animation: liveChatHeart 1.55s cubic-bezier(0.18, 0.82, 0.24, 1) forwards;
}

@keyframes liveChatFloat {
    from {
        transform: translateY(0) scale(0.9);
        opacity: 1;
    }
    to {
        transform: translateY(-120px) scale(1.4);
        opacity: 0;
    }
}

@keyframes liveChatHeart {
    0% {
        transform: translate(-50%, -50%) scale(0.45) rotate(-8deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--drift)), calc(-50% - var(--rise))) scale(1.65) rotate(16deg);
        opacity: 0;
    }
}

@media (max-width: 760px) {
    .live-chat-overlay {
        background: rgba(0, 0, 0, 0.42);
    }

    .live-chat-panel {
        top: 8px;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: calc(100svh - 8px);
        height: calc(100dvh - 8px);
        max-height: calc(100svh - 8px);
        max-height: calc(100dvh - 8px);
        border-left: 0;
        border-top: 1px solid rgba(225, 38, 29, 0.35);
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.65);
    }

    .live-chat-panel.is-open,
    [data-live-chat].is-open .live-chat-panel {
        transform: translateY(0);
    }

    .live-chat-header {
        padding: 12px 14px;
        position: relative;
    }

    .live-chat-header::before {
        content: '';
        display: block;
        width: 42px;
        height: 4px;
        margin: 0 auto 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.28);
    }

    .live-chat-close {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.1);
    }

    .live-chat-title-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .live-chat-title strong {
        font-size: 16px;
    }

    .live-chat-title span {
        font-size: 11px;
    }

    .live-chat-rules {
        margin-top: 10px;
        padding: 10px;
        max-height: 54px;
        overflow-y: auto;
    }

    .live-chat-identity {
        padding: 10px 12px;
    }

    .live-chat-nick-toggle {
        display: flex;
    }

    .live-chat-identity.is-nick-collapsed {
        padding: 8px 12px;
        gap: 0;
    }

    .live-chat-identity.is-nick-collapsed .live-chat-name-field,
    .live-chat-identity.is-nick-collapsed .live-chat-save-name,
    .live-chat-identity.is-nick-collapsed .live-chat-name-confirm {
        display: none;
    }

    .live-chat-messages {
        padding: 12px;
    }

    .live-chat-composer {
        padding: 10px 12px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        background: #080808;
    }

    .live-chat-back-radio {
        display: none;
    }

    .live-chat-quick-emojis {
        max-height: 48px;
        gap: 7px;
    }

    .live-chat-quick-emojis button {
        width: 31px;
        height: 31px;
        font-size: 17px;
    }

    .live-chat-reactions {
        right: 14px;
        bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .live-chat-open {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 760px) and (max-height: 760px) {
    .live-chat-panel {
        height: 100svh;
        height: 100dvh;
        max-height: 100svh;
        max-height: 100dvh;
        top: 0;
        border-radius: 0;
    }

    .live-chat-title span,
    .live-chat-rules {
        display: none;
    }

    .live-chat-identity {
        padding: 8px 12px;
    }

    .live-chat-name-field span {
        margin-bottom: 4px;
    }

    .live-chat-quick-emojis {
        max-height: 40px;
    }
}

.chat-room-page {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow: hidden;
    background: #050505;
    color: #fff;
}

.chat-room-shell {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 760px;
    margin: 0 auto;
    background: #080808;
}

.chat-room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(225, 38, 29, 0.12);
}

.chat-room-back {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.chat-room-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.chat-room-header p {
    margin: 2px 0 0;
    color: #c9c9c9;
    font-size: 12px;
}

.chat-room-info-toggle {
    display: none;
    margin: 10px 12px 0;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(225, 38, 29, 0.32);
    border-radius: 8px;
    background: rgba(225, 38, 29, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.chat-room-info-toggle i {
    color: #ff6259;
    font-size: 12px;
}

.chat-room-radio {
    margin: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(225, 38, 29, 0.25);
    border-radius: 8px;
    background: #111;
}

.chat-room-radio-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-room-radio-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(225, 38, 29, 0.18);
    color: #ff5a51;
}

.chat-room-radio-info strong,
.chat-room-radio-info span {
    display: block;
}

.chat-room-radio-info strong {
    font-size: 14px;
}

.chat-room-radio-info span {
    margin-top: 2px;
    color: #a3a3a3;
    font-size: 12px;
}

.chat-room-radio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-room-radio-controls button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e1261d;
    color: #fff;
}

.chat-room-radio-controls input {
    width: 74px;
}

.chat-room-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-room-rules {
    margin: 0 12px 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #d6d6d6;
    font-size: 12px;
}

.chat-room-card > .live-chat-pinned {
    margin: 0 12px 10px;
}

.chat-room-identity {
    padding: 10px 12px;
}

.chat-room-messages {
    flex: 1;
    min-height: 0;
    padding: 12px;
}

.chat-room-composer {
    flex: 0 0 auto;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    background: #080808;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.28);
}

.chat-room-reactions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.chat-room-reactions button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 18px;
}

@media (max-width: 760px) {
    .chat-room-info-toggle {
        display: flex;
    }

    .chat-room-shell.is-info-collapsed .chat-room-radio,
    .chat-room-shell.is-info-collapsed .chat-room-live,
    .chat-room-shell.is-info-collapsed .chat-room-rules {
        display: none;
    }

    .chat-room-radio {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .chat-room-live {
        margin: 8px 12px 0;
    }

    .chat-room-rules {
        margin-bottom: 8px;
    }
}
