/* 模板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;
    }
}

/* ================================================================
   按钮统一配色与对齐（站点要求）
   背景红色 + 文字纯白色 + 一律居中
   ----------------------------------------------------------------
   说明：本段是"覆盖规则"，追加在各模板原有样式之后，
   配合 !important 覆盖各模板原本各不相同的按钮配色
   （原来有深蓝 #1f4e79 / 深绿 #1b5e20 / 深青 #0f5257 / 棕 #7a4b1e … 等多种）。
   要调整颜色只需要改这里的两个色值，不用去动上面原有的 CSS。
   若要恢复各模板原本的花色，把这整段删掉即可。
   标记：CTA-RED-CENTER
   ================================================================ */
.t01-btn,.t02-btn,.t03-link,.t04-key,.t05-go,.t06-btn,.t07-btn,.t08-btn,
.t09-btn,.t10-btn,.t11-btn,.t12-btn,.t13-btn,.t14-btn,.t15-btn,.t16-btn,
.t17-btn,.t18-btn,.t19-btn,.t20-btn,.t21-btn,.t22-btn,.t23-btn,.t23-btn2,
.t24-btn,.t25-btn,.t26-btn,.t27-btn,.t28-btn,.t28-btn2,.t29-btn,.t30-btn,
.t30-btn2,.t31-btn,.t32-btn,.t33-btn,.t34-btn,.t35-btn,.t36-btn,.t37-btn,
.t38-btn,.t39-btn,.t40-go,.t41-go,.t42-go,.t43-go,.t44-go,.t45-go,
.t46-btn,.t47-btn,.t48-btn,.t49-btn,.t50-btn,.km-btn,.ob-btn {
    background: #e53935 !important;
    background-color: #e53935 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #e53935 !important;
    text-align: center;
}
/* 悬停 / 聚焦 / 按下 一并压成同色系，避免出现"红底配绿色悬停"这类突兀效果 */
.t01-btn:hover,.t02-btn:hover,.t03-link:hover,.t04-key:hover,.t05-go:hover,
.t06-btn:hover,.t07-btn:hover,.t08-btn:hover,.t09-btn:hover,.t10-btn:hover,
.t11-btn:hover,.t12-btn:hover,.t13-btn:hover,.t14-btn:hover,.t15-btn:hover,
.t16-btn:hover,.t17-btn:hover,.t18-btn:hover,.t19-btn:hover,.t20-btn:hover,
.t21-btn:hover,.t22-btn:hover,.t23-btn:hover,.t23-btn2:hover,.t24-btn:hover,
.t25-btn:hover,.t26-btn:hover,.t27-btn:hover,.t28-btn:hover,.t28-btn2:hover,
.t29-btn:hover,.t30-btn:hover,.t30-btn2:hover,.t31-btn:hover,.t32-btn:hover,
.t33-btn:hover,.t34-btn:hover,.t35-btn:hover,.t36-btn:hover,.t37-btn:hover,
.t38-btn:hover,.t39-btn:hover,.t40-go:hover,.t41-go:hover,.t42-go:hover,
.t43-go:hover,.t44-go:hover,.t45-go:hover,.t46-btn:hover,.t47-btn:hover,
.t48-btn:hover,.t49-btn:hover,.t50-btn:hover,.km-btn:hover,.ob-btn:hover,
.t01-btn:focus,.t02-btn:focus,.t03-link:focus,.t04-key:focus,.t05-go:focus,
.t10-btn:focus,.t21-btn:focus,.t31-btn:focus,.t32-btn:focus,.t33-btn:focus,
.t34-btn:focus,.t35-btn:focus,.t41-go:focus,.t45-go:focus {
    background: #c62828 !important;
    background-color: #c62828 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #c62828 !important;
}
/* 按钮一律居中。
   注意：不能只写 margin-left/right:auto —— 那样对 display:inline-block 的元素无效
   （.t01-btn 这类就是 inline-block，父级又是 text-align:left，会被顶在左边）。
   所以这里用 display:block + width:fit-content + margin:auto 三件套，
   行内/行内块/块级三种写法都能稳稳居中，不依赖外面那层容器。
   标记：CTA-RED-CENTER */
.t01-btn,.t02-btn,.t03-link,.t04-key,.t05-go,.t06-btn,.t07-btn,.t08-btn,
.t09-btn,.t10-btn,.t11-btn,.t12-btn,.t13-btn,.t14-btn,.t15-btn,.t16-btn,
.t17-btn,.t18-btn,.t19-btn,.t20-btn,.t21-btn,.t22-btn,.t23-btn,.t23-btn2,
.t24-btn,.t25-btn,.t26-btn,.t27-btn,.t28-btn,.t28-btn2,.t29-btn,.t30-btn,
.t30-btn2,.t31-btn,.t32-btn,.t33-btn,.t34-btn,.t35-btn,.t36-btn,.t37-btn,
.t38-btn,.t39-btn,.t40-go,.t41-go,.t42-go,.t43-go,.t44-go,.t45-go,
.t46-btn,.t47-btn,.t48-btn,.t49-btn,.t50-btn,.km-btn,.ob-btn {
    display: block !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
