:root {
    /* 核心色板 - 徕卡三原色 */
    --leica-red: #D40000;
    --leica-black: #000000;
    --leica-white: #FFFFFF;
    
    /* 语义化色值 - 浅色模式 */
    --bg: var(--leica-white);
    --fg: var(--leica-black);
    --accent: var(--leica-red);
    --border: rgba(0, 0, 0, 0.08);
    --subtle-bg: #F8F8F8;
    --muted: #888888;
    
    /* 字体族 */
    --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    
    /* 间距与布局 */
    --container-max: 1440px;
    --header-h: 90px;
    --header-h-sm: 60px;
    --ease-dynamic: cubic-bezier(0.19, 1, 0.22, 1); /* 更干脆的机械感 */
}

[data-theme="dark"] {
    --bg: #000000; /* 纯黑 */
    --fg: #FFFFFF;
    --border: rgba(255, 255, 255, 0.15);
    --subtle-bg: #111111;
    --muted: #999999;
}

/* 1. 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.5s var(--ease-dynamic);
}

/* 隐藏滚动条但保留滚动 */
body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s var(--ease-dynamic);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(10%) contrast(1.05); /* 模拟胶片感 */
}

/* 文章内容图片优化 */
.article-content img {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
    margin: 26px auto;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: translateY(-5px);
}

/* ============================================================
   沉浸看图：独立全屏层，黑底、无干扰，点开后可在整套图之间连续浏览
   ============================================================ */
.leica-immersive {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
    cursor: zoom-out;
    overscroll-behavior: contain;
}

.leica-immersive.active {
    opacity: 1;
    visibility: visible;
}

.leica-immersive .im-img {
    max-width: 94vw;
    max-height: 86vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.leica-immersive.active .im-img.is-loaded {
    opacity: 1;
    transform: none;
}

/* 关闭按钮：右上角，保持主题的细线风格 */
.leica-immersive .im-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
}

.leica-immersive .im-close:hover {
    color: #fff;
    border-color: var(--leica-red);
}

/* 上一张 / 下一张 */
.leica-immersive .im-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.65);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.3s, opacity 0.3s;
}

.leica-immersive .im-nav:hover {
    color: #fff;
}

.leica-immersive .im-prev { left: 8px; }
.leica-immersive .im-next { right: 8px; }

.leica-immersive .im-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

@media (max-width: 768px) {
    .leica-immersive .im-img {
        max-width: 100vw;
        max-height: 78vh;
    }

    .leica-immersive .im-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .leica-immersive .im-nav {
        width: 40px;
        height: 64px;
        font-size: 26px;
    }
}

/* 重点内容高亮 */
.highlight-content {
    color: var(--leica-red);
    font-weight: bold;
    border-bottom: 2px solid var(--leica-red);
    padding-bottom: 2px;
}

/* 重点内容差异化突出 */
.article-content strong,
.article-content b {
    color: var(--accent);
    font-weight: 800;
    position: relative;
    padding: 0 2px;
}

.article-content strong::after,
.article-content b::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent);
    opacity: 0.1;
    z-index: -1;
}
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
}

@media (max-width: 768px) {
    .container { 
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* 3. 灵动版特有：快门加载动画 */
.shutter-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.shutter-blade {
    flex: 1;
    background: var(--leica-black);
    transition: transform 0.6s var(--ease-dynamic);
}

.shutter-blade:nth-child(1) { transform-origin: top; }
.shutter-blade:nth-child(2) { transform-origin: bottom; }

.shutter-loader.hide .shutter-blade:nth-child(1) { transform: scaleY(0); }
.shutter-loader.hide .shutter-blade:nth-child(2) { transform: scaleY(0); }

/* 6. 进场动画增强 */
.post-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-dynamic);
}

.post-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-img-link {
    display: block;
    overflow: hidden;
    background: var(--subtle-bg);
    margin-bottom: 28px;
    clip-path: inset(0 0 0 0);
    transition: clip-path 1s var(--ease-dynamic);
}

.post-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    /* 保留全站胶片感，再叠加光圈带来的景深虚化 */
    filter: grayscale(10%) contrast(1.05) blur(calc(var(--exif-blur, 0px) * 0.3));
    transition: transform 1.2s var(--ease-dynamic), filter 0.12s linear;
}

.post-card:hover .post-img {
    transform: scale(1.1) rotate(1deg);
}

.post-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    transition: color 0.4s var(--ease-dynamic);
}

.post-card:hover .post-title {
    color: var(--accent);
}

.post-info {
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 12px;
}

.post-category a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
}

.post-category a:hover {
    border-bottom-color: var(--accent);
}

.post-excerpt {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.read-more {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fg);
}

.read-more::after {
    content: '→';
    transition: transform 0.3s var(--ease-dynamic);
}

