/* v4 mdgw 样式 override — Go mdgw 视觉对齐

   仅 override Mirages 主题, 不覆盖原 CSS 变量
   接入: layouts/app.blade.php 末尾 <link rel="stylesheet" href="...">
*/

/* ====== 顶栏 social 图标 (图片型, 对齐 Go pc-nav-icon 22px) ====== */
.side-toolbar-list .toolbar-img-item { display: inline-flex; align-items: center; justify-content: center; }
.side-toolbar-list .toolbar-img-item img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

/* ====== Footer Kingkong + descBox ====== */
.mdgw-footer-bar {
    padding: 18px 13px;
    box-sizing: border-box;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}
.mdgw-kingkong {
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.10);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    margin-bottom: 18px;
}
.mdgw-kk-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #9E9E9E;
    text-decoration: none;
}
.mdgw-kk-item:hover { opacity: 0.8; }
.mdgw-kk-img {
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
}
.mdgw-desc-box {
    margin-bottom: 18px;
    text-align: left;
}
.mdgw-desc-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 500;
}
.mdgw-desc {
    font-size: 13px;
    color: #9E9E9E;
    line-height: 1.6;
}

/* ====== Dark / Light 模式适配 ====== */
/* Mirages 自带 theme-dark / theme-white body class, 我们 scoped override */

body.theme-dark .mdgw-footer-bar {
    background: #1a1a1a;
}
body.theme-dark .mdgw-kingkong {
    border-color: rgba(255,255,255,0.10);
}
body.theme-dark .mdgw-kk-item { color: #9E9E9E; }
body.theme-dark .mdgw-desc-title { color: #fff; }
body.theme-dark .mdgw-desc { color: #9E9E9E; }

body.theme-white .mdgw-footer-bar {
    background: #f7f7f7;
}
body.theme-white .mdgw-kingkong {
    border-color: rgba(0,0,0,0.10);
}
body.theme-white .mdgw-kk-item { color: #666; }
body.theme-white .mdgw-desc-title { color: #333; }
body.theme-white .mdgw-desc { color: #666; }

/* ===== v4.1 footer 扩展段 (精确镜像 Go footer.css + Mirages a 色 override) ===== */

/* 父级 left-align override - Mirages footer .container 默认 text-align: center */
#footer .mdgw-footer-bar,
#footer .mdgw-footer-bar .mdgw-desc-box,
#footer .mdgw-footer-bar .mdgw-desc-title,
#footer .mdgw-footer-bar .mdgw-desc,
#footer .mdgw-footer-bar .mdgw-url-list,
#footer .mdgw-footer-bar .mdgw-url-item,
#footer .mdgw-footer-bar .mdgw-celltem {
    text-align: left !important;
}

/* urlList: 6 网址 — Go .urlList .urlItem 双行 56px */
#footer .mdgw-url-list {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0;
}
#footer .mdgw-url-item {
    height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 18px;
}
#footer .mdgw-url-title {
    color: #FAFAFA !important;
    font-size: 16px;
    line-height: 1.4;
}
#footer .mdgw-url-item a,
#footer .mdgw-url-item a:link,
#footer .mdgw-url-item a:visited,
#footer .mdgw-url-item a:hover {
    color: #1ABC9C !important;
    word-break: break-all;
    text-decoration: none;
}

/* celltem: 6 个链接 — Go .celltem 单行 cell 50px + border-bottom + 灰白字 */
#footer .mdgw-celltem {
    height: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    align-items: center;
    font-size: 16px;
    margin: 0;
    font-weight: normal;
}
#footer .mdgw-celltem .mdgw-cell,
#footer .mdgw-celltem .mdgw-cell:link,
#footer .mdgw-celltem .mdgw-cell:visited,
#footer .mdgw-celltem .mdgw-cell:hover {
    color: #f0f0f0 !important;
    text-decoration: none;
}

