/*
Theme Name: Thicklife Child
Theme URI:  https://example.com
Description: Aper Theme 的子主题，用来做相册功能开发
Author:      你的名字
Version:     2.0.8
Template:    aper-theme
Text Domain: thicklife-child
 * Changelog:
 * v1.0.2 - 2024-08-02 (Fix):
 * 1. 修正了轮播高度规则的特异性，确保动态高度能正确应用。
 * 2. 修正了首页全屏标题隐藏的选择器，解决了黑条问题。
 * 3. 移除了错误隐藏相册导航箭头的规则。
 * v1.1.0 - 2025-06-20 (Enhancement):
 * 1. 引入 --hdr / --ftr 变量统一可用高度。
 * 2. 轮播高度改为 calc(100dvh - var(--hdr) - var(--ftr))。
 * 3. Flex 布局确保标题永不被页脚遮挡。
 * 4. 恢复相册第二层导航箭头，隐藏多余关闭按钮。
 * v1.1.1 - 2025-06-21 (Hotfix):
 * 1. 修复标题被推到视口底部，图片下方标题不可见。
 * 2. 修复相册第三层全屏标题条宽度异常。
 * 3. 恢复缺失的 root 变量和统一高度规则。
 * v1.1.2 - 2025-06-21 (Hotfix 2):
 * 1. 恢复首页标题右对齐并缩进 1 字符，字体与相册第二层保持一致。
 * 2. 相册第二层重新显示左右导航箭头，隐藏左侧多余关闭按钮。
 * v1.1.3 - 2025-06-21 (Hotfix 3):
 * 1. 统一相册第二层标题字体、字号、字重与首页一致，使用 !important 覆盖旧规则。
 * v1.1.4 - 2025-06-21 (Hotfix 4):
 * 1. 恢复首页轮播图片点击跳转链接功能；仅在相册第二/三层隐藏 .slide-click-target。
 * v1.1.5 - 2025-06-22 (Height Unification):
 * 1. 删除所有 var(--album-avail-h,80vh) 高度声明，消除双体系冲突。
 * 2. 统一 .homepage-swiper / .album-swiper / #album-lightbox 高度为 calc(100dvh - var(--hdr) - var(--ftr))。
 * 3. 将 .slide-img-box 恢复为 flex:1 1 auto；.slide-caption-container 改为 margin-top:auto；保持 flex 列布局。
 * v1.1.6 - 2025-06-22 (Hotfix):
 * 1. 回退 slide-caption 布局：.slide-img-box flex:0 0 auto; .slide-caption-container margin-top:0，保证标题可见。
 * v1.1.7 - 2025-06-22 (Footer Flex):
 * 1. 页脚使用 Flex 横向布局；社交链接与版权信息两端对齐。
 * 2. 压缩 .footer-separator 上下间距，为轮播标题腾出高度。
 * v1.1.8 - 2025-06-22 (Caption Overlay):
 * 1. 在全屏模式下隐藏旧黑条。
 * 2. 新的半透明浮层样式。
 * 3. 激活后淡入。
 * 4. 样式定义标题和描述。
 * v2.0.1 - 2025-07-06 (P1-S2 Precision Fix):
 * 1. 使用精准选择器body.album-fs-mode #album-lightbox修正参数。
 * 2. 内边距对齐：padding-top:10px; padding-bottom:20px。
 * 3. 字体样式对齐：标题1.1rem，描述0.9rem，缩进2ch。
 * 4. 字体族对齐：添加'繁Think黑'，布局对齐flex-start。
 * 5. 确保不影响相册第二层和其他功能。
 * v2.0.2 - 2025-01-15 (P1-S3 Center Click Area):
 * 1. 添加相册专用中央热区样式 .enhanced-fs-center-click-area。
 * 2. 仅在全屏模式 body.album-fs-mode 下显示。
 * 3. 占据整个图片区域，z-index 2147483640，为点击跳转做准备。
 * v2.0.2a - 2025-01-15 (P1-S3 Click Logic Fix):
 * 1. 修复中央热区点击时鼠标光标错误显示问题。
 * 2. 光标显示/隐藏现在只由鼠标移动(>3px)控制，与点击行为无关。
 * 3. 完全对齐首页全屏模式的鼠标交互逻辑。
 * v2.0.7 - 2025-01-16 (字符显示异化修复):
 * 1. 配合album-lightbox.js Rev-15和album-enhanced-fs.js rev22修复字符异化问题。
 * 2. 第二层使用DOM创建方式，第三层只从dataset获取数据，确保字符规范化。
 * 3. 样式文件本身无需修改，仅版本号同步更新。
 * v2.0.8 - 2025-01-16 (JavaScript字符规范化完整修复):
 * 1. 配合album-lightbox.js Rev-16和album-enhanced-fs.js rev23实现JavaScript层面字符规范化。
 * 2. 在第二层JavaScript中直接处理异化字符（如Unicode 8217右单引号）。
 * 3. 第三层直接使用已规范化的dataset数据，确保显示一致性。
*/

