.sp-qdetail {
    color: var(--sp-text, #111827);
}

.sp-post {
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.sp-answer:last-child {
    border-bottom: 0;
}

.sp-vote-rail {
    width: 44px;
}

.sp-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sp-vote-btn {
    position: relative;
    width: 32px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.sp-vote-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.sp-vote-up::before {
    top: 6px;
    border-right: 9px solid transparent;
    border-bottom: 12px solid #9ca3af;
    border-left: 9px solid transparent;
}

.sp-vote-down::before {
    top: 10px;
    border-top: 12px solid #9ca3af;
    border-right: 9px solid transparent;
    border-left: 9px solid transparent;
}

.sp-vote-up:hover::before,
.sp-vote-up.upvote-on::before {
    border-bottom-color: var(--sp-brand, #f97316);
}

.sp-vote-down:hover::before,
.sp-vote-down.downvote-on::before {
    border-top-color: var(--sp-brand, #f97316);
}

.sp-vote-count {
    display: block;
    min-width: 32px;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.sp-post-copy {
    font-size: 0.98rem;
}

.sp-post-copy p:last-child {
    margin-bottom: 0;
}

.sp-post-copy a {
    word-break: break-all;
}

.sp-content-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.sp-share-menu {
    min-width: 260px;
}

.sp-comments {
    border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.sp-comment {
    padding: 8px 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.65);
}

.sp-comment:last-child {
    border-bottom: 0;
}

.sp-comment-body {
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.55;
    word-break: break-word;
}

.sp-comment-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-left: 4px;
    color: #6b7280;
}

.sp-comment-edit-box textarea {
    min-height: 88px;
    resize: vertical;
}

.sp-answer-editor textarea,
.sp-answer-editor .form-control {
    width: 100%;
    min-height: 180px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    resize: vertical;
}

.sp-comment-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 2px;
}

.sp-comment-action-link,
.sp-comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sp-comment-action-link {
    color: #6b7280;
    background: #f3f4f6;
}

.sp-comment-action-link:hover {
    color: #374151;
    background: #e5e7eb;
}

.sp-comment-action-btn {
    padding: 0 10px;
    border: 0;
    background: #f8fafc;
    color: #4b5563;
    cursor: pointer;
}

.sp-comment-action-btn:hover {
    background: #eef2f7;
    color: #111827;
}

.sp-comment-action-btn.is-danger {
    background: #fef2f2;
    color: #dc2626;
}

.sp-comment-action-btn.is-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.sp-comment-action-link i,
.sp-comment-action-btn i {
    font-size: 0.72rem;
}

.sp-comment-action-link:focus-visible,
.sp-comment-action-btn:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .sp-vote-rail {
        width: 34px;
    }

    .sp-post {
        gap: 10px !important;
    }

    .sp-vote-count {
        font-size: 0.95rem;
    }

    .sp-post-copy {
        font-size: 0.95rem;
    }
}