/*!
 * 留歌主题 文章页新排版 v1.5
 * 设计目标：完全独立于参考模板的视觉风格，使用现代化 hero banner + sticky 下划线 tab + 纵向商品卡 + 单列居中布局
 * v1.1：宽屏容器按断点智能扩展（1360/1520/1680），正文文字保持 760px 舒适行宽居中，图片/视频/卡片全宽展示
 * v1.3：宽屏容器按 viewport 铺满（保留 16-20px 小边距），充分利用大屏空间
 * v1.5：正文文字块取消 760px 限宽，与图片/视频统一为卡片全宽，左右边缘对齐
 * 作者：留歌
 * 作用域：仅文章单页 (body.single-post) 生效，不影响其他页面
 */

/* ====== 1. 整体容器：宽屏智能扩展，单列居中，去掉左右双栏 sidebar ====== */
/* 全局 .container 在宽屏最多 1280px，文章页尽量铺满但两侧各留约 100px，
   避开右侧固定悬浮坞（宽45px+距右40px），超宽屏封顶 1500px */
@media (min-width: 768px) {
    body.single-post .container.mt-2.mt-sm-4,
    body.single-post .archive-hero.post-hero > .container {
        max-width: min(1500px, calc(100vw - 200px));
    }
}

body.single-post .container.mt-2.mt-sm-4 > .row.g-2.g-md-3.g-lg-4 {
    display: block !important;
    max-width: 100%;
    margin: 0 auto;
}

body.single-post .content-wrapper[data-sticky-content] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

body.single-post .sidebar-wrapper[data-sticky] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 32px;
}

body.single-post .sidebar-wrapper .sidebar {
    display: grid;
    /* auto-fill 保留空轨道：小工具数量不足时卡片保持约 300px 舒适宽度靠左排列，
       避免 auto-fit 把少量卡片强行拉伸到 600+px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    justify-content: start;
    gap: 16px;
}

/* ====== 2. 主卡：透明无边框，让内部元素自然堆叠 ====== */
body.single-post .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* ====== 3. 标题区：渐变彩色 hero banner ====== */
body.single-post .article-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: #fff;
    border-radius: 20px;
    padding: 32px 28px !important;
    margin: 0 0 24px 0 !important;
    position: relative;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.25);
}

body.single-post .article-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 50%, rgba(255,255,255,0.18), transparent 45%),
        radial-gradient(circle at 82% 78%, rgba(255,255,255,0.12), transparent 45%);
    pointer-events: none;
}

body.single-post .article-header .post-title {
    color: #fff !important;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px !important;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

body.single-post .article-header .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    color: rgba(255,255,255,0.96) !important;
    font-size: 13px;
    position: relative;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-post .article-header .article-meta > span,
body.single-post .article-header .article-meta > li {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px !important;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff !important;
    list-style: none;
}

body.single-post .article-header .article-meta a {
    color: #fff !important;
    text-decoration: none;
}

body.single-post .article-header .article-meta a:hover {
    text-decoration: underline;
}

body.single-post .article-header .article-meta i {
    opacity: 0.9;
}

body.single-post .article-header .article-meta .meta-edit a {
    color: rgba(255,255,255,0.85) !important;
}

/* 前台访客无编辑权限时 meta-edit 为空胶囊，直接隐藏避免行尾出现空条 */
body.single-post .article-header .article-meta > .meta-edit:empty {
    display: none !important;
}

/* hero 内层 container 横向 padding 为 20px，与下方卡片 24px 偏移差 4px，
   桌面端补偿使渐变 banner 与内容卡片左右边缘对齐（需 !important 覆盖基础 margin） */
@media (min-width: 992px) {
    body.single-post .archive-hero.post-hero .article-header {
        margin-left: 4px !important;
        margin-right: 4px !important;
    }
}

/* 桌面端(≥992) hero banner 与卡片的 4px 对齐补偿见上方 margin 规则；
   移动端(<992)按断点的 container padding 对齐规则见第 4 节基础 container 规则之后 */

/* ====== 4. archive-hero 风格文章头部 ====== */
body.single-post .archive-hero.post-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 32px rgba(0,0,0,0.15);
}

