/**
 * Klubová komunikace – stejné rozložení a místa funkcí jako v telefonní appce.
 */
html.ck-page,
html.ck-page body {
    height: 100%;
    overflow: hidden;
    background: #f3f3f5;
}

.ck {
    --ck-pink: #db2071;
    --ck-pink-soft: #f6d5e4;
    --ck-pink-dark: #a01855;
    --ck-teal: #db2071;
    --ck-teal-dark: #a01855;
    --ck-teal-soft: #f6d5e4;
    --ck-ink: #141414;
    --ck-muted: #6b6b73;
    --ck-line: #e6e6ec;
    --ck-bg: #f3f3f5;
    --ck-dark: #0a0a0a;
    --ck-bubble-mine: #db2071;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 400px) 1fr;
    background: var(--ck-bg);
    color: var(--ck-ink);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

@media (max-width: 1023px) {
    .ck { grid-template-columns: 1fr; }
    #chat-sidebar.hidden-mobile { display: none !important; }
    #chat-main.hidden-mobile { display: none !important; }
}

.ck-inbox,
.ck-thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.ck-inbox { background: var(--ck-bg); }
.ck-thread { background: var(--ck-bg); border-left: 1px solid var(--ck-line); }
@media (max-width: 1023px) {
    .ck-thread { border-left: 0; }
}

.ck-tabbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem 0.75rem 1rem;
    background: var(--ck-dark);
    flex-shrink: 0;
    position: relative;
}
.ck-tabbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #db2071;
}
.ck-tabbar h1 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
    line-height: 1.1;
}
.ck-tabbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.ck-round-btn {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: var(--ck-pink-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.92rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ck-round-btn:hover { color: var(--ck-pink); }
.ck-round-btn--teal { color: var(--ck-teal-dark); }
.ck-round-btn--teal:hover { color: var(--ck-teal); }
.ck-round-btn.hidden,
.ck-h-ico.hidden { display: none !important; }

.ck-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.85rem 1rem 0.15rem;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 0.9rem;
    flex-shrink: 0;
}
.ck-search[hidden] { display: none !important; }
.ck-search > i { color: var(--ck-muted); font-size: 0.85rem; }
.ck-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.7rem 0;
    font-size: 0.92rem;
    outline: none;
    min-width: 0;
}
.ck-search button {
    border: 0;
    background: transparent;
    color: var(--ck-muted);
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.ck-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 0.25rem 0 1.4rem;
}

.ck-sec { padding: 0.85rem 1rem 0.15rem; }
.ck-sec-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.25rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--ck-pink-dark);
}
.ck-sec.is-teal .ck-sec-label { color: var(--ck-teal-dark); }
.ck-sec-label i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--ck-pink);
}
.ck-sec.is-teal .ck-sec-label i { background: var(--ck-teal); }

.ck-sec-card {
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 1.25rem;
    overflow: hidden;
}

