:root {
    --paper: #fff;
    --ink: #1E2420;
    --ink-soft: #545E58;
    --accent: #000;
    --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;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    align-self: start;
    padding-top: 6px;
}
.social-links {
    display: flex;
    gap: 14px;
}
.social-links a {
    color: var(--ink-soft);
    transition: color .15s ease;
}
.social-links a:hover { color: var(--accent); }
.view-posts-link {
    font-size: 14px;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: color .15s ease;
}
.view-posts-link:hover { color: var(--accent); }

/* ---------- 非首页的列表页：一个简洁的标题条（风格和首页保持一致，不额外做大图 hero） ---------- */
.listpage-heading {
    max-width: 720px;
    margin: 24px auto 0;
    padding: 0 24px;
    text-align: center;
}
.listpage-heading h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin: 0 0 6px;
}
.listpage-home-link {
    display: inline-block;
    font-size: 12.5px;
    color: var(--ink-soft);
    opacity: .75;
    text-decoration: none;
    margin: 0 0 10px;
    transition: opacity .15s ease, color .15s ease;
}
.listpage-home-link:hover { opacity: 1; color: var(--accent); }
.listpage-heading p {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 14px;
}
.listpage-share-btn {
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.listpage-share-btn:hover { border-color: var(--accent); 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;
}
.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;
}
.locked-badge {
    position: absolute;
    top: 12px;
    right: 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; }
    .header-right { grid-column: 1 / -1; align-self: start; }
    .row-title { font-size: 17px; }
}

/* ---------- 帖子页面：头部和首页样式一样，但是固定在顶部不随内容滚走 ---------- */
.site-header.fixed-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: var(--paper);
}
.posts-feed {
    max-width: 720px;
    margin: 0 auto;
    padding: 170px 24px 40px;
}
.post-row {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.post-row:first-child { padding-top: 0; }
.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.post-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 18px;
}
.post-main { flex: 1; min-width: 0; }
.post-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.post-author {
    font-weight: 600;
    font-size: 15px;
}
.post-time {
    font-size: 13px;
    color: var(--ink-soft);
}
.post-content {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.post-expand-btn {
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}
.post-expand-btn:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .posts-feed { padding-top: 230px; }
}

/* ---------- 文章详情页：参照上传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;
}

/* ---------- 列表页：点击加密文章封面时弹出的密码验证弹窗 ---------- */
.lock-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20, 24, 21, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lock-modal {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    padding: 36px 24px 28px;
    text-align: center;
}
.lock-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-size: 15px;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
}
.lock-modal-close:hover { background: var(--accent-soft); color: var(--ink); }
.lock-modal-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.lock-modal-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.lock-modal-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 19px;
}
.lock-modal-sitename {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: -0.01em;
}
.lock-modal-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}
.lock-form-modal { max-width: 100%; flex-direction: column; }
.lock-form-modal input { width: 100%; box-sizing: border-box; }
.lock-form-modal button { width: 100%; }
.lock-modal-buy-btn {
    display: block;
    margin: 14px 0 0;
    padding: 10px 20px;
    border-radius: 999px;
    background: #A5690C;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s ease;
}
.lock-modal-buy-btn:hover { filter: brightness(0.88); }

.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;
}
.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;
}

/* ---------- 商品详情页：顶部复用全站 logo+站名，下面是商品详情 + 底部支付按钮 ---------- */
.product-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 40px;
}
.product-title-bold {
    font-family: var(--font-body);
    font-weight: 800;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.4;
    margin: 0 0 22px;
}

.product-hero-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 32px;
}
.product-hero-img-wrap img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.product-hero-img-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    background: rgba(0,0,0,.04);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.product-attrs {
    list-style: none;
    margin: 0;
    padding: 0;
}
.product-attrs li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
    line-height: 1.6;
}
.product-attrs li:last-child { border-bottom: none; }
.attr-label {
    flex: 0 0 84px;
    color: var(--ink-soft);
    font-weight: 600;
}
.attr-value { color: var(--ink); }
.attr-value.attr-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 17px;
}

.product-section-title {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.product-intro { margin-bottom: 8px; }
.btn-buy { font-weight: 600; }

@media (max-width: 560px) {
    .product-hero-row { grid-template-columns: 130px 1fr; gap: 18px; }
    .attr-label { flex: 0 0 68px; font-size: 13px; }
    .product-attrs li { font-size: 13px; }
}

/* ---------- 软件发布页：仿 App Store 软件详情页样式 ---------- */
.software-banner-wrap {
    width: 100%;
    margin-bottom: 24px;
}
.software-banner-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.software-banner-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: rgba(0,0,0,.04);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.software-header-row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 28px;
}
.software-icon-wrap {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--accent-soft);
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.software-icon-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.software-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--accent);
}