/* 自定义样式 - 根据截图要求修改配色和样式 */

/* 1. 全局设置深蓝色背景 */
body,
html,
#page,
.site,
.site-content,
.entry-content,
.site-header,
.site-footer,
.entry-header,
.page-header,
.content-area,
.widget-area,
.comments-area,
#content {
    background-color: #101219 !important; /* 更深的蓝色背景 */
    color: #ffffff; /* 文字颜色为白色 */
}

/* 页面内容区域 */
.site-content {
    max-width: 100%; /* 最大宽度 */
    margin: 0 auto; /* 居中 */
    padding: 0; /* 移除内边距 */
}

/* 内容容器 */
.content-area {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 页面标题样式 */
.entry-title,
.page-title {
    font-size: 32px;
    text-align: center;
    text-transform: uppercase; /* 大写字母 */
    margin: 30px 0;
    color: #ffffff !important;
}

/* 页脚样式 */
.site-footer {
    border-top: 1px solid #2d3347; /* 深色分隔线 */
    padding: 20px 30px; /* 增加页脚内边距 */
    margin-top: 15px; /* 增加与内容的间距 */
    background-color: #101219 !important; /* 与背景相同的深蓝色 */
}

/* 版权信息样式 */
.site-info {
    color: #a0a0a0; /* 浅灰色文字 */
    font-size: 14px;
    text-align: center;
    padding: 10px 0;
}

/* 链接样式 */
a, a:visited {
    color: #ffffff; /* 链接颜色 */
    text-decoration: none;
}

a:hover, a:focus, a:active {
    color: #a0a0a0; /* 悬停时颜色变浅 */
}

/* 按钮样式 */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button {
    background-color: hsl(226, 22%, 23%) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover {
    background-color: transparent !important;
}

/* 表单元素样式 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
    background-color: #2d3347;
    color: #ffffff;
    border: 1px solid #3d4357;
}

/* 确保所有文本内容可读性 */
p, li, td, th, label, input, textarea, select {
    color: #ffffff;
}

/* 移除默认边框和阴影 */
img {
    border: none !important;
    box-shadow: none !important;
}

/* 去除WordPress默认的图片滤镜 */
.wp-post-image,
.attachment-thumbnail,
.attachment-medium,
.attachment-large,
.attachment-full {
    filter: none !important;
}

/* 特定类名覆盖，确保深色背景 */
.aper-theme-container,
.aper-content-wrapper,
.aper-main-content,
.aper-site-wrapper,
.aper-main-wrapper,
body.aper-theme {
    background-color: #101219 !important;
}

/* 分割线样式 */
hr {
    border: none;
    border-top: 1px solid #2d3347;
    margin: 20px 0;
}

/* 移除WordPress添加的额外边距和填充 */
.entry-content > *,
.page-content > * {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* 确保内容区域边距适当 */
.entry-content,
.page-content {
    padding: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1f2e;
}

::-webkit-scrollbar-thumb {
    background: #2d3347;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d4357;
}

/*
  ========================================
  最终样式覆盖方案 V3
  ========================================
*/

/* 1. 强制统一导航栏背景色并大幅调整高度 */
header,
body.aper-theme header#masthead {
    background: #101219 !important;
    backdrop-filter: none !important;
    padding-top: 50px !important;
    padding-bottom: 20px !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* 稍稍增加顶部阴影效果 */
}

/* 2. 全屏按钮及工具栏背景透明化 (最终版) */
/* 核心：将按钮所在的整个顶部工具栏背景设为透明 */
.pswp__top-bar {
    background: none !important;
}

/* 同时确保按钮本身也是透明的 */
.pswp__button,
.pswp__button--zoom,
.pswp__button--fs,
.pswp__button--arrow--left,
.pswp__button--arrow--right,
.pswp__button--close {
    background: transparent !important;
    border-radius: 0 !important;
}

/* 3. Logo SVG 颜色和尺寸 */
/* 通过在 header.php 中内联 SVG，我们现在可以用 CSS 控制它的颜色 */
.svg-logo-wrapper svg {
    width: 55px; /* 维持父主题的 logo 尺寸 */
    height: auto;
    display: block;
}

.svg-logo-wrapper svg * { /* 使用通配符*来选择SVG内部所有元素 */
    fill: rgb(215, 215, 215) !important; /* 强制填充为白色 */
}

/* 确保主内容区域与顶部留出足够距离，因为导航栏是 fixed 定位 */
/* 只在非相册overlay状态下生效，避免影响首页轮播 */
body:not(.album-overlay-active) main {
    padding-top: 120px !important; /* 这个值需要略大于导航栏总高度，防止内容被遮挡 */
}

/* ─── 全站所有按钮都透明 ─── */
button,
.wp-element-button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

/* ─── PhotoSwipe：工具栏 & 按钮透明 ─── */
.pswp__top-bar,
.pswp__top-bar * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.pswp__button,
.pswp__button--close,
.pswp__button--fs,
.pswp__button--zoom,
.pswp__button--play,
.pswp__button--pause {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ─── 下拉菜单全平台透明 ─── */
/* 通用：子菜单容器 */
ul.sub-menu,
ul.children,
.menu-item-has-children > ul,
.nav-menu ul ul,
.dropdown-menu {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 清空子菜单项与链接的背景和描边 */
ul.sub-menu li,
ul.children li,
.dropdown-menu li,
ul.sub-menu li a,
ul.children li a,
.dropdown-menu li a {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* （可选）如果你想在下拉菜单 hover 时留一点高亮：
.main-navigation ul ul li:hover > a {
    background: rgba(255,255,255,0.06) !important;
}
*/

/* ─── 首页轮播容器水平居中 ─── */
.homepage-slider-wrapper {
  display: flex;
  justify-content: center;
}
/* （可选）限制最大宽度，比如 1200px，视设计稿而定 */
/* .homepage-slider-wrapper { max-width: 1200px; margin: 0 auto; } */

/* 底部版权信息 */
.copyright {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 8px;
}

/* 头部渐变阴影分隔线 */
.header-separator {
    width: 100%;
    height: 10px; /* 阴影的高度 */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); /* 从黑色半透明到完全透明的渐变 */
    position: relative;
    z-index: 5; /* 确保它在内容之上 */
}

/* 底部灰色细分隔线 */
.footer-separator {
    width: 100%;
    height: 1px; /* 细线的高度 */
    background-color: rgba(128, 128, 128, 0.25); /* 25% 灰色 */
    margin-top: 10px; /* 与上方内容保持距离 */
    margin-bottom: 40px; /* 与下方内容保持距离 - 可手动调整此数值 */
}

/*
  ========================================
  导航栏布局 (2024-06-12)
  ========================================
*/

/* 1. <header> 容器启动 Flexbox 布局 */
header {
    display: flex;
    justify-content: space-between; /* Logo 和菜单分别推到两端 */
    align-items: center;            /* 垂直居中对齐 */
    padding: 40px 120px;             /* 上下内边距40px, 左右内边距120px */
}

/* 2. 菜单 <nav> 内部也使用 Flexbox */
.main-nav .main-menu {
    display: flex;
    list-style: none; /* 移除 ul 的默认项目符号 */
    margin: 0;
    padding: 0;
}

/* 3. 菜单项 <li> 之间的间距 */
.main-nav .main-menu > .menu-item {
    margin-left: 35px; /* 设置每个菜单项的左边距，形成间距 */
}

/* 4. 菜单项链接 <a> 的样式 */
.main-nav .main-menu a {
    color: rgb(235, 235, 235);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav .main-menu a:hover {
    color: #a0a0a0;
}

/*
  ========================================
  Album Page Lightbox CSS (Ported from Homepage)
  ========================================
*/

/* ==================================================
 * Album ▸ Phase 1 修复 - 统一轮播定位系统
 * ================================================== */

/* 相册轮播overlay - 与首页一致的固定定位 */
#album-lightbox {
  position: fixed !important;
  top: 50% !important; /* 垂直居中 */
  left: 50% !important; /* 水平居中 */
  transform: translate(-50%, -50%) !important; /* 真正居中 */
  width: 100vw !important;
  height: 100vh !important;
  background: #101219 !important; /* 与首页相同的深蓝色背景 */
  pointer-events: none !important;
  z-index: 9999 !important; /* 与首页轮播一致的z-index */
  display: none;
}

/* 相册轮播容器 - 与首页完全一致的定位 */
#album-lightbox .swiper.album-swiper {
  position: relative !important; /* 与首页一致 */
  width: 100vw !important; 
  /* height: var(--album-avail-h, 80vh) !important;  Deprecated in v1.1.5 */
  left: 0 !important; /* 重置left，因为父容器已经居中 */
  transform: none !important; /* 重置transform，因为父容器已经居中 */
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important; 
  background: transparent !important;
  overflow: visible !important; 
  z-index: 1 !important; /* 相对于overlay的层级 */
  pointer-events: auto !important; /* 确保轮播可交互 */
  margin: 0 !important; /* 清除所有margin */
}

/* HTML结构支持 */
#album-lightbox .album-swiper .swiper-wrapper{height:100%;display:flex;align-items:center;}
#album-lightbox .album-swiper .swiper-slide{position:relative;display:flex;align-items:center;
  justify-content:center;height:100%;}
#album-lightbox .slide-content-wrapper{display:flex;flex-direction:column;align-items:center;
  justify-content:center;width:100%;height:100%;}
#album-lightbox .album-swiper .slide-img-box{ position:relative; display:flex; align-items:center; justify-content:center; width:100%;}
#album-lightbox .album-swiper .slide-img-wrapper { position: relative; display: inline-block; margin: auto; text-align: center; }

/* 图片样式 - 与首页完全一致 */
#album-lightbox .slide-img{display:block;max-width:72vw;max-height:62vh;object-fit:contain;
  border-radius:8px;background:#222;box-shadow:0 4px 24px rgba(0,0,0,.12);position:relative;}
#album-lightbox .album-swiper .slide-img { /* alias for higher specificity */
  display: block; max-width: 72vw; max-height: 62vh; object-fit: contain;
    border-radius: 8px; background: #222; box-shadow: 0 4px 24px rgba(0,0,0,0.12);position:relative;
}

