/* ==========================================================================
   blog.css — 单文件博客主题（参照 GitHub 风格参考稿复刻）
   覆盖：顶栏 / 公告条 / 侧边资料卡 + 标签云 / 最新文章卡片 / 互动热力图 /
         站点动态时间线 / 列表 / 详情 / 评论 / 留言板 / 页脚
   设计令牌与 GitHub Primer 对齐：蓝 #0969da，边框 #d0d7de，正文 #1f2328
   ========================================================================== */

:root {
    --bg: #f6f8fa;
    --card: #ffffff;
    --border: #d0d7de;
    --border-muted: #e7ebef;
    --fg: #1f2328;
    --fg-muted: #59636e;
    --blue: #0969da;
    --blue-soft: #ddf4ff;
    --green-dot: #1a7f37;
    --hm0: #ebedf0;
    --hm1: #9be9a8;
    --hm2: #40c463;
    --hm3: #30a14e;
    --hm4: #216e39;
    --radius: 8px;
    --shadow: 0 1px 0 rgba(31, 35, 40, 0.04);
    --cell: 10px;
    --cell-gap: 3px;
    --cell-step: 13px; /* cell + gap */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; }

/* ============================== 顶栏 ============================== */
.bh {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border-muted);
}
.bh-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.bh-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fg);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
.bh-brand:hover { text-decoration: none; color: var(--fg-muted); }
.bh-mark { color: var(--fg); flex: none; }
.bh-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.bh-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bh-nav { display: flex; align-items: center; gap: 2px; }
.bh-nav a {
    color: var(--fg);
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
}
.bh-nav a:hover { background: var(--border-muted); text-decoration: none; }
.bh-nav a.is-on { color: var(--fg); font-weight: 600; }

.bh-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 9px;
    color: var(--fg-muted);
    width: 210px;
}
.bh-search:focus-within { border-color: var(--blue); background: #fff; }
.bh-search input {
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    color: var(--fg);
    width: 100%;
}
.bh-search input::placeholder { color: var(--fg-muted); }

.bh-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
    color: var(--fg-muted);
    font-size: 12px;
    white-space: nowrap;
    background: #fff;
}
.bh-user img { border-radius: 50%; display: block; }
.bh-user:hover { text-decoration: none; opacity: .85; }

.bh-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.bh-toggle span { display: block; width: 18px; height: 2px; background: var(--fg); margin: 4px 0; border-radius: 2px; }

