/* Moments - 仿微信朋友圈 Typecho 单栏主题 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #ededed;
    color: #353535;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: #576b95; text-decoration: none; }

.moments-page {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== 头图 + 作者 ===== */
.cover {
    position: relative;
    padding-bottom: 46px;
}

.cover-img {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #cfd2d3;
    background-image: linear-gradient(135deg, #9aa7b2, #cfd2d3);
}

.author-avatar {
    position: absolute;
    right: 16px;
    bottom: 11px;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    border: 3px solid #fff;
    object-fit: cover;
    background: #ddd;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
}

.author-name {
    position: absolute;
    right: 95px;
    bottom: 50px;
    max-width: 220px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-bio {
    position: absolute;
    right: 95px;
    bottom: 22px;
    max-width: 70%;
    text-align: right;
    font-size: 12px;
    color: #0a0909;
    line-height: 1.4;
}

/* ===== 文章列表 ===== */
.post-list { padding: 4px 0; }

.post-item {
    display: flex;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.post-avatar-link { flex-shrink: 0; }

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 10px;
    background: #ddd;
}

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

.post-nickname {
    display: inline-block;
    color: #576b95;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

.post-text {
    color: #353535;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
    margin-bottom: 6px;
}

.post-text img { display: none; } /* 文中图片已单独以九宫格展示 */

/* ===== 九宫格图片 ===== */
.post-images { margin-bottom: 8px; }

.post-images.grid-1 { display: block; max-width: 200px; }
.post-images.grid-1 .img-cell { aspect-ratio: auto; border-radius: 4px; }
.post-images.grid-1 .img-cell img { height: auto; }

.post-images.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    max-width: 175px;
}

.post-images.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 230px;
}

.post-images .img-cell {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.post-images .img-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 文章卡片（分类ID=1）===== */
.article-card {
    display: flex;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    background: #f7f7f7;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    transition: background .15s;
}

.article-card:hover { background: #f0f0f0; }

.article-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px 0 0 8px; /* 左上、左下圆角；右上、右下直角 */
    object-fit: cover;
    flex-shrink: 0;
    background: #ddd;
    margin-right: 8px;
}

.article-info {
    flex: 0 1 auto;
    max-width: 240px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-title {
    font-size: 14px;
    font-weight: 500;
    color: #353535;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-summary {
    font-size: 12px;
    color: #9c9c9c;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 元信息行 ===== */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.4;
}

.post-meta-left {
    display: flex;
    align-items: center;
    color: #9c9c9c;
    font-size: 12px;
    min-width: 0;
}

.post-meta-left .dot { margin: 0 5px; }
.post-meta-left .post-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.post-time { color: #9c9c9c; font-size: 12px; }

.post-more {
    font-size: 18px;
    color: #9c9c9c;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0 4px;
    user-select: none;
}

/* ===== 分页 ===== */
.typecho-pager {
    padding: 16px;
    text-align: center;
}

.typecho-pager a,
.typecho-pager span {
    margin: 0 4px;
    color: #576b95;
    font-size: 14px;
}

.typecho-pager .current { color: #9c9c9c; }

/* ===== 文章详情 ===== */
.post-detail { padding: 0 16px 30px; }

.detail-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 10px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 1;
    color: #353535;
    border-radius: 50%;
    cursor: pointer;
}

.back-btn:hover { background: #f2f2f2; }

.detail-header {
    padding: 10px 0 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.detail-title {
    font-size: 22px;
    font-weight: 600;
    color: #353535;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}

.detail-meta {
    font-size: 13px;
    color: #9c9c9c;
}

.detail-meta .dot { margin: 0 5px; }
.detail-author { color: #576b95; }

.detail-content {
    font-size: 15px;
    line-height: 1.7;
    color: #353535;
    word-break: break-word;
}

.detail-content p { margin-bottom: 14px; }
.detail-content img { border-radius: 4px; margin: 6px 0; }
.detail-content h1, .detail-content h2, .detail-content h3 { margin: 18px 0 10px; line-height: 1.4; }
.detail-content a { color: #576b95; }
.detail-content blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f7f7f7;
    border-left: 3px solid #d0d0d0;
    color: #666;
}

/* ===== 评论区 ===== */
.comments-area { margin-top: 24px; }

.comment-list { padding-top: 8px; }

.comment-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    background: #ddd;
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

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

.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.comment-author { color: #576b95; font-size: 13px; font-weight: 500; }
.comment-time { color: #b3b3b3; font-size: 12px; }

.comment-content {
    font-size: 14px;
    color: #353535;
    line-height: 1.6;
    word-break: break-word;
    overflow: hidden;
}

.comment-reply {
    float: right;
    color: #576b95;
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1.6;
}

/* ===== 评论表单 ===== */
.comment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.comment-form p { margin-bottom: 8px; }

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #07c160;
    background: #fff;
}

.comment-form textarea { min-height: 84px; resize: vertical; }

.form-hint { font-size: 13px; color: #9c9c9c; }

.comment-submit {
    padding: 8px 18px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.comment-submit:hover { background: #06ad56; }

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .cover-img { height: 240px; }
}

@media (max-width: 380px) {
    .cover-img { height: 200px; }
    .post-item { padding: 12px; }
}