/* 标题容器 - 与首页一致 */
#album-lightbox .slide-caption-container{
  width:100%;max-width:72vw;margin:0 auto;padding-top:.4em;
  display:flex;justify-content:flex-end;pointer-events:none;box-sizing:border-box;
}
#album-lightbox .slide-title{
  font-family:'繁Think黑','PingFang SC','Microsoft YaHei',sans-serif;
  font-weight:100;color:#fff;font-size:.85rem;text-align:right;white-space:nowrap;
  letter-spacing:.5px;width:100%;padding-right:1em;
  text-indent: 1em; /* 左缩进一个字符 */
}

/* 全屏按钮 & 箭头 - 与首页完全一致 */
#album-lightbox .fullscreen-btn{position:absolute;z-index:20;top:.7em;right:.7em;font-size:2em;
  color:#888;background:none;border:none;opacity:0;pointer-events:none;
  transition:opacity .3s; padding: 0; cursor: pointer;
  font-family: '繁Think黑', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  box-shadow: none;display:block !important;
}
#album-lightbox .slide-img-wrapper:hover .fullscreen-btn{opacity:1!important;pointer-events:auto!important;}

#album-lightbox .custom-swiper-btn,
#album-lightbox .swiper-button-prev,
#album-lightbox .swiper-button-next{
  position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;
  display:flex;align-items:center;justify-content:center;font-size:12px!important;
  color:#bbb!important;cursor:pointer;opacity:.7;transition:opacity .2s;
  background:transparent!important; z-index:10;
}
#album-lightbox .album-swiper:hover .custom-swiper-btn{ opacity:1; }
#album-lightbox .swiper-button-prev{left:2vw;}
#album-lightbox .swiper-button-next{right:2vw;}
#album-lightbox .swiper-button-prev::after{content:'‹';font-size:1.2em!important;}
#album-lightbox .swiper-button-next::after{content:'›';font-size:1.2em!important;}