.read-more:hover {
    color: var(--accent);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* 无封面图模式 - 列表化 */
.post-card.no-thumb {
    grid-column: 1 / -1;
    padding: 60px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    transition: all 0.4s var(--ease-dynamic);
}

.post-card.no-thumb:hover {
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    transform: translateY(-5px);
}

.post-card.no-thumb .post-title {
    font-size: clamp(28px, 5vw, 42px);
    max-width: 900px;
}

.post-card.no-thumb .post-excerpt {
    max-width: 800px;
    font-size: 17px;
    -webkit-line-clamp: 4;
}

@media (max-width: 768px) {
    .post-card.no-thumb {
        padding: 40px 24px;
        min-height: auto;
    }
}

/* 7. 主体布局 */
main {
    padding-top: calc(var(--header-h) + 80px); /* 稳定间距 */
    min-height: 70vh;
    transition: filter 0.12s linear;
}

/* 整页曝光：ISO/快门变化时整个内容区一起变亮变暗。
   性能：仅在参数真的偏离默认值时才挂上滤镜（html.exif-bright），
   默认状态不给整页套 filter，避免移动端常驻一个全页合成层拖慢滚动。
   切勿移到 body/html，否则会改变 fixed 定位的导航栏/播放器的包含块 */
html.exif-bright main {
    filter: brightness(var(--exif-bright, 1)) contrast(var(--exif-contrast, 1));
}

/* 7.0 文章详情页样式 */
.article-header {
    margin-bottom: 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 50px;
    padding-top: 20px; /* 增加顶部内边距 */
}

.article-header h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    margin: 20px 0;
    letter-spacing: -0.02em;
}

.article-meta {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.article-cover {
    margin: 40px 0 60px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* 文章页：横屏/竖屏观看切换 */
.view-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: -20px 0 40px;
}

.view-btn {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 22px;
    color: var(--fg);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s var(--ease-dynamic);
}

.view-btn:hover,
.view-btn[aria-pressed="true"] {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

.view-btn-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--leica-red);
    transition: transform 0.3s var(--ease-dynamic);
}

.view-btn[aria-pressed="true"] .view-btn-icon {
    transform: scale(1.6);
    background: #FFF;
}

.view-count {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--muted);
}

/* 横向画廊：默认隐藏，切到横屏后显示 */
.article-gallery-h {
    display: none;
    position: relative;
    margin: 0 0 60px;
}

main.view-h .article-content,
main.view-h .article-cover {
    display: none;
}

main.view-h .article-gallery-h {
    display: block;
}

.gallery-h-track {
    display: flex;
    gap: 24px;
    height: clamp(340px, 68vh, 760px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px;
    cursor: grab;
}

.gallery-h-track:active {
    cursor: grabbing;
}

.gallery-h-track::-webkit-scrollbar {
    height: 6px;
}

.gallery-h-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.gallery-h-item {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
}

.gallery-h-item img {
    height: 100%;
    width: auto;
    max-width: none;
    filter: none; /* 保留原色，不套全站胶片灰滤镜 */
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.85);
    color: var(--fg);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-dynamic);
    z-index: 2;
}

[data-theme="dark"] .gallery-arrow {
    background: rgba(0,0,0,0.6);
    color: #FFF;
    border-color: rgba(255,255,255,0.2);
}

.gallery-arrow:hover {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

@media (max-width: 768px) {
    .view-toggle-bar {
        flex-direction: column;
        gap: 10px;
        margin: -10px 0 30px;
    }

    .gallery-h-track {
        height: 60vh;
        gap: 12px;
    }

    .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .gallery-prev { left: 6px; }
    .gallery-next { right: 6px; }
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--fg);
    max-width: 900px;
    margin: 0 auto;
}

.article-content p {
    margin-bottom: 30px;
}

.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 15px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.post-tags a:hover {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

/* 本文原图下载 */
.post-downloads {
    margin-bottom: 36px;
}

.download-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.download-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.download-title em {
    font-style: normal;
    color: var(--accent);
}

.download-all {
    flex: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px 18px;
    color: var(--fg);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s var(--ease-dynamic);
}

.download-all:hover:not(:disabled) {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

.download-all:disabled {
    opacity: 0.55;
    cursor: default;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.download-item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: 4px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
}

.download-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none; /* 缩略图保持原色，不套胶片感 */
    transition: transform 0.6s var(--ease-dynamic);
}

.download-item:hover img,
.download-item:active img {
    transform: scale(1.08);
}

.download-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 0 6px;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #FFF;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.3s var(--ease-dynamic);
}

.download-item:hover .download-mask {
    opacity: 1;
}

.download-tip {
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--muted);
}

