[data-discord-widget] {
    --discord-blurple: #5865F2;
}

.dw-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(122, 74, 255, 0.15);
    transition: box-shadow 0.3s ease;
    min-height: 0;
    overflow: hidden;
}

.dw-card:hover {
    box-shadow: 0 30px 60px -12px rgba(122, 74, 255, 0.25), 0 0 30px rgba(122, 74, 255, 0.05);
}

.dw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dw-header h2 {
    color: #c4a0ff;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(270deg, #7a4aff, #9a7aff, #c8a0ff, #9a7aff, #7a4aff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: dw-shimmer 6s linear infinite;
}

@keyframes dw-shimmer {
    to { background-position: 200% center; }
}

.dw-server-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 0.9rem;
    background: rgba(10, 12, 40, 0.5);
    margin-bottom: 1rem;
}

.dw-server-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865F2, #7a4aff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.dw-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dw-server-meta {
    flex: 1;
    min-width: 0;
}

.dw-server-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    min-width: 0;
}

.dw-server-name-row .dw-invite-btn {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.dw-server-name-row .dw-server-name {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.dw-server-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e8ff;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-server-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: #8a8ab0;
    flex-wrap: wrap;
}

.dw-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dw-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dw-stat-dot.members { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.dw-invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.6rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: normal;
    color: #fff;
    background: linear-gradient(135deg, #5a2adf, #7a4aff);
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dw-invite-btn:hover {
    background: linear-gradient(135deg, #633aef, #8a5aff);
    border-color: var(--btn-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(122, 74, 255, 0.25);
}

.dw-widget-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0.75rem;
    min-height: 0;
    flex: 1;
}

.dw-channel-panel {
    background: rgba(10, 12, 40, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 0.9rem;
    overflow-y: auto;
    padding: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #4a2a7a transparent;
    min-height: 0;
}

.dw-channel-panel::-webkit-scrollbar { width: 6px; }
.dw-channel-panel::-webkit-scrollbar-thumb { background: #4a2a7a; border-radius: 3px; }

.dw-channel-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6a6a90;
    padding: 0.7rem 0.5rem 0.3rem;
}

.dw-channel-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #a0a8c8;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-channel-item:hover {
    background: rgba(122, 74, 255, 0.12);
    color: #e0e8ff;
}

.dw-channel-item.active {
    background: rgba(122, 74, 255, 0.22);
    color: #fff;
}

.dw-channel-item .hash {
    color: #5a5a7a;
    flex-shrink: 0;
}

.dw-channel-item .chan-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-locked-msg {
    flex-direction: column;
    gap: 0.7rem;
    max-width: 460px;
    margin: 0 auto;
}

.dw-locked-text {
    font-size: 0.95rem;
    color: #c8d8f8;
    text-align: center;
    line-height: 1.5;
}

.dw-locked-msg a {
    color: #9a7aff;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 0.6rem;
}

.dw-locked-msg a:hover {
    background: rgba(122, 74, 255, 0.15);
}

.dw-chat-panel {
    background: rgba(8, 10, 30, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.dw-chat-header {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
    color: #c0c8e8;
    font-weight: 600;
    background: rgba(13, 15, 48, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dw-chat-header .hash { color: #5a5a7a; }

.dw-chat-header .topic {
    font-weight: 400;
    font-size: 0.75rem;
    color: #6a6a90;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.dw-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #4a2a7a transparent;
}

.dw-messages::-webkit-scrollbar { width: 6px; }
.dw-messages::-webkit-scrollbar-thumb { background: #4a2a7a; border-radius: 3px; }

.dw-msg {
    display: flex;
    gap: 0.7rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.5rem;
}

.dw-msg.grouped {
    margin-top: -0.6rem;
    padding-top: 0.05rem;
    padding-bottom: 0.05rem;
    padding-left: calc(0.4rem + 38px + 0.7rem);
}

.dw-msg.group-start {
    padding-bottom: 0.05rem;
}

.dw-msg.grouped .dw-msg-body {
    margin-top: 0;
}

.dw-msg:hover { background: rgba(122, 74, 255, 0.06); }

.dw-msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #5865F2, #7a4aff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    overflow: hidden;
    margin-top: 0.1rem;
}

.dw-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dw-msg-body { min-width: 0; flex: 1; }

.dw-msg-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: #d0d8f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dw-msg-author .bot-tag {
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--discord-blurple);
    color: #fff;
    padding: 0.08rem 0.35rem;
    border-radius: 0.4rem;
}

.dw-msg-author .time {
    font-weight: 400;
    font-size: 0.68rem;
    color: #5a5a7a;
}

.dw-msg-author .edited-mark {
    font-weight: 400;
    font-size: 0.68rem;
    color: #6a6a90;
    font-style: italic;
}

.dw-username-solid {
    position: relative;
}

.dw-username-grad {
    position: relative;
    background-size: 100px;
    background-repeat: repeat;
    -webkit-text-fill-color: transparent;
}

.dw-username-grad::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: inherit;
    background-repeat: inherit;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(4px);
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    z-index: -1;
    pointer-events: none;
}

.dw-msg:hover .dw-username-grad::after,
.dw-msg-author:hover .dw-username-grad::after,
.dw-user-mention:hover::after,
.dw-reply:hover .reply-author.dw-username-grad::after {
    opacity: 0.7;
}

.dw-msg:hover .dw-username-grad,
.dw-msg-author:hover .dw-username-grad,
.dw-user-mention.dw-username-grad:hover,
.dw-reply:hover .reply-author.dw-username-grad {
    animation: dw-username-shimmer 3s linear infinite;
}

@keyframes dw-username-shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 200px 0; }
}

.dw-reply {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin: 0 0 0.25rem 0;
    font-size: 0.75rem;
    color: #8a8ab0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-reply .reply-author {
    font-weight: 600;
    color: #b0b8d8;
    flex-shrink: 0;
}

.dw-reply .reply-preview {
    color: #7a7a9a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dw-reply .reply-preview .emoji {
    font-size: 1em;
    vertical-align: middle;
}

.dw-msg-content {
    font-size: 0.85rem;
    color: #c8d8f8;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    white-space: pre-wrap;
    margin-bottom: 0.3rem;
}

.dw-msg-content .emoji { font-size: 1.1em; vertical-align: middle; }

.dw-msg-content a {
    color: #9a7aff;
    word-break: break-all;
}

.dw-spoiler {
    display: inline-block;
    background: #1a1a2e;
    border: 1px solid #3a2a6a;
    color: transparent;
    border-radius: 0.35rem;
    padding: 0.05rem 0.45rem;
    margin: 0 0.1rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    user-select: none;
    text-shadow: none;
}

.dw-spoiler.revealed {
    color: inherit;
    background: rgba(122, 74, 255, 0.12);
    border-color: rgba(122, 74, 255, 0.35);
}

.dw-code {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.8rem;
    margin: 0.35rem 0;
    overflow-x: auto;
    font-family: "Consolas", "Menlo", "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #d8e0ff;
    white-space: pre;
}

.dw-code-inline {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(122, 74, 255, 0.25);
    border-radius: 0.3rem;
    padding: 0.1rem 0.35rem;
    font-family: "Consolas", "Menlo", "Courier New", monospace;
    font-size: 0.82em;
    color: #e0c8ff;
}

.dw-heading {
    display: block;
    font-weight: 700;
    color: #e0e8ff;
    line-height: 1.3;
    margin: 0.15rem 0;
}

.dw-h1 { font-size: 1.25rem; }
.dw-h2 { font-size: 1.1rem; }
.dw-h3 { font-size: 0.95rem; }
.dw-h-small { font-size: 0.72rem; font-weight: 600; color: #b8b8d0; }

.dw-role-mention {
    display: inline-block;
    background: rgba(88, 101, 242, 0.3);
    border-radius: 0.35rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.8em;
    font-weight: 500;
    color: #d0d8ff;
    cursor: default;
}

.dw-user-mention {
    display: inline-block;
    background: rgba(88, 101, 242, 0.3);
    border-radius: 0.35rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.8em;
    font-weight: 500;
    color: #d0d8ff;
    cursor: default;
}

.dw-channel-mention {
    display: inline-block;
    background: rgba(88, 101, 242, 0.18);
    border-radius: 0.35rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.8em;
    font-weight: 500;
    color: #c0c8ff;
    cursor: default;
}

.dw-msg-attach {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #8a8ab0;
}

.dw-msg-attach a.attach-file {
    color: #9a7aff;
    text-decoration: none;
    word-break: break-all;
}

.dw-msg-attach a.attach-file:hover { text-decoration: underline; }

.dw-msg-attach .attach-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.dw-msg-attach .attach-imgs a {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.3);
    max-width: 100%;
    position: relative;
    min-width: 120px;
    min-height: 90px;
}

.dw-msg-attach .attach-imgs img {
    display: block;
    max-width: 280px;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: cover;
    cursor: zoom-in;
    background: rgba(122, 74, 255, 0.06);
    min-height: 90px;
}

.dw-msg-attach .attach-imgs img[src$=".gif"],
.dw-msg-attach .attach-imgs img[src*=".gif?"],
.dw-msg-attach .attach-imgs img[src$=".webp"],
.dw-msg-attach .attach-imgs img[src*=".webp?"] {
    background: transparent;
}
.dw-msg-attach .attach-imgs a:has(img[src$=".gif"]),
.dw-msg-attach .attach-imgs a:has(img[src*=".gif?"]),
.dw-msg-attach .attach-imgs a:has(img[src$=".webp"]),
.dw-msg-attach .attach-imgs a:has(img[src*=".webp?"]) {
    background: transparent;
}

.dw-msg-attach .attach-imgs img[loading] {
    background: linear-gradient(110deg, rgba(122,74,255,0.05) 25%, rgba(122,74,255,0.12) 50%, rgba(122,74,255,0.05) 75%);
    background-size: 200% 100%;
    animation: dw-shimmer-load 1.2s infinite;
}

@keyframes dw-shimmer-load {
    to { background-position: -200% 0; }
}

.dw-msg-attach .attach-imgs img:hover { opacity: 0.9; }

.dw-msg-attach .attach-vids {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.dw-msg-attach .attach-vids video {
    max-width: 320px;
    max-height: 240px;
    width: auto;
    height: auto;
    border-radius: 0.4rem;
    display: block;
    background: rgba(0, 0, 0, 0.3);
}

.video-thumb {
    position: relative;
    display: inline-block;
    border-radius: 0.4rem;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
}

.video-thumb video {
    display: block;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    transition: background 0.2s;
    line-height: 1.2;
}

.video-thumb:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.video-play-icon {
    font-size: 2.2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.video-play-label {
    font-size: 0.75rem;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.6rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.video-thumb.playing .video-play-overlay {
    display: none;
}

.dw-stickers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.dw-sticker {
    width: 128px;
    height: 128px;
    object-fit: contain;
    border-radius: 0.4rem;
}

.dw-msg-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
    margin-bottom: 0.25rem;
}

.dw-msg:has(.dw-msg-reactions) + .dw-msg.grouped {
    margin-top: 0.05rem;
}

.dw-msg-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(122, 74, 255, 0.12);
    border: 1px solid rgba(122, 74, 255, 0.25);
    border-radius: 0.6rem;
    padding: 0.12rem 0.5rem;
    font-size: 0.8rem;
    color: #c8d8f8;
    cursor: default;
    user-select: none;
    position: relative;
    z-index: 1;
}

.dw-msg-reaction .react-emoji { font-size: 1.05em; line-height: 1; }

.dw-msg-reaction .react-emoji img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.dw-msg-reaction .react-count {
    font-weight: 600;
    font-size: 0.78rem;
    color: #b0b8d8;
}

.dw-msg-reaction.me {
    background: rgba(88, 101, 242, 0.25);
    border-color: rgba(88, 101, 242, 0.5);
}

.dw-msg-embed {
    margin-top: 0.4rem;
    background: rgba(8, 10, 30, 0.55);
    border-left: 4px solid #7a4aff;
    border-radius: 0.5rem;
    padding: 0.5rem 0.7rem;
    max-width: 420px;
}

.dw-msg-embed.gif-embed {
    background: transparent;
    border-left: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.dw-msg-embed.gif-embed .embed-media {
    margin-top: 0;
}

.dw-msg-embed .embed-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e0e8ff;
}

.dw-msg-embed .embed-title a { color: #9a7aff; text-decoration: none; }
.dw-msg-embed .embed-title a:hover { text-decoration: underline; }

.dw-msg-embed .embed-desc {
    font-size: 0.8rem;
    color: #b8c0e0;
    margin-top: 0.2rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.dw-msg-embed .embed-provider {
    font-size: 0.7rem;
    color: #6a6a90;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dw-msg-embed .embed-media {
    margin-top: 0.4rem;
    max-width: 100%;
}

.dw-msg-embed .embed-media img, .dw-msg-embed .embed-media video {
    max-width: 320px;
    max-height: 240px;
    width: auto;
    height: auto;
    border-radius: 0.4rem;
    display: block;
    background: rgba(122, 74, 255, 0.06);
}

.dw-msg-embed .embed-media img[src$=".gif"],
.dw-msg-embed .embed-media img[src*=".gif?"],
.dw-msg-embed .embed-media img[src$=".webp"],
.dw-msg-embed .embed-media img[src*=".webp?"] {
    background: transparent;
}

.dw-msg-embed .embed-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-top: 0.4rem;
}

.dw-msg-embed .embed-field { font-size: 0.78rem; }

.dw-msg-embed .embed-field .ef-name {
    font-weight: 700;
    color: #c0c8e8;
}

.dw-msg-embed .embed-field .ef-value {
    color: #a8b0d0;
    white-space: pre-wrap;
}

.dw-youtube-embed {
    margin-top: 0.4rem;
    max-width: 420px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.dw-youtube-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.dw-msg-embed.youtube-embed {
    max-width: 420px;
}

.dw-empty-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5a5a7a;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.dw-loading-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8a8ab0;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.dw-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(122, 74, 255, 0.3);
    border-top-color: #7a4aff;
    border-radius: 50%;
    animation: dw-spin 0.8s linear infinite;
}

@keyframes dw-spin { to { transform: rotate(360deg); } }

.dw-channel-toggle {
    display: none;
}

@media (max-width: 640px) {
    .dw-card { padding: 0.75rem; }

    .dw-header {
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
    }
    .dw-header h2 { font-size: 1.2rem; }
    .dw-invite-btn { padding: 0.5rem 1.2rem; font-size: 0.85rem; }

    .dw-server-info {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        padding: 0.7rem 0.85rem;
    }
    .dw-server-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .dw-server-name { font-size: 1rem; }
    .dw-server-stats { gap: 0.75rem; font-size: 0.75rem; }

    .dw-widget-layout {
        position: relative;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 68vh;
        min-height: 420px;
        flex: 0 1 auto;
        gap: 0;
    }

    .dw-channel-panel {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 60;
        width: min(78vw, 280px);
        max-height: 100%;
        border-radius: 0 1.1rem 1.1rem 0;
        border: 1px solid var(--card-border);
        border-left: none;
        background: rgba(10, 12, 40, 0.98);
        padding: 0.75rem 0.5rem 1rem;
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        -webkit-overflow-scrolling: touch;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.5);
    }
    .dw-channel-panel.open { transform: translateX(0); }

    .dw-channel-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        border: 1px solid var(--card-border);
        border-radius: 0.5rem;
        background: rgba(122, 74, 255, 0.15);
        color: #c0c8e8;
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        font-family: inherit;
        transition: background 0.15s, color 0.15s;
    }
    .dw-channel-toggle:hover,
    .dw-channel-toggle:active {
        background: rgba(122, 74, 255, 0.3);
        color: #fff;
    }

    .dw-chat-panel { min-height: 0; }
    .dw-chat-header { padding: 0.55rem 0.75rem; }
    .dw-chat-header .topic { display: none; }
    .dw-messages { padding: 0.5rem 0.6rem; }

    .dw-msg.grouped {
        padding-left: calc(0.6rem + 38px + 0.7rem);
    }
}

@media (max-width: 400px) {
    .dw-server-info { flex-direction: column; text-align: center; }
    .dw-server-icon { width: 44px; height: 44px; }
    .dw-widget-layout { height: 72vh; min-height: 460px; }
    .dw-msg-avatar { width: 34px; height: 34px; }
    .dw-msg.grouped {
        padding-left: calc(0.6rem + 34px + 0.7rem);
    }
}