.software-header-info { flex: 1; padding-top: 2px; }
.software-title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 19px;
    color: var(--ink);
    margin: 0 0 4px;
    line-height: 1.3;
}
.software-subtitle {
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 12px;
    line-height: 1.5;
}
.software-get-btn {
    display: inline-block;
    padding: 8px 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
}
.software-get-btn:hover { filter: brightness(0.92); }

.software-info-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    text-align: center;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}
.software-info-cell { display: flex; flex-direction: column; gap: 4px; }
.software-info-cell .info-value { font-size: 13px; font-weight: 700; color: var(--ink); }
.software-info-cell .info-label { font-size: 11px; color: var(--ink-soft); }

.software-screens-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.software-screens-scroll img {
    flex: 0 0 auto;
    height: 360px;
    width: auto;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    object-fit: cover;
}
.software-screens-scroll::-webkit-scrollbar { height: 6px; }
.software-screens-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.software-intro { margin-bottom: 8px; }

@media (max-width: 560px) {
    .software-info-grid { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
    .software-icon-wrap { flex-basis: 72px; width: 72px; height: 72px; border-radius: 16px; }
    .software-screens-scroll img { height: 260px; }
}
.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
}
.article-content .ql-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
    border: none;
    border-radius: var(--radius);
    margin: 1.2em 0;
}
.article-content .ql-size-small { font-size: 0.75em; }
.article-content .ql-size-large { font-size: 1.5em; }
.article-content .ql-size-huge { font-size: 2.5em; }
.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: none; }
.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%; }
}

/* ---------- 知识百科页：主体按维基百科风格排版 ---------- */
.wiki-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.wiki-h1 {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

/* 单栏顺序往下排：导语 -> 信息框 -> 目录 -> 正文 -> 参考资料 -> 落款 -> 返回链接，
   桌面端和移动端是同一套顺序，不需要另外用 grid/order 折腾。 */
.wiki-lead {
    font-size: 16px;
    line-height: 27px;
    font-weight: 500;
    margin: 0 0 20px;
}

.wiki-toc {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0,0,0,.02);
    padding: 14px 22px;
    margin: 0 0 24px;
}
.wiki-toc-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}
.wiki-toc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13.5px;
    line-height: 1.9;
}
.wiki-toc-level-3 { list-style: none; margin-left: 16px; font-size: 13px; }

.wiki-content.article-content h1,
.wiki-content.article-content h2 {
    font-size: 19px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
    margin-top: 1.8em;
}
.wiki-content.article-content h3 { font-size: 16px; }

/* 百科页链接：完全按维基百科的经典配色——未访问蓝、已访问紫，外部链接带一个小箭头，
   不显示下划线（和全站链接风格保持一致，维基百科现在的 Vector 皮肤默认也不带下划线） */
.wiki-content a,
.wiki-toc-list a,
.wiki-infobox-table a {
    color: #0645ad;
    text-decoration: none;
}
.wiki-content a:visited,
.wiki-toc-list a:visited,
.wiki-infobox-table a:visited {
    color: #0b0080;
}
.wiki-content a:hover,
.wiki-toc-list a:hover,
.wiki-infobox-table a:hover {
    opacity: .8;
}
.wiki-content a[href^="http"]::after,
.wiki-infobox-table a[href^="http"]::after {
    content: "↗";
    display: inline-block;
    font-size: .7em;
    margin-left: 2px;
    transform: translateY(-4px);
}