/* UI隐藏逻辑 - 修复标题显示问题 */
#album-lightbox .hide-swiper-ui .custom-swiper-btn,
#album-lightbox .hide-swiper-ui .swiper-button-prev,
#album-lightbox .hide-swiper-ui .swiper-button-next,
#album-lightbox .hide-swiper-ui .fullscreen-btn{opacity:0!important;pointer-events:none!important;}

/* 确保标题在hide-swiper-ui时仍然可见 */
#album-lightbox .hide-swiper-ui .slide-caption-container,
#album-lightbox .hide-swiper-ui .slide-title {
  opacity: 1 !important;
  pointer-events: auto !important;
  display: flex !important;
}

/* 全屏模式样式 - 保持现有功能 */
body.album-fs-mode .site-header,
body.album-fs-mode header,
body.album-fs-mode #masthead,
body.album-fs-mode .main-nav,
body.album-fs-mode footer,
body.album-fs-mode #wpadminbar,
body.album-fs-mode .fullscreen-btn,
body.album-fs-mode .slide-caption-container{display:none!important;}

body.album-fs-mode{overflow:hidden!important;}

body.album-fs-mode #album-lightbox {
  z-index: 2147483647 !important;
  background: #000 !important;
}

body.album-fs-mode #album-lightbox .swiper.album-swiper{
  position:fixed!important;top:0!important;left:0!important;width:100vw!important;height:100vh!important;background:#000!important;z-index:2147483647!important;
  margin:0!important;padding:0!important;transform:none!important;}