body.single-post .archive-hero.post-hero .archive-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.42) saturate(1.1);
}

body.single-post .archive-hero.post-hero .container {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
    padding: 32px 20px !important;
}

/* 移动端按断点对齐 hero banner 与内容卡片（实测各断点 container+列 padding 之和）：
   <576：10+4=14；576-767：12+4=16；768-991：12+8=20（即基础值，无需覆盖）。
   必须位于上方基础规则之后（同为 !important 同特异性，后者生效） */
@media (max-width: 575.98px) {
    body.single-post .archive-hero.post-hero .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    body.single-post .archive-hero.post-hero .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

body.single-post .archive-hero.post-hero .post-title {
    color: #fff !important;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

body.single-post .archive-hero.post-hero .article-meta {
    color: rgba(255,255,255,0.96) !important;
    justify-content: center;
}

body.single-post .archive-hero.post-hero .article-meta > span {
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* ====== 5. 商品卡 archive-shop：纵向堆叠（不再 4/8 左右） ====== */
body.single-post .archive-shop {
    background: #fff;
    border-radius: 20px;
    padding: 24px !important;
    margin: 20px 0 !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
}

body.single-post .archive-shop .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

body.single-post .archive-shop .row > .col-lg-4,
body.single-post .archive-shop .row > .col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
}

body.single-post .archive-shop .img-box {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f1f5f9;
}

body.single-post .archive-shop .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.single-post .archive-shop .info-box {
    padding: 4px 0 !important;
}

body.single-post .archive-shop .info-box .article-meta {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 4px 16px;
    color: #475569;
    background: transparent !important;
    padding: 8px 0 !important;
    margin: 0 !important;
}

body.single-post .archive-shop .info-box .article-meta li {
    list-style: none;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
    color: #475569;
    background: transparent !important;
    border-radius: 0;
    display: block;
}

body.single-post .archive-shop .info-box .article-meta li:last-child {
    border-bottom: none;
}

/* ri-down-warp 包裹层：添加内边距圆角 */
body.single-post .archive-shop .ri-down-warp {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-radius: 14px;
    padding: 16px;
    margin-top: 16px !important;
}

/* ====== 6. 价格表 prices-info：横向卡片网格 ====== */
body.single-post .prices-info {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 0 !important;
    margin: 12px 0 !important;
    list-style: none;
}

body.single-post .prices-info .price-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e0e7ff;
    font-size: 13px;
    color: #475569;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    list-style: none;
}

body.single-post .prices-info .price-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99,102,241,0.18);
}

body.single-post .prices-info .price-item.vip {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    border-color: #fde68a;
    color: #92400e;
}

body.single-post .prices-info .price-item.boosvip {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #fbcfe8;
    color: #9d174d;
}

body.single-post .prices-info .price-item.no {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #e2e8f0;
    color: #334155;
}

