/* ==========================================================================
   justnews2 补充样式（重写版）
   原则：只补「原主题依赖 Swiper / 会员插件 JS 才能完成」的部分，
        其余布局交给原主题的 style.6.16.7.css，不重复覆盖。
   ========================================================================== */

/* ---------------------------------------------------------------- 幻灯
   原站用 Swiper 写入内联宽度和高度，这里用 flex + 固定高度顶替 */
.main-slider { overflow: hidden; }

.main-slider .swiper-wrapper {
    display: flex !important;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform .5s ease;
}

.main-slider .swiper-slide {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0;
    list-style: none;
}

.main-slider .swiper-slide img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.main-slider .swiper-pagination {
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: auto;
    width: auto;
}

.main-slider .swiper-pagination-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
}

.main-slider .swiper-pagination-bullet-active { background: #fff; }

.slider-wrap { align-items: flex-start !important; }

/* ---------------------------------------------------------------- 头部
   结构：logo 左 · 导航中 · [搜索 / 登录 / 注册 / 投稿] 贴右 */
@media (min-width: 992px) {

    .header .logo img {
        height: 32px !important;
        width: auto !important;
        max-width: 200px;
    }


    .header .primary-menu { height: 64px; }
    .header .navbar-nav { display: flex; align-items: center; height: 64px; }

    .header .navbar-search-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        cursor: pointer;
    }

    .header .j-user-wrap {
        display: flex !important;
        align-items: center;
    }

    .header .j-user-wrap .login {
        display: inline-flex !important;
        align-items: center;
        height: 14px;
        padding: 0 9px;
        font-size: 14px;
        line-height: 1;
        color: #333;
    }

    /* 登录 | 注册：用 1px 竖线分隔，避免伪元素文字被撑高 */
    .header .j-user-wrap .login + .login {
        position: relative;
        margin-left: 16px;
        padding-left: 0 !important;
    }
    .header .j-user-wrap .login + .login::before {
        content: "" !important;
        position: absolute;
        left: -8px;
        top: 50%;
        width: 1px;
        height: 12px;
        margin: 0;
        padding: 0;
        border: 0;
        background: #dcdcdc;
        transform: translateY(-50%);
    }

    .header .j-user-wrap .login:first-child {
        padding-left: 0;
    }

    .header .j-user-wrap .login:hover { color: #f56c6c; }

    .header .publish {
        display: inline-flex;
        align-items: center;
        height: 28px;
        padding: 0 12px 0 10px;
        margin-left: 4px;
    }
    .header .publish i { margin-right: 4px; }

    /* 桌面端幻灯锁 320 高（1024~1199 会被原主题切成上下堆叠） */
    .main-slider { height: 320px !important; }
    .main-slider .swiper-wrapper { display: flex !important; }
    .main-slider .swiper-slide { height: 320px !important; }
    .main-slider .swiper-slide img { width: 100% !important; height: 320px !important; object-fit: cover !important; }

    /* 列表卡片：缩略图 30%、16:10 裁切（与原站实测一致） */
    .post-loop-default .item { display: flex !important; align-items: stretch !important; }
    .post-loop-default .item-img { width: 30% !important; flex: 0 0 30% !important; height: auto !important; }
    .post-loop-default .item-img .item-img-inner { display: block; position: relative; overflow: hidden; }
    .post-loop-default .item-img .item-img-inner img {
        position: absolute !important;
        top: 0; left: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        background: #f2f4f7;
    }
    .post-loop-default .item-content { flex: 1 1 auto; min-width: 0; padding-left: 20px; }

    /* 搜索面板：点图标后在头部下方展开 */
    .header .navbar-search {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        z-index: 30;
        background: #fff;
        display: none;
    }

    .header .navbar-search.navbar-search-open { display: block; }
}

/* ---------------------------------------------------------------- 手机端 */
@media (max-width: 991px) {
    .main-slider,
    .main-slider .swiper-slide { height: 200px !important; }

    .main-slider .swiper-slide img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        display: block !important;
    }

    .main-slider .slide-title {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .header .logo img {
        height: 26px !important;
        width: auto !important;
        max-width: 140px;
    }
}

/* ---------------------------------------------------------------- 正文 */
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
}

.entry-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

.entry-content pre {
    max-width: 100%;
    overflow-x: auto;
}

/* ---------------------------------------------------------------- 侧栏猜你喜欢 */
.widget_lastest_products .thumb {
    display: block !important;
    position: relative !important;
    padding-top: 62.5% !important;
    overflow: hidden;
}

.widget_lastest_products .thumb img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* 首页翻页与上方列表留 20px（原站由 .post-loop 的 margin-bottom 提供） */
.tab-wrap > .pagination { margin-top: 20px; }

/* 文章页：相关推荐两列（原站 2×3） */
.entry-related-posts .entry-related { overflow: hidden; }
.entry-related-posts .entry-related .item {
    float: left !important;
    display: block !important;
    width: 50% !important;
    margin: 0 0 10px !important;
    padding-right: 16px;
}