body.album-fs-mode .slide-img-wrapper {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
body.album-fs-mode .slide-img,
body.album-fs-mode .album-swiper .slide-img{
    max-width:100vw!important;max-height:100vh!important;border-radius:0!important;box-shadow:none!important;
    background: transparent !important;
}

body.album-fs-mode .custom-swiper-btn{color:#fff!important;opacity:0!important;pointer-events:none!important;}
body.album-fs-mode .custom-swiper-btn.enhanced-fs-arrow-visible{opacity:.7!important;pointer-events:auto!important;}
body.album-fs-mode .custom-swiper-btn.enhanced-fs-arrow-visible:hover{opacity: 1 !important;}

/* 移除不需要的元素（仅限相册第二层/全屏） */
body.album-overlay-active .slide-click-target,
body.album-fs-mode         .slide-click-target { display: none !important; }

/* JS控制的显示逻辑 */
.album-overlay-active #album-lightbox {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Header/Footer z-index确保可见性 */
.site-footer, footer {
  z-index: 10000 !important; /* 高于overlay的z-index */
  position: relative;
}

.footer-separator {
  z-index: 10000 !important;
  position: relative;
}

.site-header, header, #masthead {
  z-index: 10000 !important; /* 高于overlay的z-index */
  position: relative;
}

/* Header/Footer固定定位 - 相册第二层 */
body.album-overlay-active .site-header,
body.album-overlay-active header,
body.album-overlay-active #masthead {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  background: #101219 !important; /* 确保背景色 */
}

body.album-overlay-active .site-footer,
body.album-overlay-active footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  background: #101219 !important; /* 确保背景色 */
  padding: 10px 30px !important;
}

body.album-overlay-active .footer-separator {
  position: fixed !important;
  bottom: 70px !important; /* 调整到footer上方 - 可手动调整此数值，增大向上移动 */
  left: 0 !important;
  width: 100% !important;
  z-index: 10001 !important;
}

