.kg-app-v2 #chat-window .msg.msg--game {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0;
    max-width: min(520px, 78vw);
}

.kg-app-v2 #chat-window .msg.msg--game::before,
.kg-app-v2 #chat-window .msg.msg--game::after {
    display: none !important;
}

.kg-app-v2 #chat-window .msg.msg--game .msg-time {
    right: 12px;
    bottom: 44px;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

.chat-game-card {
    width: min(520px, 78vw);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(16, 26, 40, 0.58);
    border: 1px solid rgba(114, 145, 181, 0.28);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.chat-game-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #fff;
    font-weight: 800;
}

.chat-game-card__command {
    color: rgba(210, 222, 236, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.chat-game-frame-wrap {
    width: 100%;
    height: 360px;
    background: transparent;
}

.chat-game-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.chat-game-fullscreen-btn {
    width: calc(100% - 20px);
    margin: 10px;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    background: rgba(52, 60, 99, 0.92);
    font-weight: 800;
    cursor: pointer;
}

.chat-game-fullscreen-btn:hover {
    background: rgba(73, 86, 143, 0.98);
}

.chat-game-card:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #101a28;
}

.chat-game-card:fullscreen .chat-game-frame-wrap {
    flex: 1;
    height: auto;
}

.chat-game-card--expanded {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    width: 100vw;
    max-width: none;
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #101a28;
}

.chat-game-card--expanded .chat-game-frame-wrap {
    flex: 1;
    height: auto;
}

@media (max-width: 1000px) {
    .kg-app-v2 #chat-window .msg.msg--game {
        max-width: calc(100vw - 72px);
    }

    .chat-game-card {
        width: calc(100vw - 72px);
    }

    .chat-game-frame-wrap {
        height: 320px;
    }

    .chat-game-card__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}
