.feed-detail-page {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
    background: var(--bg-color);
}

.feed-detail-post {
    padding: 16px 15px 0;
    background: #fff;
}

.feed-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.feed-detail-author {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.feed-detail-author .avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    margin: 0;
}

.feed-detail-author-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.feed-detail-author-copy strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-detail-author-copy small {
    margin-top: 4px;
    color: var(--text-sub);
    font-size: 11px;
}

.feed-detail-author-copy small i {
    margin-right: 3px;
}

.feed-detail-page .level-tag {
    margin: 0 0 0 3px;
    background: #f2a546;
    color: #fff;
}

.feed-detail-time {
    flex: 0 0 auto;
    color: var(--text-sub);
    font-size: 11px;
}

.feed-detail-content {
    margin-top: 15px;
}

.feed-detail-content > p {
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
}

.feed-detail-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
    gap: 8px;
}

.feed-detail-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 7px;
    background: #f0f0f0;
    object-fit: cover;
}

.feed-detail-actions {
    display: grid;
    margin-top: 15px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border-color);
}

.feed-detail-actions button {
    min-height: 46px;
    color: var(--text-sub);
    font-size: 12px;
}

.feed-detail-actions button i {
    margin-right: 5px;
    font-size: 16px;
}

.feed-detail-actions button.active {
    color: var(--primary-color);
}

.feed-comments {
    margin-top: 10px;
    background: #fff;
}

.feed-comments-heading {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.feed-comments-heading h2 {
    color: var(--text-main);
    font-size: 14px;
    font-weight: bold;
}

.feed-comments-heading h2 span {
    margin-left: 3px;
    color: var(--text-sub);
    font-size: 11px;
    font-weight: normal;
}

.feed-comment {
    display: flex;
    padding: 14px 15px;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.feed-comment > .avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
}

.feed-comment-body {
    min-width: 0;
    flex: 1;
}

.feed-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.feed-comment-meta strong {
    overflow: hidden;
    color: var(--text-main);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-comment-meta time {
    flex: 0 0 auto;
    color: var(--text-sub);
    font-size: 10px;
}

.feed-comment-body > p {
    margin-top: 6px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
}

.feed-comments-empty {
    padding: 35px 15px;
    color: var(--text-sub);
    font-size: 12px;
    text-align: center;
}

.feed-comment-composer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: flex;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 9px 15px calc(9px + env(safe-area-inset-bottom));
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.feed-comment-input-wrap {
    display: block;
    min-width: 0;
    flex: 1;
}

.feed-comment-input-wrap input {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    border-radius: 18px;
    outline: 0;
    background: #f5f5f5;
    color: var(--text-main);
    font-size: 13px;
}

.feed-comment-input-wrap input::placeholder {
    color: var(--text-sub);
}

.feed-comment-submit {
    display: flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color) !important;
    color: #fff;
    font-size: 15px;
}

.feed-detail-empty {
    padding: 100px 20px 30px;
    color: var(--text-sub);
    text-align: center;
}

.feed-detail-empty > i {
    color: #ccc;
    font-size: 44px;
}

.feed-detail-empty h2 {
    margin-top: 14px;
    color: var(--text-main);
    font-size: 16px;
}

.feed-detail-empty a {
    display: inline-flex;
    min-height: 36px;
    margin-top: 18px;
    padding: 8px 15px;
    align-items: center;
    border-radius: 18px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
}

.feed-detail-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 359px) {
    .feed-detail-post,
    .feed-comments-heading,
    .feed-comment {
        padding-right: 12px;
        padding-left: 12px;
    }

    .feed-comment-composer {
        padding-right: 12px;
        padding-left: 12px;
    }
}