.ck-item {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-top: 1px solid #f0f0f4;
    background: #fff;
    text-align: left;
    color: inherit;
    cursor: pointer;
}
.ck-item:first-child { border-top: 0; }
.ck-item:hover { background: #fafafa; }
.ck-item.is-active { background: #f7f7f9; }
.ck-item.is-unread .ck-item__title strong { font-weight: 900; }

.ck-av-wrap {
    position: relative;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}
.ck-av-wrap .ck-av {
    width: 100%;
    height: 100%;
}
.ck-av-wrap--sm {
    width: 2.25rem;
    height: 2.25rem;
}
.ck-av-dot {
    display: none;
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: #31c48d;
    border: 2px solid #fff;
    box-sizing: border-box;
    pointer-events: none;
}
.ck-av-wrap.is-on .ck-av-dot { display: block; }
.ck-av-wrap--sm .ck-av-dot {
    width: 0.58rem;
    height: 0.58rem;
}

.ck-av {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    background: var(--ck-dark);
    flex-shrink: 0;
}
.ck-av.plain {
    background: #ececf0;
    color: #73737c;
}
.ck-av.ozn { background: var(--ck-pink); color: #fff; }
.ck-av.role { background: var(--ck-pink-soft); color: var(--ck-pink-dark); }
.ck-av--letters {
    background: var(--ck-pink-soft);
    color: var(--ck-pink-dark);
    text-align: center;
    line-height: 1.05;
    padding: 0.15rem;
}
.ck-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-item__txt { min-width: 0; }
.ck-item__title {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    color: var(--ck-ink);
}
.ck-item__title strong {
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ck-item__mark {
    font-size: 0.68rem;
    color: var(--ck-muted);
    flex-shrink: 0;
}
.ck-item__status {
    display: block;
    margin-top: 0.08rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ck-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ck-item__status.is-on { color: #059669; }
.ck-item__preview {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.78rem;
    color: var(--ck-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ck-item__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}
.ck-item__meta time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #b8b8c0;
}
.ck-item__meta time.is-hot { color: var(--ck-pink-dark); }
.ck-item__go { color: #b8b8c0; font-size: 0.85rem; }

.ck-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.2rem;
    padding: 0 0.4rem;
    border-radius: 0.75rem;
    background: var(--ck-pink);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.ck-list-empty {
    margin: 1rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 1rem;
    color: var(--ck-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.ck-list-empty i { color: var(--ck-pink-dark); font-size: 1.2rem; margin-top: 0.15rem; }
.ck-list-empty p { margin: 0; }

.ck-h {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem 0.55rem 0.35rem;
    background: var(--ck-dark);
    flex-shrink: 0;
    min-width: 0;
    position: relative;
}
.ck-h::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #db2071;
}
.ck-h-back,
.ck-h-ico {
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    font-size: 1rem;
}
.ck-h-back:hover,
.ck-h-ico:hover { background: rgba(255, 255, 255, 0.08); }
.ck-h-ico.is-muted { color: #fb7185; }
@media (min-width: 1024px) {
    .ck-h-back { display: none; }
}
.ck-h-who {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    padding: 0.15rem 0.25rem;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.ck-h .ck-av-wrap {
    width: 2.25rem;
    height: 2.25rem;
}
.ck-h .ck-av {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.52rem;
}
.ck-h .ck-av-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-color: var(--ck-dark);
}
.ck-h h2,
#chat-header-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ck-h p,
#chat-header-sub {
    margin: 0.05rem 0 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#chat-header-sub.is-online {
    color: #86efac;
}
.ck-h-actions {
    margin-left: auto;
    display: flex;
    gap: 0.1rem;
    flex-shrink: 0;
}

.ck-ph {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-align: center;
    color: var(--ck-muted);
    padding: 2rem;
    background: var(--ck-bg);
}
.ck-ph .ring {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--ck-line);
    color: var(--ck-pink);
    font-size: 1.45rem;
}
.ck-ph strong {
    color: var(--ck-ink);
    font-size: 1.05rem;
    font-weight: 800;
}
.ck-ph span {
    max-width: 22rem;
    font-size: 0.85rem;
    line-height: 1.45;
}

.chat-empty-state button {
    margin-left: 0.35rem;
    background: none;
    border: 0;
    padding: 0;
    color: #db2071;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

#chat-empty.hidden,
#chat-empty[hidden],
#chat-active.hidden,
#chat-active[hidden] {
    display: none !important;
}

#chat-active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 1rem 0.9rem 1.2rem;
    background: var(--ck-bg);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    scroll-behavior: smooth;
}

.chat-bubble-wrap {
    display: flex;
    width: 100%;
    overflow: visible;
}

.chat-bubble-wrap.mine { justify-content: flex-end; }
.chat-bubble-wrap.other { justify-content: flex-start; }

.chat-bubble-cluster {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    max-width: min(28rem, 78%);
}

.chat-bubble-cluster .chat-bubble {
    max-width: 100%;
    flex: 1 1 auto;
    min-width: 0;
}

.chat-bubble {
    padding: 0.55rem 0.85rem 0.4rem;
    border-radius: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.chat-bubble-mine {
    background: var(--ck-bubble-mine);
    color: #fff;
    border: 0;
    border-radius: 1.25rem 1.25rem 0.35rem 1.25rem;
    box-shadow: none;
}

.chat-bubble-other {
    background: #fff;
    color: var(--ck-ink);
    border: 1px solid var(--ck-line);
    border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
    box-shadow: none;
}

.chat-sender-name,
.chat-bubble-other > p.text-\[10px\] {
    font-size: 0.65rem !important;
    font-weight: 800;
    color: var(--ck-pink);
    margin-bottom: 0.15rem;
    letter-spacing: 0;
    text-transform: none !important;
    opacity: 1 !important;
}

.chat-bubble-mine .chat-sender-name { color: rgba(255, 255, 255, 0.85); }

.chat-msg-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.chat-msg-foot .text-\[10px\] {
    font-size: 0.62rem !important;
    font-weight: 600;
}

.chat-bubble-mine .chat-msg-foot .text-\[10px\] { color: rgba(255, 255, 255, 0.75); }
.chat-bubble-other .chat-msg-foot .text-\[10px\] { color: var(--ck-muted); }

.chat-action-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    padding: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
    transition: opacity 0.15s ease, transform 0.18s ease;
}

.chat-bubble-wrap.mine .chat-action-bar { padding-right: 0.35rem; }
.chat-bubble-wrap.other .chat-action-bar { padding-left: 0.35rem; }

.chat-action-btn {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid var(--ck-line);
    background: #fff;
    color: var(--ck-ink);
    font-size: 0.7rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-action-btn:hover { color: var(--ck-pink); border-color: #f9a8d4; }
.chat-action-btn.danger { color: #ed4956; }
.chat-action-btn.danger:hover { color: #b91c1c; border-color: #fecaca; }

.chat-bubble-cluster.menu-open .chat-action-bar {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

@media (hover: none) {
    .chat-action-bar {
        opacity: 0.9;
        pointer-events: auto;
        transform: none;
    }
}

.chat-reply-quote {
    border-left: 3px solid var(--ck-pink);
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.04);
    font-size: 0.72rem;
}

.chat-reply-quote .chat-reply-name {
    margin: 0;
    font-weight: 800;
    line-height: 1.25;
}

.chat-reply-quote .chat-reply-text {
    margin: 0.1rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.chat-bubble-mine .chat-reply-quote {
    border-left-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

.chat-bubble-mine .chat-reply-quote .chat-reply-name { color: rgba(255, 255, 255, 0.95); }
.chat-bubble-mine .chat-reply-quote .chat-reply-text { color: rgba(255, 255, 255, 0.85); }
.chat-bubble-other .chat-reply-quote .chat-reply-name { color: var(--ck-pink); }
.chat-bubble-other .chat-reply-quote .chat-reply-text { color: #4b5563; }

.chat-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.chat-reaction-pill {
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--ck-line);
    background: #fff;
    cursor: pointer;
}

.chat-bubble-mine .chat-reaction-pill {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.chat-reaction-pill.mine {
    border-color: #f9a8d4;
    background: var(--ck-pink-soft);
    color: var(--ck-ink);
}

.chat-ozn-card {
    background: #fff;
    border: 1px solid #fbcfe8;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(var(--draci-pink-rgb), 0.06);
}

.chat-ozn-card h4 {
    font-weight: 800;
    color: var(--ck-ink);
    margin-bottom: 0.35rem;
}

.chat-ozn-card .meta {
    font-size: 0.62rem;
    color: var(--ck-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.chat-bubble-moderated {
    background: #fef2f2;
    color: #991b1b;
    border: 1px dashed #fecaca;
    border-radius: 1rem;
    max-width: min(28rem, 85%);
    padding: 0.75rem 1rem;
}

.chat-recalled {
    font-size: 0.78rem;
    color: var(--ck-muted);
    font-style: italic;
    padding: 0.35rem 0;
}

.chat-pending { opacity: 0.88; }
.chat-pending .chat-bubble { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.chat-recall-btn {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    opacity: 0.95;
}
.chat-recall-btn:hover { opacity: 1; }

.chat-typing {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.15rem 0.95rem 0.45rem;
    min-height: 1.7rem;
    background: var(--ck-bg);
}
.chat-typing[hidden] { display: none !important; }
.chat-typing-avs {
    display: flex;
    align-items: center;
}
.chat-typing-avs img,
.chat-typing-avs span {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid var(--ck-bg);
    margin-left: -0.35rem;
    background: var(--ck-pink-soft);
    color: var(--ck-pink-dark);
    font-size: 0.52rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.chat-typing-avs img:first-child,
.chat-typing-avs span:first-child { margin-left: 0; }
.chat-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.38rem 0.62rem;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 0.95rem;
}
.chat-typing-dots span {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: var(--ck-pink);
    animation: ck-typing 1.05s infinite ease-in-out;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
.chat-typing-label {
    font-size: 0.72rem;
    color: var(--ck-muted);
    font-weight: 600;
}
@keyframes ck-typing {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
    40% { transform: translateY(-3px); opacity: 1; }
}

.chat-msg-ctx {
    position: fixed;
    z-index: 80;
    min-width: 11.5rem;
    padding: 0.3rem;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 0.85rem;
    box-shadow: 0 12px 32px rgba(20, 20, 20, 0.16);
}
.chat-msg-ctx[hidden] { display: none !important; }
.chat-msg-ctx button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ck-ink);
    padding: 0.48rem 0.65rem;
    border-radius: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.chat-msg-ctx button i { width: 1rem; color: var(--ck-pink-dark); }
.chat-msg-ctx button:hover { background: var(--ck-pink-soft); }
.chat-msg-ctx button.danger { color: #b91c1c; }
.chat-msg-ctx button.danger i { color: #b91c1c; }

.chat-poll-btn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    margin-top: 0.35rem;
    border: 1px solid var(--ck-line);
    background: #fff;
    color: var(--ck-ink);
    border-radius: 0.75rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.chat-bubble-mine .chat-poll-btn {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.chat-poll-btn.active {
    border-color: var(--ck-pink);
    background: var(--ck-pink-soft);
    color: var(--ck-ink);
}

.chat-empty-state {
    align-self: center;
    margin: 2rem auto;
    text-align: center;
    color: var(--ck-muted);
    font-size: 0.85rem;
    max-width: 22rem;
    line-height: 1.45;
}

#chat-compose {
    flex-shrink: 0;
    border-top: 1px solid var(--ck-line);
    background: #fff;
    padding: 0;
}

.chat-reply-bar {
    display: none;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    margin: 0.5rem 0.75rem 0;
    background: var(--ck-pink-soft);
    border: 0;
    font-size: 0.78rem;
    border-radius: 0.75rem;
}
.chat-reply-bar.open { display: flex; }
.chat-reply-bar > i { color: var(--ck-pink-dark); }
.chat-reply-bar #chat-reply-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ck-pink-dark);
}
.chat-reply-bar #chat-reply-preview {
    margin: 0;
    font-size: 0.75rem;
    color: var(--ck-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-reply-bar button {
    border: 0;
    background: transparent;
    color: var(--ck-muted);
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

#chat-attach-menu {
    display: none;
    padding: 0.7rem 1rem 0.35rem;
    flex-direction: column;
    border-bottom: 1px solid var(--ck-line);
    background: #fff;
}
#chat-attach-menu.open { display: flex; }
.ck-attach-title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ck-ink);
}
.ck-attach-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.4rem;
}
#chat-attach-menu button {
    width: 4.6rem;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--ck-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
#chat-attach-menu button i {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 1rem;
    background: var(--ck-pink-soft);
    color: var(--ck-pink-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 1.05rem;
}

.ck-compose-row {
    display: flex;
    align-items: flex-end;
    gap: 0.2rem;
    padding: 0.55rem 0.55rem 0.7rem;
}

#chat-attach-toggle,
#chat-rodice-toggle {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--ck-pink);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.55rem;
}
#chat-attach-toggle:hover { color: var(--ck-pink-dark); }
#chat-rodice-toggle {
    font-size: 1.15rem;
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: 0.1rem;
    background: var(--ck-pink-soft);
    color: var(--ck-pink-dark);
}
#chat-rodice-toggle.active {
    color: #fff;
    background: var(--ck-pink);
}

#chat-input {
    flex: 1;
    border: 1px solid #d8d8de;
    border-radius: 0.9rem;
    padding: 0.62rem 0.9rem;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
    resize: none;
    max-height: 7rem;
    background: #fff;
    line-height: 1.35;
}
#chat-input:focus { border-color: var(--ck-pink); }

#chat-send {
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 999px;
    background: var(--ck-pink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

#chat-send:hover { filter: brightness(1.05); }

.chat-emoji-picker {
    display: none;
    position: fixed;
    z-index: 200;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 0.85rem;
    padding: 0.55rem 0.65rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    min-width: 200px;
}

.chat-emoji-picker.open { display: block; }

.chat-emoji-quick {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-emoji-quick-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid var(--ck-line);
    background: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.chat-emoji-quick-btn:hover {
    background: var(--ck-pink-soft);
    border-color: #f9a8d4;
}

.chat-emoji-custom-btn { color: #6b7280; font-size: 0.85rem; }
.chat-emoji-custom { display: none; margin-top: 0.5rem; }
.chat-emoji-custom.open { display: block; }

.chat-emoji-input {
    width: 3rem;
    height: 2.5rem;
    text-align: center;
    font-size: 1.35rem;
    border: 1px solid var(--ck-line);
    border-radius: 0.65rem;
    background: var(--ck-bg);
}

.chat-emoji-input:focus {
    outline: none;
    border-color: #f9a8d4;
    box-shadow: 0 0 0 2px #fce7f3;
}

.chat-emoji-confirm {
    padding: 0.45rem 0.75rem;
    border-radius: 0.65rem;
    background: var(--ck-pink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border: 0;
    cursor: pointer;
}

.chat-activity-panel {
    display: none;
    position: fixed;
    z-index: 210;
    background: #fff;
    border: 1px solid var(--ck-line);
    border-radius: 0.95rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    max-height: min(60vh, 24rem);
    overflow: auto;
    color: var(--ck-ink);
    min-width: 16.5rem;
    width: min(20rem, calc(100vw - 1.5rem));
    box-sizing: border-box;
}
.chat-activity-panel.open { display: block; }
.chat-activity-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--ck-line);
}
.chat-activity-head strong {
    font-size: 0.9rem;
    font-weight: 800;
}
.chat-activity-head span {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ck-muted);
    white-space: nowrap;
}
.chat-activity-sec { margin-top: 0.7rem; }
.chat-activity-sec h4 {
    margin: 0 0 0.4rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ck-muted);
}
.chat-activity-sec ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.chat-activity-sec li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.45rem;
    border-radius: 0.55rem;
    line-height: 1.35;
}
.chat-activity-sec li > i {
    flex: 0 0 0.85rem;
    width: 0.85rem;
    text-align: center;
    font-size: 0.65rem;
    color: var(--ck-muted);
}
.chat-activity-sec li.is-read > i { color: var(--ck-pink); }
.chat-activity-sec li > span {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-activity-sec li > em {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ck-muted);
    white-space: nowrap;
}
.chat-activity-empty,
.chat-activity-sec li.chat-activity-muted {
    display: block;
    font-size: 0.8rem;
    color: var(--ck-muted);
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    padding: 0.35rem 0.45rem;
}

/* Velín i členská sekce – stejná zpráva / vlákno */
.ig-msgs,
#chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 1rem 0.9rem 1.2rem;
    background: var(--ck-bg, #fafafa);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    scroll-behavior: smooth;
}
.ig-day {
    align-self: center;
    margin: 0.45rem 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ck-muted, #8e8e8e);
    background: #fff;
    border: 1px solid var(--ck-line, #efefef);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    max-width: max-content;
}

.ck-modal-card {
    border-radius: 1rem !important;
}

.ck-page-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    max-width: none;
    margin: 0;
    width: 100%;
}

.ck-sheet {
    border-radius: 1.35rem 1.35rem 0 0;
    padding: 0.35rem 0 0.75rem;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
@media (min-width: 640px) {
    .ck-sheet {
        border-radius: 1.35rem;
        max-height: 72vh;
    }
}
.ck-sheet-handle {
    width: 2.25rem;
    height: 0.25rem;
    border-radius: 999px;
    background: #d8d8de;
    margin: 0.4rem auto 0.55rem;
}
.ck-sheet h3 {
    margin: 0;
    padding: 0.35rem 1.25rem 0.65rem;
    font-size: 1.25rem;
    font-weight: 800;
}
.ck-sheet-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem 0.5rem;
    padding: 0 0.75rem;
    background: #f3f3f5;
    border-radius: 0.85rem;
}
.ck-sheet-search i { color: var(--ck-muted); }
.ck-sheet-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.7rem 0;
    outline: none;
}
.ck-sheet-list {
    overflow-y: auto;
    min-height: 10rem;
    padding: 0.25rem 0 0.5rem;
}
.ck-sheet-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 1.15rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.ck-sheet-person:hover { background: #fafafa; }
.ck-sheet-person strong { font-weight: 700; }
.ck-sheet-act {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-weight: 700;
    color: var(--ck-ink);
}
.ck-sheet-act i { color: var(--ck-pink-dark); width: 1.25rem; }
.ck-sheet-act:hover { background: #fafafa; }
