/* 模板21 - 白底单栏 / 标题行右置按钮 / 680px 左对齐正文 */

/* ---------- 基础重置 ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #333333;
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

h1 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

p,
blockquote,
figure {
    margin: 0;
}

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

a {
    color: #0f5257;
    text-decoration: none;
}

/* ---------- 页面容器：单栏居中，正文实际宽度 680px ---------- */

.t21-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 24px 72px;
}

/* ---------- 标题区：flex 两端对齐，标题左、按钮右 ---------- */

.t21-titlebar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0f5257;
}

.t21-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.2px;
    color: #1f2328;
}

/* ---------- 按钮：实心小圆角，跟在标题同一行右侧 ---------- */

.t21-btn {
    flex: 0 0 auto;
    margin-top: 8px;
    padding: 10px 22px;
    border: 1px solid #0f5257;
    border-radius: 4px;
    background: #0f5257;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.t21-btn:hover {
    background: #0b3f43;
    border-color: #0b3f43;
}

/* ---------- 正文区：680px 左对齐 ---------- */

.t21-content {
    max-width: 680px;
    margin-top: 36px;
}

.t21-lead {
    font-size: 17px;
    line-height: 1.95;
    color: #333333;
}

.t21-quote {
    margin-top: 26px;
    padding-left: 18px;
    border-left: 3px solid #d0d7de;
    color: #57606a;
    font-size: 16px;
    line-height: 1.9;
}

/* ---------- 标签：浅底小圆角，前四个带圆形头像 ---------- */

.t21-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.t21-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px 5px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    color: #57606a;
    font-size: 14px;
    line-height: 1.5;
}

.t21-tag-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* ---------- 图片：正文之后，细边框浅底托底 ---------- */

.t21-figure {
    margin-top: 34px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fafafa;
}

.t21-figure-img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}

/* ---------- 友链区：细分隔线 + 链接列表 ---------- */

.t21-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 26px;
    max-width: 680px;
    margin-top: 64px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.t21-friend {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
}

.t21-friend-ttl {
    color: #1f2328;
    font-size: 14px;
    font-weight: 600;
}

.t21-friend-a {
    color: #57606a;
    font-size: 14px;
    line-height: 1.7;
    transition: color 0.2s ease;
}

.t21-friend-a:hover {
    color: #0f5257;
}

/* ---------- 窄屏：标题与按钮改上下排列，正文宽度自适应 ---------- */

@media (max-width: 720px) {
    .t21-main {
        padding: 32px 18px 48px;
    }

    .t21-titlebar {
        flex-direction: column;
        gap: 16px;
        padding-bottom: 16px;
    }

    .t21-title {
        font-size: 23px;
        line-height: 1.45;
    }

    .t21-btn {
        margin-top: 0;
        align-self: flex-start;
    }

    .t21-content {
        margin-top: 26px;
    }

    .t21-lead {
        font-size: 16px;
        line-height: 1.9;
    }

    .t21-quote {
        margin-top: 20px;
        padding-left: 14px;
        font-size: 15px;
    }

    .t21-tags {
        gap: 8px;
        margin-top: 26px;
    }

    .t21-figure {
        margin-top: 26px;
        padding: 8px;
    }

    .t21-foot {
        margin-top: 42px;
        padding-top: 18px;
        flex-direction: column;
    }

    .t21-friend {
        gap: 6px 14px;
    }
}

/* ---------- 超窄屏：进一步收紧字号，防止横向溢出 ---------- */

@media (max-width: 420px) {
    .t21-title {
        font-size: 20px;
    }

    .t21-lead,
    .t21-quote {
        font-size: 15px;
    }

    .t21-tag {
        font-size: 13px;
        padding: 4px 11px 4px 5px;
    }

    .t21-friend-a {
        font-size: 13px;
    }
}