/* 公告条 */
.bh-notice {
    background: var(--blue-soft);
    border-bottom: 1px solid #cfe6ff;
    color: var(--fg);
    padding: 8px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bh-notice svg { color: var(--blue); flex: none; }

/* ============================== 布局 ============================== */
.bw {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.bw-main { min-width: 0; }

/* ============================ 侧边资料卡 ============================ */
.bw-side {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    text-align: center;
    position: sticky;
    top: 72px;
}
.ws-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: block;
    margin: 4px auto 14px;
    background: #eaeef2;
}
.ws-name { font-size: 22px; line-height: 1.25; }
.ws-handle { margin: 4px 0 16px; color: var(--fg-muted); }
.ws-write {
    display: block;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f6f8fa;
    color: var(--fg);
    padding: 7px 0;
    font-weight: 500;
}
.ws-write:hover { background: #eef1f4; text-decoration: none; }
.ws-info {
    list-style: none;
    margin: 16px 0 8px;
    padding: 0;
    text-align: left;
    color: var(--fg-muted);
    font-size: 13px;
}
.ws-info li { display: flex; align-items: center; gap: 8px; padding: 3px 0; word-break: break-all; }
.ws-info svg { flex: none; }
.ws-stats { color: var(--fg-muted); font-size: 13px; margin: 10px 0 0; }
.ws-hr { border-top: 1px solid var(--border-muted); margin: 18px 0 14px; }
.ws-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    margin-bottom: 12px;
}
.ws-title svg { color: var(--fg-muted); }
.ws-cloud { line-height: 2.1; }
.ws-cloud a {
    display: inline-block;
    margin: 0 7px 6px 0;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    padding: 1px 10px;
}
.ws-cloud a:hover { text-decoration: none; background: #cbe3ff; }

/* ============================== 区块 ============================== */
.bsec { margin-bottom: 28px; }
.bsec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.bsec-head h2 { font-size: 18px; }
.bsec-h2 { font-size: 18px; }
.bsec-more { font-size: 13px; }
.bsec-meta { color: var(--fg-muted); font-size: 13px; white-space: nowrap; }

/* ============================ 最新文章卡 ============================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.post-card {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow .15s ease;
}
.post-card:hover { box-shadow: 0 3px 8px rgba(31, 35, 40, 0.1); }
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-title { font-size: 15px; line-height: 1.4; }
.pc-title a { color: var(--blue); word-break: break-word; }
.pc-chip {
    flex: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 12px;
    color: var(--fg-muted);
    background: #fff;
}
.pc-chip:hover { text-decoration: none; border-color: var(--blue); color: var(--blue); }
.pc-excerpt {
    margin: 0;
    color: var(--fg-muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--fg-muted);
    font-size: 12px;
    margin-top: auto;
}
.pc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); flex: none; }
.pc-date { margin-left: auto; }

/* ============================== 热力图 ============================== */
.hm-card {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 16px 12px;
}
.hm-flex { display: flex; gap: 14px; align-items: stretch; }
.hm-scroll { overflow-x: auto; flex: 1; padding-bottom: 4px; }
.hm-months {
    display: flex;
    height: 16px;
    margin-left: 34px;
}
.hm-month {
    width: var(--cell-step);
    flex: none;
    font-size: 10px;
    color: var(--fg-muted);
    white-space: nowrap;
    overflow: visible;
}
.hm-body { display: flex; gap: 6px; }
.hm-dow {
    display: grid;
    grid-template-rows: repeat(7, var(--cell));
    row-gap: var(--cell-gap);
    font-size: 10px;
    color: var(--fg-muted);
    flex: none;
    width: 28px;
}
.hm-dow span { grid-column: 1; }
.hm-dow span:nth-child(1) { grid-row: 2; }
.hm-dow span:nth-child(2) { grid-row: 4; }
.hm-dow span:nth-child(3) { grid-row: 6; }
.hm-cols {
    display: flex;
    gap: var(--cell-gap);
}
.hm-col {
    display: flex;
    flex-direction: column;
    gap: var(--cell-gap);
    width: var(--cell);
}
.hm-cell {
    width: var(--cell);
    height: var(--cell);
    border-radius: 2px;
    background: var(--hm0);
    display: block;
}
.hm-cell.lv1 { background: var(--hm1); }
.hm-cell.lv2 { background: var(--hm2); }
.hm-cell.lv3 { background: var(--hm3); }
.hm-cell.lv4 { background: var(--hm4); }

.hm-years {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: none;
    min-width: 56px;
}
.hm-years a {
    display: block;
    text-align: center;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 13px;
    color: var(--fg);
}
.hm-years a:hover { background: var(--border-muted); text-decoration: none; }
.hm-years a.on { background: var(--blue); color: #fff; }
.hm-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-muted);
}
.hm-all { font-size: 13px; }
.hm-legend { display: flex; align-items: center; gap: 3px; color: var(--fg-muted); font-size: 11px; }
.hm-legend .hm-cell { width: 9px; height: 9px; }
.hm-legend span { margin: 0 4px; }

/* ============================== 时间线 ============================== */
.tl-card {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px 20px 14px;
}
.tl-month { font-size: 14px; padding: 14px 0 4px; }
.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-muted);
}
.tl-item:last-child { border-bottom: 0; }
.tl-ico {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef1f4;
    color: var(--fg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.tl-ico.is-cmt { background: var(--blue-soft); color: var(--blue); }
.tl-text { flex: 1; min-width: 0; color: var(--fg-muted); }
.tl-text b { color: var(--fg); font-weight: 600; margin-right: 4px; }
.tl-text a { word-break: break-word; }
.tl-plain { color: var(--fg-muted); }
.tl-date { color: var(--fg-muted); font-size: 12px; white-space: nowrap; margin-top: 2px; }
.tl-empty { color: var(--fg-muted); padding: 16px 0; }

/* ============================== 列表页 ============================== */
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-row {
    display: flex;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.post-row:hover { box-shadow: 0 3px 8px rgba(31, 35, 40, 0.1); }
.pr-thumb { flex: none; width: 120px; align-self: center; }
.pr-thumb img { border-radius: 6px; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.pr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-title { font-size: 16px; line-height: 1.4; }
.pr-title a { color: var(--blue); }
.pr-excerpt { margin: 0; color: var(--fg-muted); font-size: 13px; }
.pr-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--fg-muted);
    font-size: 12px;
    margin-top: auto;
}
.pr-cat { color: var(--fg-muted); background: var(--bg); border-radius: 999px; padding: 1px 9px; }
.pr-cat:hover { text-decoration: none; color: var(--blue); }

.empty-card {
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--fg-muted);
    padding: 32px;
    text-align: center;
}

/* 分页 */
.pager { margin-top: 16px; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pager li a, .pager li span {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    background: var(--card);
    color: var(--fg);
    font-size: 13px;
}
.pager li a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pager li .page-num-current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============================== 详情页 ============================== */
.pf-crumbs { color: var(--fg-muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pf-title { font-size: 26px; line-height: 1.35; margin: 4px 0 10px; }
.pf-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--fg-muted);
    font-size: 13px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-muted);
    margin-bottom: 18px;
}
.pf-body { font-size: 15px; line-height: 1.8; word-break: break-word; }
.pf-body img { max-width: 100%; height: auto; border-radius: 6px; }
.pf-body h1, .pf-body h2, .pf-body h3 { margin: 1.2em 0 .6em; font-size: 18px; }
.pf-body p { margin: .8em 0; }
.pf-body table { border-collapse: collapse; width: 100%; }
.pf-body td, .pf-body th { border: 1px solid var(--border); padding: 6px 10px; }
.pf-tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-tags .pc-chip { display: inline-block; }

.sl-draftbar {
    background: #fff8c5;
    border-bottom: 1px solid #d4a72c66;
    color: var(--fg);
    padding: 8px 16px;
    font-size: 13px;
    max-width: 1180px;
    margin: 0 auto;
}

/* ============================== 评论 ============================== */
.comments { margin-top: 26px; }
.cm-list, .comments .cm { margin: 0; }
.cm {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-muted);
}
.cm-avatar {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.cm-body { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: baseline; gap: 8px; color: var(--fg-muted); font-size: 12px; }
.cm-head b { color: var(--fg); font-size: 13px; }
.cm-text { margin: 4px 0 0; word-break: break-word; }
.cm-reply {
    margin-top: 8px;
    background: var(--bg);
    border-left: 3px solid var(--blue);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    font-size: 13px;
}
.cm-empty { color: var(--fg-muted); padding: 8px 0; }
.cm-flash { border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; font-size: 13px; }
.cm-flash.ok { background: #dafbe1; color: #116329; }
.cm-flash.err { background: #ffebe9; color: #cf222e; }

.cm-form {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.cm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-row input[type="text"], .cm-row input[type="email"] {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font: inherit;
    color: var(--fg);
}
.cm-form textarea {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    color: var(--fg);
    resize: vertical;
    min-height: 90px;
}
.cm-captcha { color: var(--fg-muted); font-size: 13px; }
.cm-submit {
    margin-left: auto;
    background: #1a7f37;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 6px 16px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.cm-submit:hover { background: #116329; }

/* ============================== 下载页 ============================== */
.dl-list { display: flex; flex-direction: column; gap: 12px; }
.dl-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.dl-body { flex: 1; min-width: 0; }
.dl-btn {
    flex: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 14px;
    background: #f6f8fa;
}
.dl-btn:hover { border-color: var(--blue); text-decoration: none; color: var(--blue); }

/* ============================== 页脚 ============================== */
.bf {
    border-top: 1px solid var(--border-muted);
    background: #fff;
    padding: 24px 16px;
    color: var(--fg-muted);
    font-size: 13px;
    text-align: center;
}
.bf-inner { max-width: 1180px; margin: 0 auto; }
.bf-links { margin-bottom: 8px; }
.bf-links-label { color: var(--fg); font-weight: 500; }
.bf-links a { color: var(--fg-muted); margin: 0 6px; }
.bf-links a:hover { color: var(--blue); }
.bf-copy, .bf-icp { margin: 4px 0; }
.bf-icp a { color: var(--fg-muted); }
.bf-icp a:hover { color: var(--blue); }

/* ============================== 响应式 ============================== */
@media (max-width: 960px) {
    .bw { grid-template-columns: 1fr; }
    .bw-side { position: static; }
    .ws-avatar { width: 140px; height: 140px; }
    .bh-nav {
        display: none;
    }
    body.nav-open .bh-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 10px 16px;
        gap: 4px;
    }
    .bh-toggle { display: block; margin-left: auto; }
    .bh-right { margin-left: 0; flex: 1; justify-content: flex-end; }
    .bh-title { max-width: 120px; }
}
@media (max-width: 720px) {
    .bh-search { width: 130px; }
    .bh-chip { display: none; }
    .post-grid { grid-template-columns: 1fr; }
    .post-row { flex-direction: column; }
    .pr-thumb { width: 100%; }
    .hm-flex { flex-direction: column-reverse; }
    .hm-years { flex-direction: row; flex-wrap: wrap; min-width: 0; }
    .pf-title { font-size: 21px; }
}

/* ====================== 顶栏用户入口 ====================== */
.bh-auth { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.bh-auth a { color: var(--fg-muted); }
.bh-auth .bh-reg {
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
}
.bh-auth .bh-reg:hover { text-decoration: none; background: #0a63b8; }
.bh-user { display: inline-flex; align-items: center; gap: 7px; }
.bh-user:hover { text-decoration: none; }
.bh-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; color: var(--fg); font-weight: 500; }
.bh-user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--blue); color: #fff; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 12px;
}

/* ====================== 登录 / 注册 ====================== */
.auth-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 16px 64px; display: flex; justify-content: center; }
.auth-card {
    width: 100%; max-width: 380px;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
}
.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-sub { margin: 0 0 18px; color: var(--fg-muted); font-size: 13px; }
.auth-card .cm-form input:not([type="submit"]) {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
}
.auth-alt { margin: 16px 0 0; text-align: center; color: var(--fg-muted); font-size: 13px; }
.cm-submit.wide { width: 100%; }

/* ====================== 下载中心筛选与卡片 ====================== */
.dl-filter {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.dl-tabs { display: flex; gap: 6px; }
.dl-tabs a {
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--fg);
    background: var(--card);
    font-size: 13px;
}
.dl-tabs a:hover { text-decoration: none; border-color: var(--blue); color: var(--blue); }
.dl-tabs a.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.dl-cate select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 8px;
    font: inherit;
    background: var(--card);
    color: var(--fg);
}
.dl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.dl-card {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    transition: box-shadow .15s ease;
}
.dl-card:hover { box-shadow: 0 3px 8px rgba(31,35,40,.1); }
.dlc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dlc-ico {
    width: 64px; height: 48px; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--border-muted);
}
.pc-chip.free { color: var(--green-dot); border-color: #aceebb; background: #dafbe1; }
.pc-chip.paid { color: #9a6700; border-color: #d4a72c; background: #fff8c5; }
.dl-card .pr-meta { margin: 0; }
.dl-btn.primary {
    display: inline-block; text-align: center;
    background: var(--blue); color: #fff;
    border-color: var(--blue);
}
.dl-btn.primary:hover { text-decoration: none; background: #0a63b8; color: #fff; }
.dl-btn.big { padding: 8px 18px; margin-top: auto; }
.dl-view { font-size: 12px; color: var(--fg-muted); text-align: center; }

/* ====================== 个人中心 / 支付页 ====================== */
.bw-main.full { max-width: 860px; margin: 0 auto; width: 100%; }
.uc-profile {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.uc-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--blue); color: #fff; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 18px; flex: none;
}
.uc-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.uc-info span { color: var(--fg-muted); font-size: 12px; word-break: break-all; }
.uc-nick { display: flex; gap: 8px; }
.uc-nick input {
    border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 10px; font: inherit;
    max-width: 180px;
}
.uc-state { border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.uc-state.st0 { background: var(--bg); color: var(--fg-muted); }
.uc-state.st1 { background: #fff8c5; color: #9a6700; }
.uc-state.st2 { background: #dafbe1; color: #116329; }
.uc-state.st3 { background: #ffebe9; color: #cf222e; }

.pay-card {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.pay-item {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-muted);
}
.pay-item-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pay-item-info span { color: var(--fg-muted); font-size: 12px; }
.pay-price { font-size: 20px; font-weight: 600; color: #cf222e; white-space: nowrap; }
.pay-note { margin: 0; color: var(--fg-muted); font-size: 13px; line-height: 1.7; }
.pay-qr { display: flex; gap: 20px; flex-wrap: wrap; }
.qr-box {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
}
.qr-box img { width: 180px; height: 180px; object-fit: contain; }
.qr-box span { font-size: 12px; color: var(--fg-muted); }

@media (max-width: 720px) {
    .dl-grid { grid-template-columns: 1fr; }
    .bh-user-name { display: none; }
}

/* ====================== 下载页第二级筛选：软件类别 ====================== */
.dl-caterow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
}
.dl-catelabel {
    font-size: 13px;
    color: var(--fg-muted);
    flex: none;
}
.dl-catechips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.dl-catechips a {
    padding: 3px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--fg);
    background: var(--bg);
}
.dl-catechips a:hover {
    text-decoration: none;
    border-color: var(--blue);
    color: var(--blue);
}
.dl-catechips a.is-on {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

/* ====================== 版本徽标 ====================== */
.pc-chip.ver {
    color: #0550ae;
    border-color: #54aeff66;
    background: #ddf4ff;
    font-weight: 600;
}
.dlc-chips {
    margin-left: auto;
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.upd-link { margin-left: 2px; }

/* ====================== 软件详情页 + 更新记录时间线 ====================== */
.soft-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 16px;
}
.soft-idbox { flex: none; }
.dlc-ico.big { width: 96px; height: 76px; }
.soft-glyph {
    width: 84px;
    height: 68px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border-muted);
    color: var(--fg-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.soft-headinfo { flex: 1; min-width: 240px; }
.soft-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 6px;
    font-size: 22px;
}
.soft-note { margin: 0 0 8px; color: var(--fg-muted); }
.soft-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--fg-muted);
    font-size: 13px;
}
.soft-actions {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 150px;
}
.soft-actions .dl-view { text-align: center; }

.panel {
    background: var(--card);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}
.panel-hd {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.panel-title { font-size: 17px; margin: 0; }

/* Timestamped update timeline: version chip + datetime + note per entry. */
.upd-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.upd-item {
    display: flex;
    gap: 12px;
}
.upd-rail {
    flex: none;
    width: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.upd-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-dot);
    border: 2px solid #aceebb;
    margin-top: 6px;
    flex: none;
}
.upd-rail::after {
    content: "";
    flex: 1;
    width: 2px;
    background: var(--border-muted);
    margin-top: 4px;
}
.upd-item:last-child .upd-rail::after { background: transparent; }
.upd-main {
    flex: 1;
    min-width: 0;
    padding-bottom: 18px;
}
.upd-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.upd-time {
    color: var(--fg-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.upd-note {
    margin: 6px 0 0;
    color: var(--fg);
    line-height: 1.6;
}