/* 相册第二层禁用滚动条 */
body.album-overlay-active {
  overflow: hidden !important;
}

/* 相册第一层Header固定定位 */
.site-header, header, #masthead {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10000 !important; /* 高于overlay的z-index */
  background: #101219 !important; /* 确保背景色 */
}

/* === Phase 1 修复完成 === */

/* 强制显示轮播图标题 - 最高优先级 */
#album-lightbox .slide-caption-container,
#album-lightbox .album-swiper .slide-caption-container,
body.album-overlay-active #album-lightbox .slide-caption-container {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#album-lightbox .slide-title,
#album-lightbox .album-swiper .slide-title,
body.album-overlay-active #album-lightbox .slide-title {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: #fff !important;
}

/*
========================================
v1.0.2 - 显示问题修复
========================================
*/

/* 修复首页全屏模式下的标题黑条 */
/* 全屏时，隐藏首页轮播的标题容器 */
body.fullscreen-swiper-mode .homepage-swiper .slide-caption-container {
    display: none !important;
}

/*
========================================
v1.0.1 - 动态高度及显示问题修复
========================================
*/

/* 1. 应用 JS 计算的动态高度到轮播容器 */
/* 适用于相册浮层和首页轮播 */
body.album-overlay-active .album-swiper,
.homepage-swiper {
    /* height: var(--album-avail-h, 80vh);  Deprecated in v1.1.5 */
}

/* 2. 隐藏相册播放页（第二层）默认的导航箭头 */
/* 这些箭头在我们的 UI 中是多余的 */
body.album-overlay-active .swiper-button-next,
body.album-overlay-active .swiper-button-prev {
    display: none !important;
}

/* 3. 修复首页全屏模式下的标题黑条 */
/* 全屏时，隐藏首页轮播的标题容器 */
.fullscreen-swiper-mode .homepage-swiper .title-wrap {
    display: none !important;
}

#album-lightbox .slide-title,
.homepage-swiper .title-wrap {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 300;
    letter-spacing: .05em;
    opacity: .8;
}

/* === v1.1.1 Hotfix BEGIN === */
/* 解决标题容器被推到底部 & 全屏 overlay 过宽问题 */
.slide-content-wrapper {
  align-items: center !important; /* 保持横向居中 */
}
.slide-img-box,
#album-lightbox .album-swiper .slide-img-box {
  flex: 0 0 auto !important; /* 仅占据图片本身高度，不再撑满列 */
}
.slide-caption-container,
#album-lightbox .slide-caption-container {
  margin-top: 0 !important; /* 恢复紧随图片，防止被推到底部 */
  pointer-events: auto !important; /* 恢复默认 */
}
/* album 第三层全屏：wrapper 宽度恢复自适应，避免 caption 覆盖整个视窗 */
body.album-fs-mode .slide-img-wrapper {
  width: auto !important;
}
/* === v1.1.1 Hotfix END === */

/* === v1.1.1 Root Vars & Height Override (restored) === */
:root {
  --hdr: 0px;
  --ftr: 0px;
}

.homepage-swiper,
body.album-overlay-active .album-swiper,
#album-lightbox .swiper.album-swiper {
  height: calc(100dvh - var(--hdr) - var(--ftr)) !important;
}
/* === end restore === */

/* === v1.1.2 BEGIN === */
/* 1) 首页标题样式保持与相册一致 (右对齐 + 1em 缩进) */
body.home .slide-caption-container {
  justify-content: flex-end !important;
}
body.home .slide-title {
  font-family: '繁Think黑', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
  font-weight: 100 !important;
  font-size: 0.85rem !important;
  color: #fff !important;
  text-align: right !important;
  text-indent: 1em !important;
  white-space: nowrap !important;
  letter-spacing: 0.5px !important;
  padding-right: 1em !important;
  padding-left: 0 !important;
}
/* 2) 相册第二层：恢复箭头，隐藏关闭按钮 */
body.album-overlay-active .swiper-button-prev,
body.album-overlay-active .swiper-button-next {
  display: flex !important;
}
#album-lightbox .lightbox-close {
  display: none !important;
}
/* === v1.1.2 END === */

