.dc-shell { display:none; }
@media (min-width:768px) {
    .dc-shell { --dc-bg:#fff;--dc-ink:#172033;--dc-muted:#647084;--dc-line:#e5e8ef;--dc-hover:#f4f5fa;--dc-accent:#4f46e5;display:contents;color:var(--dc-ink); }
    .dark .dc-shell { --dc-bg:#171d2b;--dc-ink:#edf0f8;--dc-muted:#a7b1c5;--dc-line:#30394b;--dc-hover:#222a3a;--dc-accent:#a5b4fc; }
    .dc-shell button,.dc-shell input { font:inherit; }
    .dc-shell button { cursor:pointer;color:inherit; }
    .dc-shell :is(button,a,input):focus-visible { outline:2px solid var(--dc-accent);outline-offset:-2px; }
    .dc-inbox,.dc-window,.dc-stack-menu { background:var(--dc-bg);border:1px solid var(--dc-line);box-shadow:0 12px 40px #0003;border-radius:16px; }
    .dc-inbox { position:fixed;width:360px;max-width:calc(100vw - 24px);overflow:hidden;z-index:92; }
    .dc-inbox>header { display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px; }
    .dc-inbox h2 { font-size:20px;font-weight:750; }
    .dc-inbox>header button,.dc-window-head>button { width:32px;height:32px;flex:none;font-size:24px;border:0;border-radius:50%;background:transparent; }
    .dc-shell button:hover { background:var(--dc-hover); }
    .dc-search { margin:4px 12px 12px;padding:9px 12px;display:flex;gap:8px;align-items:center;background:var(--dc-hover);border-radius:24px;color:var(--dc-muted); }
    .dc-search input { width:100%;min-width:0;background:transparent;border:0;outline:none;color:var(--dc-ink);font-size:13px; }
    .dc-tabs { display:flex;gap:8px;padding:0 12px 12px;border-bottom:1px solid var(--dc-line); }
    .dc-tabs button { padding:7px 12px;border-radius:20px;font-size:13px;border:0;background:transparent; }
    .dc-tabs button[aria-selected=true] { background:var(--dc-hover);color:var(--dc-accent);font-weight:700; }
    .dc-inbox-list { max-height:min(420px,calc(100dvh - 280px));overflow-y:auto;overscroll-behavior:contain;padding:4px; }
    .dc-row { display:flex;align-items:center;gap:10px;width:100%;padding:10px 8px;text-align:left;border:0;border-radius:10px;background:transparent; }
    .dc-avatar { position:relative;width:40px;height:40px;flex:0 0 40px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--dc-hover);color:var(--dc-accent);font-weight:700; }
    .dc-avatar img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%; }
    .dc-online { position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border:2px solid var(--dc-bg);border-radius:50%;background:#22c55e; }
    .dc-unread { width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#3b82f6; }
    .dc-row-copy { min-width:0;flex:1; }
    .dc-row-copy strong,.dc-window-name strong { display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .dc-preview { display:flex;gap:8px;align-items:center;color:var(--dc-muted);font-size:12px; }
    .dc-preview>span { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .dc-preview time { flex:none;font-size:11px; }
    .dc-row.is-unread .dc-preview { font-weight:650;color:var(--dc-ink); }
    .dc-row:not(.is-unread) strong { font-weight:500; }
    .dc-notice { padding:14px;font-size:13px;color:var(--dc-muted); }
    .dc-all { display:block;padding:12px;text-align:center;border-top:1px solid var(--dc-line);color:var(--dc-accent);font-size:13px;font-weight:600; }
    .dc-windows { position:fixed;right:88px;bottom:16px;display:flex;align-items:flex-end;gap:12px;pointer-events:none;z-index:80; }
    .dc-window { position:relative;display:flex;flex-direction:column;width:320px;height:min(500px,calc(100dvh - 112px));overflow:hidden;pointer-events:auto; }
    .dc-window-head { display:flex;gap:6px;align-items:center;padding:10px;border-bottom:1px solid var(--dc-line);flex:none; }
    .dc-window-name { min-width:0;flex:1; }
    .dc-window-name small { font-size:11px;display:block;color:var(--dc-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .dc-window .lk-chat-history { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px; }
    .dc-window .lk-chat-bubble { max-width:240px;overflow-wrap:anywhere;background:var(--dc-hover);color:var(--dc-ink); }
    .dc-window .mine .lk-chat-bubble { background:#4f46e5;color:#fff; }
    .dc-window .lk-chat-composer { padding:10px;gap:6px;border-color:var(--dc-line);flex:none;background:var(--dc-bg); }
    .dc-window .lk-chat-composer textarea { min-width:0;max-height:100px;background:var(--dc-hover);color:var(--dc-ink);border-color:var(--dc-line);font-size:13px; }
    .dc-window .lk-chat-time,.dc-window .lk-chat-day { color:var(--dc-muted); }
    .dc-window .mine .lk-chat-time { color:#e0e7ff; }
    .dc-window .lk-chat-pending { max-height:140px;overflow-y:auto;background:var(--dc-hover); }
    .dc-connection { font-size:11px;padding:4px 10px;color:var(--dc-muted); }
    .dc-stack { position:fixed;right:16px;bottom:var(--dc-stack-bottom,16px);display:flex;flex-direction:column;gap:10px;z-index:81;width:52px; }
    .dc-stack-options { position:relative; }
    .dc-stack-options>button { width:52px;height:32px;background:var(--dc-bg);border:1px solid var(--dc-line);border-radius:18px;box-shadow:0 4px 15px #0002; }
    .dc-stack-menu { position:absolute;right:0;bottom:40px;width:220px;padding:6px; }
    .dc-stack-menu button { width:100%;padding:12px;text-align:left;font-size:13px;border:0;background:transparent;border-radius:10px; }
    .dc-bubbles { display:flex;flex-direction:column;gap:12px;max-height:calc(100dvh - var(--dc-stack-bottom,16px) - 100px);overflow-y:auto;padding:5px;overscroll-behavior:contain; }
    .dc-bubble { position:relative;flex:none; }
    .dc-bubble .dc-avatar { box-shadow:0 4px 18px #0003; }
    .dc-bubble-close { position:absolute;top:-5px;right:-4px;width:22px;height:22px;border-radius:50%;border:1px solid var(--dc-line);background:var(--dc-bg);opacity:0; }
    .dc-bubble:hover .dc-bubble-close,.dc-bubble:focus-within .dc-bubble-close { opacity:1; }
    .dc-bubble-unread { position:absolute;right:-1px;bottom:-3px;min-width:16px;height:16px;padding:0 3px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center; }
    .dc-image-preview { position:absolute;inset:0;z-index:3;background:#000c;display:flex;align-items:center;justify-content:center;padding:12px; }
    .dc-image-preview img { max-width:100%;max-height:100%;object-fit:contain; }
    .dc-image-preview button { position:absolute;top:8px;right:8px;color:white;font-size:24px; }
}

@media(min-width:768px) {
    .dc-header-trigger { position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:1px solid #e5e8ef;border-radius:10px; }
    .dark .dc-header-trigger { border-color:#30394b;color:#edf0f8; }
    .dc-header-trigger .kg-header-count-badge { position:absolute;top:-6px;right:-6px;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;line-height:1; }
    .dc-window-name .dc-context { font-size:10px;color:var(--dc-accent); }
}
