.jz-joint-log-editor {
    margin: 0 0 1.15rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.jz-joint-log-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.jz-joint-log-heading strong {
    display: block;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
}

.jz-joint-log-heading small {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.73rem;
    line-height: 1.35;
}

.jz-joint-log-visibility {
    flex: 0 0 auto;
    padding: 0.26rem 0.52rem;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    font-size: 0.68rem;
    font-weight: 850;
}

.jz-joint-log-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 34px;
}

.jz-joint-log-empty {
    width: 100%;
    padding: 0.65rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-muted, #71717a);
    font-size: 0.78rem;
    text-align: center;
}

.jz-joint-log-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    max-width: 100%;
    padding: 0.34rem 0.42rem 0.34rem 0.36rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: #29292e;
    color: var(--text-primary, #fff);
}

.jz-joint-log-chip.is-pending {
    border-style: dashed;
    color: var(--text-secondary, #a1a1aa);
}

.jz-joint-log-chip.is-selected {
    border-color: rgba(239, 68, 68, 0.38);
    background: rgba(239, 68, 68, 0.08);
}

.jz-joint-log-chip img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #202027;
}

.jz-joint-log-chip-copy {
    min-width: 0;
}

.jz-joint-log-chip-name,
.jz-joint-log-chip-state {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jz-joint-log-chip-name {
    max-width: 170px;
    font-size: 0.76rem;
    font-weight: 850;
}

.jz-joint-log-chip-state {
    max-width: 180px;
    margin-top: 0.08rem;
    color: var(--text-muted, #71717a);
    font-size: 0.62rem;
}

.jz-joint-log-chip-remove {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #a1a1aa);
    cursor: pointer;
}

.jz-joint-log-chip-remove:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.2);
}

.jz-joint-log-search-wrap {
    position: relative;
    margin-top: 0.72rem;
}

.jz-joint-log-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    background: #242429;
    color: var(--text-muted, #71717a);
}

.jz-joint-log-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary, #fff);
    font-size: 0.82rem;
}

.jz-joint-log-search-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.4rem);
    right: 0;
    left: 0;
    display: none;
    max-height: 230px;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;
    background: #1b1b20;
}

.jz-joint-log-search-results.is-open {
    display: block;
}

.jz-joint-log-result {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.65rem;
    padding: 0.58rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-primary, #fff);
    text-align: left;
    cursor: pointer;
}

.jz-joint-log-result:hover,
.jz-joint-log-result:focus-visible {
    background: rgba(239, 68, 68, 0.1);
}

.jz-joint-log-result img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #202027;
}

.jz-joint-log-result span {
    min-width: 0;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jz-joint-log-search-state {
    padding: 0.8rem;
    color: var(--text-muted, #71717a);
    font-size: 0.76rem;
    text-align: center;
}

.jz-joint-log-actions {
    display: none;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.72rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.jz-joint-log-actions.is-visible {
    display: flex;
}

.jz-joint-log-action {
    padding: 0.48rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.jz-joint-log-action:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.jz-joint-log-action.is-danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

.jz-joint-log-editor.is-busy {
    pointer-events: none;
    opacity: 0.62;
}

.jz-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.76);
}

.jz-confirm-dialog {
    width: min(430px, 100%);
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: #1f1f23;
    color: #fff;
}

.jz-confirm-dialog h3 { margin: 0 0 0.7rem; font-size: 1.1rem; }
.jz-confirm-dialog p { margin: 0; color: #b4b4bd; line-height: 1.5; }
.jz-confirm-actions { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 1.2rem; }
.jz-confirm-actions button { padding: 0.7rem 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: #29292e; color: #fff; font-weight: 800; cursor: pointer; }
.jz-confirm-actions button.is-danger { border-color: #ef4444; background: #ef4444; }

.jz-avatar-stack {
    display: inline-flex;
    align-items: center;
    min-width: 34px;
    height: 36px;
    padding-left: 7px;
    vertical-align: middle;
}

.jz-avatar-stack-item {
    position: relative;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-left: -7px;
    overflow: hidden;
    border: 2px solid var(--bg-secondary, #1f1f23);
    border-radius: 50%;
    background: #29292e;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
}

.jz-avatar-stack-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jz-avatar-stack-item.is-placeholder img {
    opacity: 0.76;
}

.jz-avatar-stack-more {
    background: #3b3b43;
}

.jz-journal-participant-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    margin-top: 0.55rem;
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.74rem;
    font-weight: 750;
}

.jz-journal-participant-summary > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jz-notification-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.jz-notification-action {
    flex: 1;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.7rem;
    font-weight: 850;
    cursor: pointer;
}

.jz-notification-action.is-primary {
    border-color: rgba(239, 68, 68, 0.45);
    background: #ef4444;
    color: #fff;
}

.jz-notification-action:disabled {
    cursor: wait;
    opacity: 0.58;
}

@media (max-width: 560px) {
    .jz-joint-log-heading {
        flex-direction: column;
    }

    .jz-joint-log-chip {
        max-width: calc(100vw - 5.5rem);
    }

    .jz-joint-log-action {
        flex: 1 1 auto;
    }
}