@media (max-width: 768px) {
    main { padding-top: calc(var(--header-h-sm) + 40px); }
    .hero-banner { padding: 60px 30px; margin-bottom: 60px; }
    .article-header h1 { font-size: 28px; }
    .article-content { font-size: 16px; }

    /* 触屏没有悬停，下载提示常驻显示 */
    .download-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 10px;
    }

    .download-mask {
        opacity: 1;
    }

    .download-head {
        flex-wrap: wrap;
    }

    .download-all {
        padding: 7px 16px;
    }
}

/* 7.1 Hero 区域：品牌视觉中心 */
.hero-banner {
    margin-bottom: 48px;
    padding: 110px 80px;
    background: transparent; /* 透明化：让顶部照片带透出来，Hero 不再是灰色卡片 */
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

/* 顶部照片带：整页最上层背景，衬在导航与 Hero 之下，向下柔柔淡出到页面底色 */
/* 容器只负责定位和淡出，不挂任何 filter：
   滤镜全部挂在下面的照片层 .page-bg__photo 上，渐隐层才不会被曝光参数压灰 */
.page-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 78vh;
    z-index: -1;
    pointer-events: none;
    /* 照片层的 blur 会向外溢出 3–4px，底部溢出的那条是照片最暗的边缘，
       不裁掉就会在渐隐结束处露出一条暗线 */
    overflow: hidden;
}

/* 照片层：焦点放在画面上部 30% 处，人物脸部落在可视区中部 */
.page-bg__photo {
    position: absolute;
    inset: 0;
    background-image: var(--page-img);
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    /* 不再挂 filter：景深虚化已在服务器缓存图里完成（见 header.php 的 leica_banner_variants），
       前端只放静态图。实时滤镜会让大图层在刷新后偶发丢失，所以这里不能再加 */
}

/* 背景照片整体压暗一点：挂在照片层内部，随照片一起滤镜，不影响外层渐隐 */
.page-bg__photo::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, var(--page-dim, 0.12));
}

/* 上段是照片，下段淡淡地融进页面底色。
   这里不用 mask：filter + mask 同时挂在一个大图层上，部分浏览器刷新后
   会偶发整层不绘制（壁纸消失）。用一个渐变遮罩子层实现同样的淡出。 */
.page-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 32%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0.85) 82%,
        #FFF 100%);
}

[data-theme="dark"] .page-bg::after {
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 32%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.85) 82%,
        #000 100%);
}


/* 高 ISO 的噪点颗粒层：整页覆盖（固定层放在 main 之外，避免被滤镜影响定位） */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: var(--exif-noise, 0);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
    transition: opacity 0.12s linear;
}

.hero-banner.has-custom-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-banner.has-custom-bg::after {
    background-image: linear-gradient(to right, 
        #FFF 1px, transparent 1px, 
        transparent 10px, #FFF 1px, transparent 1px
    );
    opacity: 0.6;
}

/* 顶部照片带上的 Hero 文字：跟随主题。
   浅色模式下照片向下淡出成页面白底，白字会整片看不见，所以改用深色字；
   深色模式底色是黑，保持原来的白字。 */
.hero-banner.has-custom-bg .hero-text h2 {
    color: var(--fg);
    text-shadow: 0 1px 12px rgba(255, 255, 255, 0.5);
}

.hero-banner.has-custom-bg .hero-text p {
    color: var(--fg);
}

.hero-banner.has-custom-bg .hero-text::after {
    color: var(--fg);
    opacity: 0.5;
}

[data-theme="dark"] .hero-banner.has-custom-bg .hero-text h2 {
    color: #FFF;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .hero-banner.has-custom-bg .hero-text p {
    color: rgba(255,255,255,0.8);
    opacity: 1;
}

[data-theme="dark"] .hero-banner.has-custom-bg .hero-text::after {
    color: rgba(255,255,255,0.5);
    opacity: 1;
}

/* 镜头焦距刻度模拟 */
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: linear-gradient(to right, 
        var(--muted) 1px, transparent 1px, 
        transparent 10px, var(--muted) 1px, transparent 1px
    );
    background-size: 80px 15px;
    background-repeat: repeat-x;
    background-position: center bottom 10px;
    opacity: 0.3;
}

[data-theme="dark"] .hero-banner {
    background: transparent;
}

.hero-text {
    position: relative;
    z-index: 1;
}

/* 增加镜头参数水印 */
.hero-text::after {
    content: 'SUMMICRON-M 1:2/35 ASPH. E39';
    position: absolute;
    bottom: -60px;
    left: 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.2em;
    opacity: 0.4;
    text-transform: uppercase;
}

/* 返图区标题：居中，位于第一篇文章上方；PC 字号较大，手机保持导航 logo 大小 */
.hero-zone-title {
    text-align: center;
    margin: -24px auto 40px;
}

.hero-zone-title .logo-text {
    display: inline-block;
    font-size: 24px;
    letter-spacing: 0.3em;
}

