/* ════════════════════════════════════════════════════════════
   Community Live Chat — modern messenger design
   Global room + private DMs, code snippets, kudos, blocking.
   Light + dark theme, mobile-first responsive.
   ════════════════════════════════════════════════════════════ */

/* ── Floating launcher ── */
.lc2-fab {
    position: fixed; bottom: 5rem; right: 1.5rem; z-index: 9998;
    width: 56px; height: 56px; border-radius: 18px;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; text-decoration: none; cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}
.lc2-fab:hover { color: #fff; transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 32px rgba(59,130,246,0.55); }
.lc2-fab .lc2-fab-count {
    position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px;
    border-radius: 999px; background: #22c55e; color: #fff;
    font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
    padding: 0 5px; box-shadow: 0 2px 8px rgba(34,197,94,0.5); border: 2px solid #fff;
}
[data-theme="dark"] .lc2-fab .lc2-fab-count { border-color: #0f172a; }

/* ── Overlay + panel shell ── */
.lc2-overlay { display: none; position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.lc2-overlay.active { display: block; }
.lc2-panel {
    position: fixed; top: 0; right: 0; z-index: 10001;
    width: 100%; max-width: 520px; height: 100vh; height: 100dvh;
    background: #f8fafc;
    border-radius: 20px 0 0 20px;
    box-shadow: -16px 0 60px rgba(15, 23, 42, 0.25);
    display: none; flex-direction: column; overflow: hidden;
    pointer-events: auto; isolation: isolate;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transform: translateX(40px); opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.2s;
}
.lc2-overlay.active .lc2-panel { display: flex; transform: translateX(0); opacity: 1; }
[data-theme="dark"] .lc2-panel { background: #0f172a; }

/* ── Header ── */
.lc2-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(120deg, #0f172a 0%, #1e1b4b 55%, #172554 100%);
    color: #fff; position: relative; overflow: hidden; flex-shrink: 0;
}
.lc2-header::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 120% at 85% 0%, rgba(99,102,241,0.35), transparent 60%),
        radial-gradient(ellipse 40% 100% at 15% 100%, rgba(14,165,233,0.25), transparent 60%);
}
.lc2-header > * { position: relative; z-index: 1; }
.lc2-header-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(59,130,246,0.5);
}
.lc2-header-text { flex: 1; min-width: 0; }
.lc2-header-text h3 { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.lc2-header-sub { font-size: 0.72rem; color: rgba(226,232,240,0.75); display: flex; align-items: center; gap: 0.35rem; margin-top: 0.1rem; }
.lc2-live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.7); animation: lc2-pulse-dot 2s infinite;
}
@keyframes lc2-pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.lc2-online-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(34,197,94,0.16); border: 1px solid rgba(34,197,94,0.45);
    color: #86efac; border-radius: 999px; padding: 0.28rem 0.7rem;
    font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.lc2-header-btn {
    width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer;
    background: rgba(255,255,255,0.1); color: #e2e8f0;
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
    transition: background 0.15s;
}
.lc2-header-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* ── Tabs ── */
.lc2-tabs {
    display: flex; gap: 0.35rem; padding: 0.55rem 0.9rem;
    background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
[data-theme="dark"] .lc2-tabs { background: #1e293b; border-bottom-color: #334155; }
.lc2-tab {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.45rem 0.9rem; border-radius: 999px; border: none; cursor: pointer;
    background: transparent; color: #64748b; font-size: 0.83rem; font-weight: 700;
    transition: background 0.15s, color 0.15s; position: relative;
}
.lc2-tab:hover { background: rgba(99,102,241,0.08); color: #4f46e5; }
.lc2-tab.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 3px 10px rgba(99,102,241,0.35); }
[data-theme="dark"] .lc2-tab { color: #94a3b8; }
[data-theme="dark"] .lc2-tab.active { color: #fff; }
.lc2-tab-badge {
    min-width: 18px; height: 18px; border-radius: 999px; padding: 0 4px;
    background: #ef4444; color: #fff; font-size: 0.65rem; font-weight: 800;
    display: none; align-items: center; justify-content: center;
}
.lc2-tab-badge.show { display: inline-flex; }

/* ── Body: people rail + chat column ── */
.lc2-body { flex: 1; display: flex; min-height: 0; }

/* People rail */
.lc2-people {
    width: 168px; flex-shrink: 0; background: #fff; border-right: 1px solid #e2e8f0;
    display: flex; flex-direction: column; min-height: 0;
}
[data-theme="dark"] .lc2-people { background: #1e293b; border-right-color: #334155; }
.lc2-people-head {
    padding: 0.7rem 0.85rem 0.4rem; font-size: 0.66rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; flex-shrink: 0;
}
.lc2-people-list { flex: 1; overflow-y: auto; padding: 0 0.5rem 0.75rem; margin: 0; list-style: none; }
.lc2-person {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.42rem 0.4rem;
    border-radius: 10px; cursor: pointer; position: relative;
    transition: background 0.15s;
}
.lc2-person:hover { background: rgba(99,102,241,0.07); }
[data-theme="dark"] .lc2-person:hover { background: rgba(99,102,241,0.15); }
.lc2-avatar-wrap { position: relative; flex-shrink: 0; }
.lc2-avatar {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
    background: #e2e8f0; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
[data-theme="dark"] .lc2-avatar { border-color: #1e293b; }
.lc2-presence {
    position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px;
    border-radius: 50%; background: #22c55e; border: 2px solid #fff;
}
[data-theme="dark"] .lc2-presence { border-color: #1e293b; }
.lc2-person-name {
    flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; color: #334155;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-theme="dark"] .lc2-person-name { color: #cbd5e1; }
.lc2-person-menu-btn {
    width: 24px; height: 24px; border-radius: 7px; border: none; cursor: pointer;
    background: transparent; color: #94a3b8; font-size: 0.8rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}
.lc2-person:hover .lc2-person-menu-btn { opacity: 1; }
.lc2-person-menu-btn:hover { background: rgba(99,102,241,0.14); color: #4f46e5; }
.lc2-people-empty { padding: 1rem 0.85rem; font-size: 0.78rem; color: #94a3b8; line-height: 1.5; }

/* Per-user action menu */
.lc2-user-menu {
    position: fixed; z-index: 10005; min-width: 200px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    box-shadow: 0 16px 48px rgba(15,23,42,0.22); padding: 0.35rem; display: none;
}
[data-theme="dark"] .lc2-user-menu { background: #1e293b; border-color: #334155; }
.lc2-user-menu.show { display: block; animation: lc2-menu-in 0.15s ease-out; }
@keyframes lc2-menu-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }
.lc2-user-menu-head {
    display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #f1f5f9; margin-bottom: 0.25rem;
}
[data-theme="dark"] .lc2-user-menu-head { border-bottom-color: #334155; }
.lc2-user-menu-head img { width: 34px; height: 34px; border-radius: 50%; }
.lc2-user-menu-head .nm { font-size: 0.85rem; font-weight: 700; color: #1e293b; }
[data-theme="dark"] .lc2-user-menu-head .nm { color: #f1f5f9; }
.lc2-user-menu button {
    display: flex; align-items: center; gap: 0.6rem; width: 100%;
    padding: 0.55rem 0.6rem; border: none; border-radius: 9px; cursor: pointer;
    background: transparent; color: #334155; font-size: 0.83rem; font-weight: 600; text-align: left;
    transition: background 0.13s;
}
[data-theme="dark"] .lc2-user-menu button { color: #cbd5e1; }
.lc2-user-menu button:hover { background: rgba(99,102,241,0.09); }
.lc2-user-menu button i { width: 18px; text-align: center; }
.lc2-user-menu button.danger { color: #dc2626; }
.lc2-user-menu button.danger:hover { background: rgba(220,38,38,0.08); }

/* Chat column */
.lc2-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* Helper banner */
.lc2-earn-banner {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.9rem; font-size: 0.74rem; font-weight: 600; flex-shrink: 0;
    background: linear-gradient(90deg, rgba(245,158,11,0.12), rgba(34,197,94,0.1));
    border-bottom: 1px solid rgba(245,158,11,0.25); color: #92400e;
}
[data-theme="dark"] .lc2-earn-banner { color: #fcd34d; border-bottom-color: rgba(245,158,11,0.2); }
.lc2-earn-banner i { color: #f59e0b; }
.lc2-earn-banner .lc2-my-xp { margin-left: auto; font-weight: 800; white-space: nowrap; }

/* Messages */
.lc2-messages {
    flex: 1; overflow-y: auto; padding: 1rem 0.9rem 0.5rem;
    display: flex; flex-direction: column; gap: 0.15rem; scroll-behavior: smooth;
}
.lc2-day-empty {
    margin: auto; text-align: center; color: #94a3b8; padding: 1.5rem 1rem;
}
.lc2-day-empty i { font-size: 2.2rem; margin-bottom: 0.6rem; display: block;
    background: linear-gradient(135deg, #38bdf8, #a78bfa); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; }
.lc2-day-empty p { margin: 0; font-size: 0.86rem; line-height: 1.55; }

.lc2-msg-row { display: flex; gap: 0.55rem; margin-top: 0.6rem; max-width: 92%; }
.lc2-msg-row.own { margin-left: auto; flex-direction: row-reverse; }
.lc2-msg-row.grouped { margin-top: 0.12rem; }
.lc2-msg-row .lc2-avatar { width: 30px; height: 30px; align-self: flex-end; }
.lc2-msg-row.grouped .lc2-avatar { visibility: hidden; }
.lc2-msg-col { min-width: 0; display: flex; flex-direction: column; }
.lc2-msg-meta { display: flex; align-items: baseline; gap: 0.45rem; margin: 0 0.25rem 0.15rem; }
.lc2-msg-row.own .lc2-msg-meta { flex-direction: row-reverse; }
.lc2-msg-row.grouped .lc2-msg-meta { display: none; }
.lc2-msg-name { font-size: 0.72rem; font-weight: 800; color: #6366f1; }
.lc2-msg-time { font-size: 0.65rem; color: #94a3b8; }
.lc2-bubble {
    padding: 0.55rem 0.85rem; border-radius: 16px; font-size: 0.88rem; line-height: 1.5;
    color: #1e293b; background: #fff; border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
    border-bottom-left-radius: 5px; word-wrap: break-word; overflow-wrap: break-word;
    animation: lc2-bubble-in 0.18s ease-out;
}
@keyframes lc2-bubble-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
[data-theme="dark"] .lc2-bubble { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.lc2-msg-row.own .lc2-bubble {
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; border: none;
    border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
    box-shadow: 0 3px 10px rgba(99,102,241,0.3);
}

/* Code snippet card */
.lc2-code-card {
    border-radius: 14px; overflow: hidden; min-width: 200px; max-width: 100%;
    border: 1px solid #1e293b; box-shadow: 0 4px 14px rgba(2,6,23,0.35);
    animation: lc2-bubble-in 0.18s ease-out;
}
.lc2-code-head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.4rem 0.75rem; background: #1e293b; color: #94a3b8;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.lc2-code-head .lang { color: #7dd3fc; display: inline-flex; align-items: center; gap: 0.35rem; }
.lc2-code-copy {
    border: none; background: rgba(148,163,184,0.15); color: #cbd5e1; cursor: pointer;
    font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 0.3rem; transition: background 0.15s;
}
.lc2-code-copy:hover { background: rgba(148,163,184,0.3); color: #fff; }
.lc2-code-body {
    margin: 0; padding: 0.75rem 0.9rem; background: #0f172a; color: #e2e8f0;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.78rem;
    line-height: 1.55; overflow-x: auto; -webkit-overflow-scrolling: touch;
    max-height: 320px; overflow-y: auto; white-space: pre;
}

/* System + kudos chips */
.lc2-system { align-self: center; margin-top: 0.6rem; font-size: 0.72rem; color: #94a3b8;
    background: rgba(148,163,184,0.12); padding: 0.25rem 0.8rem; border-radius: 999px; text-align: center; }
.lc2-kudos {
    align-self: center; margin-top: 0.6rem; font-size: 0.78rem; font-weight: 700;
    color: #92400e; text-align: center;
    background: linear-gradient(90deg, rgba(253,224,71,0.35), rgba(251,146,60,0.28));
    border: 1px solid rgba(245,158,11,0.45);
    padding: 0.4rem 1rem; border-radius: 999px;
    box-shadow: 0 3px 12px rgba(245,158,11,0.25);
    animation: lc2-kudos-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .lc2-kudos { color: #fde68a; }
@keyframes lc2-kudos-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Typing */
.lc2-typing {
    min-height: 1.3rem; padding: 0.1rem 1rem 0.25rem; flex-shrink: 0;
    font-size: 0.72rem; color: #94a3b8; display: flex; align-items: center; gap: 0.4rem;
}
.lc2-typing-dots { display: none; gap: 0.2rem; }
.lc2-typing.show .lc2-typing-dots { display: inline-flex; }
.lc2-typing-dots span {
    width: 5px; height: 5px; border-radius: 50%; background: #6366f1;
    animation: lc2-type-bounce 1.2s infinite ease-in-out;
}
.lc2-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.lc2-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes lc2-type-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-4px); opacity: 1; } }

/* ── Composer ── */
.lc2-composer { padding: 0.6rem 0.8rem 0.8rem; background: #fff; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
[data-theme="dark"] .lc2-composer { background: #1e293b; border-top-color: #334155; }
.lc2-code-mode-bar {
    display: none; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem;
    font-size: 0.72rem; font-weight: 700; color: #0ea5e9;
}
.lc2-composer.code-mode .lc2-code-mode-bar { display: flex; }
.lc2-code-mode-bar select {
    border: 1px solid #bae6fd; background: rgba(14,165,233,0.07); color: #0369a1;
    font-size: 0.72rem; font-weight: 700; border-radius: 8px; padding: 0.25rem 0.5rem; cursor: pointer;
}
[data-theme="dark"] .lc2-code-mode-bar select { background: rgba(14,165,233,0.12); border-color: rgba(14,165,233,0.4); color: #7dd3fc; }
.lc2-code-mode-close { margin-left: auto; border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 0.85rem; }
.lc2-input-row { display: flex; align-items: flex-end; gap: 0.5rem; }
.lc2-input-wrap {
    flex: 1; display: flex; align-items: flex-end; gap: 0.25rem;
    background: #f1f5f9; border: 1.5px solid transparent; border-radius: 18px;
    padding: 0.3rem 0.35rem 0.3rem 0.9rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.lc2-input-wrap:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.13); background: #fff; }
[data-theme="dark"] .lc2-input-wrap { background: #0f172a; }
[data-theme="dark"] .lc2-input-wrap:focus-within { background: #0f172a; }
.lc2-input {
    flex: 1; border: none; background: transparent; resize: none; outline: none;
    font-size: 0.9rem; color: #1e293b; font-family: inherit;
    line-height: 1.45; max-height: 120px; padding: 0.3rem 0;
}
[data-theme="dark"] .lc2-input { color: #e2e8f0; }
.lc2-composer.code-mode .lc2-input { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.82rem; }
.lc2-icon-btn {
    width: 34px; height: 34px; border-radius: 12px; border: none; cursor: pointer;
    background: transparent; color: #64748b; font-size: 0.95rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.lc2-icon-btn:hover { background: rgba(99,102,241,0.1); color: #4f46e5; }
.lc2-icon-btn.active { background: rgba(14,165,233,0.15); color: #0284c7; }
.lc2-send-btn {
    width: 42px; height: 42px; border-radius: 14px; border: none; cursor: pointer; flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
    transition: transform 0.13s, box-shadow 0.13s;
}
.lc2-send-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.55); }
.lc2-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── DM view ── */
.lc2-dm-list { flex: 1; overflow-y: auto; padding: 0.75rem; }
.lc2-dm-empty { text-align: center; color: #94a3b8; padding: 2.5rem 1.25rem; }
.lc2-dm-empty i { font-size: 2rem; display: block; margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #38bdf8, #a78bfa); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; }
.lc2-dm-empty p { margin: 0; font-size: 0.84rem; line-height: 1.6; }
.lc2-dm-item {
    display: flex; align-items: center; gap: 0.7rem; width: 100%;
    padding: 0.65rem 0.75rem; border-radius: 14px; border: 1px solid #e2e8f0;
    background: #fff; cursor: pointer; margin-bottom: 0.5rem; text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lc2-dm-item:hover { border-color: #a5b4fc; box-shadow: 0 4px 14px rgba(99,102,241,0.14); }
[data-theme="dark"] .lc2-dm-item { background: #1e293b; border-color: #334155; }
.lc2-dm-item img { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.lc2-dm-item .lc2-dm-info { flex: 1; min-width: 0; }
.lc2-dm-item .lc2-dm-name { font-size: 0.86rem; font-weight: 700; color: #1e293b; }
[data-theme="dark"] .lc2-dm-item .lc2-dm-name { color: #f1f5f9; }
.lc2-dm-item .lc2-dm-preview { font-size: 0.74rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-dm-unread {
    min-width: 20px; height: 20px; border-radius: 999px; background: #6366f1; color: #fff;
    font-size: 0.68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.lc2-dm-head {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem;
    background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
[data-theme="dark"] .lc2-dm-head { background: #1e293b; border-bottom-color: #334155; }
.lc2-dm-head img { width: 32px; height: 32px; border-radius: 50%; }
.lc2-dm-head .nm { flex: 1; font-size: 0.9rem; font-weight: 800; color: #1e293b; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .lc2-dm-head .nm { color: #f1f5f9; }
.lc2-dm-back, .lc2-dm-block {
    border: none; background: transparent; cursor: pointer; color: #64748b;
    width: 30px; height: 30px; border-radius: 9px; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
}
.lc2-dm-back:hover { background: rgba(99,102,241,0.1); color: #4f46e5; }
.lc2-dm-block:hover { background: rgba(220,38,38,0.1); color: #dc2626; }
.lc2-private-note {
    font-size: 0.68rem; color: #94a3b8; text-align: center; padding: 0.3rem 1rem 0; flex-shrink: 0;
}

/* ── Chat request toast ── */
.lc2-request-toast {
    position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(140%);
    z-index: 10006; width: min(400px, calc(100vw - 2rem));
    background: #fff; border: 1px solid #e2e8f0; border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15,23,42,0.3); padding: 0.9rem 1rem;
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.lc2-request-toast.show { transform: translateX(-50%) translateY(0); }
[data-theme="dark"] .lc2-request-toast { background: #1e293b; border-color: #334155; }
.lc2-request-row { display: flex; align-items: center; gap: 0.7rem; }
.lc2-request-row img { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.lc2-request-text { flex: 1; min-width: 0; font-size: 0.84rem; color: #334155; line-height: 1.4; }
[data-theme="dark"] .lc2-request-text { color: #cbd5e1; }
.lc2-request-text strong { color: #6366f1; }
.lc2-request-actions { display: flex; gap: 0.45rem; margin-top: 0.7rem; }
.lc2-request-actions button {
    flex: 1; padding: 0.5rem 0.6rem; border-radius: 11px; border: none; cursor: pointer;
    font-size: 0.8rem; font-weight: 700; transition: opacity 0.15s;
}
.lc2-request-actions button:hover { opacity: 0.88; }
.lc2-req-accept { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.lc2-req-decline { background: #f1f5f9; color: #475569; }
[data-theme="dark"] .lc2-req-decline { background: #334155; color: #cbd5e1; }
.lc2-req-block { background: rgba(220,38,38,0.1); color: #dc2626; }

/* ── Blocked users manager ── */
.lc2-blocked-panel {
    display: none; flex: 1; flex-direction: column; min-height: 0;
}
.lc2-blocked-panel.show { display: flex; }
.lc2-blocked-list { flex: 1; overflow-y: auto; padding: 0.75rem; }
.lc2-blocked-item {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem;
    border-radius: 13px; border: 1px solid #e2e8f0; background: #fff; margin-bottom: 0.5rem;
}
[data-theme="dark"] .lc2-blocked-item { background: #1e293b; border-color: #334155; }
.lc2-blocked-item img { width: 34px; height: 34px; border-radius: 50%; filter: grayscale(1); opacity: 0.7; }
.lc2-blocked-item .nm { flex: 1; font-size: 0.84rem; font-weight: 600; color: #64748b; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-unblock-btn {
    border: 1px solid #a5b4fc; background: rgba(99,102,241,0.07); color: #4f46e5;
    font-size: 0.74rem; font-weight: 700; border-radius: 999px; padding: 0.32rem 0.8rem; cursor: pointer;
    transition: background 0.15s;
}
.lc2-unblock-btn:hover { background: rgba(99,102,241,0.16); }
.lc2-blocked-empty { text-align: center; color: #94a3b8; font-size: 0.82rem; padding: 2rem 1rem; }

/* Emoji quick row */
.lc2-emoji-pop {
    position: absolute; bottom: 100%; margin-bottom: 0.5rem; right: 0; z-index: 5;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    box-shadow: 0 14px 40px rgba(15,23,42,0.18); padding: 0.45rem; display: none;
    grid-template-columns: repeat(7, 1fr); gap: 0.15rem;
}
.lc2-emoji-pop.show { display: grid; }
[data-theme="dark"] .lc2-emoji-pop { background: #1e293b; border-color: #334155; }
.lc2-emoji-pop button {
    width: 32px; height: 32px; border: none; background: transparent; cursor: pointer;
    font-size: 1.05rem; border-radius: 8px;
}
.lc2-emoji-pop button:hover { background: rgba(99,102,241,0.1); }

/* ── Modals (send XP / confirm) ── */
.lc2-modal-backdrop {
    display: none; position: fixed; inset: 0; z-index: 10008;
    background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    align-items: center; justify-content: center; padding: 1rem;
}
.lc2-modal-backdrop.show { display: flex; }
.lc2-modal {
    position: relative; width: min(360px, 100%);
    background: #fff; border-radius: 22px; padding: 1.75rem 1.5rem 1.4rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
    text-align: center; overflow: hidden;
    animation: lc2-modal-pop 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
[data-theme="dark"] .lc2-modal { background: #1e293b; }
@keyframes lc2-modal-pop { from { transform: translateY(18px) scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.lc2-modal-glow {
    position: absolute; top: -70px; left: 50%; transform: translateX(-50%);
    width: 260px; height: 140px; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(245,158,11,0.28), transparent 70%);
}
.lc2-modal-close {
    position: absolute; top: 0.7rem; right: 0.8rem; width: 30px; height: 30px;
    border: none; border-radius: 9px; background: rgba(148,163,184,0.12);
    color: #64748b; font-size: 1.1rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lc2-modal-close:hover { background: rgba(148,163,184,0.25); }
.lc2-modal-avatar {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 0.6rem;
    border: 3px solid #fff; box-shadow: 0 6px 20px rgba(245,158,11,0.35), 0 0 0 3px rgba(245,158,11,0.35);
    position: relative; display: block;
}
[data-theme="dark"] .lc2-modal-avatar { border-color: #1e293b; }
.lc2-modal-icon {
    width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 0.7rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.lc2-modal-icon.danger { background: rgba(220,38,38,0.1); color: #dc2626; box-shadow: 0 0 0 6px rgba(220,38,38,0.06); }
.lc2-modal-title { margin: 0 0 0.35rem; font-size: 1.1rem; font-weight: 800; color: #0f172a; }
[data-theme="dark"] .lc2-modal-title { color: #f1f5f9; }
.lc2-modal-title span { color: #d97706; }
.lc2-modal-sub { margin: 0 0 1rem; font-size: 0.83rem; color: #64748b; line-height: 1.55; }
.lc2-modal-balance { font-size: 0.78rem; color: #94a3b8; }
.lc2-modal-balance strong { color: #d97706; }
.lc2-xp-presets { display: flex; gap: 0.45rem; justify-content: center; margin-bottom: 0.8rem; flex-wrap: wrap; }
.lc2-xp-presets button {
    padding: 0.45rem 0.85rem; border-radius: 999px; cursor: pointer;
    border: 1.5px solid #e2e8f0; background: #f8fafc; color: #475569;
    font-size: 0.82rem; font-weight: 800; transition: all 0.15s;
}
[data-theme="dark"] .lc2-xp-presets button { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.lc2-xp-presets button:hover { border-color: #fbbf24; transform: translateY(-1px); }
.lc2-xp-presets button.selected {
    border-color: #f59e0b; color: #92400e;
    background: linear-gradient(135deg, rgba(253,224,71,0.35), rgba(251,146,60,0.25));
    box-shadow: 0 3px 12px rgba(245,158,11,0.3);
}
[data-theme="dark"] .lc2-xp-presets button.selected { color: #fde68a; }
.lc2-xp-custom {
    display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 0.65rem;
    border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 0.35rem 0.8rem;
    background: #f8fafc;
}
[data-theme="dark"] .lc2-xp-custom { background: #0f172a; border-color: #334155; }
.lc2-xp-custom:focus-within { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.lc2-xp-custom input {
    width: 80px; border: none; background: transparent; outline: none; text-align: center;
    font-size: 1.15rem; font-weight: 800; color: #0f172a; -moz-appearance: textfield;
}
.lc2-xp-custom input::-webkit-outer-spin-button, .lc2-xp-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
[data-theme="dark"] .lc2-xp-custom input { color: #f1f5f9; }
.lc2-xp-custom span { font-size: 0.78rem; font-weight: 800; color: #d97706; }
.lc2-modal-error { display: none; margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 600; color: #dc2626; }
.lc2-modal-error.show { display: block; }
.lc2-modal-actions { display: flex; gap: 0.55rem; margin-top: 0.4rem; }
.lc2-modal-btn {
    flex: 1; padding: 0.65rem 0.8rem; border-radius: 13px; border: none; cursor: pointer;
    font-size: 0.86rem; font-weight: 800; transition: transform 0.13s, box-shadow 0.13s, opacity 0.13s;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.lc2-modal-btn.ghost { background: #f1f5f9; color: #475569; }
[data-theme="dark"] .lc2-modal-btn.ghost { background: #334155; color: #cbd5e1; }
.lc2-modal-btn.ghost:hover { opacity: 0.85; }
.lc2-modal-btn.primary {
    background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff;
    box-shadow: 0 6px 18px rgba(245,158,11,0.4);
}
.lc2-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,158,11,0.5); }
.lc2-modal-btn.primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.lc2-modal-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff;
    box-shadow: 0 6px 18px rgba(220,38,38,0.35);
}
.lc2-modal-btn.danger:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(220,38,38,0.45); }

/* ── Mobile ── */
@media (max-width: 575.98px) {
    .lc2-panel { max-width: none; border-radius: 0; }
    .lc2-header { padding: 0.7rem 0.8rem; gap: 0.55rem; }
    .lc2-header-icon { width: 34px; height: 34px; font-size: 0.95rem; border-radius: 10px; }
    .lc2-header-text h3 { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lc2-header-sub { display: none; }
    .lc2-online-pill { padding: 0.24rem 0.55rem; font-size: 0.7rem; }
    .lc2-people { position: absolute; inset: 0; top: 0; width: 100%; z-index: 4; display: none; }
    .lc2-people.show-mobile { display: flex; }
    .lc2-fab { right: 1rem; width: 50px; height: 50px; font-size: 1.2rem; }
    .lc2-msg-row { max-width: 100%; }
}
@media (min-width: 576px) {
    .lc2-people-toggle { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .lc2-panel, .lc2-bubble, .lc2-code-card, .lc2-kudos, .lc2-request-toast { animation: none !important; transition: none !important; }
}