/* === v1.1.3 BEGIN === */
#album-lightbox .slide-title,
#album-lightbox .album-swiper .slide-title,
body.album-overlay-active #album-lightbox .slide-title {
  font-family: '繁Think黑', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
  font-weight: 100 !important;
  font-size: 0.85rem !important; /* 与首页一致 */
  color: #fff !important;
  text-align: right !important;
  text-indent: 1em !important;
  letter-spacing: 0.5px !important;
  padding-right: 1em !important;
  white-space: nowrap !important;
}
/* === v1.1.3 END === */

/* === v1.1.4 END === */

/* === v1.1.5 Height Unification === */
.slide-img-box,
#album-lightbox .album-swiper .slide-img-box {
  /* flex: 1 1 auto !important;  Removed in v1.1.6 */
}
.slide-caption-container,
#album-lightbox .slide-caption-container {
  /* margin-top: auto !important;  Removed in v1.1.6 */
}
.homepage-swiper,
body.album-overlay-active .album-swiper,
#album-lightbox .swiper.album-swiper {
  height: calc(100dvh - var(--hdr) - var(--ftr)) !important;
}
/* === v1.1.5 END === */

/* === v1.1.6 Hotfix === */
.slide-img-box,
#album-lightbox .album-swiper .slide-img-box {
  flex: 0 0 auto !important;
}
.slide-caption-container,
#album-lightbox .slide-caption-container {
  margin-top: 0 !important;
}
/* === v1.1.6 END === */

/* === v1.1.7 Footer Flex === */
footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:10px 30px;}
.social-links{display:flex;gap:1.5em;}
.social-links a{display:inline-block;transition:transform .2s ease-in-out;}
.social-links a:hover{transform:scale(1.1);}
.copyright{margin:0;font-size:0.8rem;color:#a0a0a0;}
.footer-separator{margin-top:4px;margin-bottom:10px;}

/* === Footer Social Links Alignment Override (2025-07-06) === */
footer .social-links{
  margin:0 !important;
  align-items:center !important; /* 垂直居中 */
}
footer .social-links a{
  font-size:1rem !important;     /* 恢复默认字号，保证高度 */
  line-height:1.2 !important;    /* 稍微增加行高以防视觉压缩 */
  padding:0 !important;
}
footer .copyright{
  font-size:1rem !important;     /* 与 social link 一致 */
  line-height:1.2 !important;
}

/* === Footer Typography Final Fix (2025-07-06) === */
footer .social-links a,
footer .copyright{
  font-size:0.8rem !important;
  line-height:normal !important; /* 使用浏览器默认行高以保持垂直居中 */
}

/* 取消固定定位情况下 footer-separator 的额外 margin，保持高度一致 */
body.home .footer-separator,
body.single-album.album-footer-fixed .footer-separator,
body.album-overlay-active .footer-separator{
  margin-bottom:0 !important;
}

/* === Overlay Separator Alignment (2025-07-06) === */
body.album-overlay-active .footer-separator{
  margin-bottom:0 !important; /* 取消全局margin影响 */
  bottom:38px !important;    /* 与首页/固定页一致 ，相册第二层分割线设置*/
}

/*
 * S-1a-rev12: Enhanced Fullscreen Mode Styles
 * ===========================================
 */

/* 播放按钮 */
body.album-fs-mode .album-play-toggle-btn{position:fixed;top:32px;right:32px;width:40px;height:40px;border-radius:50%;font:20px/40px "Helvetica Neue",Helvetica,Arial,sans-serif;color:#fff;background:radial-gradient(#666 0%,#000 70%);box-shadow:0 2px 6px rgba(0,0,0,.4);cursor:pointer;opacity:0;transition:opacity .25s;z-index:2147483647!important}
body.album-fs-mode .album-play-toggle-btn.visible{opacity:.7}
body.album-fs-mode .album-play-toggle-btn.visible:hover{opacity:1}

/* 光标隐藏 */
body.album-fs-mode.cursor-hidden,body.album-fs-mode.cursor-hidden *{cursor:none!important}

/* 彻底压制旧 ⛶ (如仍被注入瞬间删除) */
body.album-fs-mode .fullscreen-btn{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* 箭头字符 & 默认隐藏 */
body.album-fs-mode .swiper-button-next:after{content:'›';font-size:32px}
body.album-fs-mode .swiper-button-prev:after{content:'‹';font-size:32px}
body.album-fs-mode .swiper-button-next,body.album-fs-mode .swiper-button-prev{opacity:0;transition:opacity .25s}

/* === ▼▼▼ P1 S-2 Caption Overlay (Final) ▼▼▼ =================================== */
/* 在全屏模式下隐藏旧黑条 */
body.album-fs-mode #album-lightbox .slide-caption-container{display:none!important;}

/* 新的半透明浮层样式 */
#album-lightbox .enhanced-fs-caption-overlay{
  position:absolute;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:auto; /* JS will set this */
  max-width:100%;
  min-height: 140.396px;
  padding:10px 0;
  background:rgba(50,50,50,0.75);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center; /* 垂直居中 */
  pointer-events:none;
  z-index:2147483647; /* Ensure it's on top */
  font-family:'PingFang SC','Microsoft YaHei',sans-serif;
  text-align: left; /* Override theme styles */
  opacity: 0; /* Fade in */
  transition: opacity 0.3s;
}

/* === ▼ P1-S2 参数对齐修正 (精准选择器) ▼ === */
/* 只在相册全屏模式下应用首页参数 - 确保不影响第二层 */
body.album-fs-mode #album-lightbox .enhanced-fs-caption-overlay{
  padding-top: 10px !important; /* 与首页一致 */
  padding-bottom: 20px !important; /* 与首页一致 */
  font-family: '繁Think黑','PingFang SC','Microsoft YaHei',sans-serif !important; /* 与首页一致 */
  justify-content: flex-start !important; /* 与首页顶部对齐一致 */
}

body.album-fs-mode #album-lightbox .enhanced-fs-title{
  font-size: 1.1rem !important; /* 与首页标题一致 */
  margin-top: 0 !important;
  margin-bottom: 0.3em !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-indent: 2ch !important; /* 与首页一致 */
  align-self: flex-start !important; /* 与首页对齐 */
}