@media (max-width: 768px) {
    .hero-zone-title {
        margin: -8px auto 32px;
    }

    .hero-zone-title .logo-text {
        font-size: 16px;
        letter-spacing: 0.25em;
    }
}

/* 取景框四角角标 */
.hero-viewfinder {
    position: absolute;
    inset: 30px 30px 58px 30px;
    pointer-events: none;
    z-index: 1;
}

.hero-viewfinder span {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--muted);
    opacity: 0.35;
}

.hero-viewfinder span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero-viewfinder span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero-viewfinder span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero-viewfinder span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* 右侧曝光参数读数 */
.hero-exif {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    z-index: 1;
    pointer-events: none;
    animation: heroFadeIn 1.2s var(--ease-dynamic) 0.4s both;
}

.exif-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--muted);
    opacity: 0.9;
}

.exif-item b {
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--leica-red);
}

/* 可调参数：在数字上左右拖动连续调整，轻点跳一档 */
.exif-item.is-live {
    pointer-events: auto;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.3s var(--ease-dynamic);
}

.exif-item.is-live:hover {
    opacity: 1;
}

.exif-item.is-live .exif-val {
    border-bottom: 1px dashed currentColor;
    padding-bottom: 2px;
}

.exif-hint {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--muted);
    opacity: 0.45;
}

/* 曝光读数 / 取景框 / 提示：浅色模式用深色，深色模式才转白 */
.hero-banner.has-custom-bg .exif-hint {
    color: var(--fg);
}

.hero-banner.has-custom-bg .hero-viewfinder span {
    border-color: var(--fg);
    opacity: 0.4;
}

.hero-banner.has-custom-bg .exif-item {
    color: var(--fg);
}

[data-theme="dark"] .hero-banner.has-custom-bg .exif-hint {
    color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .hero-banner.has-custom-bg .hero-viewfinder span {
    border-color: rgba(255, 255, 255, 0.8);
    opacity: 0.5;
}

[data-theme="dark"] .hero-banner.has-custom-bg .exif-item {
    color: rgba(255, 255, 255, 0.8);
}

.hero-text h2 {
    font-size: clamp(40px, 6vw, 80px); /* 稍微调小一点，增加精致感 */
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: var(--fg); /* 移除渐变，使用纯色表现徕卡的机械严谨感 */
    animation: heroFadeIn 1.2s var(--ease-dynamic) both;
}

.hero-text p {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    max-width: 600px;
    /* 负边距把红杠推到 h2 左缘之外，文字左缘与标题对齐 */
    margin-left: -22px;
    padding-left: 19px;
    border-left: 3px solid var(--leica-red); /* 侧边的红色细线，增加品牌感 */
    animation: heroFadeIn 1.2s var(--ease-dynamic) 0.2s both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(40px) skewY(2deg); }
    to { opacity: 1; transform: translateY(0) skewY(0); }
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px 50px;
    margin-bottom: 100px;
}

@media (max-width: 768px) {
    .post-grid { grid-template-columns: 1fr; gap: 60px; }
}

.magazine-grid {
    display: flex;
    flex-direction: column;
    gap: 100px;
    margin-bottom: 120px;
}

/* ---- 双 featured（首页最新两篇） ---- */
.dual-featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.dual-featured-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.dual-featured-image {
    width: 100%;
    min-width: 0;
}

.dual-featured-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dual-featured-info .post-title {
    font-size: 24px;
    margin-bottom: 16px;
}

.dual-featured-info .post-excerpt {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.magazine-row {
    display: flex;
    flex-direction: column;
}

.magazine-top {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 50px;
    align-items: start;
}

.featured-image-box {
    width: 100%;
}

/* 图片容器（旧 featured + 新 dual-featured 共用） */
.featured-image-box .post-img-link,
.dual-featured-image .post-img-link {
    margin-bottom: 0;
    position: relative;
    aspect-ratio: 4/3;
}

.featured-image-box .post-img-link .post-img,
.dual-featured-image .post-img-link .post-img {
    height: 100%;
    object-fit: cover;
}

/* 图片 hover 遮罩 + 入口提示（双 featured + magazine-top 大图 共用） */
.featured-image-box .post-img-link::before,
.dual-featured-image .post-img-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s var(--ease-dynamic);
    z-index: 2;
    pointer-events: none;
}

.featured-image-box .post-img-link:hover::before,
.dual-featured-image .post-img-link:hover::before {
    background: rgba(0, 0, 0, 0.45);
}

.featured-image-box .post-img-link::after,
.dual-featured-image .post-img-link::after {
    content: '点击阅读 →';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.3s var(--ease-dynamic), transform 0.3s var(--ease-dynamic);
    z-index: 3;
    white-space: nowrap;
    pointer-events: none;
}

.featured-image-box .post-img-link:hover::after,
.dual-featured-image .post-img-link:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

