.xinghui-comment-article-link .xh-cal-menu {
    width: 420px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(20, 25, 40, .14);
}

.xh-comment-notice {
    margin: 0 0 8px;
    padding: 9px 14px;
    border: 1px dashed rgba(255, 82, 82, .45);
    border-radius: 10px;
    background: rgba(255, 82, 82, .04);
    color: #ff4d4f;
    font-size: 13px;
    line-height: 20px;
}

.xh-comment-ai-tools {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.xh-comment-ai-btn.disabled {
    pointer-events: none;
    opacity: .72;
}

.xh-cal-panel {
    padding: 16px;
    background: var(--main-bg-color, #fff);
}

.xh-cal-label {
    margin: 0 0 10px;
    color: var(--main-color, #666);
    font-size: 15px;
}

.xh-cal-search {
    height: 42px;
    border-radius: 12px !important;
    margin-bottom: 12px;
}

.xh-cal-selected-wrap {
    display: none;
    margin: 0 0 10px;
}

.xh-cal-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px 10px;
    border: 1px solid rgba(103, 95, 255, .28);
    border-radius: 999px;
    background: rgba(103, 95, 255, .1);
    color: #675fff;
    font-size: 14px;
    line-height: 20px;
}

.xh-cal-selected-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-cal-selected-remove {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8b83ff;
    font-size: 16px;
    line-height: 18px;
    cursor: pointer;
}

.xh-cal-selected-remove:hover {
    background: rgba(103, 95, 255, .16);
}

.xh-cal-current {
    margin-bottom: 8px;
}

.xh-cal-results {
    height: 260px;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.xh-cal-results::-webkit-scrollbar {
    width: 6px;
}

.xh-cal-results::-webkit-scrollbar-thumb {
    background: rgba(125, 135, 155, .28);
    border-radius: 999px;
}

.xh-cal-results::-webkit-scrollbar-track {
    background: transparent;
}

.xh-cal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    margin: 0 0 8px;
    border: 1px solid rgba(125, 135, 155, .16);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .18s;
}

.xh-cal-item:hover {
    background: rgba(80, 120, 255, .06);
    border-color: rgba(80, 120, 255, .2);
    transform: translateY(-1px);
}

.xh-cal-thumb {
    width: 56px;
    height: 42px;
    flex: 0 0 56px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(125, 135, 155, .12);
}

.xh-cal-thumb img,
.xh-cal-thumb-fallback {
    display: block;
    width: 100%;
    height: 100%;
}

.xh-cal-thumb img {
    object-fit: cover;
}

.xh-cal-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a94a6;
}

.xh-cal-main {
    min-width: 0;
    flex: 1;
}

.xh-cal-title,
.xh-cal-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-cal-title {
    color: var(--main-color, #555);
    font-size: 14px;
    line-height: 20px;
}

.xh-cal-meta {
    margin-top: 2px;
    color: var(--muted-2-color, #999);
    font-size: 13px;
}

.xh-cal-badge {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(103, 95, 255, .12);
    color: #675fff;
    font-size: 12px;
    vertical-align: 1px;
}

.xh-cal-loading,
.xh-cal-empty {
    padding: 22px 8px;
    color: var(--muted-2-color, #999);
    text-align: center;
    font-size: 14px;
}

.xh-comment-post-card {
    margin-top: 12px;
    display: inline-block;
    width: auto;
    max-width: 100%;
}

.xh-comment-post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: auto;
    max-width: 100%;
    padding: 12px;
    border: 1px solid rgba(125, 135, 155, .16);
    border-radius: 14px;
    background: var(--main-bg-color, #fff);
    color: inherit;
    text-decoration: none !important;
}

.xh-comment-post-card-link:hover {
    border-color: rgba(103, 95, 255, .22);
    background: rgba(103, 95, 255, .035);
}

.xh-comment-post-card-thumb {
    width: 220px;
    height: 124px;
    flex: 0 0 220px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(125, 135, 155, .08);
}

.xh-comment-post-card-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: rgba(125, 135, 155, .06);
}

.xh-comment-post-card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a94a6;
}

.xh-comment-post-card-main {
    min-width: 0;
    flex: 0 1 auto;
    max-width: min(360px, calc(100vw - 300px));
}

.xh-comment-post-card-title,
.xh-comment-post-card-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-comment-post-card-title {
    color: var(--main-color, #555);
    font-size: 13px;
    line-height: 19px;
}

.xh-comment-post-card-meta {
    margin-top: 8px;
    color: var(--muted-2-color, #999);
    font-size: 12px;
}

.xh-comment-post-card-badge {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(103, 95, 255, .12);
    color: #675fff;
    font-size: 12px;
}

@media (max-width: 767px) {
    .xinghui-comment-article-link .xh-cal-menu {
        left: auto;
        right: -90px;
        width: calc(100vw - 28px);
    }

    .xh-cal-results {
        height: 220px;
        max-height: 220px;
    }

    .xh-comment-post-card-thumb {
        width: 120px;
        height: 68px;
        flex-basis: 120px;
    }

    .xh-comment-post-card {
        display: block;
    }

    .xh-comment-post-card-link {
        display: flex;
        width: 100%;
    }

    .xh-comment-post-card-main {
        flex: 1;
        max-width: none;
    }
}