/* connectBox: 4 social — 圆形 36px + gap 40px + border-bottom */
#footer .mdgw-connect-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
#footer .mdgw-connect-box a { display: inline-flex; }
#footer .mdgw-connect-item {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* subPageBox: 5 法律链接 — 居中灰白 14px */
#footer .mdgw-sub-page-box {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 0;
    text-align: center !important;
}
#footer .mdgw-sub-page-box,
#footer .mdgw-sub-page-box a,
#footer .mdgw-sub-page-box a:link,
#footer .mdgw-sub-page-box a:visited,
#footer .mdgw-sub-page-box a:hover {
    color: #f0f0f0 !important;
    text-decoration: none;
}

/* 版权 tip — 居中灰小字 + 绿 link */
#footer .mdgw-tip {
    font-size: 11px;
    text-align: center !important;
    padding: 20px 0;
    margin-bottom: 50px;
    line-height: 12px;
    color: #9E9E9E !important;
}
#footer .mdgw-tip p {
    margin-bottom: 2px;
    line-height: 24px;
    color: #9E9E9E !important;
}
#footer .mdgw-tip a,
#footer .mdgw-tip a:link,
#footer .mdgw-tip a:visited,
#footer .mdgw-tip a:hover {
    color: #1ABC9C !important;
    text-decoration: none;
}

/* @media 大屏 — Go 768px 断点 */
@media screen and (min-width: 768px) {
    #footer .mdgw-url-title { font-size: 18px; }
    #footer .mdgw-celltem { font-size: 18px; height: 70px; }
    #footer .mdgw-connect-box { padding: 30px 0; }
    #footer .mdgw-connect-item { width: 40px; height: 40px; }
}

/* Light 模式 fallback (Mirages 白天) */
body.theme-white #footer .mdgw-url-title { color: #333 !important; }
body.theme-white #footer .mdgw-celltem { border-color: rgba(0,0,0,0.10); }
body.theme-white #footer .mdgw-celltem .mdgw-cell { color: #333 !important; }
body.theme-white #footer .mdgw-connect-box { border-color: rgba(0,0,0,0.10); }
body.theme-white #footer .mdgw-sub-page-box,
body.theme-white #footer .mdgw-sub-page-box a { color: #333 !important; }
body.theme-white #footer .mdgw-tip,
body.theme-white #footer .mdgw-tip p { color: #888 !important; }

/* ===== v4.2 fix (2026-05-28) — kingkong icon size + desc 白色强制 ===== */

/* descTitle 强制纯白 + 加粗 (override Mirages 父级 #ccc 类色) */
#footer .mdgw-footer-bar .mdgw-desc-title {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 18px;
}
#footer .mdgw-footer-bar .mdgw-desc {
    color: #9E9E9E !important;
    font-size: 14px;
    line-height: 20px;
}

/* kingkong: mobile 24px (跟 Go 一致), 但桌面浏览器 768px+ 升到 40x40 (Go @media) */
@media screen and (min-width: 768px) {
    #footer .mdgw-footer-bar .mdgw-kk-img {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 18px !important;
    }
    #footer .mdgw-footer-bar .mdgw-kk-item {
        font-size: 18px !important;
    }
    #footer .mdgw-footer-bar .mdgw-desc-title {
        font-size: 22px !important;
    }
    #footer .mdgw-footer-bar .mdgw-desc {
        font-size: 16px !important;
    }
}

/* Light 模式 descTitle 仍纯黑 */
body.theme-white #footer .mdgw-footer-bar .mdgw-desc-title { color: #1a1a1a !important; }

/* ===== v4.3 fix (2026-05-28) — body 纯黑 + kingkong label 灰白 + 字体强制大屏 18px ===== */

/* 1. body 背景纯黑 (Go 是 #000, Mirages 默认是 #1a1a1a 偏灰) */
body.theme-dark {
    background-color: #000 !important;
}
body.theme-dark #wrap,
body.theme-dark #body,
body.theme-dark #footer {
    background-color: #000 !important;
}