/* ====== 7. 按钮组 buy-btns：圆角药丸 ====== */
body.single-post .buy-btns,
body.single-post .down-buy-warp .d-block.gap-2.mt-0 {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

body.single-post .buy-btns .btn,
body.single-post .down-buy-warp .btn-group {
    border-radius: 999px !important;
    padding: 10px 22px !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

body.single-post .buy-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ====== 8. TAB 导航：sticky 顶部 + 下划线 active（替换 nav-pills 圆角药丸） ====== */
body.single-post .single-content-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px 14px 0 0;
    margin: 24px 0 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

body.single-post .single-content-nav .nav.nav-pills {
    display: flex !important;
    gap: 0 !important;
    padding: 0 8px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

body.single-post .single-content-nav .nav.nav-pills::-webkit-scrollbar {
    height: 4px;
}

body.single-post .single-content-nav .nav.nav-pills::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

body.single-post .single-content-nav .nav.nav-pills .nav-item {
    margin: 0 !important;
    flex-shrink: 0;
}

body.single-post .single-content-nav .nav.nav-pills .nav-link {
    background: transparent !important;
    color: #64748b !important;
    border-radius: 0 !important;
    padding: 14px 20px !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

body.single-post .single-content-nav .nav.nav-pills .nav-link:hover {
    color: #6366f1 !important;
    background: transparent !important;
}

body.single-post .single-content-nav .nav.nav-pills .nav-link.active {
    color: #6366f1 !important;
    border-bottom-color: #6366f1;
    background: transparent !important;
}

/* 旧版下划线由 ::after 伪元素绘制（蓝色），统一覆盖为主题紫 */
body.single-post .single-content-nav .nav.nav-pills .nav-link:hover::after {
    background-color: rgba(99, 102, 241, 0.25) !important;
}

body.single-post .single-content-nav .nav.nav-pills .nav-link.active::after,
body.single-post .single-content-nav .nav.nav-pills .nav-link.active:hover::after {
    background-color: #6366f1 !important;
}

body.single-post .single-content-nav .nav.nav-pills .nav-link.active i,
body.single-post .single-content-nav .nav.nav-pills .nav-link:hover i {
    color: #6366f1 !important;
}

/* ====== 9. tab-content：白色卡片 ====== */
body.single-post .tab-content {
    background: #fff;
    border-radius: 0 0 14px 14px;
    padding: 24px 22px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

body.single-post .post-content {
    line-height: 1.85;
    font-size: 15px;
    color: #1e293b;
}

body.single-post .post-content p {
    margin-bottom: 1.2em;
}

body.single-post .post-content h2,
body.single-post .post-content h3,
body.single-post .post-content h4 {
    margin: 1.6em 0 0.8em;
    padding-left: 14px;
    border-left: 4px solid #6366f1;
    font-weight: 700;
    color: #1e293b;
}

body.single-post .post-content img {
    border-radius: 12px;
    margin: 16px 0;
}

body.single-post .post-content a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ====== 9.1 排版对齐：正文文字与媒体统一为卡片全宽，左右边缘对齐 ====== */
/* 文本块不再限宽居中，与图片/视频保持同一左右边缘 */

/* 仅含图片的段落全宽放行（经典编辑器常把独立图片包进 <p>，古腾堡宽/全宽对齐同样放行） */
body.single-post .post-content > p:has(> img:only-child),
body.single-post .post-content > p:has(> a:only-child > img:only-child),
body.single-post .post-content > *.alignwide,
body.single-post .post-content > *.alignfull {
    max-width: 100%;
}

/* 媒体与宽幅内容不溢出容器 */
body.single-post .post-content img {
    max-width: 100%;
    height: auto;
}

body.single-post .post-content video,
body.single-post .post-content iframe,
body.single-post .post-content embed,
body.single-post .post-content object,
body.single-post .post-content table,
body.single-post .post-content figure {
    max-width: 100%;
}

body.single-post .post-content video,
body.single-post .post-content iframe {
    width: 100%;
}

/* 版权卡片、标签、分享条、FAQ、评论区同样全宽，与正文/媒体对齐 */

/* 常见问题列表 list-group-numbered 美化（左 64px 为圆形序号留位，避免与标题重叠） */
body.single-post #pills-faq .list-group-item {
    border: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%) !important;
    margin-bottom: 8px;
    padding: 16px 18px 16px 64px !important;
    color: #1e293b;
}

/* FAQ 序号与主题紫统一 */
body.single-post #pills-faq .list-group-numbered > li::before {
    background-color: #eef0ff !important;
    color: #6366f1 !important;
}

body.single-post #pills-faq .list-group-numbered > li .fw-bold {
    color: #1e293b !important;
}

/* ====== 10. 媒体预览 archive-media-preview：大圆角 ====== */
body.single-post .archive-media-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    background: #000;
}

body.single-post .archive-media-preview .preview-text {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.single-post .archive-media-preview video,
body.single-post .archive-media-preview audio {
    width: 100%;
    border-radius: 16px;
    display: block;
}

/* ====== 11. 标签 entry-tags：chip 圆角 ====== */
body.single-post .entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    align-items: center;
}

body.single-post .entry-tags > i {
    color: #6366f1;
    margin-right: 4px;
}

body.single-post .entry-tags a {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

body.single-post .entry-tags a:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99,102,241,0.25);
}

/* ====== 12. entry-social：作者 + 操作按钮 ====== */
body.single-post .entry-social {
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
}

