/* 模板31 - 紧凑小字单页 */

/* ===== 1. 基础重置（自包含，不引用任何外部样式） ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body,
h1,
p,
figure {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

a {
    color: inherit;
}

/* ===== 2. 页面骨架：白底、820px 单栏、紧凑节奏 ===== */
body {
    background-color: #ffffff;
    color: #1f2328;
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.t31-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px 22px 44px;
}

.t31-main {
    display: block;
}

.t31-post {
    display: block;
}

/* ===== 3. 标题：22px / 700 ===== */
.t31-h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2328;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f5257;
}

/* ===== 4. 正文段落：14.5px / 行高 1.7 ===== */
.t31-p {
    font-size: 14.5px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 12px;
    text-align: left;
}

.t31-p:last-of-type {
    margin-bottom: 0;
}

/* ===== 5. 关键标签：横排紧密，间距 8px，方框形态 ===== */
.t31-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 16px;
    padding: 0;
}

.t31-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid #d0d7de;
    border-radius: 2px;
    background-color: #f7f8fa;
    color: #0f5257;
    font-size: 12.5px;
    line-height: 1.25;
    white-space: nowrap;
}

.t31-tag-av {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e5e7eb;
}

/* ===== 6. 横屏图：整页唯一一张，最大宽 300px，左对齐 ===== */
.t31-fig {
    margin: 16px 0 18px;
    padding: 0;
}

.t31-fig-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    object-fit: cover;
}

/* ===== 7. 按钮：小号实心，圆角 2px ===== */
.t31-act {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.t31-btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid #0f5257;
    border-radius: 2px;
    background-color: #0f5257;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.t31-btn:hover {
    background-color: #0c4145;
    border-color: #0c4145;
}

.t31-btn--soft {
    background-color: #ffffff;
    color: #0f5257;
}

.t31-btn--soft:hover {
    background-color: #f7f8fa;
    color: #0c4145;
    border-color: #0c4145;
}

/* ===== 8. 底部友链：一条细线收尾，链接紧密成串 ===== */
.t31-foot {
    margin-top: 30px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.9;
}

.t31-friend {
    display: block;
    color: #57606a;
}

.t31-friend-ttl {
    display: inline-block;
    margin-right: 10px;
    color: #8a8f98;
    font-weight: 600;
}

.t31-friend-lk {
    display: inline-block;
    margin-right: 12px;
    color: #57606a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.t31-friend-lk:hover {
    color: #0f5257;
    text-decoration: underline;
}

/* ===== 9. 窄屏适配：单列、按钮通栏、图片不再限宽 ===== */
@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .t31-page {
        padding: 20px 14px 32px;
    }

    .t31-h1 {
        font-size: 19px;
        line-height: 1.45;
    }

    .t31-p {
        font-size: 14px;
    }

    .t31-tags {
        gap: 6px;
    }

    .t31-tag {
        font-size: 12px;
        padding: 4px 8px;
    }

    .t31-fig-img {
        max-width: 100%;
    }

    .t31-act {
        flex-direction: column;
        gap: 8px;
    }

    .t31-btn {
        width: 100%;
        text-align: center;
    }

    .t31-friend-lk {
        margin-right: 10px;
    }
}

/* ===== 10. 超窄屏：头像缩到 20px，标签换行不溢出 ===== */
@media (max-width: 360px) {
    .t31-tag-av {
        width: 20px;
        height: 20px;
    }

    .t31-h1 {
        font-size: 18px;
    }
}