/* 2. kingkong label 颜色强制灰白 (Mirages 默认 a #1ABC9C 绿 cover) */
#footer .mdgw-footer-bar .mdgw-kk-item,
#footer .mdgw-footer-bar .mdgw-kk-item:link,
#footer .mdgw-footer-bar .mdgw-kk-item:visited,
#footer .mdgw-footer-bar .mdgw-kk-item:hover,
#footer .mdgw-footer-bar .mdgw-kk-item:active {
    color: #9E9E9E !important;
    text-decoration: none !important;
}
#footer .mdgw-footer-bar .mdgw-kk-item span {
    color: #9E9E9E !important;
}

/* 3. 字体大屏 768px+ 强制 (Mirages 可能 cover) */
@media screen and (min-width: 768px) {
    #footer .mdgw-footer-bar .mdgw-kk-item,
    #footer .mdgw-footer-bar .mdgw-kk-item span {
        font-size: 18px !important;
    }
    #footer .mdgw-footer-bar .mdgw-desc-title { font-size: 22px !important; }
    #footer .mdgw-footer-bar .mdgw-desc { font-size: 16px !important; }
    #footer .mdgw-footer-bar .mdgw-url-title { font-size: 18px !important; }
    #footer .mdgw-footer-bar .mdgw-url-item a { font-size: 16px !important; }
    #footer .mdgw-footer-bar .mdgw-celltem {
        font-size: 18px !important;
        height: 70px !important;
    }
}

/* 4. tip 字体强制 11px (Mirages 可能 cover) */
#footer .mdgw-footer-bar .mdgw-tip,
#footer .mdgw-footer-bar .mdgw-tip p {
    font-size: 11px !important;
}
#footer .mdgw-footer-bar .mdgw-tip p {
    line-height: 24px !important;
}

/* 5. Light 模式 body 纯白 (不污染白天主题) */
body.theme-white {
    background-color: #fff !important;
}
body.theme-white #footer {
    background-color: #fff !important;
}
body.theme-white #footer .mdgw-footer-bar .mdgw-kk-item,
body.theme-white #footer .mdgw-footer-bar .mdgw-kk-item span {
    color: #666 !important;
}

/* ===== v4.4 fix (2026-05-28) — Go 计算样式精确对齐 (浏览器循环抓 computedStyle 比对) ===== */

/* 1. fbar 背景透明 (Go transparent, PHP 之前 #1a1a1a 偏灰) - 父 #footer 已 #000 */
#footer .mdgw-footer-bar {
    background-color: transparent !important;
}

/* 2. kingkong 去掉 borderTop/Bottom (Go 没有, PHP 多了两条灰线) */
#footer .mdgw-footer-bar .mdgw-kingkong {
    border-top: none !important;
    border-bottom: none !important;
}

/* 3. kkitem 颜色强制 WHITE (Go 是 #fff 白, 不是灰) */
#footer .mdgw-footer-bar .mdgw-kk-item,
#footer .mdgw-footer-bar .mdgw-kk-item:link,
#footer .mdgw-footer-bar .mdgw-kk-item:visited,
#footer .mdgw-footer-bar .mdgw-kk-item:hover,
#footer .mdgw-footer-bar .mdgw-kk-item:active,
#footer .mdgw-footer-bar .mdgw-kk-item span {
    color: #fff !important;
}

/* 4. celltem H3 fontWeight 700 (Go H3 默认 bold, PHP 之前 normal 太细) */
#footer .mdgw-footer-bar .mdgw-celltem {
    font-weight: 700 !important;
}

/* 5. tip 颜色 WHITE (Go 全白, PHP 之前 #9E9E9E 灰) */
#footer .mdgw-footer-bar .mdgw-tip,
#footer .mdgw-footer-bar .mdgw-tip p {
    color: #fff !important;
}

/* 6. urlTitle line-height 强制 18px (Go 紧凑, PHP Mirages 给了 1.4 = 25.2px) */
#footer .mdgw-footer-bar .mdgw-url-title {
    line-height: 18px !important;
}

/* 7. urlA word-break normal (Go normal, PHP break-all 长 url 会断行) */
#footer .mdgw-footer-bar .mdgw-url-item a {
    word-break: normal !important;
}