/* 占位图样式 */
.no-thumb-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--subtle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.5em;
    color: var(--border);
    border: 1px solid var(--border);
}

.side-list-wrapper {
    height: 100%;
}

.side-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between; /* 均匀分布，实现高度对齐 */
}

.side-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease-dynamic);
}

.side-item:first-child { padding-top: 0; }
.side-item:last-child { border-bottom: none; padding-bottom: 0; }

.side-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}

.side-item-category a {
    color: var(--accent);
}

.side-item-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.side-item:hover .side-item-title {
    color: var(--accent);
}

/* ---- 首页列表进场动效 ----
   大图从下升起 → 文字块（含标题）跟着从左到右淡入；右侧小标题依次从左划入
   只动 opacity / transform，大图额外提示合成层，移动端更顺滑
   效果常驻：快滚出视口时复位，再滚回来会重新播放
   初始隐藏态只在 html.has-js 下生效，脚本失效时内容照常显示 */

/* 大图：从下升起 */
.has-js .dual-featured-card .dual-featured-image,
.has-js .magazine-row .featured-image-box .post-img-link,
.has-js .magazine-row .featured-image-box .no-thumb-placeholder {
    opacity: 0;
    transform: translateY(56px);
    transition: opacity 0.9s var(--ease-dynamic), transform 0.9s var(--ease-dynamic);
    will-change: transform, opacity;
}

/* 文字块：等大图起来之后再从左到右淡入 */
.has-js .dual-featured-card .dual-featured-info,
.has-js .magazine-row .featured-info-bottom {
    opacity: 0;
    transform: translateX(-34px);
    transition: opacity 0.75s var(--ease-dynamic), transform 0.75s var(--ease-dynamic);
}

/* 右侧小标题：依次从左划入 */
.has-js .magazine-row .side-item {
    opacity: 0;
    transform: translateX(-44px);
    transition: opacity 0.65s var(--ease-dynamic), transform 0.65s var(--ease-dynamic);
}

/* 小标题逐条延迟，形成依次划入的节奏 */
.has-js .magazine-row .side-item:nth-child(2) { transition-delay: 0.1s; }
.has-js .magazine-row .side-item:nth-child(3) { transition-delay: 0.2s; }
.has-js .magazine-row .side-item:nth-child(4) { transition-delay: 0.3s; }

/* 进入视口：大图先到位 */
.has-js .dual-featured-card.is-inview .dual-featured-image,
.has-js .magazine-row.is-inview .featured-image-box .post-img-link,
.has-js .magazine-row.is-inview .featured-image-box .no-thumb-placeholder {
    opacity: 1;
    transform: none;
}

/* 文字块比大图晚 0.22s 起步，形成「图先立住、字再跟上」的顺序 */
.has-js .dual-featured-card.is-inview .dual-featured-info,
.has-js .magazine-row.is-inview .featured-info-bottom {
    opacity: 1;
    transform: none;
    transition-delay: 0.22s;
}

.has-js .magazine-row.is-inview .side-item {
    opacity: 1;
    transform: none;
}

/* 复位时不带延迟：滚出去收得干脆，不在边界上拖泥带水 */
.has-js .dual-featured-card:not(.is-inview) .dual-featured-info,
.has-js .magazine-row:not(.is-inview) .featured-info-bottom,
.has-js .magazine-row:not(.is-inview) .side-item:nth-child(2),
.has-js .magazine-row:not(.is-inview) .side-item:nth-child(3),
.has-js .magazine-row:not(.is-inview) .side-item:nth-child(4) {
    transition-delay: 0s;
}

/* 移动端：行程再大一点、时间稍长，上下滑动时的动效更明显也更顺 */
@media (max-width: 768px) {
    .has-js .dual-featured-card .dual-featured-image,
    .has-js .magazine-row .featured-image-box .post-img-link,
    .has-js .magazine-row .featured-image-box .no-thumb-placeholder {
        transform: translateY(84px);
        transition-duration: 1s;
    }

    .has-js .dual-featured-card .dual-featured-info,
    .has-js .magazine-row .featured-info-bottom {
        transform: translateX(-40px);
        transition-duration: 0.85s;
    }

    .has-js .magazine-row .side-item {
        transform: translateX(-56px);
    }
}

/* 大图的文字信息：紧跟在图片下方，与图片构成一个完整的图文 */
.featured-info-bottom {
    margin-top: 28px;
}

.featured-info-bottom .post-title {
    font-size: clamp(20px, 2.6vw, 32px);
    margin-bottom: 16px;
}

.featured-info-bottom .post-excerpt {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .magazine-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .side-list {
        gap: 20px;
    }
}

