* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    background: #f9f9f9;
    word-break: break-word;
    padding-bottom: 120px;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 测试设计这类宽表格/脑图页面：放开宽度，别把空间浪费在两侧 */
.container.container-wide {
    max-width: 1760px;
    padding: 0 28px;
}

.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 16px 0; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 1.375rem; font-weight: 700; color: #111; }
.site-nav a { margin-left: 20px; color: #555; font-size: 0.9375rem; }
/* 「测试中心」入口：黑色加粗，和其它导航项区分开 */
.site-nav a.nav-strong { color: #000; font-weight: 700; }
.post-list { padding: 32px 0; }
.tag-heading { margin-bottom: 20px; color: #666; font-weight: 400; font-size: 1.125rem; }
.post-item { background: #fff; padding: 20px 24px; margin-bottom: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.post-item h2 { font-size: 1.125rem; margin-bottom: 8px; }
.post-item h2 a { color: #111; }
.post-item h2 a:hover { color: #2563eb; }
.post-meta { font-size: 0.8125rem; color: #888; margin-bottom: 10px; }
.post-meta .post-date { margin-right: 12px; }
.tag { display: inline-block; background: #eef2ff; color: #4f46e5; padding: 2px 8px; border-radius: 4px; font-size: 0.8125rem; margin-right: 6px; }
.tag:hover { background: #4f46e5; color: #fff; text-decoration: none; }
.post-excerpt { color: #555; margin-bottom: 10px; font-size: 0.9375rem; line-height: 1.7; }
.read-more { font-size: 0.875rem; color: #2563eb; }
.empty-tip { color: #999; text-align: center; padding: 48px 0; font-size: 0.9375rem; }

.blog-layout { display: flex; gap: 24px; padding: 32px 0; }
.post-detail { flex: 1; min-width: 0; }
/*.sidebar { width: 260px; flex-shrink: 0; }*/

/*.widget { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 16px; position: sticky; top: 20px; }*/

.blog-layout {
    display: flex;
    gap: 24px;
    padding: 32px 0;
    align-items: flex-start;      /* 关键：别让侧边栏被拉伸 */
}

.post-detail { flex: 1; min-width: 0; }

.sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;             /* sticky 挪到这里 */
    top: 20px;
    align-self: flex-start;       /* 关键：按内容定高，防止塌陷 */
}

.widget {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 16px;
    /* position: sticky 去掉，恢复默认 static */
}

.widget h3 { font-size: 0.9375rem; margin-bottom: 12px; color: #333; border-bottom: 2px solid #2563eb; padding-bottom: 8px; }
#article-toc ul { list-style: none; }
#article-toc li { margin-bottom: 6px; }
#article-toc a { color: #555; font-size: 0.875rem; }
#article-toc a:hover { color: #2563eb; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    line-height: 1;
    background: #f3f4f6;
    color: #374151;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tag-cloud-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
}

.tag-cloud-item:nth-child(6n+1) { background: #eef2ff; color: #4338ca; }
.tag-cloud-item:nth-child(6n+2) { background: #ecfdf5; color: #047857; }
.tag-cloud-item:nth-child(6n+3) { background: #fef3c7; color: #b45309; }
.tag-cloud-item:nth-child(6n+4) { background: #ffe4e6; color: #be123c; }
.tag-cloud-item:nth-child(6n+5) { background: #e0f2fe; color: #0369a1; }
.tag-cloud-item:nth-child(6n+6) { background: #f3e8ff; color: #7e22ce; }

/* 侧栏标签云（关于页、归档页用的是 .tag）：同一套色板，逐个不同色。
   这里的 nth-child 规则选择器权重高于 .tag:hover，悬停时不会被打回统一的靛蓝。 */
.tag-cloud .tag {
    margin-right: 0;
}

.tag-cloud .tag:nth-child(6n+1) { background: #eef2ff; color: #4338ca; }
.tag-cloud .tag:nth-child(6n+2) { background: #ecfdf5; color: #047857; }
.tag-cloud .tag:nth-child(6n+3) { background: #fef3c7; color: #b45309; }
.tag-cloud .tag:nth-child(6n+4) { background: #ffe4e6; color: #be123c; }
.tag-cloud .tag:nth-child(6n+5) { background: #e0f2fe; color: #0369a1; }
.tag-cloud .tag:nth-child(6n+6) { background: #f3e8ff; color: #7e22ce; }

.tag-cloud .tag:hover {
    text-decoration: none;
    filter: brightness(0.94);
}

.latest-posts-list {
    list-style: none;
}

.latest-posts-list li {
    margin-bottom: 10px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.latest-posts-list a {
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.latest-posts-list a:hover {
    color: #2563eb;
}

.latest-posts-list .post-date {
    font-size: 0.75rem;
    color: #999;
}

.archives-list {
    list-style: none;
}

.archives-list li {
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.archives-list a {
    color: #555;
}

.archives-list a:hover {
    color: #2563eb;
}

/* 全局音乐播放器 */
.global-music-player {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 280px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.music-player-inner {
    padding: 12px 14px;
}

.music-info {
    margin-bottom: 10px;
    padding: 0 18px;      /* 避开右上角的收起/关闭按钮 */
    text-align: center;
    font-size: 0.875rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.music-btn {
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.music-btn:hover {
    background: #e5e7eb;
}

.music-playlist {
    display: none;
    margin-top: 12px;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

.music-playlist.show {
    display: block;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #555;
}

.music-list {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.8125rem;
}

.music-list li {
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #444;
}

.music-list li:hover {
    background: #f3f4f6;
}

.music-list li.active {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 500;
}

/* 文章详情页样式 */
.post-content {
    background: #fff;
    padding: 32px 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.post-content h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: #111;
    line-height: 1.4;
}

.post-body {
    margin-top: 24px;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.post-body p {
    margin-bottom: 16px;
}

.post-body h2 {
    font-size: 1.375rem;
    margin: 28px 0 12px;
    color: #111;
}

.post-body h3 {
    font-size: 1.125rem;
    margin: 24px 0 10px;
    color: #111;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.post-body pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 16px;
    margin: 16px 0;
    color: #555;
}

.post-body ul,
.post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.post-body th,
.post-body td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.9375rem;
}

.post-body th {
    background: #f9fafb;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 768px) {
    .blog-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .global-music-player {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 10px;
    }

    .post-content {
        padding: 20px;
    }
}

/* ---------- 测试中心 ---------- */
.lab-page {
    padding: 40px 0 64px;
}

.lab-title {
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 8px;
}

.lab-subtitle {
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 28px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.lab-card {
    display: block;
    background: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    color: #333;
    transition: box-shadow 0.15s, transform 0.15s;
}

.lab-card:hover {
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lab-card h2 {
    font-size: 1.0625rem;
    color: #111;
    margin-bottom: 8px;
}

.lab-card p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.6;
}

.lab-card-link {
    font-size: 0.875rem;
    color: #2563eb;
}

/* ---------- 测试中心：登录页 ---------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 56px 0 80px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.auth-card h1 {
    font-size: 1.25rem;
    color: #111;
    margin-bottom: 6px;
}

.auth-tip {
    font-size: 0.8125rem;
    color: #999;
    margin-bottom: 18px;
}

.auth-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.8125rem;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.auth-form .field {
    display: block;
    margin-bottom: 16px;
}

.auth-form .field span {
    display: block;
    font-size: 0.875rem;
    color: #444;
    margin-bottom: 6px;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="tel"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 11px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.auth-back {
    margin-top: 18px;
    font-size: 0.8125rem;
    text-align: center;
}

/* ---------- 测试中心：注册 / 找回密码 ---------- */
.auth-card-wide {
    max-width: 460px;
}

.auth-card .field-error {
    display: block;
    color: #dc2626;
    font-size: 0.75rem;
    font-style: normal;
    margin-top: 4px;
}

.auth-card .field-hint {
    display: block;
    color: #999;
    font-size: 0.75rem;
    font-style: normal;
    margin-top: 4px;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.8125rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.code-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.code-row input {
    flex: 1;
}

.code-badge {
    flex-shrink: 0;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.9375rem;
    letter-spacing: 3px;
    user-select: all;
}

.agree-row {
    margin: 4px 0 18px;
    font-size: 0.8125rem;
}

/* ---------- 测试中心：订单管理 ---------- */
.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user {
    font-size: 0.875rem;
    color: #666;
}

.btn-ghost {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #444;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-ghost:hover {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
}

.btn-ghost[disabled] {
    color: #aaa;
    border-color: #e5e7eb;
    background: #fafafa;
    cursor: not-allowed;
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.status-tabs a {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    color: #555;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.status-tabs a:hover {
    text-decoration: none;
    border-color: #2563eb;
    color: #2563eb;
}

.status-tabs a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.data-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #333;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 11px 18px;
    text-align: left;
    font-size: 0.875rem;
    border-bottom: 1px solid #f5f5f5;
}

.data-table th {
    background: #fafafa;
    color: #666;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #fafcff;
}

.data-table .num {
    text-align: right;
    white-space: nowrap;
}

.data-table .muted {
    color: #888;
}

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.badge-pending_payment { background: #fff7e6; color: #b45309; }
.badge-pending_review  { background: #eef2ff; color: #4338ca; }
.badge-pending_ship    { background: #eff6ff; color: #1d4ed8; }
.badge-shipped         { background: #ecfeff; color: #0e7490; }
.badge-completed       { background: #ecfdf5; color: #047857; }
.badge-refunding       { background: #fef2f2; color: #b91c1c; }
.badge-refunded        { background: #f5f3ff; color: #6d28d9; }
.badge-cancelled       { background: #f3f4f6; color: #6b7280; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
}

.detail-side {
    display: flex;
    flex-direction: column;
}

.kv {
    padding: 6px 18px 14px;
}

.kv dt {
    font-size: 0.8125rem;
    color: #999;
    margin-top: 12px;
}

.kv dd {
    font-size: 0.875rem;
    color: #333;
    margin-top: 2px;
    line-height: 1.6;
}

.amounts {
    padding: 12px 18px 18px;
    border-top: 1px solid #f5f5f5;
}

.amounts > div {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
    padding: 4px 0;
}

.amounts b {
    color: #333;
}

.amount-final {
    border-top: 1px dashed #eee;
    margin-top: 6px;
    padding-top: 8px !important;
}

.amount-final b {
    color: #e11d48;
    font-size: 1.0625rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
}

.log-list {
    list-style: none;
    padding: 6px 18px 16px;
}

.log-list li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px dashed #f2f2f2;
    font-size: 0.875rem;
}

.log-list li:last-child {
    border-bottom: 0;
}

.log-time {
    color: #999;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.log-list b {
    color: #333;
    font-weight: 600;
}

.log-list .muted {
    color: #666;
}

.lab-note {
    font-size: 0.8125rem;
    color: #999;
    text-align: center;
    margin-top: 8px;
}

.lab-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 14px;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ---------- 测试中心：电商演示系统 ---------- */
.demo-shell {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 32px 0 64px;
}

.demo-menu {
    width: 216px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.demo-menu-home {
    display: block;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.demo-menu-home.active {
    color: #2563eb;
}

.demo-menu-group {
    margin-top: 10px;
}

.demo-menu-title {
    display: block;
    padding: 6px 18px;
    font-size: 0.8125rem;
    color: #999;
}

.demo-menu-title.active {
    color: #2563eb;
}

.demo-menu ul {
    list-style: none;
}

.demo-menu li a {
    display: block;
    padding: 6px 18px 6px 30px;
    font-size: 0.8125rem;
    color: #555;
    border-left: 2px solid transparent;
}

.demo-menu li a:hover {
    background: #f5f8ff;
    color: #2563eb;
    text-decoration: none;
}

.demo-menu li a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
    border-left-color: #2563eb;
    padding-left: 28px;
}

.demo-content {
    flex: 1;
    min-width: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 18px;
}

.chip {
    padding: 4px 12px;
    border-radius: 999px;
    background: #f3f6ff;
    color: #3157b8;
    font-size: 0.8125rem;
}

.chip:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}

.feature-list {
    padding: 12px 18px 18px 34px;
}

.feature-list li {
    font-size: 0.875rem;
    color: #555;
    padding: 4px 0;
}

.demo-link-btn {
    display: inline-block;
    width: auto;
    padding: 9px 22px;
}

@media (max-width: 768px) {
    .demo-shell {
        flex-direction: column;
    }

    .demo-menu {
        width: 100%;
        position: static;
        max-height: none;
    }
}

/* ---------- 测试中心：筛选栏 / 分页 / 提示 ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.filter-bar input,
.filter-bar select,
.inline-form input,
.inline-form select {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #333;
    background: #fff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-bar input[type="text"] {
    width: 180px;
}

.filter-bar input[type="number"] {
    width: 96px;
}

.btn-inline {
    width: auto;
    padding: 7px 16px;
    font-size: 0.8125rem;
}

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 6px 0 4px;
    font-size: 0.8125rem;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.flash-area {
    padding-top: 16px;
}

.flash {
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.flash-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ---------- 测试设计 ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-num {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: #888;
}

.tree-wrap {
    overflow-x: auto;
}

.tree,
.tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 竖向树：逐层缩进 */
.tree ul {
    display: block;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px dashed #dbe2ef;
}

.tree li {
    position: relative;
    padding: 4px 0;
}

.tree ul > li::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 22px;
    width: 18px;
    border-top: 1px dashed #dbe2ef;
}

/* 折叠：收起子节点 */
.tree li.collapsed > ul {
    display: none;
}

.fold {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: #94a3b8;
    font-size: 0.625rem;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

.fold:hover {
    color: #2563eb;
}

.tree {
    display: flex;
    align-items: center;
}

/* 每一层都是一列，向右展开 */
.tree ul {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px dashed #dbe2ef;
}

.tree li {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 2px 0;
}

/* 从竖线到节点的横向连接线 */
.tree ul > li::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 19px;
    width: 20px;
    border-top: 1px dashed #dbe2ef;
}

.tree-label {
    display: inline-block;
    min-width: 150px;
    max-width: 260px;
    background: #f5f8ff;
    border: 1px solid #e3e9f7;
    color: #334155;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

/* (模块)/(场景)/(用例) 标识：比标题小一号，和标题留一点间距 */
.tree-label .mark {
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.85;
    margin-right: 5px;
}

.tree > li > .tree-label {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

li[data-kind="module"] > .tree-label {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #312e81;
    font-weight: 600;
}

li[data-kind="scenario"] > .tree-label {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

li[data-kind="case"] > .tree-label {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* 图例里的小标识沿用对应层级的文字色 */
.tree-legend {
    float: right;
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
}

.tree-legend .mark {
    margin-left: 10px;
    margin-right: 3px;
}

.tree-legend .mark-module {
    color: #312e81;
}

.tree-legend .mark-scenario {
    color: #92400e;
}

.tree-legend .mark-case {
    color: #065f46;
}

.cov {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.cov-has {
    background: #ecfdf5;
    color: #047857;
}

.cov-none {
    background: #f3f4f6;
    color: #9ca3af;
}

.matrix-table .center {
    text-align: center;
}

.matrix-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 18px 16px;
    font-size: 0.8125rem;
    color: #666;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding: 18px;
}

.form-grid .field {
    display: block;
}

.form-grid .field > span {
    display: block;
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 5px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    outline: none;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-grid .field-error {
    display: block;
    color: #dc2626;
    font-size: 0.75rem;
    font-style: normal;
    margin-top: 4px;
}

.field-wide {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.link-danger {
    background: none;
    border: 0;
    color: #dc2626;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.link-danger:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- 测试设计：脑图就地编辑 ---------- */
.node-tools {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.12s;
}

/* 只有鼠标停在节点自己身上（标签或按钮）才出现，
   悬停在子节点上不会带出父级的按钮 */
.tree li > .tree-label:hover ~ .node-tools,
.tree li > .node-tools:hover {
    opacity: 1;
}

/* 用例节点的按钮常驻，模块/场景仍然悬停才出现 */
li[data-kind="case"] > .node-tools {
    opacity: 1;
}

.node-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    line-height: 1;
}

.node-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.node-btn-danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.nt {
    font-size: 0.75rem;
}

li[data-kind="case"] {
    cursor: grab;
}

li[data-kind="case"]:active {
    cursor: grabbing;
}

li.drop-hover > .tree-label {
    outline: 2px dashed #2563eb;
    outline-offset: 2px;
    background: #eff6ff;
}

.drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 60;
}

.drawer-mask[hidden] {
    display: none;
}

/* 居中弹窗（原先是右侧抽屉） */
.drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    max-width: 92vw;
    max-height: 82vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    z-index: 61;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer[hidden] {
    display: none;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eeeeee;
    font-size: 0.9375rem;
}

.drawer-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 18px;
}

.drawer-body .field {
    display: block;
    margin-bottom: 14px;
}

.drawer-body .field > span {
    display: block;
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 5px;
}

.drawer-body input,
.drawer-body select,
.drawer-body textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #333;
    outline: none;
}

.drawer-body input:focus,
.drawer-body select:focus,
.drawer-body textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.drawer-foot {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #eeeeee;
}

.field-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 用例节点可点击看详情 */
.case-link {
    cursor: pointer;
}

.case-link:hover {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

/* 脑图卡片内的两栏：左树 + 右详情 */
.map-detail {
    padding: 10px 14px 12px;
}

.map-detail[hidden] {
    display: none;
}

.btn-mini {
    padding: 4px 12px;
    font-size: 0.75rem;
}

/* ---------- 用例详情（右栏常驻表单） ---------- */
.case-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.case-form-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 详情头部的小按钮：点位更好按，和正文 16px 比例协调 */
.case-form-head .btn-mini {
    min-width: 64px;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.case-form-head .btn-primary.btn-mini {
    font-weight: 500;
}

/* 这两个按钮按内容宽度，不要撑满整行 */
.case-form-btns .btn-primary,
.case-form-btns .btn-ghost {
    width: auto;
}

.case-mode {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

/* 标题顶在最上面，字号最大 */
.case-title-field {
    display: block;
    margin-bottom: 8px;
}

.case-title-field > span {
    display: block;
    margin-bottom: 2px;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.case-title-field textarea {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
    font-family: inherit;
    background: #fff;
    outline: none;
    resize: vertical;
}

.case-title-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 属性两列排布 */
.case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-bottom: 4px;
}

.case-grid .field {
    margin: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.case-form .field {
    display: block;
    margin-bottom: 6px;
}

.case-form .field > span {
    display: block;
    margin-bottom: 2px;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.case-form .field-hint {
    display: block;
    margin: 0 0 2px;
    font-size: 0.6875rem;
    font-style: normal;
    color: #9ca3af;
}

.case-form input,
.case-form select,
.case-form textarea {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.8125rem;
    font-family: inherit;
    line-height: 1.45;
    color: #333;
    background: #fff;
    outline: none;
}

.case-form input:focus,
.case-form select:focus,
.case-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* ---------- 测试设计：两栏布局 ---------- */
/* 左列：脑图 → 覆盖矩阵 → 状态迁移；右列：用例详情 */
#design-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(380px, 32%, 520px);
    grid-template-areas:
        "stats  stats"
        "map    detail"
        "right  detail";
    gap: 16px;
    align-items: start;
}

#design-body > .stat-row {
    grid-area: stats;
    margin-bottom: 0;
}

#design-body > .map-card {
    grid-area: map;
    min-width: 0;
}

.design-col-right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.design-col-detail {
    grid-area: detail;
    position: sticky;
    top: 16px;
    min-width: 0;
}

#design-body .data-card {
    margin-bottom: 0;
}

.detail-empty {
    padding: 32px 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8125rem;
}

/* ---------- 平板 / 手机：单列 ---------- */
@media (max-width: 1000px) {
    #design-body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "stats"
            "map"
            "detail"
            "right";
        gap: 12px;
    }

    .design-col-detail {
        position: static;
    }
}

@media (max-width: 900px) {
    .container.container-wide {
        padding: 0 14px;
    }

    .stat-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-num {
        font-size: 1.25rem;
    }

    /* 触屏没有 hover，节点按钮常驻并放大 */
    .node-tools {
        opacity: 1;
    }

    .node-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8125rem;
    }

    .fold {
        width: 22px;
        height: 22px;
        font-size: 0.6875rem;
    }

    /* 表格横向滑动，不撑破卡片 */
    .data-card {
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 8px 12px;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {
    .container.container-wide {
        padding: 0 12px;
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-grid {
        grid-template-columns: 1fr;
    }

    .tree ul {
        margin-left: 12px;
        padding-left: 12px;
    }

    .tree ul > li::before {
        left: -12px;
        width: 10px;
    }

    .tree-label {
        min-width: 0;
        max-width: 100%;
        font-size: 0.875rem;
    }

    .admin-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (hover: none) {
    .node-tools {
        opacity: 1;
    }
}


/* ---------- 用例详情（只读态） ---------- */
.case-view[hidden] { display: none; }

.view-title {
    margin: 4px 0 12px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    color: #111;
    word-break: break-word;
}

.view-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.case-badge {
    padding: 2px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8125rem;
    line-height: 1.7;
}

.case-badge-method { background: #eef2ff; color: #4338ca; }
.case-badge-p0 { background: #fee2e2; color: #b91c1c; }
.case-badge-p1 { background: #fef3c7; color: #92400e; }
.case-badge-p2 { background: #e0f2fe; color: #0369a1; }
.case-badge-none { background: #f1f5f9; color: #94a3b8; }

.view-section { margin-bottom: 10px; }

.view-section h4 {
    margin: 0 0 5px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.view-section p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

.view-pre {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.view-meta {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    font-size: 0.875rem;
    color: #94a3b8;
}

.view-meta b { color: #475569; font-weight: 500; }


/* ---------- 居中弹窗 ---------- */
.ui-dialog {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-dialog[hidden] {
    display: none;
}

.ui-dialog-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.ui-dialog-box {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    padding: 18px 20px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.ui-dialog-title {
    margin-bottom: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111;
}

.ui-dialog-text {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
}

.ui-dialog-input {
    width: 100%;
    margin: 4px 0 12px;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
}

.ui-dialog-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ui-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

/* 弹窗按钮：等宽、不撑满、字号大一档 */
.ui-dialog-actions .btn-ghost,
.ui-dialog-actions .btn-primary {
    width: auto;
    min-width: 88px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.4;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.ui-dialog-actions .btn-ghost {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #475569;
}

.ui-dialog-actions .btn-ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.ui-dialog-actions .btn-primary {
    border: 0;
    background: #2563eb;
    color: #fff;
    font-weight: 500;
}

.ui-dialog-actions .btn-primary:hover {
    background: #1d4ed8;
}

.ui-dialog-actions .btn-ghost:active,
.ui-dialog-actions .btn-primary:active {
    transform: translateY(1px);
}


/* ---------- 看板下拉 ---------- */
.board-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 8px;
}

.board-picker label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.board-picker select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.board-picker select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* 导航搜索框、系列徽章、上下篇 */
.nav-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 20px;
    vertical-align: middle;
}

.nav-search input {
    width: 140px;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nav-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nav-search button {
    padding: 5px 14px;
    border: 1px solid #2563eb;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.nav-search button:hover {
    background: #1d4ed8;
}

/* 系列徽章 */
.series-badge {
    display: inline-block;
    margin-right: 12px;
    padding: 1px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    line-height: 1.7;
}

.series-badge:hover {
    background: #e0e7ff;
}

/* 文章底部上下篇 */
.series-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed #e5e7eb;
}

.series-nav-item {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.series-nav-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.series-nav-item.is-empty {
    border: 0;
    background: none;
}

.series-nav-next {
    text-align: right;
}

.series-nav-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.series-nav-title {
    font-size: 0.9375rem;
    color: #111;
}

/* 系列列表页 */
.series-item h2 {
    font-size: 1.0625rem;
}

@media (max-width: 640px) {
    .nav-search {
        margin: 8px 0 0;
    }

    .nav-search input {
        width: 120px;
    }

    .series-nav {
        flex-direction: row;
    }

    .series-nav-next {
        text-align: left;
    }
}


/* ---------- 页脚固定在页面底部 ---------- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#page-content {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 18px 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.8125rem;
    color: #888;
}

.site-footer .container {
    display: block;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #888;
}

.site-footer a:hover {
    color: #2563eb;
}


/* ---------- 博客首页增强 ---------- */
/* 首页 hero、文章卡、侧栏列表、代码块 */
.home-hero {
    margin-bottom: 24px;
    padding: 24px 26px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%, #fff 100%);
    border: 1px solid #e5e9f5;
}

.home-hero h1 {
    margin-bottom: 8px;
    font-size: 1.5rem;
    color: #111;
}

.home-hero p {
    margin: 0 0 12px;
    color: #475569;
    font-size: 0.9375rem;
}

.home-hero .home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.home-hero .home-stats span {
    padding: 2px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    color: #475569;
}

/* 文章卡：左侧系列色条 + 悬停反馈 */
.post-item {
    position: relative;
    border-left: 3px solid var(--accent, #e5e7eb);
    transition: box-shadow 0.15s, transform 0.15s;
}

.post-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.post-read {
    margin-right: 12px;
    color: #9ca3af;
}

.post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 侧栏列表 */
.widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.875rem;
    border-bottom: 1px dashed #f1f5f9;
}

.widget-list li:last-child {
    border-bottom: 0;
}

.widget-list a {
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-list a:hover {
    color: #2563eb;
}

.widget-count {
    margin-left: 8px;
    color: #94a3b8;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.stat-list li span {
    color: #64748b;
}

.stat-list li b {
    color: #111;
    font-size: 0.9375rem;
}

/* 正文与代码 */
.post-body {
    max-width: 900px;
}

.post-body pre {
    margin: 16px 0;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f6f8fa;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-body code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #f1f5f9;
    font-size: 0.875em;
}

.post-body pre code {
    padding: 0;
    background: none;
    font-size: inherit;
}

@media (max-width: 640px) {
    .home-hero {
        padding: 18px 18px;
    }

    .home-hero h1 {
        font-size: 1.25rem;
    }
}


.pager-btn {
    display: inline-block;
    min-width: 96px;
    text-align: center;
}

/* 不可用时占位但不显示，保证三个元素的相对位置不变 */
.pager-btn.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.pager-info {
    color: #94a3b8;
    font-size: 0.8125rem;
}


/* 订单列表每页条数 */
.per-page-form {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
}

.per-page-form label {
    font-size: 0.8125rem;
    color: #64748b;
}

.per-page-form select {
    padding: 3px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-family: inherit;
    background: #fff;
}


/* 测试设计：标题下方的操作区 */
.design-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}


/* ---------- 导入用例弹窗 ---------- */
.import-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
}

.import-modal[hidden] {
    display: none;
}

.import-box {
    width: min(520px, calc(100vw - 32px));
    padding: 18px 20px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.import-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.import-tip {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #64748b;
}

.import-box input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 0.8125rem;
    background: #f8fafc;
}

.import-result {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.8125rem;
    color: #334155;
}

.import-result ul {
    margin: 8px 0 0 18px;
    color: #b91c1c;
}

.import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.import-actions .btn-primary,
.import-actions .btn-ghost {
    width: auto;
}


/* ---------- 测试中心卡片扩展 ---------- */
.lab-card-owner {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.card-del {
    margin-top: 8px;
}

.lab-card.card-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: default;
}

.lab-card.card-add h2 {
    margin: 0 0 4px;
}

.lab-card.card-add input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
}

.lab-card.card-add input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.lab-card.card-add .btn-primary {
    width: auto;
}


.card-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.card-tools form {
    margin: 0;
}

.link-edit {
    font-size: 0.8125rem;
    color: #2563eb;
}

.link-edit:hover {
    text-decoration: underline;
}

.card-add-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ---------- 文章页布局：三栏、容器加宽 ---------- */
.container.container-post {
    max-width: 1400px;
}

.container-post .blog-layout {
    gap: 20px;
}

.container-post .post-nav {
    flex: 0 0 300px;
}

.container-post .sidebar {
    width: 230px;
}

/* ---------- 文章页左侧导航 ---------- */
.post-nav {
    flex: 0 0 300px;
    min-width: 0;
}

.post-nav-inner {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding-right: 6px;
    font-size: 0.8125rem;
}

.post-nav-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    color: #94a3b8;
}

.post-nav-head a {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
}

.post-nav-group {
    margin-bottom: 14px;
}

.post-nav-title {
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
}

.post-nav-title a {
    color: #64748b;
}

.post-nav-title a:hover {
    color: #2563eb;
}

.post-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid #eef2f7;
}

.post-nav li a {
    display: block;
    padding: 3px 0 3px 10px;
    color: #475569;
    line-height: 1.5;
    border-left: 2px solid transparent;
    margin-left: -1px;
    word-break: break-word;
}

.post-nav li a:hover {
    color: #2563eb;
    background: #f8fafc;
}

.post-nav li a.is-active {
    color: #2563eb;
    font-weight: 600;
    border-left-color: #2563eb;
    background: #eff6ff;
}

@media (max-width: 1200px) {
    .post-nav {
        display: none;
    }

    .container.container-post {
        max-width: 1080px;
    }
}


/* 系列页也走三栏，容器同样加宽 */
.container-series {
    max-width: 1400px;
}

.post-nav-series {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-nav-series li a {
    display: block;
    padding: 5px 0 5px 10px;
    color: #475569;
    line-height: 1.5;
    border-left: 2px solid transparent;
    margin-left: -1px;
    word-break: break-word;
}

.post-nav-series li a:hover {
    color: #2563eb;
    background: #f8fafc;
}

.post-nav-series li a.is-active {
    color: #2563eb;
    font-weight: 600;
    border-left-color: #2563eb;
    background: #eff6ff;
}

.nav-order {
    color: #94a3b8;
    margin-right: 4px;
}

@media (max-width: 1200px) {
    .container-series {
        max-width: 1080px;
    }
}


/* ---------- 手机端排版修正 ---------- */
@media (max-width: 900px) {
    /* 页头：标题独占一行，导航换行排列，搜索框铺满 */
    .site-header { padding: 12px 0; }
    .site-header .container {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 10px;
    }

    .site-title {
        width: 100%;
        font-size: 1.25rem;
    }

    nav {
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 16px;
        width: 100%;
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    nav a {
        margin-left: 0;
        font-size: 0.875rem;
        line-height: 1.8;
    }

    .nav-search {
        flex: 1 1 100%;
        margin: 4px 0 0;
    }

    .nav-search input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    /* 内容区 */
    .container { padding: 0 14px; }
    .blog-layout { padding: 16px 0; gap: 16px; }
    .post-list { padding: 0; }

    /* 文章卡片 */
    .post-item {
        padding: 16px;
        margin-bottom: 12px;
    }

    .post-item h2 {
        font-size: 1.0625rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .post-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        margin-bottom: 8px;
    }

    .post-excerpt { font-size: 0.9375rem; }

    .home-hero { padding: 18px; }

    /* 分页 */
    .pager {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .pager-btn { min-width: 0; }

    /* 侧栏堆叠后不再吸顶 */
    .sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .post-meta { font-size: 0.75rem; }
    .post-item h2 { font-size: 1rem; }
    .tag { font-size: 0.6875rem; padding: 2px 6px; }
    .series-badge { font-size: 0.6875rem; margin-right: 0; }
    .widget { padding: 14px; }
    .home-hero h1 { font-size: 1.125rem; }
    .pager-info { order: -1; flex: 1 1 100%; text-align: center; }
}


/* ---------- 全站移动端适配 ---------- */
@media (max-width: 768px) {
    /* 正文页 */
    .post-content {
        padding: 18px 16px;
        border-radius: 0;
    }

    .post-content h1 { font-size: 1.375rem; line-height: 1.45; }
    .post-content h2 { font-size: 1.1875rem; margin: 24px 0 10px; }
    .post-content h3 { font-size: 1.0625rem; }
    .post-content p,
    .post-content li { font-size: 0.9375rem; }
    .post-content blockquote { margin: 14px 0; padding: 10px 14px; }

    /* 正文里的宽表格：单独横向滚动，不撑破页面 */
    .post-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-content table th,
    .post-content table td {
        white-space: nowrap;
        font-size: 0.8125rem;
        padding: 6px 8px;
    }

    pre {
        padding: 12px;
        font-size: 0.78rem;
        border-radius: 6px;
    }

    /* 页头操作区：按钮换行 */
    .admin-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-head-right {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .lab-title { font-size: 1.25rem; }
    .design-actions { flex-wrap: wrap; }

    /* 测试中心页头 / 母版工具条 */
    .spec-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }

    .spec-bar .spacer { display: none; }

    /* 系列上下篇 */
    .series-nav {
        flex-direction: row;
        gap: 6px;
        margin-top: 20px;
    }

    /* 空状态 */
    .empty-tip { padding: 32px 0; }

    /* 弹窗 */
    .drawer {
        width: calc(100vw - 24px);
        max-height: 88vh;
        padding: 16px;
    }

    /* 表格通用：可横向滚动 */
    .data-table { font-size: 0.8125rem; }
    .data-table th,
    .data-table td { padding: 6px 8px; }

    /* 表单按钮 */
    .btn-primary,
    .btn-ghost { font-size: 0.875rem; }
}

@media (max-width: 480px) {
    .post-content { padding: 14px 12px; }
    .post-content h1 { font-size: 1.25rem; }
    .lab-title { font-size: 1.125rem; }
    .auth-card { padding: 20px; }
    .spec-bar input[type="search"] { width: 100%; }
    .zoom span { min-width: 32px; }
}


/* ---------- 手机端页头：标题居中 + 导航两行 ---------- */
@media (max-width: 900px) {
    .site-header .container {
        flex-direction: column;
        align-items: stretch;
        row-gap: 8px;
    }

    .site-title {
        width: 100%;
        text-align: center;
    }

    nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0 10px;
        padding: 0 12px;
        width: 100%;
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    /* 每项取自身宽度，剩余空间均分到间隔上，视觉间距一致 */
    nav > a,
    nav > .nav-more {
        flex: 0 0 auto;
    }

    nav a {
        margin-left: 0;
        text-align: center;
        font-size: 0.8125rem;
        line-height: 1.9;
        white-space: nowrap;
    }

    /* 手机端不显示搜索框和按钮 */
    .nav-search {
        display: none;
    }
}

@media (max-width: 380px) {
    nav {
        gap: 2px 12px;
    }

    nav a {
        font-size: 0.8125rem;
    }
}

/* ---------- 手机端文章页：隐藏目录与最新文章 ---------- */
@media (max-width: 768px) {
    /* 左侧系列导航（本来 <1200 就隐藏，这里再兜一层） */
    .post-nav { display: none; }

    /* 右侧栏整体不再展示：目录、最新文章在手机上价值低且占空间 */
    .container-post .sidebar { display: none; }

    /* 其它页面（首页/归档/标签）仍保留侧栏，只去掉最新文章 */
    .latest-posts-widget { display: none; }
}


/* ---------- 手机端：系列导航折叠面板 ---------- */
.series-mobile {
    display: none;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
}

.series-mobile summary {
    cursor: pointer;
    color: #334155;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.series-mobile summary::-webkit-details-marker { display: none; }

.series-mobile summary::after {
    content: "▾";
    color: #94a3b8;
    transition: transform 0.15s;
}

.series-mobile[open] summary::after { transform: rotate(180deg); }

.series-mobile-count {
    margin-left: auto;
    font-weight: 400;
    font-size: 0.75rem;
    color: #94a3b8;
}

.series-mobile ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid #f1f5f9;
}

.series-mobile li a {
    display: block;
    padding: 4px 0;
    color: #475569;
    line-height: 1.55;
    word-break: break-word;
}

.series-mobile li a.is-active {
    color: #2563eb;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .series-mobile { display: block; }
}

/* ---------- 手机端：上一篇 / 下一篇按钮收小 ---------- */
@media (max-width: 768px) {
    .series-nav {
        gap: 8px;
        margin-top: 18px;
        padding-top: 14px;
    }

    .series-nav-item {
        padding: 8px 10px;
        border-radius: 6px;
    }

    .series-nav-label {
        margin-bottom: 2px;
        font-size: 0.6875rem;
    }

    .series-nav-title {
        font-size: 0.8125rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .series-nav-item { padding: 6px 9px; }
    .series-nav-title { font-size: 0.75rem; }
}


/* ---------- 手机端：全部系列卡片加宽（几乎贴边） ---------- */
@media (max-width: 768px) {
    .container.container-plain {
        padding: 0 6px;
    }

    .container-plain .blog-layout {
        padding: 12px 0;
    }

    .container-plain .post-item {
        margin-bottom: 10px;
        border-radius: 6px;
    }
}

/* ---------- 手机端：内容区强制整宽，避免卡片只占一半 ---------- */
@media (max-width: 900px) {
    .blog-layout {
        display: block;
        padding: 16px 0;
    }

    .blog-layout > main,
    .blog-layout > aside,
    .post-detail,
    .post-list,
    .post-item,
    .series-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .blog-layout > aside {
        margin-top: 16px;
    }
}


/* ---------- 上一篇 / 下一篇：去掉标题后保持一行 ---------- */
.series-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.series-nav-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 10px 12px;
}

.series-nav-next { text-align: center; }

.series-nav-label {
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: #475569;
}

@media (max-width: 768px) {
    .series-nav {
        flex-direction: row;
        gap: 8px;
        margin-top: 18px;
        padding-top: 14px;
    }

    .series-nav-item { padding: 8px 10px; }
    .series-nav-label { font-size: 0.75rem; }
}

/* ---------- 上一篇 / 下一篇：强制同一行 ---------- */
.series-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
}

.series-nav .series-nav-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 9px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-nav .series-nav-item.is-empty {
    display: block;
    visibility: hidden;
}

.series-nav .series-nav-label {
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: #475569;
}

@media (max-width: 768px) {
    .series-nav { gap: 8px; margin-top: 18px; padding-top: 14px; }
    .series-nav .series-nav-label { font-size: 0.75rem; }
}


/* ---------- 标签云动效 ---------- */
.tag-cloud {
    gap: 9px;
}

.tag-cloud-item {
    /* 文章越多字号略大，1 篇最小、5 篇以上最大 */
    font-size: calc(0.75rem + min(var(--w, 1), 5) * 0.045rem);
    padding: calc(4px + min(var(--w, 1), 5) * 0.6px) 11px;
    transition: transform 0.14s ease-out, box-shadow 0.14s ease-out, filter 0.14s ease-out;
    animation: tag-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--i, 0) * 35ms);
    will-change: transform;
}

@keyframes tag-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.86);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 悬停：抬起 + 放大 + 彩色光晕 */
.tag-cloud-item:hover,
.tag-cloud-item:focus-visible {
    transform: translateY(0) scale(1.5);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    filter: brightness(1.05) saturate(1.2);
    z-index: 90;
    position: relative;
}

.tag-cloud-item:active {
    transform: translateY(0) scale(1.6);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .tag-cloud-item,
    .tag-cloud-item:nth-child(3n) {
        animation: none;
        transition: none;
    }

    .tag-cloud-item:hover { transform: none; }
}


/* ---------- 手机端：点按标签放大 ---------- */
.tag-cloud-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tag-cloud-item.is-zoomed {
    animation: none;
    transform: translateY(0) scale(1.5);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    filter: brightness(1.05) saturate(1.2);
    z-index: 90;
    position: relative;
}


/* ---------- 标签云：像云一样缓慢飘动 ---------- */
.tag-cloud-item {
    /* translate / rotate 与 hover 的 transform 互不干扰，可以同时生效 */
    animation:
        tag-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
        cloud-a 8s ease-in-out infinite alternate;
    animation-delay:
        calc(var(--i, 0) * 35ms),
        calc(var(--i, 0) * -0.85s);
}

/* 三条路线，按位置轮换，避免整片同步移动 */
@keyframes cloud-a {
    0%   { translate: 0 0;       rotate: 0deg; }
    33%  { translate: 5px -4px;  rotate: 0.8deg; }
    66%  { translate: -3px 3px;  rotate: -0.6deg; }
    100% { translate: 4px 2px;   rotate: 0.4deg; }
}

@keyframes cloud-b {
    0%   { translate: 0 0;       rotate: 0deg; }
    40%  { translate: -6px -3px; rotate: -0.9deg; }
    75%  { translate: 3px 4px;   rotate: 0.7deg; }
    100% { translate: -4px 1px;  rotate: -0.3deg; }
}

@keyframes cloud-c {
    0%   { translate: 0 0;       rotate: 0deg; }
    30%  { translate: 3px 5px;   rotate: 0.6deg; }
    65%  { translate: 6px -2px;  rotate: -0.8deg; }
    100% { translate: -2px -4px; rotate: 0.5deg; }
}

.tag-cloud-item:nth-child(3n+1) {
    animation-name: tag-pop, cloud-a;
    animation-duration: 0.4s, 8s;
}

.tag-cloud-item:nth-child(3n+2) {
    animation-name: tag-pop, cloud-b;
    animation-duration: 0.4s, 10.5s;
    animation-delay: calc(var(--i, 0) * 35ms), calc(var(--i, 0) * -1.15s);
}

.tag-cloud-item:nth-child(3n) {
    animation-name: tag-pop, cloud-c;
    animation-duration: 0.4s, 9s;
    animation-delay: calc(var(--i, 0) * 35ms), calc(var(--i, 0) * -0.55s);
}

/* 系统要求减少动效时停止飘动 */
@media (prefers-reduced-motion: reduce) {
    .tag-cloud-item,
    .tag-cloud-item:nth-child(3n+1),
    .tag-cloud-item:nth-child(3n+2),
    .tag-cloud-item:nth-child(3n) {
        animation: none;
    }
}


/* ---------- 标签页：标签云尺寸放大一倍 ---------- */
/* 密集排布 + 大小错落，看起来更像一团云 */
.tag-cloud.tag-cloud-lg {
    gap: 5px 8px;
    align-items: center;
    line-height: 1.4;
}

.tag-cloud-lg .tag-cloud-item {
    font-size: calc(0.8rem + min(var(--w, 1), 10) * 0.16rem);
}

/* 用相对定位上下错开，形成云一样的参差感（不影响飘动动画） */
.tag-cloud-lg .tag-cloud-item:nth-child(3n+1) { position: relative; top: 3px; }
.tag-cloud-lg .tag-cloud-item:nth-child(3n+2) { position: relative; top: -2px; }
.tag-cloud-lg .tag-cloud-item:nth-child(4n)   { position: relative; top: 1px; }
.tag-cloud-lg .tag-cloud-item:nth-child(5n)   { position: relative; top: -4px; }


/* ---------- 标签页：标签不加粗 ---------- */
.tag-cloud .tag-cloud-item {
    font-weight: 400;
    letter-spacing: 0;
    color: inherit;
}

.tag-cloud .tag-cloud-item:nth-child(6n+1) { color: #4338ca; }
.tag-cloud .tag-cloud-item:nth-child(6n+2) { color: #047857; }
.tag-cloud .tag-cloud-item:nth-child(6n+3) { color: #b45309; }
.tag-cloud .tag-cloud-item:nth-child(6n+4) { color: #be123c; }
.tag-cloud .tag-cloud-item:nth-child(6n+5) { color: #0369a1; }
.tag-cloud .tag-cloud-item:nth-child(6n+6) { color: #7e22ce; }




/* ---------- 标签页：经典词云 ---------- */
.tag-cloud-sky {
    position: relative;
    max-width: 900px;
    margin: 8px auto 0;
    min-height: 470px;
    background: none;
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

.tag-cloud-sky .tag-cloud {
    position: absolute;
    inset: 0;
    display: block;
    margin: 0;
    padding: 0;
}

/* 纯文字标签：无背景、无边框，靠字号和颜色形成层次 */
.tag-cloud-sky .tag-cloud-item {
    background: none !important;
    border-radius: 0;
    padding: 2px 6px;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
    box-shadow: none;
    animation: none;
    transition: transform 0.15s ease, color 0.15s ease;
}

.tag-cloud-sky .tag-cloud-item:hover,
.tag-cloud-sky .tag-cloud-item:focus-visible {
    transform: scale(1.15);
    filter: saturate(1.3);
    z-index: 999 !important;
}

@media (max-width: 640px) {
    .tag-cloud-sky {
        min-height: 52vh;
        display: flex;
        background: none;
        border: 0;
        margin-top: 4px;
    }

    /* 稍作散开：行列均匀铺满，四周留白 */
    .tag-cloud-sky .tag-cloud {
        position: static;
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        align-content: space-evenly;
        justify-content: center;
        gap: 9px 14px;
        padding: 6px 2px;
    }

    .tag-cloud-sky .tag-cloud-item {
        padding: 2px 3px;
        transform: none !important;
    }
}


/* ---------- 词云：缓慢飘动 ---------- */
.tag-cloud-sky .tag-cloud-item {
    animation: wc-drift-a 12s ease-in-out infinite alternate;
    animation-delay: calc(var(--i, 0) * -0.9s);
    will-change: translate;
}

@keyframes wc-drift-a {
    0%   { translate: 0 0; }
    50%  { translate: 6px -5px; }
    100% { translate: -5px 4px; }
}

@keyframes wc-drift-b {
    0%   { translate: 0 0; }
    45%  { translate: -7px -4px; }
    100% { translate: 5px 6px; }
}

@keyframes wc-drift-c {
    0%   { translate: 0 0; }
    40%  { translate: 4px 6px; }
    100% { translate: -6px -3px; }
}

.tag-cloud-sky .tag-cloud-item:nth-child(3n+1) {
    animation-name: wc-drift-a;
    animation-duration: 12s;
}

.tag-cloud-sky .tag-cloud-item:nth-child(3n+2) {
    animation-name: wc-drift-b;
    animation-duration: 15s;
    animation-delay: calc(var(--i, 0) * -1.3s);
}

.tag-cloud-sky .tag-cloud-item:nth-child(3n) {
    animation-name: wc-drift-c;
    animation-duration: 13.5s;
    animation-delay: calc(var(--i, 0) * -1.7s);
}

@media (prefers-reduced-motion: reduce) {
    .tag-cloud-sky .tag-cloud-item { animation: none; }
}

@media (max-width: 640px) {
    .tag-cloud-sky .tag-cloud-item { animation: none; }
}


/* ---------- 顶部菜单统一成「测试中心」的样式 ---------- */
.site-header nav a,
.site-header nav a.nav-strong {
    color: #000;
    font-weight: 700;
    font-size: 0.9375rem;
}

.site-header nav a:hover {
    color: #2563eb;
}

@media (max-width: 900px) {
    .site-header nav a {
        font-weight: 700;
        font-size: 0.875rem;
    }
}


/* ---------- 关于页：手机端不溢出 ---------- */
.about-body {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.about-body p,
.about-body li,
.about-body h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.about-body a {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.post-content {
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .about-body {
        font-size: 0.9375rem;
        line-height: 1.8;
    }

    .about-body h2 {
        font-size: 1.0625rem;
        margin: 20px 0 8px;
    }

    .about-body ul {
        padding-left: 18px;
    }

    .about-body li {
        margin-bottom: 6px;
    }
}


/* ---------- 卡片原地编辑 ---------- */
.lab-card.card-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: default;
}

.lab-card.card-edit input,
.lab-card.card-edit textarea {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
}

.lab-card.card-edit input:focus,
.lab-card.card-edit textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}


/* ---------- 卡片表单字段标签 ---------- */
.card-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: -4px;
}


/* ---------- 测试中心功能卡片里的补充文字 ---------- */
.lab-nav-more {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.7;
    color: #64748b;
}


/* ---------- 测试中心页头入口卡 ---------- */
.lab-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.lab-nav-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #111;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.lab-nav-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.lab-nav-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.lab-nav-desc {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #64748b;
}

.lab-nav-item.is-current {
    cursor: default;
    background: #f8fafc;
    border-style: dashed;
    border-color: #cbd5e1;
}

.lab-nav-item.is-current .lab-nav-title {
    color: #334155;
}

.lab-nav-item.is-current .lab-nav-desc {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .lab-nav {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .lab-nav-item {
        padding: 12px 14px;
    }

    .lab-nav-title {
        font-size: 1.0625rem;
    }

    .lab-nav-desc {
        font-size: 0.75rem;
    }
}


/* 入口卡及其内部文字一律不可选中 */
.lab-nav,
.lab-nav *,
.lab-nav-item,
.lab-nav-item *,
.lab-nav-title,
.lab-nav-desc,
.lab-nav-more {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none;
}


/* 入口卡：悬停只让标题变蓝，不加下划线、不选中文字 */
.lab-nav-item,
.lab-nav-item:hover,
.lab-nav-item:focus,
.lab-nav-title,
.lab-nav-desc,
.lab-nav-more {
    text-decoration: none !important;
}

a.lab-nav-item:hover .lab-nav-title {
    color: #2563eb;
}


/* ---------- 测试中心：分组与卡片排布 ---------- */
.lab-section {
    margin-bottom: 24px;
}

.lab-section-title {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

/* 入口卡：浅底 + 左侧色条，与下面的内容卡区分开 */
.lab-nav-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #c7d2fe;
}

.lab-nav-item.is-current {
    background: #f1f5f9;
    border-left-color: #cbd5e1;
    border-style: solid;
    border-color: #e2e8f0;
    border-left: 3px solid #cbd5e1;
}

.lab-nav-item.span-all {
    grid-column: 1 / -1;
}

/* 卡片上的 demo 角标 */
.card-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.6875rem;
    font-weight: 600;
    vertical-align: middle;
}

/* 账号卡 */
.card-account-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.card-account .btn-mini,
.card-account .btn-ghost {
    width: auto;
}

/* 添加卡片：虚线卡，点开才展开表单 */
.lab-card.card-new {
    border: 1px dashed #cbd5e1;
    background: #fbfcfe;
    box-shadow: none;
    padding: 16px 18px;
}

.lab-card.card-new summary {
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
    list-style: none;
}

.lab-card.card-new summary::-webkit-details-marker {
    display: none;
}

.lab-card.card-new[open] summary {
    margin-bottom: 10px;
    color: #111;
}

.lab-card.card-new form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lab-card.card-new input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
}

.lab-card.card-new input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

@media (max-width: 640px) {
    .lab-section { margin-bottom: 18px; }
    .lab-nav-item.span-all { grid-column: auto; }
}


/* ---------- UI 元素练习场 ---------- */
.uilab-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
    color: #475569;
}

.uilab-field input,
.uilab-field select,
.uilab-field textarea {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
}

.uilab-field input:focus,
.uilab-field select:focus,
.uilab-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.uilab-field input[type="range"] {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.uilab-field em {
    font-style: normal;
    font-size: 0.75rem;
    color: #64748b;
}

.uilab-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 10px 0;
    font-size: 0.8125rem;
    color: #475569;
}

.uilab-row label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.uilab-label {
    font-weight: 600;
    color: #334155;
}

.uilab-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.uilab-output {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
    max-height: 220px;
    overflow: auto;
}

.uilab-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 6px 0 0;
}

.uilab-msg {
    font-size: 0.875rem;
    color: #047857;
    min-height: 20px;
}

/* 弹层 */
.uilab-tooltip {
    position: relative;
    display: inline-block;
    padding: 4px 8px;
    border-bottom: 1px dashed #94a3b8;
    cursor: help;
}

.uilab-tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    bottom: 130%;
    padding: 5px 9px;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 20;
}

.uilab-menu {
    position: relative;
}

.uilab-menu-list {
    position: absolute;
    top: 110%;
    left: 0;
    z-index: 30;
    min-width: 120px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.uilab-menu-list a {
    display: block;
    padding: 6px 12px;
    font-size: 0.8125rem;
    color: #334155;
}

.uilab-menu-list a:hover {
    background: #f1f5f9;
}

/* 加载动画 */
.uilab-spinner {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.uilab-spinner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #93c5fd;
    animation: uilab-bounce 0.9s infinite ease-in-out;
}

.uilab-spinner-dot:nth-child(2) { animation-delay: 0.15s; }
.uilab-spinner-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes uilab-bounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.6; }
    40% { transform: scale(1); opacity: 1; }
}

/* 进度条 */
.uilab-progress {
    height: 8px;
    margin-top: 10px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.uilab-progress-bar {
    height: 100%;
    background: #2563eb;
    transition: width 0.12s linear;
}

/* 拖拽排序 */
.uilab-sortable {
    display: flex;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.uilab-sortable li {
    padding: 8px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8125rem;
    color: #334155;
    cursor: grab;
}

.uilab-sortable li.is-dragging {
    opacity: 0.5;
    border-style: solid;
    border-color: #93c5fd;
}

.uilab-reset {
    margin: 8px 0 32px;
    text-align: center;
}

@media (max-width: 640px) {
    .uilab-sortable { flex-direction: column; }
}


/* ---------- 轻提示 toast ---------- */
.ui-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    z-index: 10000;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 0.8125rem;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.ui-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ---------- 顶部登录状态按钮 ---------- */
.site-header nav a.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-header nav a.nav-user:hover {
    background: #e0e7ff;
    color: #3730a3;
}

@media (max-width: 900px) {
    .site-header nav a.nav-user {
        font-size: 0.75rem;
        padding: 2px 10px;
    }
}


/* ---------- 系列左栏：两级目录树 ---------- */
.nav-tree {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

.nav-tree-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 6px;
    color: #111;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.nav-tree-title::-webkit-details-marker { display: none; }

.nav-tree-title::before {
    content: "▾";
    margin-right: 2px;
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.nav-tree-branch:not([open]) > .nav-tree-title::before {
    transform: rotate(-90deg);
}

.nav-tree-title:hover {
    background: #f1f5f9;
}

.nav-tree-count {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 400;
    color: #94a3b8;
}

.nav-tree-children {
    list-style: none;
    margin: 2px 0 0;
    padding: 0 0 0 14px;
    border-left: 1px solid #e5e7eb;
}

.nav-tree-children li a {
    display: block;
    padding: 4px 6px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    color: #475569;
    line-height: 1.55;
    word-break: break-word;
}

.nav-tree-children li a:hover {
    color: #2563eb;
    background: #f8fafc;
}

.nav-tree-children li a.is-active {
    color: #2563eb;
    font-weight: 600;
    border-left-color: #2563eb;
    background: #eff6ff;
}


/* ---------- 三级目录树：二级分组 ---------- */
.nav-tree-subtitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    list-style: none;
}

.nav-tree-subtitle::-webkit-details-marker { display: none; }

.nav-tree-subtitle::before {
    content: "▾";
    margin-right: 2px;
    font-size: 9px;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.nav-tree-branch-sub:not([open]) > .nav-tree-subtitle::before {
    transform: rotate(-90deg);
}

.nav-tree-subtitle:hover {
    background: #f8fafc;
}

.nav-tree-leaves {
    list-style: none;
    margin: 1px 0 6px 10px;
    padding: 0 0 0 14px;
    border-left: 1px dashed #e2e8f0;
}

.nav-tree-leaves li a {
    padding-left: 6px;
}

.nav-tree-subgroup {
    margin-bottom: 2px;
    padding-left: 2px;
}


/* ---------- 三级树缩进（最终生效） ---------- */
.nav-tree-leaves {
    margin-left: 14px !important;
    padding-left: 16px !important;
}

.nav-tree-leaves > li > a {
    padding: 4px 6px 4px 8px !important;
    margin-left: 0 !important;
    position: relative;
}

.nav-tree-leaves > li > a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 6px;
    border-top: 1px dashed #cbd5e1;
}


/* ---------- 全部系列：卡片宽度与系列内文章一致 ---------- */
@media (min-width: 769px) {
    .container-plain .post-list {
        max-width: 790px;
        margin: 0 auto;
    }
}


/* ---------- 文章页左栏与正文顶部对齐 ---------- */
.post-nav {
    padding-top: 32px;
}

.post-nav-head {
    margin-top: 0;
}

@media (max-width: 1200px) {
    .post-nav { padding-top: 0; }
}


@media (max-width: 900px) {
    .site-header nav a.nav-icp {
        font-size: 0.625rem;
        padding: 1px 6px;
    }
}


/* ---------- 页脚固定：ICP 备案不随内容滚动 ---------- */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin-top: 0;
    padding: 7px 0;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
}

body {
    padding-bottom: 112px;
}

@media (max-width: 640px) {
    .site-footer {
        font-size: 0.6875rem;
        padding: 6px 0;
    }

    body { padding-bottom: 96px; }
}


/* ---------- 分页按钮文字居中 ---------- */
.pager-btn {
    text-align: center;
    line-height: 1.6;
}


/* ---------- 系列上一篇/下一篇：文字居中 ---------- */
.series-nav-item {
    text-align: center;
}

.series-nav-label {
    text-align: center;
}


/* ---------- 正文排版优化：行内代码 / 代码块 / 引用 / 表格 ---------- */
.post-content code:not(pre code) {
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
    color: #0f172a;
    white-space: nowrap;
}

.post-content pre {
    position: relative;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.7;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}

.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 999px;
}

.post-content pre code {
    background: none;
    border: 0;
    padding: 0;
    font-size: 0.8125rem;
    color: inherit;
    white-space: pre;
}

/* 复制按钮 */
.code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #cbd5e1;
    font-size: 0.6875rem;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.post-content pre:hover .code-copy,
.code-copy:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .code-copy { opacity: 1; }
}

.code-copy:hover {
    background: #1e293b;
    color: #fff;
}

/* 引用 */
.post-content blockquote {
    background: #f8fafc;
    border-left: 3px solid #93c5fd;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    color: #475569;
}

/* 表格 */
.post-content table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
}

.post-content table tbody tr:nth-child(even) {
    background: #fafbfc;
}


/* ---------- 系列详情：分页贴到内容底部 ---------- */
.container-series .post-list {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 260px);
}

.container-series .post-list > .pager {
    margin-top: auto;
    padding-top: 18px;
}

@media (max-width: 768px) {
    .container-series .post-list {
        min-height: calc(100vh - 220px);
    }
}


/* ---------- 全部系列：分页贴到内容底部 ---------- */
.container-plain .post-list {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 260px);
}

.container-plain .post-list > .pager {
    margin-top: auto;
    padding-top: 18px;
}

@media (max-width: 768px) {
    .container-plain .post-list {
        min-height: calc(100vh - 220px);
    }
}


/* ---------- 首页/搜索结果：分页贴到内容底部 ---------- */
.container-home .post-list {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 260px);
}

.container-home .post-list > .pager {
    margin-top: auto;
    padding-top: 18px;
}

@media (max-width: 768px) {
    .container-home .post-list {
        min-height: calc(100vh - 220px);
    }
}


/* ---------- 首页卡片略微收紧，保证分页在一屏内完整可见 ---------- */
.post-item {
    padding: 15px 20px;
    margin-bottom: 12px;
}

.post-item h2 {
    margin-bottom: 6px;
}

.post-item .post-meta {
    margin-bottom: 8px;
}

.post-item .post-excerpt {
    margin-bottom: 8px;
    line-height: 1.65;
}

.home-hero {
    padding: 18px 22px;
    margin-bottom: 18px;
}

.home-hero p {
    margin-bottom: 8px;
}

.container-home .post-list {
    min-height: calc(100vh - 320px);
}

.container-home .post-list > .pager {
    padding-top: 12px;
}


/* ---------- 首页标签云：查看更多 ---------- */
.tag-cloud-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #64748b;
}

.tag-cloud-more:hover {
    color: #2563eb;
}


/* ---------- 首页卡片略微加高，吃掉底部留白 ---------- */
.post-item {
    padding: 19px 22px;
    margin-bottom: 14px;
}

.post-item h2 {
    margin-bottom: 8px;
}

.post-item .post-meta {
    margin-bottom: 9px;
}

.post-item .post-excerpt {
    margin-bottom: 10px;
    line-height: 1.7;
}


/* ---------- 系列页：5 篇一页时压缩卡片高度 ---------- */
.container-series .post-item {
    padding: 16px 20px;
    margin-bottom: 12px;
}

.container-series .post-item h2 {
    margin-bottom: 6px;
}

.container-series .post-item .post-meta {
    margin-bottom: 7px;
}

.container-series .post-item .post-excerpt {
    margin-bottom: 7px;
    line-height: 1.6;
}

.container-series .post-list {
    min-height: calc(100vh - 300px);
}

.container-plain .post-list {
    min-height: calc(100vh - 300px);
}


/* ---------- 系列页：进一步压缩，5 条 + 分页一屏显示 ---------- */
.container-series .blog-layout,
.container-plain .blog-layout {
    padding: 20px 0;
}

.container-series .tag-heading,
.container-plain .tag-heading {
    margin-bottom: 12px;
    font-size: 1rem;
}

.container-series .post-item,
.container-plain .post-item {
    padding: 17px 20px;
    margin-bottom: 11px;
}

.container-series .post-item h2,
.container-plain .post-item h2 {
    margin-bottom: 6px;
    font-size: 1.0625rem;
}

.container-series .post-item .post-meta,
.container-plain .post-item .post-meta {
    margin-bottom: 7px;
    font-size: 0.8125rem;
}

.container-series .post-item .post-excerpt,
.container-plain .post-item .post-excerpt {
    margin-bottom: 7px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.container-series .post-item .read-more,
.container-plain .post-item .read-more {
    font-size: 0.8125rem;
}

.container-series .post-list,
.container-plain .post-list {
    min-height: calc(100vh - 250px);
}


/* ---------- 独立页面侧栏目录 ---------- */
.toc ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
    font-size: 0.8125rem;
    line-height: 1.9;
}

.toc ul ul {
    padding-left: 12px;
    font-size: 0.75rem;
}

.toc a {
    color: #475569;
}

.toc a:hover {
    color: #2563eb;
}


/* ---------- 正文列表缩进（全局 reset 去掉了默认内边距） ---------- */
.post-content ul,
.post-content ol {
    padding-left: 1.5em;
    margin: 8px 0 12px;
}

.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul {
    margin: 4px 0;
    padding-left: 1.3em;
}

.post-content li {
    margin-bottom: 4px;
    line-height: 1.75;
}


/* ---------- 导航「更多」下拉 ---------- */
.nav-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 20px;   /* 与其它菜单项一致的首行间距 */
}

.nav-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #000;
    cursor: pointer;
}

.nav-more-btn:hover {
    color: #2563eb;
}

.nav-caret {
    font-size: 0.625rem;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.nav-more:hover .nav-caret,
.nav-more.is-open .nav-caret {
    transform: rotate(180deg);
}

.nav-more-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, -4px);
    z-index: 60;
    min-width: 128px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.nav-more-panel a {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.nav-more-panel a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.nav-more:hover .nav-more-panel,
.nav-more:focus-within .nav-more-panel,
.nav-more.is-open .nav-more-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}




/* ---------- 正文四级小标题：字距放宽 ---------- */
.post-content h4 {
    margin: 20px 0 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.12em;
}


/* ---------- 正文表格铺满并等比拉伸 ---------- */
.post-content table {
    width: 100%;
    table-layout: fixed;
}

.post-content table th:first-child,
.post-content table td:first-child {
    width: 40%;
}

.post-content table th,
.post-content table td {
    white-space: normal;
    overflow-wrap: anywhere;
}


/* ---------- 正文表格：表头与数据统一居中 ---------- */
.post-content table th,
.post-content table td {
    text-align: center;
}


/* ---------- 构建历史 ---------- */
.build-hint {
    color: #94a3b8;
    font-size: 0.8125rem;
}

.build-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.build-badge.is-ok {
    background: #dcfce7;
    color: #15803d;
}

.build-badge.is-fail {
    background: #fee2e2;
    color: #b91c1c;
}

.build-badge.is-skip {
    background: #fef3c7;
    color: #b45309;
}



/* ---------- 手机端：登录状态按钮固定到页头右上角 ---------- */
@media (max-width: 900px) {
    .site-header nav a.nav-user {
        position: fixed;
        top: 6px;
        right: 8px;
        margin: 0;
        padding: 2px 10px;
        font-size: 0.6875rem;
        z-index: 80;
    }
}


/* ---------- 手机端：隐藏侧栏小部件（系列 / 统计 / 标签云） ---------- */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}


/* ---------- 手机端导航：保证一行放得下 5 个入口 ---------- */
@media (max-width: 900px) {
    .nav-more {
        /* 按钮没有链接的前后内边距，视觉上会贴着「标签云」，补一点左边距 */
        margin-left: 9px;
    }

    .nav-more-btn {
        white-space: nowrap;
        font-size: 0.875rem;
    }

    .nav-more-panel a {
        white-space: nowrap;
    }
}


/* ---------- 手机端：禁止横向溢出，子菜单白底不越界 ---------- */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }
}


/* ---------- 播放器文字按钮（歌单 / 顺序） ---------- */
.music-btn-text {
    width: auto;
    min-width: 56px;
    height: 32px;
    padding: 0 14px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.music-btn-text:hover {
    color: #92400e;
    background: #ffedd5;
}


/* ---------- 歌单按钮：紫色 ---------- */
.music-btn-list {
    color: #6d28d9;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.music-btn-list:hover {
    color: #5b21b6;
    background: #ede9fe;
}


/* ---------- 播放器关闭按钮 ---------- */
.global-music-player {
    position: fixed;
}

.music-player-inner {
    position: relative;
}

.music-btn-hide {
    position: absolute;
    top: 4px;
    right: 6px;
    padding: 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: #94a3b8;
    background: none;
    border: 0;
    z-index: 2;
}

.music-btn-hide:hover {
    color: #ef4444;
    background: #fef2f2;
}


/* ---------- 「显示播放器」独占一行，与首行首项左对齐 ---------- */
#nav-show-player {
    flex: 0 0 100%;
    width: 100%;
    text-align: left;
    /* 与其它菜单项的内边距一致，文字左边缘才能对齐 */
    padding-left: 12px;
}


/* ---------- 回到顶部 ---------- */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 92px;
    z-index: 70;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #475569;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: #2563eb;
    border-color: #bfdbfe;
}

/* ---------- 手机端：加大点击区域 ---------- */
@media (max-width: 768px) {
    .tag,
    .post-meta .tag {
        padding: 4px 9px;
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .pager a,
    .pager span,
    .pagination a,
    .pagination span {
        min-height: 36px;
        min-width: 36px;
        padding: 6px 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav a,
    .nav-more-btn {
        padding: 6px 2px;
    }

    .back-to-top {
        right: 12px;
        bottom: 86px;
        width: 44px;
        height: 44px;
    }
}





/* ---------- 播放器右上角收起按钮 ---------- */
.music-btn-collapse {
    position: absolute;
    top: 4px;
    right: 34px;
    padding: 0 6px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    color: #94a3b8;
    background: none;
    border: 0;
    z-index: 2;
}

.music-btn-collapse:hover {
    color: #b45309;
}


/* ---------- 音乐悬浮球 ---------- */
.music-ball {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #b45309;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.music-ball:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}

.music-ball.is-playing-area {
    color: #6d28d9;
}

/* 展开时出现在球的上方，右对齐，从右下角放大 */
.global-music-player {
    right: 20px;
    bottom: 84px;
    transform-origin: bottom right;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-music-player.is-collapsed {
    display: none;
}

.global-music-player:not(.is-open) {
    opacity: 0;
    transform: scale(0.92);
}

@media (max-width: 768px) {
    .music-ball {
        right: 12px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .global-music-player {
        right: 12px;
        bottom: 78px;
    }
}


/* ---------- 统一各页面容器宽度与左右留白，左边缘与站点标题对齐 ---------- */
.container,
.container-home,
.container-series,
.container-post,
.container-plain {
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}


/* ---------- 系列页：取消正文居中收窄，左边缘与其它页对齐 ---------- */
.container-plain .post-list {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* ---------- 系列页：卡片三列排布 ---------- */
.series-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.series-grid .series-item {
    margin: 0 !important;
    height: 100%;
}

@media (max-width: 900px) {
    .series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .series-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
}


/* ---------- 系列页：卡片紧贴标题下方 ---------- */
.container-plain .tag-heading {
    margin-bottom: 6px !important;
}

.container-plain .post-list > .series-item {
    margin-top: 0 !important;
}
