.smb-wrap {
    --smb-border: #d9dee7;
    --smb-muted: #667085;
    --smb-text: #1f2937;
    --smb-panel: #ffffff;
    --smb-soft: #f6f7f9;
    --smb-accent: #1677ff;
    max-width: 780px;
    margin: 0 auto;
    color: var(--smb-text);
}

.smb-feed-head,
.smb-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}

.smb-profile-head {
    justify-content: flex-start;
}

.smb-page-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.25;
}

.smb-page-subtitle {
    margin: 6px 0 0;
    color: var(--smb-muted);
    font-size: 14px;
}

.smb-sort {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--smb-border);
    border-radius: 8px;
    background: var(--smb-soft);
}

.smb-sort a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--smb-muted);
    text-decoration: none;
    font-size: 14px;
}

.smb-sort a.is-active {
    background: #ffffff;
    color: var(--smb-text);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.smb-login,
.smb-empty,
.smb-composer,
.smb-post {
    border: 1px solid var(--smb-border);
    border-radius: 8px;
    background: var(--smb-panel);
}

.smb-login,
.smb-empty {
    padding: 16px;
    color: var(--smb-muted);
}

.smb-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.smb-login a,
.smb-submit,
.smb-comment-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: var(--smb-accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.smb-submit:disabled,
.smb-comment-form button:disabled,
.smb-like:disabled {
    cursor: wait;
    opacity: 0.65;
}

.smb-composer {
    padding: 14px;
    margin: 0 0 18px;
}

.smb-composer-author,
.smb-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smb-post-author {
    color: inherit;
    text-decoration: none;
}

.smb-avatar,
.smb-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.smb-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
    color: #344054;
    font-weight: 700;
}

.smb-avatar-img {
    object-fit: cover;
}

.smb-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.smb-tool,
.smb-emoji,
.smb-color,
.smb-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--smb-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--smb-text);
    cursor: pointer;
    line-height: 1;
}

.smb-color::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--smb-color);
}

.smb-upload {
    width: auto;
    padding: 0 10px;
    font-size: 13px;
}

.smb-upload input {
    display: none;
}

.smb-editor {
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--smb-border);
    border-radius: 8px;
    background: #ffffff;
    outline: none;
    line-height: 1.65;
}

.smb-editor:focus {
    border-color: var(--smb-accent);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}

.smb-editor:empty::before {
    content: attr(data-placeholder);
    color: #98a2b3;
}

.smb-editor img,
.smb-post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
}

.smb-composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.smb-help,
.smb-notice,
.smb-comment-notice {
    color: var(--smb-muted);
    font-size: 13px;
}

.smb-notice.is-error,
.smb-comment-notice.is-error {
    color: #b42318;
}

.smb-notice.is-success {
    color: #027a48;
}

.smb-notice.is-loading,
.smb-comment-notice.is-loading {
    color: var(--smb-accent);
}

.smb-feed {
    display: grid;
    gap: 16px;
}

.smb-post {
    padding: 16px;
}

.smb-post-head {
    margin-bottom: 12px;
}

.smb-post-author strong,
.smb-comment-meta strong {
    display: block;
    font-size: 15px;
}

.smb-post-author time,
.smb-comment-meta time {
    display: block;
    margin-top: 2px;
    color: var(--smb-muted);
    font-size: 12px;
}

.smb-post-content {
    overflow-wrap: anywhere;
    line-height: 1.75;
}

.smb-post-content p {
    margin: 0 0 10px;
}

.smb-post-content p:last-child {
    margin-bottom: 0;
}

.smb-post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--smb-border);
    color: var(--smb-muted);
    font-size: 14px;
}

.smb-like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--smb-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--smb-text);
    cursor: pointer;
}

.smb-like.is-liked {
    border-color: #f04438;
    color: #d92d20;
    background: #fff5f5;
}

.smb-count {
    min-width: 1.5em;
    text-align: center;
}

.smb-comments {
    margin-top: 12px;
}

.smb-comment-list {
    display: grid;
    gap: 10px;
}

.smb-comment {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
}

.smb-comment .smb-avatar,
.smb-comment .smb-avatar-img {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

.smb-comment-content {
    margin-top: 4px;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.smb-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 12px;
}

.smb-comment-form textarea {
    width: 100%;
    min-height: 42px;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid var(--smb-border);
    border-radius: 6px;
    outline: none;
    line-height: 1.5;
}

.smb-comment-form textarea:focus {
    border-color: var(--smb-accent);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.smb-comment-login {
    margin-top: 10px;
    color: var(--smb-muted);
    font-size: 13px;
}

.smb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.smb-pagination a {
    padding: 8px 12px;
    border: 1px solid var(--smb-border);
    border-radius: 6px;
    color: var(--smb-text);
    text-decoration: none;
}

.smb-pagination span {
    color: var(--smb-muted);
}

@media (max-width: 640px) {
    .smb-feed-head,
    .smb-composer-foot,
    .smb-login {
        align-items: stretch;
        flex-direction: column;
    }

    .smb-sort {
        width: 100%;
    }

    .smb-sort a {
        flex: 1;
        justify-content: center;
    }

    .smb-comment-form {
        grid-template-columns: 1fr;
    }

    .smb-submit,
    .smb-comment-form button {
        width: 100%;
    }
}