/* 8. subPageBox 居中 (对齐 Go footer.css .subPageBox{justify-content:center}; 旧版误判"Go左对齐"改 flex-start 是错的) */
#footer .mdgw-footer-bar .mdgw-sub-page-box {
    justify-content: center !important;
    text-align: center !important;
}

/* 9. celltem + cell 纯白 #fff (Go 继承 body 白, 我们之前 #f0f0f0 是 240 偏灰) */
#footer .mdgw-footer-bar .mdgw-celltem,
#footer .mdgw-footer-bar .mdgw-celltem .mdgw-cell,
#footer .mdgw-footer-bar .mdgw-celltem .mdgw-cell:link,
#footer .mdgw-footer-bar .mdgw-celltem .mdgw-cell:visited,
#footer .mdgw-footer-bar .mdgw-celltem .mdgw-cell:hover {
    color: #fff !important;
}

/* Light 模式 fix: kkitem + tip 仍纯黑 (跟 dark 镜像) */
body.theme-white #footer .mdgw-footer-bar .mdgw-kk-item,
body.theme-white #footer .mdgw-footer-bar .mdgw-kk-item span,
body.theme-white #footer .mdgw-footer-bar .mdgw-tip,
body.theme-white #footer .mdgw-footer-bar .mdgw-tip p {
    color: #1a1a1a !important;
}

/* ===== v5 fix (2026-05-28) — article 详情页对齐 Go (浏览器循环 computedStyle 比对) ===== */

/* article title - Go 24px center weight 300, PHP Mirages 给 40.5px left */
body.card .post-title {
    font-size: 24px !important;
    line-height: 32px !important;
    font-weight: 300 !important;
    text-align: center !important;
    margin-bottom: 14px !important;
    color: #fff !important;
}

/* article meta - Go 14px rgba 70% */
body.card .post-meta {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* article content - Go 16px white. line-height 保留 PHP 1.8 (Go 1.0 太挤) */
body.card .post-content {
    font-size: 16px !important;
    color: #fff !important;
}

/* archive title 一致化 - author页 #archives-title 之前 42px 跟 category/home .blog-title 28px 不齐 */
#archives-title {
    font-size: 28px !important;
    font-weight: 400 !important;
    text-align: center !important;
    color: #fff !important;
}

/* ===== v5.1 top nav 视觉对齐 Go (2026-05-28) ===== */

/* 1. logo 缩小 - HTML 写 height=40, Mirages CSS 拉到 56 (logo 太大), 限制回 36 跟 Go 视觉接近 */
#navbar .navbar-brand img {
    max-height: 36px !important;
    height: 36px !important;
    width: auto !important;
}
#navbar .navbar-brand {
    padding: 4px 0 !important;
}

/* 2. 顶部圆形灰底图标 → 扁平无底 (Go 全是 outline 无 bg) */
#navbar a[href$=".html"] {
    background-color: transparent !important;
    border-radius: 0 !important;
}
/* hover 时给一点点反馈 (不要完全无 hover state, 改成淡白) */
#navbar a[href$=".html"]:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 4px !important;
}

/* ===== v6 (2026-05-28) — 隐藏空"更多▼"壳 ===== */
/* 5 INSERT 后 nav 是 首页+官方信息(4 children), navbarMenus().chunk(5) 还是只产生 [0] 一块,
   dropdown_navs 仍空, navbar.blade.php @default 渲染空"更多▼". 用 :has() 隐藏整个 li. */
#navbar li.nav-item.dropdown:has(#more-menu-dropdown) {
    display: none !important;
}

/* ===== v7 (SEO 第二批 T3) — 正文图 CLS 占位 =====
   正文相册图 DB 无宽高、比例不定 → aspect-ratio 会变形/留黑边, 不用。
   content-visibility:auto 让屏外懒载图跳过渲染, contain-intrinsic-size 给一个估高占位,
   滚入视口后真实高度接管 → 减少懒载入时的布局抖动(CLS)。
   🔴 只作用正文容器内的图; 不碰首页/列表卡片(已 CLS-safe), 也不碰评论区图。
   content-visibility/contain-intrinsic-size 非 mirages.min.css 设置项, 无需 !important 即生效。 */
.post-content img {
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
}
