:root {
    --bg: #05070c;
    --panel: rgba(12, 18, 28, 0.82);
    --panel-border: rgba(120, 160, 255, 0.25);
    --text: #e8eef8;
    --muted: #8fa3bf;
    --accent: #3b82f6;
    --send: #5eead4;
    --logout: #fbbf24;
    --log-bg: rgba(0, 0, 0, 0.35);
    --chat-bar-h: 6.5rem;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

body.chat {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
}

.chat-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    isolation: isolate;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 45% at 80% 55%, rgba(168, 85, 247, 0.28), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(34, 197, 94, 0.22), transparent 55%),
        linear-gradient(180deg, #070b12, #030508);
    pointer-events: none;
}

.chat-app {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, clamp(240px, 22vw, 360px));
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.5rem;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0.5rem clamp(0.5rem, 1.2vw, 1rem) max(0.35rem, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.chat-main {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-room-list__heading {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted, #94a3b8);
}

.chat-room-list {
    margin: 0 0 0.65rem;
    padding: 0;
    list-style: none;
    max-height: none;
}

.chat-room-list__item {
    margin: 0;
    padding: 0;
}

.chat-room-list__btn {
    display: block;
    width: 100%;
    margin: 0 0 0.3rem;
    padding: 0.45rem 0.55rem;
    text-align: left;
    font: inherit;
    font-size: 0.88rem;
    color: var(--text, #e8eef8);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-room-list__btn:hover {
    border-color: rgba(94, 234, 212, 0.45);
    background: rgba(15, 23, 42, 0.85);
}

.chat-room-list__btn.is-active {
    border-color: rgba(94, 234, 212, 0.75);
    background: rgba(45, 212, 191, 0.12);
    font-weight: 600;
}

.chat-room-list__count {
    margin-left: 0.25rem;
    font-size: 0.82em;
    font-weight: 500;
    color: var(--muted, #94a3b8);
}

.chat-room-list__btn.is-active .chat-room-list__count {
    color: rgba(167, 243, 208, 0.95);
}

.chat-room-list__btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.chat-rooms-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0;
}

.chat-room-block {
    margin: 0;
    min-width: 0;
}

.chat-room-block__head {
    margin-bottom: 0.25rem;
}

.chat-room-block__users {
    margin: 0;
    padding: 0 0 0 0.15rem;
    max-height: none;
}

.online__subtitle {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted, #94a3b8);
}

.chat-ticker {
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 0.35rem;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.75);
    overflow: hidden;
    box-sizing: border-box;
}

.chat-ticker[hidden] {
    display: none !important;
}

.chat-ticker__viewport {
    width: 100%;
    overflow: hidden;
    padding: 0.45rem 0;
    box-sizing: border-box;
}

.chat-ticker__text {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    padding: 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--send, #2dd4bf);
    animation: chat-ticker-single var(--ticker-duration, 20s) linear infinite;
    transform: translateX(var(--ticker-start, 100%));
}

@keyframes chat-ticker-single {
    from {
        transform: translateX(var(--ticker-start, 100%));
    }
    to {
        transform: translateX(var(--ticker-end, -100%));
    }
}

.chat-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem clamp(0.75rem, 1.5vw, 1.5rem);
    background: var(--log-bg);
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 4px;
    font-size: var(--chat-user-font-size, clamp(0.85rem, 1.6vw, 0.95rem));
    font-weight: var(--chat-user-font-weight, 400);
    font-style: var(--chat-user-font-style, normal);
    color: var(--chat-user-text-color, var(--text));
    line-height: 1.55;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.chat-line { margin-bottom: 0.35rem; word-break: break-word; }
.chat-line__dice-value {
    font-weight: 700;
    color: #fef08a;
}

.chat-line--join { color: var(--muted); font-style: italic; }
.chat-line__time { color: #6b7280; margin-right: 0.35rem; }
.chat-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.chat-badge--admin { background: linear-gradient(#8b0000, #3d0000); color: #fff; border: 1px solid #ff4444; }
.chat-badge--guest { background: linear-gradient(#8b6914, #4a3800); color: #fff; border: 1px solid #fbbf24; }
.chat-badge--mod { background: linear-gradient(#1e3a8a, #0f172a); color: #93c5fd; border: 1px solid #3b82f6; }
.chat-line__user { font-weight: 700; margin-right: 0.35rem; }

.chat-line__body img.chat-smiley {
    vertical-align: middle;
    width: auto;
    height: auto;
    max-width: 250px;
    margin: 4px;
    display: inline-block;
    cursor: pointer;
}

.chat-line--say .chat-line__say-verb {
    color: #cbd5e1;
    font-weight: 500;
}

.chat-line__body .chat-smiley-blocked {
    display: inline;
    margin: 0 0.15em;
    padding: 0.1em 0.45em;
    font-size: 0.85em;
    font-style: italic;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.35);
    border-radius: 4px;
    vertical-align: middle;
}

.chat-side {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    min-width: 0;
    align-self: stretch;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

.player { padding: 0.65rem 0.75rem; flex-shrink: 0; }
.player__head { font-size: 0.85rem; margin-bottom: 0.5rem; }
.player__station {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.78rem;
}
.player__main-row {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
}
.player__side {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: flex-start;
}
.player__meta { margin: 0; font-size: 0.78rem; line-height: 1.35; }
.player__dj-label { color: var(--muted); }
.player__dj-name { font-weight: 700; color: #f472b6; margin-left: 0.2rem; }
.player__on-air {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    background: #4ade80;
    border-radius: 3px;
    vertical-align: middle;
}
.player__on-air[hidden] { display: none !important; }
.player__now {
    margin-top: 0.15rem;
}
.player__np-label {
    margin: 0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.player__wishbox-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.38rem 0.45rem;
    border: 1px solid rgba(244, 114, 182, 0.45);
    border-radius: 8px;
    background: rgba(244, 114, 182, 0.12);
    color: #fbcfe8;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
}
.player__wishbox-btn:hover {
    background: rgba(244, 114, 182, 0.22);
}
.player__wishbox-btn[hidden] {
    display: none !important;
}

.player__track {
    margin: 0.12rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #e2e8f0;
    min-height: 2.2em;
}
.player__body { display: flex; flex-direction: column; gap: 0.45rem; }
.player__art {
    position: relative;
    flex: 0 0 42%;
    width: 42%;
    max-width: 108px;
    aspect-ratio: 1;
    align-self: flex-start;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    overflow: hidden;
}
.player__art-ph {
    font-size: 2rem;
    line-height: 1;
    z-index: 0;
}
.player__art-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}
.player__art-img[hidden] {
    display: none !important;
}
.player__transport {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.player__mute {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.player__mute[aria-pressed="true"] {
    opacity: 0.55;
}
.player__volume {
    width: 100%;
    min-width: 0;
    margin: 0;
}
.player__play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
    font-size: 0.75rem;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
.player__status { margin: 0; font-size: 0.75rem; color: var(--muted); }

.online {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.65rem 0.75rem;
    overflow: hidden;
}
.online__title { margin: 0 0 0.5rem; font-size: 0.9rem; font-weight: 600; }
.online__list {
    list-style: none; margin: 0; padding: 0;
    overflow-y: auto; flex: 1; font-size: 0.85rem;
    -webkit-overflow-scrolling: touch;
}
.online__list li { padding: 0.2rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.online__list li.online__loading,
.online__list li.online__error {
    color: var(--muted);
    font-size: 0.82rem;
    border-bottom: none;
}
.online__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    box-sizing: border-box;
}
.online__avatar-wrap {
    display: inline-flex;
    flex-shrink: 0;
    cursor: zoom-in;
}
.online__avatar-wrap .online__avatar {
    display: block;
}
.online__avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.online-avatar-preview {
    position: fixed;
    z-index: 10050;
    width: 132px;
    height: 132px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}
.online-avatar-preview img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: contain;
    object-position: center top;
    background: rgba(0, 0, 0, 0.25);
}
.online__on-air {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.3rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0f172a;
    background: #4ade80;
    border-radius: 3px;
    vertical-align: middle;
}
.online__avatar--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
}
.online__name {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    width: 100%;
}
.online__nick-line {
    grid-column: 1;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    justify-self: start;
    overflow: visible;
}
.online__nick-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
}

.online__gender {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.online__gender-icon {
    width: 1rem;
    height: 1rem;
    display: block;
    object-fit: contain;
}
.online__nick-cluster .online__nick {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.online__nick-mute-suffix {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.12rem;
    line-height: 0;
    vertical-align: middle;
}

.online__nick-mute-suffix .chat-mute-indicator {
    width: 14px;
    height: 14px;
}

.chat-nick-link.online__nick[data-chat-muted="1"] .online__nick-mute-suffix,
.chat-nick-link.online__nick[data-chat-muted="1"] .chat-mute-indicator {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.online__nick-line .chat-mute-indicator,
.online__nick-line .online__on-air {
    flex-shrink: 0;
}

.online__row--muted .chat-mute-indicator {
    opacity: 1;
}
.online__meta-end {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-shrink: 0;
    justify-self: end;
    max-width: 100%;
}

.online__mute-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.online__nick-cluster .chat-mute-indicator {
    display: inline-flex;
}

.online__priv-req {
    margin-left: 0.25rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border: 1px solid rgba(251, 191, 36, 0.6);
    border-radius: 4px;
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    cursor: pointer;
}
.chat-inline-image {
    max-width: min(280px, 100%);
    max-height: 200px;
    border-radius: 6px;
    vertical-align: middle;
}
.chat-reload-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(90deg, rgba(180, 83, 9, 0.95), rgba(217, 119, 6, 0.92));
    color: #fffbeb;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
}
.chat-reload-banner__text {
    margin: 0;
    flex: 1 1 12rem;
    text-align: center;
}
.chat-reload-banner__btn {
    flex: 0 0 auto;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.chat-reload-banner__btn:hover {
    background: rgba(255, 255, 255, 0.22);
}
.chat-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%) translateY(0.5rem);
    z-index: 12000;
    max-width: min(92vw, 28rem);
    padding: 0.55rem 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.chat-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.chat-line__report {
    margin-left: 0.35rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    line-height: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    vertical-align: middle;
    transition: opacity 0.15s ease;
}
.chat-line__report:hover,
.chat-line__report:focus-visible {
    opacity: 1;
}

/* Melde-Flagge nur bei Maus-Hover über die Zeile (Desktop); Touch: weiter sichtbar */
@media (hover: hover) and (pointer: fine) {
    .chat-line__report {
        opacity: 0;
        pointer-events: none;
    }
    .chat-line:hover .chat-line__report,
    .chat-line:focus-within .chat-line__report {
        opacity: 0.55;
        pointer-events: auto;
    }
    .chat-line__report:hover,
    .chat-line__report:focus-visible {
        opacity: 1;
    }
}
.chat-bar__reports-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.2rem;
    min-width: 1rem;
    padding: 0 0.2rem;
    font-size: 0.65rem;
    line-height: 1rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-weight: 700;
}
.chat-bar__reports-btn {
    position: relative;
}
.chat-bar__reports-btn--alert {
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.45));
}
.chat-report-modal {
    position: fixed;
    inset: 0;
    z-index: 13100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.chat-report-modal[hidden] {
    display: none !important;
}
.chat-report-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
}
.chat-report-modal__panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    max-height: 90vh;
    overflow: auto;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: var(--panel-bg, #1e293b);
    color: var(--text, #f1f5f9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.chat-report-modal__hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
}
.chat-report-modal__reason {
    width: 100%;
    margin-top: 0.35rem;
    box-sizing: border-box;
}
.chat-reports-inbox-modal__panel {
    width: min(96vw, 520px);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.chat-reports-inbox-modal__intro {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: var(--muted, #94a3b8);
    line-height: 1.4;
}
.chat-reports-inbox-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.chat-reports-inbox-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.chat-reports-inbox__item {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.chat-reports-inbox__meta {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    color: var(--muted, #94a3b8);
}
.chat-reports-inbox__body {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    word-break: break-word;
}
.chat-reports-inbox__mod {
    margin: 0.5rem 0;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    font-size: 0.82rem;
}
.chat-reports-inbox__toggle {
    margin: 0 0 0.55rem;
}

.chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
}

.chat-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chat-toggle__track {
    flex-shrink: 0;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.85);
    border: 1px solid rgba(248, 113, 113, 0.65);
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-toggle__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}

.chat-toggle__input:checked + .chat-toggle__track {
    background: #16a34a;
    border-color: rgba(134, 239, 172, 0.75);
}

.chat-toggle__input:checked + .chat-toggle__track::after {
    transform: translateX(1.25rem);
}

.chat-toggle__input:focus-visible + .chat-toggle__track {
    outline: 2px solid rgba(45, 212, 191, 0.7);
    outline-offset: 2px;
}

.chat-toggle__text {
    font-size: 0.82rem;
    color: var(--text, #f1f5f9);
    line-height: 1.35;
}
.chat-reports-inbox__mod-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}
.chat-reports-inbox__mod-label {
    color: var(--muted, #94a3b8);
}
.chat-reports-inbox__select {
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #0f172a;
    color: var(--text, #f1f5f9);
    font-size: 0.82rem;
}
.chat-reports-inbox__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.chat-report-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    justify-content: flex-end;
}
.chat-report-modal__btn {
    background: #334155;
    color: var(--text, #f1f5f9);
    border-color: #475569;
    min-height: 2.25rem;
    font-size: 0.85rem;
}
.chat-report-modal__btn--primary {
    background: var(--ui-btn-bg, var(--send, #2dd4bf));
    color: #042f2e;
    border-color: transparent;
}
.chat-reports-inbox-modal__footer {
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    justify-content: center;
}
.chat-reports-inbox-modal__close {
    min-width: 7rem;
    min-height: 2.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--ui-btn-bg, var(--send, #2dd4bf));
    color: #042f2e;
    border-color: transparent;
}
.online__meta-end .online__img-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    min-height: 1.65rem;
    margin: 0;
    padding: 0.1rem 0.35rem;
    font-size: 0.9rem;
    line-height: 1;
    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
}
.online__meta-end .online__img-review:hover,
.online__meta-end .online__img-review:focus-visible {
    background: rgba(59, 130, 246, 0.28);
}
.chat-image-review-modal {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.chat-image-review-modal[hidden] {
    display: none !important;
}
.chat-image-review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.chat-image-review-modal__panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    max-height: 90vh;
    overflow: auto;
    padding: 1rem 1.1rem 1.1rem;
    border-radius: 10px;
    background: var(--panel-bg, #1e293b);
    color: var(--text, #f1f5f9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.chat-image-review-modal__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}
.chat-image-review-modal__sender {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
}
.chat-image-review-modal__preview-wrap {
    text-align: center;
    margin-bottom: 0.85rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-image-review-modal__preview {
    max-width: 100%;
    max-height: 50vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    background: #0f172a;
}
.chat-image-review-modal__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}
.chat-image-review-modal__actions .btn {
    width: 100%;
    justify-content: center;
}
@media (max-width: 420px) {
    .chat-image-review-modal__actions {
        grid-template-columns: 1fr;
    }
}
.online__role {
    text-align: right;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.online__role-icon,
.chat-role-icon {
    display: block;
    width: auto;
    height: 1rem;
    max-width: 4rem;
    object-fit: contain;
    object-position: right center;
    margin-left: auto;
}

.online__role .online__role-icon {
    height: 0.95rem;
}

.chat-profile-form textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: #0f172a;
    color: var(--text);
    font-size: 0.78rem;
    resize: vertical;
}

.chat-profile-form input[type="url"],
.chat-profile-form input[type="text"] {
    width: 100%;
    padding: 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: #0f172a;
    color: var(--text);
    font-size: 0.78rem;
}

.chat-profile-form__hint {
    margin: 0 0 0.5rem;
    font-size: 0.68rem;
    color: var(--muted);
}

.chat-profile-form__error {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    color: #fca5a5;
}

.chat-profile-form__color-section {
    margin-top: 0.75rem;
}

.chat-profile-form__section-title--inline {
    margin-bottom: 0.25rem;
}

.chat-profile-form__letter-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.chat-profile-form__letter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
}

.chat-profile-form__letter-char {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1;
    min-width: 1.1rem;
    text-align: center;
}

.chat-profile-form__letter-input {
    width: 2rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.chat-profile-form__color-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.chat-profile-form__color-actions .color-picker-block {
    flex: 1 1 12rem;
    margin: 0;
}

.chat-profile-form__color-reset {
    flex: 0 0 auto;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.chat-nick-link .chat-nick-char {
    font: inherit;
}

.chat-profile-form__save {
    width: 100%;
    margin-top: 0.25rem;
}

.chat-profile-form__section-title {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.chat-profile-form__identity-slot {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem 0.65rem;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 6px;
}

.chat-profile-form__identity-slot legend {
    padding: 0 0.25rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.chat-profile-form__identity-slot--primary {
    border-color: rgba(34, 211, 238, 0.35);
}

.chat-profile-form__nick-readonly {
    opacity: 0.85;
    cursor: not-allowed;
}

.chat-profile-form__avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.chat-profile-form__preview {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    flex-shrink: 0;
}

.chat-profile-form__file {
    flex: 1;
    min-width: 0;
}

.chat-profile-form input[type="date"] {
    width: 100%;
    padding: 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: #0f172a;
    color: var(--text);
    font-size: 0.78rem;
}

.chat-bar {
    grid-column: 1;
    grid-row: 2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.45rem 0.35rem 0.15rem;
    background: rgba(8, 12, 20, 0.98);
    border-top: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 4px;
}

.chat-bar__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.chat-bar__toolbar-start,
.chat-bar__toolbar-end {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chat-bar__toolbar-end {
    margin-left: auto;
    justify-content: flex-end;
}

.chat-bar__compose {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
}

.chat-bar__wish-inbox-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn.btn-logout.chat-bar__wish-inbox-btn.chat-bar__wish-inbox-btn--alert {
    background: #dc2626 !important;
    background-image: none !important;
    border-color: #fecaca !important;
    color: #fff !important;
    font-weight: 700;
    animation: chat-wish-inbox-blink 0.95s ease-in-out infinite;
}
.chat-bar__wish-inbox-label {
    white-space: nowrap;
}
@keyframes chat-wish-inbox-blink {
    0%, 100% {
        background-color: #ef4444;
        box-shadow: 0 0 8px 2px rgba(248, 113, 113, 0.75);
    }
    50% {
        background-color: #991b1b;
        box-shadow: 0 0 22px 8px rgba(248, 113, 113, 0.95);
    }
}

.chat-bar__toolbar-btn {
    min-height: 36px;
    padding: 0.4rem 0.65rem;
}
.chat-bar__icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-bar__smiley-btn:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.08);
}
.chat-bar__status-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-bar__status-wrap.is-open {
    z-index: 45;
}

.chat-bar__status {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
}

.chat-bar__status-dot-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 12px;
    background: var(--status-dot-color, #22c55e);
    box-shadow: 0 0 8px var(--status-dot-color, #22c55e);
    pointer-events: none;
}

.chat-bar__status--pick:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.08);
}

.chat-bar__status--pick:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chat-status-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.45rem);
    z-index: 40;
    width: min(13rem, 88vw);
    max-height: min(50vh, 16rem);
    overflow: auto;
    padding: 0.55rem 0.65rem 0.65rem;
    border-radius: 10px;
    border: 2px solid #22d3ee;
    background: #050505;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.chat-status-menu[hidden] {
    display: none !important;
}

.chat-status-menu__heading {
    margin: 0 0 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #22d3ee;
}

.chat-status-menu__list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.chat-status-menu__empty {
    margin: 0.2rem 0.1rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.chat-status-menu__subheading {
    margin: 0.65rem 0 0.35rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.chat-custom-status {
    margin: 0 0 0.15rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chat-user-menu__section--custom-status {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.65rem;
}

.chat-custom-status--popup {
    padding: 0.35rem 0.15rem 0.5rem;
    max-width: 100%;
}

.user-card-popup-panel--edit .chat-custom-status__input,
.user-card-popup-panel--edit .chat-custom-status__file {
    box-sizing: border-box;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
}

.chat-user-menu .chat-custom-status__input,
.chat-user-menu .chat-custom-status__file {
    box-sizing: border-box;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
}

.chat-user-menu .chat-custom-status__actions {
    margin-top: 0.15rem;
}

.chat-custom-status--inactive .chat-custom-status__input,
.chat-custom-status--inactive .chat-custom-status__color,
.chat-custom-status--inactive .chat-custom-status__file,
.chat-custom-status--inactive .chat-custom-status__check {
    opacity: 0.65;
}

.chat-custom-status__notice {
    margin: 0;
    padding: 0.4rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.chat-custom-status__title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.chat-custom-status__hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.35;
}

.chat-custom-status__label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.78rem;
}

.chat-custom-status__input,
.chat-custom-status__file {
    width: 100%;
    font: inherit;
}

.chat-custom-status__color {
    width: 3rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
}

.chat-custom-status__check {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
}

.chat-custom-status__preview {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-custom-status__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chat-custom-status__btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
}

.chat-local-time-toggle {
    opacity: 0.55;
    line-height: 1;
}

.chat-local-time-toggle.is-active {
    opacity: 1;
}

.chat-bar__icon.chat-local-time-toggle:hover,
.chat-bar__icon.chat-local-time-toggle:focus-visible {
    border-color: var(--ui-frame-border, var(--panel-border));
    background: rgba(255, 255, 255, 0.05);
}

.chat-local-time-toggle__icon {
    font-size: 1rem;
}

.online__local-time {
    margin-left: 0.45rem;
    font-size: 0.78rem;
    color: var(--muted, #9ca3af);
    white-space: nowrap;
}

.online__local-time-icon {
    margin-right: 0.15rem;
}

.chat-status-dot,
.online__status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
    box-shadow: 0 0 6px currentColor;
}

.chat-status-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    object-fit: contain;
    flex-shrink: 0;
}

.chat-status-icon--toolbar {
    width: 18px;
    height: 18px;
}

.online__status .chat-status-icon {
    width: 12px;
    height: 12px;
    margin-right: 0.25rem;
}

.chat-bar__status-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.chat-user-menu__item--status {
    text-align: left;
}

.online__status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.online__status .online__status-dot {
    margin-right: 0;
    flex-shrink: 0;
}
.chat-bar__user-btn {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.chat-nick-link {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 700;
    color: #e2e8f0;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    text-underline-offset: 2px;
}

.chat-nick-link:hover {
    text-decoration-color: #22d3ee;
}

.online__nick {
    font-weight: 600;
    text-align: left;
}

.chat-line__user.chat-nick-link {
    text-decoration: none;
}

.chat-line__user.chat-nick-link:hover {
    text-decoration: underline;
}

.user-card-popup-body {
    margin: 0;
    min-height: 0;
    background: #050505;
    color: #e2e8f0;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.user-card-popup-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #0a0a0a;
}

.user-card-popup-bar__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #22d3ee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-popup-bar__close {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    cursor: pointer;
}

.user-card-popup-bar__close:hover {
    border-color: #22d3ee;
    color: #22d3ee;
}

.user-card-popup-panel {
    padding: 0.55rem 0.65rem 0.85rem;
    text-align: left;
}

.user-card-popup-panel--profile {
    text-align: center;
    padding: 0.65rem 0.85rem 1.25rem;
    max-width: 36rem;
    margin: 0 auto;
    box-sizing: border-box;
}

.chat-profile-card {
    max-width: min(28rem, 100%);
    margin: 0.65rem auto 0;
    padding: 1rem 0.85rem 0.9rem;
    text-align: center;
    border: 2px solid rgba(34, 211, 238, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, #0c0c0c 0%, #050505 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.chat-profile-card__avatar {
    margin: 0 auto 0.55rem;
}

.chat-profile-card__name {
    margin: 0 0 0.25rem;
}

.chat-profile-card__registered {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.chat-profile-card__role {
    margin: 0 0 0.5rem;
    min-height: 1.25rem;
}

.profile-edit-popup-body {
    overflow: hidden;
}

.user-card-popup-panel--edit {
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    padding: 0.55rem 0.85rem 1rem;
    max-width: 38rem;
    margin: 0 auto;
    box-sizing: border-box;
}

.user-card-popup-panel--edit .chat-profile-form {
    max-width: 100%;
}

.chat-nick-popover {
    position: fixed;
    z-index: 10060;
    width: min(15.5rem, 88vw);
    max-height: min(72dvh, 26rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.55rem 0.65rem 0.65rem;
    border-radius: 10px;
    border: 2px solid #22d3ee;
    background: #050505;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
    text-align: left;
    left: 0;
    top: 0;
}

.chat-nick-popover[hidden] {
    display: none !important;
}

.chat-nick-popover__title {
    margin: 0.15rem 0 0.45rem;
    padding: 0 0.1rem;
    font-size: 0.95rem;
    font-weight: 800;
    word-break: break-word;
}

.chat-nick-popover__rule {
    margin: 0 0 0.35rem;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-nick-popover__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chat-nick-popover__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.38rem 0.12rem;
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.chat-nick-popover__hint {
    margin: 0.5rem 0.75rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--muted, #94a3b8);
}

.chat-nick-popover__subhead {
    margin: 0.35rem 0.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.chat-nick-popover__mute-status {
    display: block;
    margin: 0 0.5rem 0.35rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fecaca;
    background: rgba(248, 113, 113, 0.12);
    border-radius: 4px;
}

.chat-nick-popover__mute-status[hidden] {
    display: none !important;
}

.chat-nick-popover__list--compact .chat-nick-popover__item {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.chat-nick-popover__list--compact > li[hidden],
.chat-nick-popover__item[hidden] {
    display: none !important;
}

.chat-nick-popover__item--lift {
    color: #86efac;
}

.chat-mod-dialog {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.chat-mod-dialog[hidden] {
    display: none !important;
}

.chat-mod-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.chat-mod-dialog__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 320px);
    padding: 1rem 1.1rem 1.05rem;
    border-radius: 10px;
    background: var(--surface-elevated, #1e293b);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.chat-mod-dialog__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.chat-mod-dialog__target {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #22d3ee;
    word-break: break-word;
}

.chat-mod-dialog__field {
    display: block;
    margin-bottom: 0.85rem;
}

.chat-mod-dialog__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.85;
}

.chat-mod-dialog__select {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: var(--surface, #0f172a);
    color: inherit;
    font-size: 0.9rem;
}

.chat-mod-dialog__confirm {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #fca5a5;
}

.chat-mod-dialog__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.chat-mod-dialog__btn {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.chat-mod-dialog__btn--primary {
    border-color: #0891b2;
    background: #0891b2;
    color: #fff;
}

.chat-nick-with-mute {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    vertical-align: baseline;
}

.chat-mute-indicator {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    line-height: 1;
    color: #f87171;
    opacity: 1;
}

.chat-mute-indicator__svg {
    display: block;
    width: 14px;
    height: 14px;
}

.online__nick-line .chat-mute-indicator {
    margin-left: 0.05rem;
}

.online__row[data-online-muted="1"] .online__nick-cluster {
    padding-right: 0.05rem;
}

.chat-nick-popover__item:hover {
    color: #22d3ee;
}

.chat-nick-popover__icon {
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
}

.chat-nick-popover__back {
    display: block;
    margin: 0 0 0.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #22d3ee;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.chat-nick-popover__view--setcard {
    text-align: center;
}

.chat-nick-popover__avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.06);
}

.chat-nick-popover__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.chat-nick-popover__setcard-name {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 800;
    word-break: break-word;
}

.chat-nick-popover__setcard-role {
    margin: 0 0 0.55rem;
}

.chat-profile-card-meta {
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.65rem 0.6rem;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
    line-height: 1.4;
}

.chat-profile-card-meta[hidden] {
    display: none !important;
}

.chat-profile-card-meta dt {
    margin: 0.45rem 0 0.12rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.chat-profile-card-meta dt:first-child {
    margin-top: 0.05rem;
}

.chat-profile-card-meta dd {
    margin: 0 0 0.15rem;
    color: #f1f5f9;
    font-weight: 600;
}

.chat-profile-card-meta__empty {
    color: #64748b !important;
    font-weight: 500 !important;
    font-style: italic;
}

.chat-profile-card-meta__about {
    line-height: 1.45;
    font-weight: 600;
}

.chat-profile-card-meta__richtext {
    word-break: break-word;
    line-height: 1.45;
    font-weight: 600;
}

.chat-profile-form--tinymce .tox-tinymce {
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.chat-profile-form__richtext textarea {
    width: 100%;
    min-height: 5rem;
}

.chat-profile-card-meta dt:last-of-type {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-profile-card-meta__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-profile-card-meta__status-icon {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.chat-profile-card-meta__gender {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chat-profile-card-meta__gender-icon {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.chat-nick-popover__setcard-bio {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
}

.chat-nick-popover__setcard-guest {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.chat-nick-popover__setcard-status {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.chat-user-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-user-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.45rem);
    z-index: 40;
    width: min(16.5rem, 92vw);
    max-height: min(78vh, 28rem);
    overflow: auto;
    padding: 0.55rem 0.65rem 0.65rem;
    border-radius: 10px;
    border: 2px solid #22d3ee;
    background: #050505;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.chat-user-menu__section {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-user-menu__section:last-child {
    border-bottom: none;
}

.chat-user-menu__section--actions {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.chat-user-menu__heading {
    margin: 0 0 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #22d3ee;
}

.chat-user-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chat-user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.35rem 0.15rem;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.chat-user-menu__item--action {
    font-weight: 700;
    color: #f1f5f9;
}

.chat-user-menu__item.is-active {
    color: #22d3ee;
    font-weight: 700;
}

.chat-user-menu__check {
    color: #22d3ee;
    font-weight: 700;
    width: 0.85rem;
    flex-shrink: 0;
}

.chat-user-menu__icon {
    flex-shrink: 0;
}

.chat-user-menu__links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-user-menu__item--link {
    font-weight: 600;
    color: #bae6fd;
}

.chat-user-menu__back {
    display: block;
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0.25rem 0;
    border: none;
    background: transparent;
    color: #22d3ee;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.chat-user-menu__subhead {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #22d3ee;
}

.chat-user-menu__display-body {
    padding-top: 0.15rem;
}

.chat-settings-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.chat-settings-row--styles {
    flex-direction: row;
    gap: 0.4rem;
}

.chat-settings-select {
    height: 34px;
    padding: 0 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: #0f172a;
    color: var(--text);
    font-size: 0.78rem;
}

.chat-settings-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chat-settings__swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
}

.chat-settings__swatch--default {
    background: linear-gradient(135deg, #334155, #0f172a);
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 700;
}

.chat-settings__swatch.is-active {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.color-picker-block__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.color-picker-block__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.45rem 0.25rem 0.4rem;
    border-radius: 6px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.08));
    cursor: pointer;
    flex-shrink: 0;
    max-width: 100%;
}

.color-picker-block__trigger:hover {
    border-color: #22d3ee;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(168, 85, 247, 0.12));
}

.color-picker-block__rainbow {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(
        #ef4444,
        #fbbf24,
        #22c55e,
        #06b6d4,
        #3b82f6,
        #a855f7,
        #ef4444
    );
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.color-picker-block__open-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    white-space: nowrap;
}

.color-picker-block__native,
.chat-settings-color-input {
    width: 46px;
    height: 28px;
    padding: 1px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker-block__native::-webkit-color-swatch-wrapper,
.chat-settings-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-block__native::-webkit-color-swatch,
.chat-settings-color-input::-webkit-color-swatch {
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.color-picker-block__native::-moz-color-swatch,
.chat-settings-color-input::-moz-color-swatch {
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-settings-style {
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
}

.chat-settings-style.is-active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chat-bar__form { flex: 1 1 auto; min-width: 0; }
.chat-bar__form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #0f172a;
    color: var(--text);
    font-size: 16px;
}

.btn {
    border: 1px solid var(--ui-btn-border, transparent);
    border-radius: 4px;
    padding: 0.55rem 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-send { background: var(--ui-btn-bg, var(--send)); color: #042f2e; min-width: 4.5rem; }
.btn-logout { background: var(--ui-btn-bg, var(--logout)); color: #042f2e; }

.chat-bar__logout { margin: 0; }

.chat-copy {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 0.65rem;
    color: var(--muted);
    margin: 0;
    padding: 0.15rem 0.35rem 0.35rem;
}

.chat--enter {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    overflow: auto;
}
.chat-enter {
    position: relative;
    z-index: 1;
    width: min(24rem, 92vw);
    padding: 2rem;
    background: var(--panel);
    border: 1px solid var(--ui-frame-border, var(--panel-border));
    border-radius: 8px;
}
.chat-enter__form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.chat-enter__form input {
    padding: 0.65rem;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #0f172a;
    color: var(--text);
    font-size: 16px;
}
.chat-error { color: #fca5a5; font-size: 0.9rem; }
.chat-enter__staff { margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }
.chat-enter__staff a { color: var(--send); }
.chat-enter__form label { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }

/* Radio-Player: Sichtbarkeit pro Gerät (Admin → Radio) */
@media (min-width: 769px) {
    .chat-app[data-radio-player-desktop="0"] .player {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .chat-app[data-radio-player-mobile="0"] .player {
        display: none !important;
    }
}

/* Tablet: schmalere Sidebar */
@media (max-width: 1024px) {
    .chat-app {
        grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    }
}

/* Mobile: untereinander, volle Breite */
@media (max-width: 768px) {
    body.chat {
        height: 100dvh;
    }

    .chat-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        padding: 0.35rem 0.35rem 0.25rem;
        gap: 0.35rem;
    }

    .chat-side {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .chat-main {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
    }

    .chat-bar {
        grid-column: 1;
        grid-row: 3;
    }

    .chat-side .player,
    .chat-side .online {
        flex: 1 1 50%;
        min-width: 0;
        min-height: 0;
    }

    .chat-side .online {
        flex: 1 1 auto;
        min-height: 7rem;
        max-height: min(38dvh, 220px);
    }

    .chat-side .online__list {
        flex: 1 1 auto;
        min-height: 4.5rem;
    }

    .chat-app[data-radio-player-mobile="0"] .chat-side .online {
        flex: 1 1 100%;
        width: 100%;
        max-height: min(42dvh, 260px);
    }

    .chat-log {
        min-height: 0;
    }

    .chat-copy {
        display: none;
    }

    .chat-bar__compose {
        flex-wrap: nowrap;
    }

    .btn-send {
        min-width: 5rem;
    }

    .chat-line__body img.chat-smiley {
        max-width: min(250px, 70vw);
    }
}

@media (max-width: 480px) {
    .chat-side {
        flex-direction: column;
    }

    .chat-side .player,
    .chat-side .online {
        flex: none;
        width: 100%;
    }

    .chat-side .online {
        min-height: 7rem;
        max-height: min(36dvh, 200px);
    }

    .chat-bar__toolbar-btn {
        font-size: 0.7rem;
        padding: 0.45rem 0.5rem;
    }

    .btn-send {
        min-width: 4.25rem;
        padding: 0.5rem 0.45rem;
        font-size: 0.7rem;
    }
}