/* 移动端（≤768px）适配：让"点击阅读"入口始终可见 + 双 featured 单列 */
@media (max-width: 768px) {
    /* ---- 防超出屏幕 ---- */
    html, body { overflow-x: hidden; }

    /* Hero banner 缩小，避免和下方内容挤在一起 */
    .hero-banner {
        padding: 40px 24px;
        margin-bottom: 50px;
    }
    .hero-banner .hero-text { text-align: center; }
    .hero-banner .hero-text h2 {
        font-size: clamp(28px, 9vw, 42px);
        letter-spacing: 0.02em;
    }
    /* 手机端隐藏 Hero 大标题，避免遮挡背景照片 */
    .hero-banner.has-custom-bg .hero-text h2 {
        display: none;
    }
    .hero-banner .hero-text p { font-size: 13px; }

    /* ---- 文字整体缩小 ---- */
    .post-title { font-size: 20px; margin-bottom: 12px; }
    .post-meta { font-size: 11px; gap: 10px; margin-bottom: 8px; }
    .post-excerpt { font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
    .read-more { font-size: 11px; }

    /* 最底下 magazine-row 里的文章文字区 */
    .featured-info-bottom .post-title {
        font-size: clamp(18px, 5.5vw, 24px);
        margin-bottom: 10px;
    }
    .featured-info-bottom .post-excerpt {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    /* side-list 列表文字缩小 */
    .side-item-meta { font-size: 10px; gap: 8px; margin-bottom: 3px; }
    .side-item-title { font-size: 13px; }

    /* ---- 双 featured 单列 + 内部文字 ---- */
    .dual-featured {
        grid-template-columns: minmax(0, 1fr);
        gap: 50px;
        margin-bottom: 60px;
    }
    .dual-featured-info .post-title { font-size: 18px; margin-bottom: 10px; }
    .dual-featured-info .post-excerpt { font-size: 13px; margin-bottom: 12px; }

    /* ---- 图片：与电脑端统一为 4:3 ---- */
    .featured-image-box .post-img-link,
    .dual-featured-image .post-img-link {
        aspect-ratio: 4/3;
    }

    /* 图片始终显示遮罩 + 入口提示（触屏无 hover） */
    .featured-image-box .post-img-link::before,
    .dual-featured-image .post-img-link::before {
        background: rgba(0, 0, 0, 0.35);
    }
    .featured-image-box .post-img-link::after,
    .dual-featured-image .post-img-link::after {
        opacity: 1;
        transform: translate(-50%, -50%);
        font-size: 12px;
        padding: 8px 18px;
    }

    /* 禁用 hover 放大动画（触屏无 hover） */
    .post-card:hover .post-img { transform: none; }

    /* 点击态反馈 */
    .featured-image-box .post-img-link:active::before,
    .dual-featured-image .post-img-link:active::before {
        background: rgba(0, 0, 0, 0.55);
    }
}

/* 8. 分页：机械拨盘感 */
.pagination {
    margin: 60px 0 100px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pagination span, 
.pagination a {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 800;
    transition: all 0.3s var(--ease-dynamic);
}

.pagination a:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

/* 评论区域样式 */
.comments-section {
    max-width: 900px;
    margin: 80px auto 100px;
    padding-top: 50px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

/* 评论列表 */
.comment {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.comment-child {
    margin-left: 50px;
    padding-left: 24px;
    border-left: 2px solid var(--accent);
    border-bottom-color: transparent;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(30%);
}

.comment-name {
    font-size: 14px;
    font-weight: 800;
}

.comment-time {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--fg);
    padding-left: 52px;
}

.comment-content p {
    margin-bottom: 8px;
}

.comment-actions {
    padding-left: 52px;
    margin-top: 8px;
}

.comment-reply-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.comment-reply-btn:hover {
    color: var(--accent);
}

/* 评论表单 */
.comment-form {
    margin-bottom: 50px;
    padding: 30px;
    background: var(--subtle-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.comment-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form input:focus {
    border-color: var(--accent);
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    font-family: var(--font-sans);
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    border-color: var(--accent);
}

.verify-code {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.verify-code input {
    width: 120px !important;
    padding: 10px 14px !important;
}

.verify-code img {
    cursor: pointer;
    height: 40px;
    border: 1px solid var(--border);
    filter: none;
}

.submit-btn {
    margin-top: 20px;
    padding: 12px 40px;
    background: var(--fg);
    color: var(--bg);
    border: none;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-dynamic);
}

.submit-btn:hover {
    background: var(--accent);
    color: #FFF;
    transform: translateY(-2px);
}

.comment-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comment-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.comment-pagination a,
.comment-pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s var(--ease-dynamic);
}

.comment-pagination a:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.comment-pagination .current {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .comment-form-row {
        grid-template-columns: 1fr;
    }
    
    .comment-child {
        margin-left: 20px;
        padding-left: 16px;
    }
    
    .comment-content {
        padding-left: 0;
    }
    
    .comment-actions {
        padding-left: 0;
    }
}

/* Hero 取景器元素 - 移动端适配 */
@media (max-width: 768px) {
    /* 给底部焦距刻度留出空间 */
    .hero-banner {
        padding-bottom: 56px;
    }

    /* 窄屏下水印会被裁切并与底部刻度重叠，移动端隐藏 */
    .hero-text::after {
        display: none;
    }

    .hero-viewfinder {
        inset: 16px 16px 52px 16px;
    }

    /* 红杠移到标题文字范围之外的左边沿，与时间保持同一水平线；
       时间本身仍与标题同心，不再需要为红杠预留缩进 */
    .hero-text p {
        position: relative;
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;
        border-left: 0;
        letter-spacing: 0.18em;
    }

    .hero-text p::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 2px;
        height: 12px;
        background: var(--leica-red);
    }

    .hero-viewfinder span {
        width: 16px;
        height: 16px;
        border-width: 1.5px;
    }

    /* 参数改为横向一行，居中排在时钟下方 */
    .hero-exif {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 16px;
        margin-top: 20px;
    }

    .exif-item {
        font-size: 11px;
        gap: 5px;
        letter-spacing: 0.1em;
    }

    .exif-item b {
        font-size: 9px;
    }

    /* 手机上允许竖向滑动页面：只有横向拖动才调数值，误触或想滚动时不会把参数拨走 */
    .exif-item.is-live {
        touch-action: pan-y;
    }

    .exif-hint {
        flex-basis: 100%;
        text-align: center;
    }
}

/* 顶部照片带：移动端压低高度，并把横向焦点对准人物（画面约 25% 处），避免人物被切到左边缘 */
@media (max-width: 768px) {
    .page-bg {
        height: 74vh;
    }

    .page-bg__photo {
        background-image: var(--page-img-sharp, var(--page-img));
        background-position: 25% top;
    }

    /* 性能：移动端关掉图片自带的胶片滤镜（grayscale 10% + contrast 1.05），
       每张图少一个合成层；桌面保持原胶片观感不变。
       卡片图仍保留光圈景深虚化（仅在曝光参数偏离默认时挂上） */
    img {
        filter: none;
    }
    .post-img {
        filter: none;
    }
    html.exif-on .post-img {
        filter: blur(calc(var(--exif-blur, 0px) * 0.3));
    }
}

/* ============================================================
   标题统一纯色：不再使用渐变字，跟随主题（浅色纯黑 / 深色纯白）
   标题悬停变红的反馈由各自的 .post-title / .side-item-title 规则提供
   ============================================================ */
.post-title a,
.side-item-title a,
.article-header h1,
.comments-title,
.hero-text h2,
.hero-banner.has-custom-bg .hero-text h2 {
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
}

/* 链接标题继承父级颜色，保留原有的悬停变红反馈 */
.post-title a,
.side-item-title a {
    color: inherit;
}

.article-header h1,
.comments-title,
.hero-text h2,
.hero-banner.has-custom-bg .hero-text h2 {
    color: var(--fg);
}

/* ============================================================
   标题点击变红：Hero 大标题与卡片 / 侧栏小标题统一同一反馈
   润色过渡 0.25s，260ms 后由 JS 撤掉 class 自然回到原色
   ============================================================ */
.post-title a,
.side-item-title a,
.hero-text h2,
.article-header h1,
.comments-title {
    transition: color 0.25s var(--ease-dynamic);
}

.title-press,
.title-press * {
    color: var(--leica-red) !important;
}

/* Hero 时间下方的日期（原顶部 logo 的日期） */
.hero-date {
    display: block;
    margin-top: 8px;
    margin-left: -22px;
    padding-left: 19px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--fg);
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
    animation: heroFadeIn 1.2s var(--ease-dynamic) 0.3s both;
}

/* 移动端：时间与日期都不再缩进，与标题居中对齐 */
@media (max-width: 768px) {
    .hero-date {
        margin-left: 0;
        padding-left: 0;
        font-size: 11px;
    }
}

/* ============================================================
   文章页入场：大标题从右向左淡入，图片淡入并从下方浮起
   初始隐藏态只在 has-js 下生效，脚本失效时内容照常可见
   ============================================================ */
.has-js .article-header h1 {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s var(--ease-dynamic),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .article-header h1.is-in {
    opacity: 1;
    transform: none;
}

.has-js .article-content img,
.has-js .article-cover img,
.has-js .gallery-h-item img {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-dynamic),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .article-content img.is-in,
.has-js .article-cover img.is-in,
.has-js .gallery-h-item img.is-in {
    opacity: 1;
    transform: none;
}

/* 入场完成后保留原有的悬停上浮反馈 */
.has-js .article-content img.is-in:hover {
    transform: translateY(-5px);
}

@media (prefers-reduced-motion: reduce) {
    .has-js .article-header h1,
    .has-js .article-content img,
    .has-js .article-cover img,
    .has-js .gallery-h-item img {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   文章照片墙：按原图比例自动分行，大小错落、整体连续
   电脑：悬停这张变长变大、同行其余自动收窄，点击才进入看图
   手机：点按先播放放大效果，再进入沉浸看图
   两张以下不启用照片墙
   ============================================================ */
.article-content img.is-portrait {
    max-width: 62%;
}

.article-collage {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 30px 0;
}

/* 拼图排版前先隐藏正文（占位保留），图片全部加载后再显示，避免先乱后正 */
.article-content.collage-pending {
    visibility: hidden;
}

.article-collage .collage-row {
    display: flex;
    width: 100%;
    gap: 3px;
}

.article-collage .collage-row.is-single {
    justify-content: center;
}

.article-collage .collage-block {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.article-collage .collage-upper {
    display: flex;
    width: 100%;
}

/* 右侧小图列：宽度由 flex-grow 控制；列内每张图各自独立放大 */
.article-collage .collage-side {
    display: flex;
    flex-direction: column;
    flex-grow: var(--grow, 1);
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 0;
}

.article-collage .collage-side .collage-card {
    width: 100%;
    /* 高度由脚本写入 --h；悬停时在这个基准上加高，下面的图自然被推开 */
    height: var(--h, auto);
}

/* 通栏横图的基础高度由脚本写入 --wide-h */
.article-collage .collage-card.is-wide {
    height: var(--wide-h, auto);
}

.article-collage .collage-card {
    position: relative;
    flex-grow: var(--grow, 1);
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--subtle-bg);
    cursor: zoom-in;
    transform-origin: center;
    backface-visibility: hidden;
    contain: paint;
    /* 动效暂时全部取消：照片紧贴、直角，先看静态效果 */
    transition: none;
}

.article-collage .collage-card:hover,
.article-collage .collage-card img:hover {
    transform: none;
    filter: none;
}

.article-collage .collage-card img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    filter: none; /* 照片墙保留原色 */
    cursor: zoom-in;
}

/* 照片墙内的图不参与正文入场上浮，由卡片自己做动效 */
.has-js .article-content .article-collage img {
    opacity: 1;
    transform: none;
}


/* 手机端：点按先放大，动效跑完再出图 */
.article-collage .collage-card.is-tap {
    transform: none;
}

@media (max-width: 768px) {
    .article-content img.is-portrait { max-width: 74%; }

    .article-collage {
        width: 88%;
        margin: 24px auto;
        gap: 2px;
    }

    .article-collage .collage-row {
        gap: 2px;
    }

    /* 手机端实验：第一次点只出动效，再点一次才进入看图 */
    .article-collage .collage-card.is-tap::after {
        content: '再点一次看大图';
        position: absolute;
        left: 50%;
        bottom: 10px;
        transform: translateX(-50%);
        padding: 4px 10px;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 11px;
        letter-spacing: 0.05em;
        white-space: nowrap;
        pointer-events: none;
    }
}

/* ============================================================
   Hero 时间竖排：日期在上，时、分上下堆叠，星期在下
   ============================================================ */
.hero-temporal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    animation: heroFadeIn 1.2s var(--ease-dynamic) 0.2s both;
}

.hero-temporal .hero-date {
    margin: 0;
    padding-left: 5px; /* 大号数字有左侧留白，小字右移几像素做视觉对齐 */
    font-size: 15px;
    letter-spacing: 0.22em;
    opacity: 0.75;
    text-align: left;
}

.hero-temporal #hero-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: clamp(56px, 10vw, 116px);
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: 0;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.hero-temporal #hero-clock::before,
.hero-temporal #hero-clock::after {
    display: none;
}

.hero-temporal #hero-clock .clock-h,
.hero-temporal #hero-clock .clock-m {
    display: block;
}

.hero-temporal .hero-week {
    margin-top: 0;
    padding-left: 5px; /* 与日期同一左缘 */
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.42em;
    color: var(--fg);
    opacity: 0.55;
    text-transform: uppercase;
    text-align: left;
}

[data-theme="dark"] .hero-temporal #hero-clock,
[data-theme="dark"] .hero-temporal .hero-date,
[data-theme="dark"] .hero-temporal .hero-week {
    color: #FFF;
}

@media (max-width: 768px) {
    .hero-temporal {
        align-items: flex-start;
        gap: 4px;
    }

    .hero-temporal #hero-clock {
        font-size: clamp(64px, 19vw, 104px);
    }

    /* 日期/星期只在电脑端放大，手机端保持原尺寸 */
    .hero-temporal .hero-date {
        font-size: 13px;
    }

    .hero-temporal .hero-week {
        font-size: 12px;
    }
}