/* 参考资料：单独一个带边框的盒子，和上面的正文明确分开，不是同一块内容 */
.wiki-references {
    margin-top: 32px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0,0,0,.02);
}
.wiki-section-title {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 0 0 10px;
}
.wiki-references-list {
    font-size: 13px;
    line-height: 1.9;
    color: var(--ink-soft);
    padding-left: 20px;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wiki-footer-note {
    margin-top: 28px;
    font-size: 12.5px;
    color: var(--ink-soft);
    font-style: italic;
}

/* 信息框：导语下面的独立卡片，不再是右侧侧栏 */
.wiki-infobox {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,.015);
    font-size: 13px;
    margin: 0 0 24px;
}
.wiki-infobox-title {
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
}
.wiki-infobox-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 260px;
}
.wiki-infobox-table {
    width: 100%;
    border-collapse: collapse;
}
.wiki-infobox-table th,
.wiki-infobox-table td {
    padding: 8px 14px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.wiki-infobox-table th {
    width: 25%;
    color: var(--ink-soft);
    font-weight: 600;
    white-space: nowrap;
}
.wiki-infobox-table td { word-break: break-word; }

/* ---------- 作者介绍页：图片+文字的作者卡片网格 ---------- */
.author-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}
.author-page-title {
    font-family: var(--font-display);
    font-size: 24px;
    margin: 0 0 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.author-intro {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
    margin: -8px 0 24px;
}
.author-outro {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-soft);
    margin: 28px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 18px;
}
.author-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0,0,0,.015);
    text-align: center;
    padding-bottom: 14px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s ease, border-color .2s ease;
}
a.author-card:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.author-card-img-wrap {
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.author-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
/* 鼠标悬浮时图片放大，容器 overflow:hidden 会把超出部分裁掉，不会撑破卡片 */
.author-card:hover .author-card-img { transform: scale(1.12); }

.author-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.06);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-family: var(--font-display);
}
.author-card-name {
    font-weight: 700;
    font-size: 14.5px;
    margin: 12px 12px 4px;
}
.author-card-name .bi { color: var(--accent); font-size: 12px; margin-left: 2px; }
.author-card-bio {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 12px;
}

@media (max-width: 720px) {
    .author-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
}

/* ---------- 会话页（在线客服聊天） ---------- */
.chat-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 720px;
    margin: 0 auto;
}
.chat-topbar { padding: 20px 24px 0; }
.chat-back-link { font-size: 14px; color: var(--ink-soft); }
.chat-back-link:hover { color: var(--accent); }

/* 第一行：客服头像（居中）/ 第二行：客服名称 / 第三行：客服自我介绍（浅色字体） */
.chat-agent-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--line);
}
.chat-agent-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}
.chat-agent-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 26px;
}
.chat-agent-name {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}
.chat-agent-bio {
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    color: var(--ink-soft);
    opacity: .85;
    max-width: 440px;
    line-height: 1.6;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chat-empty-hint {
    margin: auto;
    color: var(--ink-soft);
    font-size: 14px;
    text-align: center;
}
.chat-disabled-hint {
    margin: 40px auto;
    color: var(--ink-soft);
    font-size: 14px;
    text-align: center;
}
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 78%;
}
.chat-row-agent { align-self: flex-start; }
.chat-row-user { align-self: flex-end; flex-direction: row-reverse; }

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-avatar-user { background: var(--accent); color: #fff; }
.chat-avatar-placeholder { font-family: var(--font-display); font-weight: 600; }

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-row-user .chat-bubble {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.chat-input-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 14px 24px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}
.chat-input-bar input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 16px; /* 16px 避免 iOS Safari 聚焦时自动放大页面 */
    background: #fff;
    color: var(--ink);
    font-family: var(--font-body);
}
.chat-input-bar input:focus { outline: none; border-color: var(--accent); }
.chat-input-bar button {
    padding: 0 22px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.chat-input-bar button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 悬浮的"联系站长"入口，除会话页本身外常驻在页面底部/右下角 ---------- */
.floating-chat-entry {
    position: fixed;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

/* 样式一：通栏白色文字条（图标 + "联系站长" 文字，贴底部 20px，左右占满整行） */
.floating-chat-entry-bar {
    left: 20px;
    right: 20px;
    bottom: 20px;
    height: 52px;
    gap: 8px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
}
.floating-chat-entry-bar i { font-size: 18px; color: var(--accent); }
.floating-chat-entry-bar:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
/* 文章/商品详情页底部已有一条固定操作栏，悬浮条上移让位，避免两条栏重叠 */
.floating-chat-entry-bar.floating-chat-entry-raised { bottom: 92px; }

/* 样式二：圆形图标按钮（最早的默认样式，只有图标，固定在右下角） */
.floating-chat-entry-circle {
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.floating-chat-entry-circle span { display: none; }
.floating-chat-entry-circle:hover { transform: scale(1.06); }
.floating-chat-entry-circle.floating-chat-entry-raised { bottom: 94px; }

@media (max-width: 720px) {
    .chat-agent-avatar { width: 60px; height: 60px; }
    .chat-row { max-width: 88%; }
}