/* 文章页：上一篇 / 下一篇 卡片配色（原站蓝底白字） */
.entry-page .entry-page-prev,
.entry-page .entry-page-next {
    background: #2f7fd1 !important;
    background-image: linear-gradient(135deg, #3d8fe0 0%, #2b6fb8 100%) !important;
    border-radius: 4px;
}
.entry-page .entry-page-prev a,
.entry-page .entry-page-next a,
.entry-page .entry-page-info { color: #fff !important; }
.entry-page .entry-page-prev,
.entry-page .entry-page-next { position: relative; min-height: 76px; }

/* 正文里的内链卡片（原 WP 嵌入块） */
.entry-content .jm-embed {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    padding: 10px 14px;
    background: #f7f9fc;
    border: 1px solid #e6edf6;
    border-left: 3px solid #2f7fd1;
    border-radius: 4px;
    color: #2f7fd1;
    font-size: 15px;
    transition: background .2s;
}
.entry-content .jm-embed:hover { background: #eef4fc; }
.entry-content .jm-embed .wi { flex: 0 0 auto; }

/* 正文折叠与「阅读剩余」按钮 */
.entry-content.is-collapsed {
    position: relative;
    overflow: hidden;
}
.entry-content.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 120px;
    background: linear-gradient(rgba(255,255,255,0), #fff 80%);
    pointer-events: none;
}
.jm-readmore {
    display: block;
    margin: 18px auto 24px;
    padding: 8px 26px;
    background: #fff;
    border: 1px solid #b9d3ee;
    border-radius: 20px;
    color: #2f7fd1;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.jm-readmore:hover { background: #eef4fc; border-color: #2f7fd1; }

/* 文章信息里的分类：逗号分隔，不要额外空隙 */
.entry-info .entry-cats a { margin: 0 !important; padding: 0 !important; letter-spacing: normal !important; }
.entry-info .entry-cats { display: inline; }

/* ---------- 手机端导航：自绘下拉面板 ---------- */
@media (max-width: 991px) {
    body > header.header { position: relative; z-index: 300; }

    /* 几何统一（开/关都生效），压掉原主题的抽屉式定位 */
    body > header.header .jm-nav-panel {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 100% !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 78vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        border: 0 !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
        transform: none !important;
        transition: none !important;
        float: none !important;
    }

    body > header.header .jm-nav-panel:not(.jm-open) { display: none !important; }
    body > header.header .jm-nav-panel.jm-open { display: block !important; }

    body > header.header .navbar-nav {
        display: block !important;
        float: none !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
    }

    body > header.header .navbar-nav > li {
        display: block !important;
        float: none !important;
        border-bottom: 1px solid #f2f3f5;
        width: 100% !important;
    }

    body > header.header .navbar-nav > li > a {
        display: block !important;
        padding: 13px 18px !important;
        font-size: 15px !important;
        color: #333 !important;
        background: #fff !important;
        line-height: 24px !important;
    }

    body > header.header .dropdown-menu {
        position: static !important;
        display: none !important;
        float: none !important;
        width: 100% !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #f8f9fb !important;
        padding: 4px 0 !important;
        margin: 0 !important;
    }

    body > header.header .menu-item.jm-sub-open > .dropdown-menu { display: block !important; }

    body > header.header .dropdown-menu > li > a {
        display: block !important;
        padding: 10px 18px 10px 32px !important;
        font-size: 14px !important;
        color: #555 !important;
        background: transparent !important;
    }

    body > header.header .navbar-nav .caret,
    body > header.header .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 6px;
        transition: transform .2s;
    }

    body > header.header .menu-item.jm-sub-open > a .caret,
    body > header.header .menu-item.jm-sub-open > a.dropdown-toggle::after {
        transform: rotate(180deg);
    }

    body > header.header .navbar-action {
        position: static !important;
        display: flex !important;
        align-items: center;
        gap: 16px;
        padding: 14px 18px !important;
        margin: 0 !important;
        border-top: 1px solid #f2f3f5;
        transform: none !important;
        height: auto !important;
    }

    body > header.header .navbar-search-icon { display: none !important; }
    body > header.header .j-user-wrap,
    body > header.header #j-user-wrap { display: flex !important; align-items: center; gap: 0; }

    body.jm-menu-open { overflow: hidden; }
}

/* ============================================================
   桌面端头部 v2（① 修复：单 flex 三段，取代 57/433 两块互斥规则）
   logo 与导航走文档流，操作区靠 margin-left:auto 顶右；
   导航 min-width:0 + overflow:hidden 只收缩不重叠；992~1239 有压缩带。
   ============================================================ */
@media (min-width: 992px) {
    .header .container {
        display: flex !important;
        align-items: center;
        height: 64px;
        position: relative;
    }
    .header .navbar-header {
        position: static !important;
        float: none !important;
        flex: 0 0 auto;
        margin: 0 !important;
        display: flex;
        align-items: center;
        height: 64px;
    }
    .header .logo img {
        height: 32px !important;
        width: auto !important;
        max-width: 200px;
    }
    .header .jm-nav-panel {
        position: static !important;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 0 0 16px !important;
        padding: 0 !important;
        height: 64px;
        display: flex !important;
        align-items: center;
        justify-content: flex-start !important;
        width: auto !important;
        background: transparent !important;
        overflow: visible;
    }
    .header .jm-nav-panel .primary-menu {
        min-width: 0;
        height: 64px;
        margin: 0 !important;
    }
    .header .jm-nav-panel .navbar-nav {
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        height: 64px;
        min-width: 0;
    }
    .header .navbar-action {
        position: static !important;
        transform: none !important;
        flex: 0 0 auto;
        margin: 0 0 0 auto !important;
        display: flex !important;
        align-items: center;
        gap: 12px;
        white-space: nowrap;
        width: auto !important;
        height: auto !important;
    }
    .header .navbar-action > * {
        position: static !important;
        flex: 0 0 auto !important;
    }
    .header .jm-menu-toggle { display: none !important; }
}

/* 992~1239 压缩带：菜单项与操作区间距收紧、投稿隐藏，防挤掉菜单尾项 */
@media (min-width: 992px) and (max-width: 1239px) {
    .header .navbar-nav > li > a { padding-left: 9px; padding-right: 9px; }
    .header .navbar-action { gap: 8px; }
    .header .navbar-action .publish { display: none !important; }
}

/* ④ 992~1239：容器按视口弹性放宽、侧栏收窄到 240（修复正文 602px 偏窄） */
@media (min-width: 992px) and (max-width: 1239px) {
    :root { --theme-sidebar-width: 240px; }
    .container { width: calc(100% - 30px); }
}


/* 手机端汉堡按钮（自绘，避免触发原主题把整页推到右边） */
@media (max-width: 991px) {
    body > header.header .jm-menu-toggle {
        position: absolute;
        right: 12px;
        top: 10px;
        width: 40px;
        height: 30px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        z-index: 1001;
    }
    body > header.header .jm-menu-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        margin: 5px auto;
        background: #333;
        border-radius: 2px;
        transition: transform .2s, opacity .2s;
    }
    body > header.header .jm-menu-toggle.jm-active .icon-bar-1 { transform: translateY(7px) rotate(45deg); }
    body > header.header .jm-menu-toggle.jm-active .icon-bar-2 { opacity: 0; }
    body > header.header .jm-menu-toggle.jm-active .icon-bar-3 { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 991px) {
    /* 面板里的登录/注册/投稿：原主题是白字，这里压回深色 */
    body > header.header .j-user-wrap .login,
    body > header.header #j-user-wrap .login {
        color: #333 !important;
        font-size: 14px !important;
        padding: 0 10px !important;
        height: auto !important;
        display: inline-block !important;
        line-height: 20px !important;
    }
    body > header.header .j-user-wrap .login:first-child { padding-left: 0 !important; }
    body > header.header .j-user-wrap .login + .login::before {
        content: "|" !important;
        color: #dcdfe6 !important;
        margin-right: 10px;
        font-size: 12px;
    }
    body > header.header .navbar-action .publish {
        display: inline-flex !important;
        align-items: center;
        height: 30px;
        color: #fff !important;
    }

    /* 面板里的搜索框 */
    body > header.header .navbar-search {
        position: static !important;
        display: block !important;
        background: #fff !important;
        padding: 12px 18px 16px !important;
        margin: 0 !important;
        border-top: 1px solid #f2f3f5;
    }
    body > header.header .navbar-search .navbar-search-inner { display: flex; align-items: center; gap: 8px; }
    body > header.header .navbar-search .navbar-search-input {
        flex: 1;
        height: 34px;
        border: 1px solid #dcdfe6;
        border-radius: 4px;
        padding: 0 10px;
        box-sizing: border-box;
    }
    body > header.header .navbar-search .navbar-search-btn { height: 34px; }
}

@media (max-width: 991px) {
    /* 投稿按钮在面板里要露出来 */
    body > header.header .navbar-action a.publish,
    body > header.header .jm-nav-panel .publish {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        height: 30px !important;
        line-height: 30px !important;
        padding: 0 12px !important;
        margin-left: auto !important;
        background: #2f7fd1 !important;
        color: #fff !important;
        border-radius: 3px !important;
        font-size: 13px !important;
    }
    body > header.header .jm-nav-panel .publish i { margin-right: 4px; }
}

/* 仅屏幕阅读器/搜索引擎可见 */
.jm-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 桌面端隐藏汉堡按钮（改类名后原主题的 display:none 不再生效） */
@media (min-width: 992px) {
    .header .jm-menu-toggle { display: none !important; }
}

/* 手机端菜单：半透明遮罩，点空白关闭（原来能透出下面的内容） */
@media (max-width: 991px) {
    .jm-menu-backdrop {
        position: fixed;
        left: 0; right: 0;
        top: 50px; bottom: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 998;
        display: none;
    }
    .jm-menu-backdrop.jm-show { display: block; }
}

/* 原主题 JS 会按侧栏高度给 #wrap 写 min-height，导致正文下方出现大片空白 */
#wrap { min-height: 0 !important; }

/* mega 面板：导航项缺 menu-item-style（main.js 按该类算列宽），退化为窄列时给最小宽 */
@media (min-width: 992px) {
    .jm-nav-panel .dropdown-menu { min-width: 280px; }
}

/* PATCH-APPLIED-20261105 */
/* ============================================================
   jm-fix.css 追加补丁   2026-11-05
   用法：整段粘贴到 /usr/themes/justnews2/jm-fix.css 文件末尾并保存。
         jm_asset() 会让 ?v= 自动跳变，访客即时生效，无需清缓存。
   回滚：删除本段即可（纯追加，未改动任何既有规则）。
   诊断依据见同目录 imjx前台三处错位诊断与补丁.md
   ============================================================ */


/* ------------------------------------------------------------
   P1  文章页「上一篇 / 下一篇」深色卡片压住作者头像行
   根因（两处叠加）：
     ① body 带 el-boxed，主题 .el-boxed .entry-bar{margin:30px -20px -20px}
        的负底边距把后续内容整体上拽 20px；
     ② 卡片沿用主题「带背景图」时代的 padding:60px 15px 10px，
        jm-fix 改纯色渐变后这 60px 顶部留白已无意义，卡片被撑高、盖住头像。
   ------------------------------------------------------------ */
.el-boxed .entry-bar { margin-bottom: 0 !important; }

.single .entry-page { margin-top: 30px; }

.single .entry-page .entry-page-prev,
.single .entry-page .entry-page-next {
  padding: 14px 16px !important;   /* 覆盖主题的 60px 15px 10px */
  min-height: 0 !important;
}

.single .entry-page .entry-page-prev a,
.single .entry-page .entry-page-next a { padding: 0; }

.single .entry-page .entry-page-prev a span,
.single .entry-page .entry-page-next a span {
  height: auto;
  padding: 0 0 6px;
  line-height: 20px;
  -webkit-line-clamp: 2;
}

.single .entry-page .entry-page-info { position: relative; }


/* ------------------------------------------------------------
   P2  评论表单：标签与输入框错位、输入框只有约 150px 宽
   根因：Typecho 模板输出 <p class="comment-form-item">，
         而主题样式只认 .comment-form-author / -email / -url
         （实测 style.css 与 jm-fix.css 中 comment-form-item 命中均为 0）。
         整套「label 绝对定位 + 三列 float」一条都没应用，
         input / textarea 退化为浏览器默认尺寸。
   修法：按模板真实类名补一套 flex 表单样式。
   ------------------------------------------------------------ */
.comment-respond .comment-form { padding: 6px 15px 15px; }

.comment-respond .comment-form-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
}

.comment-respond .comment-form-item > label {
  flex: 0 0 62px;
  line-height: 34px;
  text-align: right;
  font-weight: 400;
  color: var(--theme-gray-color, #999);
}

.comment-respond .comment-form-item > input,
.comment-respond .comment-form-item > textarea {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
  line-height: 22px;
  padding: 7px 12px;
  border: 1px solid var(--theme-line-color, #e6e6e6);
  border-radius: 4px;
  background: #fff;
  color: var(--theme-black-color, #333);
  outline: 0;
}

.comment-respond .comment-form-item > input:focus,
.comment-respond .comment-form-item > textarea:focus {
  border-color: var(--theme-color, #2f7fd1);
}

.comment-respond .comment-form-item > textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-respond .form-submit {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

@media (max-width: 767px) {   /* 移动端：标签移到输入框上方 */
  .comment-respond .comment-form-item { flex-wrap: wrap; gap: 4px; }
  .comment-respond .comment-form-item > label {
    flex: 0 0 100%; line-height: 20px; text-align: left;
  }
}


/* ------------------------------------------------------------
   P3  桌面端搜索条浮在面包屑上方（红框处）
   根因：jm-fix 用 .navbar-search-open 控制显隐，但 jm-fix.js 全文
         没有任何切换该类的代码；真正的显隐由主题 main.js 完成——
         它给 body 加 is-search，并用 jQuery 写内联 display:inline-block。
         于是主题的「360px 居中 + inline」与 jm-fix 的 top:64px 定位混搭，
         搜索条浮在 header 下沿、压在面包屑之上。
   修法：用 body.is-search 接管显隐（!important 可压过内联样式），
         面板做成整幅下拉、输入框撑满。
   ------------------------------------------------------------ */
@media (min-width: 992px) {
  body > header.header .navbar-search {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 12px 0 16px !important;
    margin: 0 !important;
    border-top: 1px solid #f2f3f5;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
    z-index: 40;
  }

  body.is-search > header.header .navbar-search,
  body > header.header .navbar-search.navbar-search-open {
    display: block !important;
  }

  body > header.header .navbar-search .navbar-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(720px, 92%);
    margin: 0 auto;
    position: static;
  }

  body > header.header .navbar-search .navbar-search-input {
    flex: 1 1 auto;
    width: auto;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: #333 !important;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    display: block;
  }

  body > header.header .navbar-search .navbar-search-close {
    display: inline-block !important;
    width: 26px;
    line-height: 26px;
    text-align: center;
  }

  body > header.header .navbar-search .navbar-search-btn {
    position: static;
    height: 36px;
    line-height: 36px;
    padding: 0 4px;
  }

  /* 原主题在搜索态会隐藏主菜单，头部瞬间空掉，这里保留 */
  body.is-search > header.header .primary-menu { display: block !important; }
  body.is-search > header.header .navbar-nav   { display: flex !important; }
}

/* ------------------------------------------------------------
   P6  首屏轮播区左右底部不对齐（浏览器实测 2026-11-05：
       左 main-slider 320px，右 feature-post 两卡合计约 200px，右下留空）
   根因：主题 style.css 桌面规则 .feature-post li{height:153px} 与
         媒体查询里的 li{height:auto}、img{height:auto} 相互打架，
         当前断点命中的是 auto 那组；jm-fix 只锁了 main-slider 高度，
         没有管右侧列。
   修法：桌面端把 .slider-wrap 改成 stretch 对齐，
         右侧 ul.feature-post 用 flex column 两卡各占一半，图 cover 填满。
         （总高自动等于左侧 320px：每卡 (320−14)/2 = 153px，与主题原设计一致）
   ------------------------------------------------------------ */
@media (min-width: 992px) {
  .slider-wrap { align-items: stretch !important; }

  .slider-wrap .feature-post {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    align-self: stretch;
  }

  .slider-wrap .feature-post li {
    flex: 1 1 50%;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
  }
  .slider-wrap .feature-post li + li { margin-top: 14px; }

  .slider-wrap .feature-post li a { height: 100%; }

  .slider-wrap .feature-post li img {
    height: 100% !important;
    object-fit: cover;
  }
}

/* ------------------------------------------------------------
   P7  列表缩略图源图纵横比不一（实测首页列表源图 935x136 ~ 689x427）
       → 卡片灰边参差 + 加载位移（CLS）
   根因：第 2 批的 contain 止血方案让 img 绝对定位撑满容器，
         但容器（.item-img-inner）本身没有统一高度基准；
         整改删掉写死的 480x300 后 img 也无尺寸属性 → CLS。
   修法：给容器统一 16:10 纵横比（与"②源图重生成"同一目标，CSS 先行）。
   ------------------------------------------------------------ */
.post-loop .item-img .item-img-inner { aspect-ratio: 16 / 10; }

/* ------------------------------------------------------------
   P8  mega 面板五列布局塌成单列（浏览器实测：9 项垂直单列排）
   根因：面板 ul 带 menu-item-wrap menu-item-col-5 类，原主题靠
         menu-item-style + main.js 计算列宽；导航缺 menu-item-style，
         JS 不算列宽，列类就是摆设。jm-fix 的面板规则把 li 排成
         单列 list 样式（padding-left:32px 是给二级菜单的）。
   修法：面板内一级 li 用 grid 五列；二级（如果以后出现）仍走单列。
   ------------------------------------------------------------ */
@media (min-width: 992px) {
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap {
    display: none;   /* 默认仍隐藏；展开状态由 P4 的 hover 规则覆盖 */
  }
  body > header.header .jm-nav-panel .menu-item.dropdown:hover > .dropdown-menu.menu-item-wrap,
  body > header.header .jm-nav-panel .menu-item.jm-sub-open > .dropdown-menu.menu-item-wrap {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 10px 14px !important;
    left: 0 !important; right: 0 !important;
  }
  /* 面板内一级条目回到正常菜单样式（覆盖二级菜单专用的 32px 缩进） */
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap > li > a {
    padding: 9px 12px !important;
    font-size: 13px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* ------------------------------------------------------------
   P4  导航 mega 下拉面板宽度锁死在 ~130px（浏览器实测 129.51 × 351.91）
   根因（三条叠加）：
     ① jm-fix 写了 body > header.header .dropdown-menu{width:100% !important}，
        父级是约 130px 宽的 li.menu-item，100% 就等于 130px；
     ② 后补的 .jm-nav-panel .dropdown-menu{min-width:280px} 无 !important、
        特异性也更低，压不住 ①，所以昨晚那行等于没生效；
     ③ 主题给 li.dropdown 设了 position:relative，绝对定位子元素仍会
        以 130px 的 li 为包含块，逃不出去。
   修法：解除 li 定位，让面板以整幅的 .jm-nav-panel 为包含块；
         并补 hover 显隐兜底（jm-fix 的 display:none !important 会压掉
         主题基于 opacity/visibility 的 hover 展开）。
   ------------------------------------------------------------ */
@media (min-width: 992px) {
  body > header.header .jm-nav-panel .menu-item.dropdown {
    position: static !important;
  }

  body > header.header .jm-nav-panel .dropdown-menu {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    border-radius: 0 0 6px 6px;
    z-index: 45;
  }

  /* hover 展开兜底：兼容主题的 opacity/visibility 过渡 */
  body > header.header .jm-nav-panel .menu-item.dropdown:hover > .dropdown-menu,
  body > header.header .jm-nav-panel .menu-item.jm-sub-open > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}


/* PATCH2-APPLIED-20261106 */
/* ============================================================
   追加补丁第二轮 2026-11-06（纯追加，可整段删除回滚）
   P9  文章页作者栏：孤立竖线清除、行高压实
   P10 上一篇/下一篇：卡片加高、标题与标签拉开
   P11 相关推荐：行距压缩
   P12 导航会员区：登录/注册/开通会员折叠进皇冠图标下拉
   ============================================================ */

/* ---- P9 作者栏 ---- */
.entry-bar { height: auto !important; min-height: 44px; margin: 24px 0 6px !important; }
.entry-bar-inner { padding: 6px 0 !important; align-items: center; }
.entry-bar .info-item::before { display: none !important; }
.entry-bar .meta-item + .meta-item { margin-left: 22px !important; position: relative; }
.entry-bar .meta-item + .meta-item::before {
  content: ""; position: absolute; left: -11px; top: 50%;
  width: 1px; height: 12px; background: #e0e0e0; transform: translateY(-50%);
}

/* ---- P10 上一篇 / 下一篇 ---- */
.single .entry-page .entry-page-prev,
.single .entry-page .entry-page-next {
  padding: 16px 18px 14px !important;
  min-height: 82px !important;
  display: flex !important; flex-direction: column !important; justify-content: center !important;
}
.single .entry-page .entry-page-prev a,
.single .entry-page .entry-page-next a {
  position: static !important; width: auto !important; height: auto !important;
}
.single .entry-page .entry-page-prev a span,
.single .entry-page .entry-page-next a span {
  padding: 0 0 10px !important; line-height: 22px !important; font-size: 15px !important;
}
.single .entry-page .entry-page-info { font-size: 13px !important; opacity: .85; }

/* ---- P11 相关推荐行距 ---- */
.entry-related-posts .entry-related .item { margin: 0 !important; padding: 9px 0 !important; }
.entry-related-posts .entry-related .item a { line-height: 22px; }

/* ---- P12 会员折叠（选择器统一带 body>header.header 前缀，压过旧的 .login 规则）---- */
@media (min-width: 992px) {
  body > header.header .jm-member-wrap { position: relative; }
  body > header.header .jm-member-toggle {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; color: #e6a23c; cursor: pointer;
  }
  body > header.header .jm-member-toggle .wi svg { width: 20px; height: 20px; fill: currentColor; }
  body > header.header .jm-member-toggle:hover { background: #fdf6ec; }
  body > header.header .jm-member-menu {
    display: none; position: absolute; right: 0; top: 100%; z-index: 60;
    background: #fff; border: 1px solid #eee; border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,.10); padding: 6px 0; min-width: 148px;
  }
  body > header.header .jm-member-menu .login {
    display: block !important; padding: 9px 16px !important; font-size: 14px !important;
    line-height: 1.5 !important; color: #333 !important; white-space: nowrap; height: auto !important;
    margin-left: 0 !important; background: #fff;
  }
  body > header.header .jm-member-menu .login:hover { background: #f5f7fa; color: #2f7fd1 !important; }
  body > header.header .jm-member-menu .login + .login { margin-left: 0 !important; padding-left: 16px !important; }
  body > header.header .jm-member-menu .login + .login::before { display: none !important; content: none !important; }
  body > header.header .jm-member-menu .login:first-child { padding-left: 16px !important; }
  body > header.header .jm-member-wrap:hover .jm-member-menu,
  body > header.header .jm-member-wrap.jm-member-open .jm-member-menu { display: block; }
}
@media (max-width: 991px) {
  body > header.header .jm-member-toggle { display: none !important; }
  body > header.header .jm-member-menu { display: inline-flex !important; }
}
/* PATCH3-APPLIED-20261106 */
/* ============================================================
   追加补丁第三轮 2026-11-06：P9.1 作者栏紧凑化（纯追加，可整段删除回滚）
   根因：主题 .entry-bar .entry-bar-info{display:flex;justify-content:
         space-between;width:100%} 把两个 meta 项推到容器两端，
         头像/名字在最左、368/0 在最右，中间巨大空白 → 观感散架。
   修法：整行左聚拢——头像+名字+阅读+评论依次排列，项间 1px 短竖线。
   ============================================================ */
.single .entry-bar { margin: 22px 0 4px !important; height: auto !important; }

.single .entry-bar-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 8px 0 !important;
}

.single .entry-bar-author {
  display: flex !important;
  align-items: center;
  margin-right: 30px;
}
.single .entry-bar-author img {
  width: 36px !important; height: 36px !important;
  border-radius: 50%; margin-right: 8px; display: block;
}
.single .entry-bar-author .author-name {
  font-size: 14px; line-height: 1.4; color: #2f7fd1;
}

.single .entry-bar-info {
  display: flex !important;
  width: auto !important;
  margin-left: 0 !important;
  justify-content: flex-start !important;
  align-items: center;
}
.single .entry-bar-info .info-item {
  display: inline-flex !important;
  align-items: center;
  margin: 0 0 0 26px !important;
  padding: 0 !important;
  position: relative;
  color: #999 !important;
  font-size: 13px;
  line-height: 20px;
}
.single .entry-bar-info .info-item:first-child { margin-left: 0 !important; }
.single .entry-bar-info .info-item::before {
  content: "" !important;
  display: block !important;
  position: absolute; left: -13px; top: 50%;
  width: 1px; height: 12px; background: #e3e3e3;
  transform: translateY(-50%);
}
.single .entry-bar-info .info-item:first-child::before { display: none !important; }
.single .entry-bar-info .info-item .wi { font-size: 15px; margin-right: 5px; color: #b8b8b8; }
.single .entry-bar-info .info-item .data { color: #999; }

/* 作者栏与上下页卡片间距 */
.single .entry-page { margin-top: 22px !important; }

/* PATCH4-APPLIED-20261106 */
/* ============================================================
   追加补丁第四轮 2026-11-06（纯追加，可整段删除回滚）
   P13 会员下拉：竖线残留清除（全局生效，不限桌面断点）
        旧规则 .header .j-user-wrap .login + .login::before 画 1px 灰竖线，
        菜单里的 .login 仍是 .j-user-wrap 后代，窄视口下 P12 的桌面块
        清除规则不生效 → 竖线残留。此处在所有断点统一清除。
   P14 会员图标：皇冠换为用户人像图标后的配色修正（去金色底，用主题蓝）
   ============================================================ */

/* ---- P13 菜单内彻底清除分隔竖线（全局） ---- */
body > header.header .jm-member-menu .login + .login {
  position: static !important;
  margin-left: 0 !important;
  padding-left: 16px !important;
}
body > header.header .jm-member-menu .login + .login::before,
body > header.header .jm-member-menu .login + .login::after {
  content: none !important;
  display: none !important;
}

/* ---- P14 人像图标配色：与搜索图标同风格 ---- */
body > header.header .jm-member-toggle {
  color: #555 !important;
  background: transparent !important;
}
body > header.header .jm-member-toggle:hover {
  color: #2f7fd1 !important;
  background: #f2f6fc !important;
}
body > header.header .jm-member-wrap.jm-member-open .jm-member-toggle {
  color: #2f7fd1 !important;
}

/* PATCH5-APPLIED-20261106 */
/* ============================================================
   追加补丁第五轮 2026-11-06（纯追加，可整段删除回滚）
   P15 会员折叠区残留竖线：核弹级清除
        折叠区（图标+下拉菜单）内所有元素的 ::before/::after
        一律禁用——该区域不存在任何需要保留的伪元素装饰，
        主题旧规则（1px 灰线 / "|" 字符）无论来自哪条选择器都被压掉。
   ============================================================ */
body > header.header .jm-member-wrap::before,
body > header.header .jm-member-wrap::after,
body > header.header .jm-member-wrap .jm-member-toggle::before,
body > header.header .jm-member-wrap .jm-member-toggle::after,
body > header.header .jm-member-wrap .jm-member-menu::before,
body > header.header .jm-member-wrap .jm-member-menu::after,
body > header.header .jm-member-wrap .jm-member-menu *::before,
body > header.header .jm-member-wrap .jm-member-menu *::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* PATCH6-APPLIED-20261106 */
/* ============================================================
   追加补丁第六轮 2026-11-06（纯追加，可整段删除回滚）
   P16 评论表单重排：彻底改为原站风格
   - 称呼/邮箱/网址 三列并排一行；内容 textarea 整行
   - label 移到输入框上方（小字灰色），不再左侧占位
   - 输入框撑满所在列，行距收紧，提交按钮右对齐
   - 覆盖 P2 的 flex 同行方案（本段特异性更高且位于文件末尾）
   ============================================================ */
.comment-respond form.comment-form .comment-form-item {
  display: block;
  margin: 0 0 16px;
  padding: 0;
}
.comment-respond form.comment-form .comment-form-item:nth-of-type(-n+3) {
  display: inline-block;
  vertical-align: top;
  width: 32%;
  margin-right: 2%;
  box-sizing: border-box;
}
.comment-respond form.comment-form .comment-form-item:nth-of-type(3) { margin-right: 0; }
.comment-respond form.comment-form .comment-form-item label {
  display: block;
  width: auto;
  flex: none;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: #8a8f99;
  margin: 0 0 6px;
}
.comment-respond form.comment-form .comment-form-item input[type="text"],
.comment-respond form.comment-form .comment-form-item input[type="email"],
.comment-respond form.comment-form .comment-form-item input[type="url"] {
  display: block;
  width: 100% !important;
  height: 38px;
  padding: 6px 12px;
  box-sizing: border-box;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}
.comment-respond form.comment-form .comment-form-item textarea {
  display: block;
  width: 100% !important;
  height: 140px;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  resize: vertical;
}
.comment-respond form.comment-form .comment-form-item input:focus,
.comment-respond form.comment-form .comment-form-item textarea:focus {
  border-color: #2f7fd1;
  outline: none;
}
.comment-respond form.comment-form { padding: 20px 20px 16px; }
.comment-respond form.comment-form .form-submit {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  text-align: right;
  overflow: visible;
}
.comment-respond form.comment-form .form-submit .submit {
  float: none;
  display: inline-block;
  margin: 0;
}
/* 移动端退回单列 */
@media (max-width: 991px) {
  .comment-respond form.comment-form .comment-form-item:nth-of-type(-n+3) {
    display: block;
    width: 100%;
    margin-right: 0;
  }
}

/* PATCH7-APPLIED-20261106 */
/* ============================================================
   追加补丁第七轮 2026-11-06（纯追加，可整段删除回滚）
   P17 评论表单三列并排修正
   根因：P16 用 inline-block 排三列，元素间换行符空白(~4px)叠加
   32%*3+2%*2=100% 后超出容器，第三个(网址)被挤到第二行(2+1)。
   修正：改用 float 布局（不吃空白字符），内容行 clear:both；
   移动端退回单列。
   ============================================================ */
.comment-respond form.comment-form .comment-form-item:nth-of-type(-n+3) {
  display: block;
  float: left;
  width: 32%;
  margin-right: 2%;
}
.comment-respond form.comment-form .comment-form-item:nth-of-type(3) {
  margin-right: 0;
}
.comment-respond form.comment-form .comment-form-item:nth-of-type(4) {
  clear: both;
}
.comment-respond form.comment-form .form-submit {
  clear: both;
}
@media (max-width: 991px) {
  .comment-respond form.comment-form .comment-form-item:nth-of-type(-n+3) {
    float: none;
    width: 100%;
    margin-right: 0;
  }
  .comment-respond form.comment-form .comment-form-item:nth-of-type(4) { clear: none; }
}
/* PATCH8-APPLIED-20261108 */
/* ============================================================
   追加补丁第八轮 2026-11-08（纯追加，可整段删除回滚）
   P18 导航下拉恢复经典竖向下拉（撤销 P4 横向铺满 + P8 五列网格）
   目标：子菜单挂在菜单项正下方、单列竖排，不再横向铺开，避免与页面内容重叠。
   本段与 P4/P8 同处 @media (min-width:992px)，选择器特异性相同，靠"后出现者胜"覆盖。
   ============================================================ */
@media (min-width: 992px) {
  /* 菜单项重新成为定位父级，下拉以它为基准 */
  body > header.header .jm-nav-panel .menu-item.dropdown {
    position: relative !important;
  }
  /* 下拉面板：绝对定位到菜单项正下方，宽度自适应内容，不再 right:0 铺满 */
  body > header.header .jm-nav-panel .dropdown-menu {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    width: auto !important;
    min-width: 180px !important;
    max-width: 320px !important;
    margin: 0 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.12) !important;
    background: #fff !important;
    border-radius: 0 0 6px 6px !important;
    padding: 6px 0 !important;
    /* 撤销主题的 scaleY/opacity 抽屉动画，改用纯显隐，杜绝半透明残留 */
    transform: none !important;
    opacity: 1 !important;
    visibility: hidden !important;
    display: block !important;
  }
  /* 默认隐藏，hover 或展开时才显示 */
  body > header.header .jm-nav-panel .menu-item.dropdown > .dropdown-menu {
    visibility: hidden !important;
    opacity: 0 !important;
  }
  body > header.header .jm-nav-panel .menu-item.dropdown:hover > .dropdown-menu,
  body > header.header .jm-nav-panel .menu-item.jm-sub-open > .dropdown-menu {
    visibility: visible !important;
    opacity: 1 !important;
  }
  /* 子项：单列竖排，撤销 P8 的五列网格与多列 flex */
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap,
  body > header.header .jm-nav-panel .menu-item.dropdown:hover > .dropdown-menu.menu-item-wrap,
  body > header.header .jm-nav-panel .menu-item.jm-sub-open > .dropdown-menu.menu-item-wrap {
    display: block !important;
    grid-template-columns: none !important;
  }
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap > li {
    display: block !important;
    width: 100% !important;
    float: none !important;
  }
  /* 一级子项文字：正常菜单缩进，单行 */
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap > li > a {
    padding: 9px 18px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    color: #444 !important;
  }
  body > header.header .jm-nav-panel .dropdown-menu.menu-item-wrap > li > a:hover {
    color: #2f7fd1 !important;
    background: #f4f8fd !important;
  }
}