body.single-post .entry-social .row {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.single-post .entry-social .share-author {
    display: inline-flex;
    align-items: center;
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
}

body.single-post .entry-social .share-author:hover {
    color: #6366f1;
}

body.single-post .entry-social .avatar-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

body.single-post .entry-social .btn-soft,
body.single-post .entry-social .btn {
    border-radius: 999px !important;
    padding: 8px 16px !important;
    font-size: 13px;
    font-weight: 600;
}

/* ====== 13. 文章导航 entry-navigation：圆角卡片 ====== */
body.single-post .post-navigation,
body.single-post .navigation.post-navigation {
    margin: 24px 0 !important;
    padding: 18px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.single-post .post-navigation a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

body.single-post .post-navigation a:hover {
    text-decoration: underline;
}

/* ====== 14. 相关文章 entry-related-posts ====== */
body.single-post .related-posts,
body.single-post [class*="entry-related"] {
    margin-top: 32px;
}

/* ====== 15. 移动端适配 ====== */
@media (max-width: 768px) {
    body.single-post .article-header {
        padding: 24px 18px !important;
        border-radius: 16px;
    }

    body.single-post .archive-shop {
        padding: 16px !important;
    }

    body.single-post .archive-shop .info-box .article-meta {
        grid-template-columns: 1fr;
    }

    body.single-post .tab-content {
        padding: 18px 14px !important;
    }

    body.single-post .single-content-nav .nav.nav-pills .nav-link {
        padding: 12px 14px !important;
        font-size: 13px;
    }

    body.single-post .sidebar-wrapper .sidebar {
        grid-template-columns: 1fr;
    }

    body.single-post .prices-info {
        grid-template-columns: 1fr 1fr;
    }

    body.single-post .archive-hero.post-hero {
        min-height: 220px;
    }

    body.single-post .buy-btns .btn,
    body.single-post .down-buy-warp .btn-group {
        padding: 10px 18px !important;
        font-size: 13px;
    }

    body.single-post .entry-social .row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body.single-post .prices-info {
        grid-template-columns: 1fr;
    }

    body.single-post .article-header .post-title {
        font-size: 1.4rem;
    }
}

/* ====== 16. 暗色模式：阅读卡片与站点暗色主题统一（html[data-bs-theme="dark"]） ====== */
[data-bs-theme="dark"] body.single-post .single-content-nav {
    background: rgba(22, 26, 31, 0.92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link {
    color: #9aa4b2 !important;
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link.active {
    color: #a5b4fc !important;
    border-bottom-color: #818cf8;
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link.active::after {
    background-color: #818cf8 !important;
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link.active i,
[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link:hover i {
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] body.single-post .single-content-nav .nav.nav-pills .nav-link:hover::after {
    background-color: rgba(129, 140, 248, 0.25) !important;
}

/* 白色阅读卡 → 深色卡 */
[data-bs-theme="dark"] body.single-post .tab-content {
    background: #161a1f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] body.single-post .post-content {
    color: #d7dce4;
}

[data-bs-theme="dark"] body.single-post .post-content h2,
[data-bs-theme="dark"] body.single-post .post-content h3,
[data-bs-theme="dark"] body.single-post .post-content h4 {
    color: #f1f4fa;
}

[data-bs-theme="dark"] body.single-post .post-content a {
    color: #a5b4fc;
}

[data-bs-theme="dark"] body.single-post .post-content hr {
    border-top-color: rgba(255, 255, 255, 0.12);
}

/* FAQ 深色卡 */
[data-bs-theme="dark"] body.single-post #pills-faq .list-group-item {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #d7dce4;
}

[data-bs-theme="dark"] body.single-post #pills-faq .list-group-numbered > li::before {
    background-color: rgba(129, 140, 248, 0.18) !important;
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] body.single-post #pills-faq .list-group-numbered > li .fw-bold {
    color: #f1f4fa !important;
}

[data-bs-theme="dark"] body.single-post #pills-faq .list-group-numbered > li .text-muted {
    color: #9aa4b2 !important;
}

/* 商品/购买区深色 */
[data-bs-theme="dark"] body.single-post .archive-shop {
    background: #161a1f;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] body.single-post .archive-shop .ri-down-warp {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] body.single-post .buy-title {
    color: #e8ecf3;
}

[data-bs-theme="dark"] body.single-post .prices-info .price-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #c7cdd8;
}

[data-bs-theme="dark"] body.single-post .prices-info .price-item.vip {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

[data-bs-theme="dark"] body.single-post .prices-info .price-item.boosvip {
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.3);
    color: #f9a8d4;
}

[data-bs-theme="dark"] body.single-post .prices-info .price-item.no {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
    color: #9aa4b2;
}

/* 标签 / 分享 / 版权 / 上下篇：深色适配 */
[data-bs-theme="dark"] body.single-post .entry-tags a {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #c7cdd8;
}

[data-bs-theme="dark"] body.single-post .entry-tags a:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

[data-bs-theme="dark"] body.single-post .entry-tags > i {
    color: #a5b4fc;
}

[data-bs-theme="dark"] body.single-post .entry-social {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] body.single-post .entry-social .share-author {
    color: #e8ecf3;
}

[data-bs-theme="dark"] body.single-post .entry-copyright {
    background: rgba(255, 255, 255, 0.04);
    color: #9aa4b2;
}

[data-bs-theme="dark"] body.single-post .post-navigation,
[data-bs-theme="dark"] body.single-post .navigation.post-navigation {
    background: #161a1f;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* 评论区：深色融入阅读卡，去掉突兀的浅边框/黑块感 */
[data-bs-theme="dark"] body.single-post #comments.entry-comments {
    background: transparent;
    border: 0;
    padding: 8px 0 0;
}

[data-bs-theme="dark"] body.single-post #comments .comment-notes,
[data-bs-theme="dark"] body.single-post #comments .logged-in-as {
    color: #9aa4b2;
}

[data-bs-theme="dark"] body.single-post #comments input[type="text"],
[data-bs-theme="dark"] body.single-post #comments input[type="email"],
[data-bs-theme="dark"] body.single-post #comments input[type="url"],
[data-bs-theme="dark"] body.single-post #comments textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

[data-bs-theme="dark"] body.single-post #comments input:focus,
[data-bs-theme="dark"] body.single-post #comments textarea:focus {
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] body.single-post #comments input[type="submit"],
[data-bs-theme="dark"] body.single-post #comments #submit {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] body.single-post #comments input[type="submit"]:hover,
[data-bs-theme="dark"] body.single-post #comments #submit:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

/* ====== 17. 顶部下载条（下载按钮/下载地址迁移至内容区顶部） ====== */
body.single-post .single-top-down {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    margin: 0 0 20px;
    background: #fff;
    border: 1px solid #e8ecf5;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

body.single-post .single-top-down .std-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

body.single-post .single-top-down .std-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

body.single-post .single-top-down .std-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-right: auto;
}

body.single-post .single-top-down .std-prices .prices-info {
    margin: 0;
}

body.single-post .single-top-down .std-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

body.single-post .single-top-down .std-actions .btn {
    margin-top: 0 !important;
    white-space: nowrap;
}

body.single-post .single-top-down .buy-count {
    width: 100%;
    font-size: 12px;
    color: #94a3b8;
}

/* 下载入口已迁移至顶部，隐藏底部侧栏重复的购买小工具 */
body.single-post .sidebar-wrapper [class*="post-buy-widget"] {
    display: none !important;
}

/* 暗色模式 */
[data-bs-theme="dark"] body.single-post .single-top-down {
    background: #161a1f;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] body.single-post .single-top-down .std-title {
    color: #e8ecf3;
}

[data-bs-theme="dark"] body.single-post .single-top-down .buy-count {
    color: #7a8494;
}

/* 移动端：图标缩小，标题独占一行，按钮组横向铺满 */
@media (max-width: 767.98px) {
    body.single-post .single-top-down {
        padding: 14px 16px;
        gap: 12px;
        align-items: flex-start;
    }

    body.single-post .single-top-down .std-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
        border-radius: 10px;
    }

    body.single-post .single-top-down .std-title {
        width: 100%;
        margin-right: 0;
    }

    body.single-post .single-top-down .std-actions {
        width: 100%;
        margin-left: 0;
    }

    body.single-post .single-top-down .std-actions .btn,
    body.single-post .single-top-down .std-actions .btn-group {
        flex: 1 1 auto;
    }
}
