:root {
    --paper: #F5F3EC;
    --ink: #1E2420;
    --ink-soft: #545E58;
    --accent: #1F4B3F;
    --accent-soft: #E4EEE9;
    --line: #DAD6C8;
    --radius: 10px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html {
    background: var(--paper);
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部 Header：logo + 简介 + 社交账号 ---------- */
.site-header {
    border-bottom: 1px solid transparent;
    padding: 40px 24px 32px;
    transition: border-color .2s ease;
}
.site-header.loaded {
    border-bottom-color: var(--line);
}
.header-inner {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}
.logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 24px;
}
.site-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.intro {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.5;
}
.social-links {
    display: flex;
    gap: 14px;
    align-self: start;
    padding-top: 6px;
}
.social-links a {
    color: var(--ink-soft);
    transition: color .15s ease;
}
.social-links a:hover { color: var(--accent); }

/* ---------- 文章列表：每篇一行，封面 + 标题 ---------- */
.article-list {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 24px 60px;
}
.state-msg {
    text-align: center;
    color: var(--ink-soft);
    padding: 60px 0;
    font-size: 15px;
}
.article-row {
    display: block;
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-row:hover .row-title { text-decoration: underline; }

.cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--accent-soft);
}
.cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-soft), var(--line));
}
.cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 36, 32, 0.42);
}
.cover-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}
.cover-caption .row-title {
    color: #fff;
    margin: 0 0 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.cover-caption .row-date {
    color: rgba(255,255,255,.85);
}
.pinned-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,.92);
    color: #A5690C;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.row-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    transition: color .15s ease;
}
.row-date {
    font-size: 13px;
    color: var(--ink-soft);
}

.load-status {
    text-align: center;
    margin: 28px 0 0;
    font-size: 13px;
    color: var(--ink-soft);
}

.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--ink-soft);
    font-size: 13px;
    border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
    .header-inner { grid-template-columns: auto 1fr; }
    .social-links { grid-column: 1 / -1; align-self: start; }
    .row-title { font-size: 17px; }
}

/* ---------- 文章详情页：参照上传HTML的版式（滚动收起标题栏 + 作者信息条 + 底部固定按钮） ---------- */
.reader-page { position: relative; }

.reader-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.reader-header.loaded {
    border-bottom-color: var(--line);
}
.reader-header-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
}
.reader-title-full {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    margin: 12px 0;
    transition: opacity .25s ease;
}
.reader-title-compact {
    position: absolute;
    left: 24px; right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity .25s ease;
}
.reader-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.reader-name-sm {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-soft);
}
.reader-name-sm .bi { color: var(--accent); font-size: 13px; margin-left: 2px; }

.reader-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 100px 24px 40px;
}

.reader-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 24px;
}
.reader-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
}
.reader-name {
    font-size: 16px;
    font-weight: 600;
}
.reader-name .bi { color: var(--accent); font-size: 13px; margin-left: 3px; }
.reader-sub {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 2px;
}

.reader-copyright {
    color: var(--ink-soft);
    font-size: 13px;
    margin: 0 0 20px;
}
.reader-copyright .bi { color: var(--accent); }

.reader-content .article-content {
    font-size: 15px;
    line-height: 23px;
    font-family: var(--font-body);
}

.lock-box {
    text-align: center;
    padding: 36px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--accent-soft);
}
.lock-excerpt {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px;
    text-align: left;
}
.lock-icon { font-size: 28px; margin-bottom: 10px; }
.lock-hint {
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 18px;
}
.lock-form {
    display: flex;
    gap: 10px;
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.lock-form input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    box-sizing: border-box;
}
.lock-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.lock-form button:hover:not(:disabled) { background: var(--accent); }
.lock-form button:disabled { opacity: .6; cursor: default; }
.lock-error {
    color: #B3402E;
    font-size: 13px;
    margin: 14px 0 0;
}

.reader-bottom-spacer { height: 90px; }

.copy-share-btn {
    display: block;
    margin: 28px auto 0;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.copy-share-btn:hover { border-color: var(--accent); color: var(--accent); }

.back-to-list-link {
    display: block;
    margin: 32px auto 0;
    text-align: center;
    color: #1a73e8;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.back-to-list-link:hover { color: #0f5bc7; }

.reader-bottom-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 14px 24px;
    z-index: 40;
}
.btn-back-list {
    display: block;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 12px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
}
.btn-back-list:hover { background: var(--accent); }


.article-cover {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: block;
}
.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
}
.article-content h1, .article-content h2, .article-content h3 {
    font-family: var(--font-display);
    margin-top: 1.6em;
}
.article-content p { margin: 0 0 1.2em; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content blockquote {
    margin: 1.5em 0;
    padding-left: 18px;
    border-left: 3px solid var(--accent);
    color: var(--ink-soft);
}

@media (max-width: 560px) {
    .reader-title-full { font-size: 17px; }
    .lock-box { padding: 28px 16px; }
    .lock-form { flex-direction: column; max-width: 100%; }
    .lock-form button { width: 100%; }
}