body.album-fs-mode #album-lightbox .enhanced-fs-caption{
  font-size: 0.9rem !important; /* 与首页描述一致 */
  text-indent: 2ch !important; /* 与首页一致 */
  padding-left: 0.5ch !important; /* 与首页一致 */
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-self: flex-start !important; /* 与首页对齐 */
}
/* === ▲ P1-S2 参数对齐修正 End ▲ === */

/* P2-S8: 修正显隐控制 - 移除强制显示，改为通过 .visible 类控制 */
body.enhanced-fs-active #album-lightbox .enhanced-fs-caption-overlay{
  /* 移除自动 opacity: 1，改为默认隐藏，通过 .visible 类控制 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* 只有添加 .visible 类时才显示 (对齐首页逻辑) */
body.enhanced-fs-active #album-lightbox .enhanced-fs-caption-overlay.visible{
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  pointer-events: auto;
}

#album-lightbox .enhanced-fs-title{
  font-weight:100;
  font-size:1rem;
  margin:0 1em .3em;
  text-indent:1em;
}

#album-lightbox .enhanced-fs-caption{
  font-weight:100;
  font-size:.85rem;
  line-height:1.5;
  margin:0 1em 0;
  text-indent:1em;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
/* === ▲▲▲ P1 S-2 End ▲▲▲ ===================================================== */

/* === ▼▼▼ P1 S-3 Center Click Area ▼▼▼ ===================================== */
/* 相册专用中央热区样式 */
#album-lightbox .enhanced-fs-center-click-area {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2147483640;
    cursor: pointer;
    display: none;
}

/* 仅在相册全屏模式下显示中央热区 */
body.album-fs-mode #album-lightbox .enhanced-fs-center-click-area {
    display: block;
}
/* === ▲▲▲ P1 S-3 End ▲▲▲ ===================================================== */

