:root {
    /* --- 全局变量定义 --- */

    /* 背景色 */
    --bg: #F5F5F7;
    /* 强调色 (苹果蓝) */
    --accent: #0071E3;
    /* 卡片在 Z 轴上的层级间距 */
    --step-z: 1100px;
    /* 全局缓动函数 */
    --ease: cubic-bezier(0.25, 1, 0.5, 1);

    /* --- 响应式尺寸计算 --- */
    /* 首页卡片固定为 2:3；宽度或高度不足时按相同比例整体缩小。 */
    --card-w: min(400px, 75vw, 52vh);
    --card-h: min(600px, 112.5vw, 78vh);
    /* 展开时的边距 */
    --gap: 60px;
}

@media (max-width: 768px) {
    :root {
        /* 移动端保留更多上下空间，同时保持同一 2:3 比例。 */
        --gap: 20px;
        --card-w: min(72vw, 50vh);
        --card-h: min(108vw, 75vh);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    background-color: var(--bg);
    color: #1D1D1F;
    font-family: 'Inter', -apple-system, sans-serif;
    /* 禁止默认滚动，由自定义逻辑控制 */
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

/* 只有在非详情模式下才禁用全局触摸行为，避免影响详情页的上下滑动 */
body:not(.mode-detail):not(.mode-about) {
    touch-action: none;
}

/* UI 元素 */
.header {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 5000;
    transition: opacity 0.6s var(--ease);
    /* 防止遮挡下方卡片的交互 */
    pointer-events: none;
}

.header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.about-trigger {
    position: fixed;
    top: 40px;
    right: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 106px;
    min-height: 42px;
    pointer-events: auto;
    appearance: none;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #424245;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    cursor: pointer;
    transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.about-trigger:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
}

.language-toggle {
    position: fixed;
    top: 40px;
    right: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 42px;
    pointer-events: auto;
    appearance: none;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #424245;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    cursor: pointer;
    transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.language-toggle:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
}

.about-dialog {
    width: min(620px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 34px;
    color: #1D1D1F;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(34px) saturate(160%);
    -webkit-backdrop-filter: blur(34px) saturate(160%);
    overflow: auto;
}

.about-dialog[open] {
    animation: about-enter 0.45s var(--ease) both;
}

.about-dialog::backdrop {
    background: rgba(239, 239, 242, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.about-card {
    position: relative;
    padding: 66px 64px 58px;
}

.about-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(245, 245, 247, 0.9);
    color: var(--accent);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.about-close:hover {
    background: #E8E8ED;
    transform: scale(1.06);
}

.about-close svg {
    width: 19px;
    height: 19px;
}

.about-eyebrow {
    display: block;
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.about-card h2 {
    max-width: 450px;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 600;
}

.about-intro {
    margin-top: 28px;
    font-size: 1.15rem;
    line-height: 1.65;
    color: #1D1D1F;
}

.about-copy {
    margin-top: 18px;
    font-size: 0.96rem;
    line-height: 1.75;
    color: #6E6E73;
}

.about-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 30px;
    list-style: none;
}

.about-focus li {
    padding: 9px 13px;
    border: 1px solid rgba(0, 113, 227, 0.12);
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.07);
    color: #0066CC;
    font-size: 0.73rem;
    font-weight: 500;
}

.about-projects {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
    padding: 13px 19px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #FFFFFF;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 113, 227, 0.22);
    transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.about-projects:hover {
    background: #0077ED;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 113, 227, 0.28);
}

.about-projects span {
    transition: transform 0.25s var(--ease);
}

.about-projects:hover span {
    transform: translateX(3px);
}

@keyframes about-enter {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 5000;
    pointer-events: auto;
}

.dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: transparent;
    cursor: pointer;
    border: 0;
    padding: 0;
    appearance: none;
}

.dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D2D2D7;
    transition: transform 0.5s var(--ease), background 0.5s var(--ease);
}

.dot:focus-visible,
.card-anchor:focus-visible,
.close-btn:focus-visible,
.play-overlay:focus-visible,
.about-trigger:focus-visible,
.language-toggle:focus-visible,
.about-close:focus-visible,
.about-projects:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.45);
    outline-offset: 4px;
}

/* 弹窗关闭后由程序恢复焦点时，不显示整张卡片的蓝色焦点框。 */
.card-anchor.is-programmatic-focus:focus-visible,
.about-close.is-programmatic-focus:focus-visible {
    outline: none;
}

.dot.active {
    background: transparent;
}

.dot.active::before {
    background: var(--accent);
    transform: scale(1.6);
}

/* 3D 舞台 */
.stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.world {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

/* 卡片容器 */
.card-anchor {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--card-w);
    height: var(--card-h);
    aspect-ratio: 2 / 3;
    transform: translate3d(-50%, -50%, 0);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    transition: transform 1s var(--ease), opacity 0.8s var(--ease), filter 0.8s var(--ease), width 0.8s var(--ease), height 0.8s var(--ease);
    pointer-events: none;
    opacity: 0;
}

.card-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.8s var(--ease);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 44px;
    background: white;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* --- 沉浸式预览面修复 --- */
.face-front {
    padding: 0;
    z-index: 2;
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.preview-img-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 171px);
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.preview-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

/* 修复核心：消融带 (用于文字下方的模糊遮罩) */
.melt-zone {
    position: absolute;
    bottom: 150px;
    /* 文字区域的高度 */
    left: 0;
    width: 100%;
    height: 80px;
    /* 模糊过渡带的高度 */
    z-index: 2;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(40px);
    /* 关键：使用 mask 让模糊本身产生羽化感 */
    mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
    pointer-events: none;
    /* Safari 修复: 延迟显示,避免与卡片切换时的 filter blur 叠加造成闪烁 */
    /* 使用更长的延迟(0.8s)确保卡片过渡完全完成 */
    transition: opacity 0.6s ease 0.8s;
    /* 强制 GPU 加速,改善 Safari 的 backdrop-filter 渲染 */
    transform: translateZ(0);
    will-change: opacity;
}

/* 修复移动端渲染 BUG：非激活卡片隐藏模糊层，避免 backdrop-filter 叠加导致的渲染异常 */
.card-anchor:not(.is-active) .melt-zone {
    opacity: 0;
    /* 立即隐藏,无延迟 */
    transition: opacity 0.2s ease 0s;
}

/* 文字覆盖层：纯白底部 */
.front-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 151px;
    /* 略微多出1px避免缝隙 */
    padding: 0 40px 50px 40px;
    background: #FFFFFF;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: none;
}

/* 柔和的悬停反馈 */
.card-anchor.is-active:not(.is-open) .face-front:hover {
    transform: scale(1.03) translate3d(0, -5px, 40px);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.08);
}

.card-anchor.is-active:not(.is-open) .face-front:hover img {
    transform: scale(1.08);
}

.face-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    z-index: 1;
    background: white;
    pointer-events: none;
}

/* 展开逻辑 */
.card-anchor.is-active {
    pointer-events: auto;
    opacity: 1;
}

.card-anchor.is-open {
    width: calc(100vw - (var(--gap) * 2));
    height: calc(100vh - (var(--gap) * 2));
    height: calc(100dvh - (var(--gap) * 2));
    z-index: 9000 !important;
    transform: translate3d(-50%, -50%, 0px) !important;
}

.card-anchor.is-open .card-face {
    border-radius: 36px;
    box-shadow: 0 60px 150px rgba(0, 0, 0, 0.1);
}

.card-anchor.is-open .card-flipper {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* 开始翻转时立即隐藏封面图及其渐变层，避免旋转过程中露出镜像图片。 */
.card-anchor.is-open .preview-img-box,
.card-anchor.is-open .melt-zone,
.card-anchor.is-open .front-info-overlay {
    opacity: 0;
    visibility: hidden;
    transition: none;
}

/* 退出时等卡片接近正面后再恢复封面与标题，避免过早露出。 */
.card-anchor.is-closing .preview-img-box,
.card-anchor.is-closing .melt-zone,
.card-anchor.is-closing .front-info-overlay {
    animation: cover-return 0.8s linear both;
}

@keyframes cover-return {
    0%, 16% {
        opacity: 0;
        visibility: hidden;
    }
    16.1% {
        opacity: 0;
        visibility: visible;
    }
    100% {
        opacity: 1;
        visibility: visible;
    }
}

.card-anchor.is-open .face-back {
    pointer-events: auto;
}

/* 详情内容居中滚动 */
.detail-view {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.is-open .detail-view {
    opacity: 1;
    transition-delay: 0.13s;
}

.detail-content-wrapper {
    width: calc(100% - 80px);
    max-width: 800px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    padding: 60px 0 80px;
}

.detail-main-content {
    width: 100%;
}

.detail-image-carousel {
    position: relative;
    width: 100%;
    margin: -18px 0 72px;
}

.detail-image-strip {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 6px 2px 18px;
    overflow-x: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
}

.detail-image-strip::-webkit-scrollbar {
    display: none;
}

.detail-image-strip .section-image {
    flex: 0 0 clamp(210px, 19vw, 260px);
    height: auto;
    aspect-ratio: 1242 / 1660;
    margin-bottom: 0;
    scroll-snap-align: start;
}

.detail-image-strip .section-image img {
    width: 100%;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
}

.detail-image-strip.is-dragging {
    cursor: grabbing;
}

.detail-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #1D1D1F;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.detail-carousel-btn:hover {
    background: #FFFFFF;
    color: var(--accent);
    transform: translateY(-50%) scale(1.05);
}

.detail-carousel-prev {
    left: -18px;
}

.detail-carousel-next {
    right: -18px;
}

.detail-intro-header,
.detail-feature-row,
.detail-feature-copy,
.detail-feature-media,
.detail-text-pair,
.detail-media-block,
.detail-quote-block,
.detail-text-block {
    width: 100%;
}

.detail-feature-copy,
.detail-feature-media {
    min-width: 0;
}

.detail-view::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.detail-view::-webkit-scrollbar-track {
    background: transparent;
}

.detail-view::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 2px solid white;
    /* 给滚动条加白边提升精致感 */
}

.detail-view::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.detail-nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 72px;
    flex: 0 0 auto;
    padding: 16px clamp(24px, 3vw, 40px);
    border-radius: 36px 36px 0 0;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.detail-nav-bar.is-stuck {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.small-nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    color: #1D1D1F;
    letter-spacing: -0.01em;
}

.detail-nav-bar.is-stuck .small-nav-title {
    opacity: 1;
    transform: none;
}

.detail-large-header {
    margin-top: 10px;
    margin-bottom: 40px;
}

.detail-large-header .section-title {
    margin-bottom: 5px;
}

.detail-large-header .project-time {
    color: #86868B;
    font-size: 0.95rem;
    margin-top: 5px;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F5F5F7;
    border: none;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.close-btn:hover {
    background: #E8E8ED;
    transform: scale(1.1);
}

.play-overlay:hover .play-overlay-icon {
    transform: scale(1.05);
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

body.mode-detail .header,
body.mode-detail .indicator {
    opacity: 0 !important;
}

body.mode-detail .about-trigger {
    pointer-events: none;
}

body.mode-detail .language-toggle {
    pointer-events: none;
}

body.mode-detail .card-anchor:not(.is-open) {
    opacity: 0.1;
    filter: blur(40px);
    transform: translate3d(-50%, -50%, -800px) !important;
}

/* 内容样式 */
.card-tag {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.face-front h3 {
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 600;
    white-space: pre-line;
}

.detail-large-header .section-title {
    white-space: pre-line;
}

.section-text {
    line-height: 1.9;
    color: #424245;
    font-size: 1.15rem;
    margin-bottom: 40px;
}

.section-quote {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1D1D1F;
    font-style: italic;
    padding: 24px 30px;
    border-left: 4px solid var(--accent);
    margin-bottom: 40px;
    background: #f5f5f7;
    border-radius: 0 16px 16px 0;
}

.section-link-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
    padding: 22px 24px;
    color: #1D1D1F;
    text-decoration: none;
    background: linear-gradient(135deg, #F4FAFF 0%, #F5F5F7 100%);
    border: 1px solid rgba(0, 113, 227, 0.14);
    border-radius: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.section-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow: 0 16px 34px rgba(0, 64, 128, 0.1);
}

.section-link-card:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.35);
    outline-offset: 3px;
}

.section-link-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #0071E3;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 64, 128, 0.08);
}

.section-link-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.section-link-content strong {
    font-size: 1.05rem;
    font-weight: 600;
}

.section-link-content > span {
    color: #6E6E73;
    font-size: 0.9rem;
    line-height: 1.5;
}

.section-link-cta {
    flex: 0 0 auto;
    color: #0071E3;
    font-size: 0.9rem;
    font-weight: 600;
}

.section-image {
    width: 100%;
    height: 450px;
    background: #f5f5f7;
    border-radius: 16px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.section-image.is-pending {
    background: linear-gradient(110deg, #F0F0F2 25%, #FAFAFB 45%, #F0F0F2 65%);
    background-size: 200% 100%;
    animation: image-placeholder 1.5s ease-in-out infinite;
}

.section-image.is-loaded {
    height: auto;
    background: transparent;
    border: none;
}

.section-image.has-error::after {
    content: attr(data-error-message);
    color: #86868B;
    font-size: 0.9rem;
}

.section-image img {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    display: block;
    margin: 0 auto;
}

.detail-hero-image {
    margin-bottom: 48px;
}

.detail-hero-image img {
    width: 100%;
    max-height: none;
    object-fit: contain;
}

@media (min-width: 1025px) {
    .detail-content-wrapper.has-unified-layout {
        width: calc(100% - clamp(80px, 9vw, 144px));
        max-width: 1240px;
        padding-top: clamp(34px, 4.5vh, 52px);
    }

    .has-unified-layout .detail-intro-header {
        max-width: 1120px;
        margin-bottom: 48px;
    }

    .has-unified-layout .detail-intro-header .detail-large-header {
        max-width: 800px;
        margin-top: 0;
        margin-bottom: 28px;
    }

    .has-unified-layout .detail-intro-header .section-quote {
        margin-bottom: 0;
    }

    .has-unified-layout .detail-feature-row {
        display: grid;
        grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.42fr);
        gap: clamp(40px, 5vw, 76px);
        align-items: start;
        margin-bottom: 96px;
    }

    .has-unified-layout .detail-content-row .detail-feature-copy {
        position: sticky;
        top: 104px;
        align-self: start;
    }

    .has-unified-layout .detail-hero-row {
        align-items: center;
    }

    .has-unified-layout .detail-large-header .section-title {
        font-size: clamp(2.5rem, 3.4vw, 3.5rem);
        line-height: 1.08;
    }

    .has-unified-layout .detail-feature-copy > .section-subtitle:first-child,
    .has-unified-layout .detail-text-pair .detail-text-block > .section-subtitle:first-child,
    .has-unified-layout .detail-text-block > .section-subtitle:first-child {
        margin-top: 0;
    }

    .has-unified-layout .detail-hero-row .section-link-card {
        margin-bottom: 34px;
        padding: 19px 20px;
    }

    .has-unified-layout .detail-hero-row .section-link-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .has-unified-layout .detail-hero-row .section-link-cta {
        display: none;
    }

    .has-unified-layout .detail-feature-media .section-image img {
        width: 100%;
        max-height: none;
    }

    .has-unified-layout .detail-feature-media .section-image.is-phone-shot {
        justify-content: center;
    }

    .has-unified-layout .detail-feature-media .section-image.is-tablet-shot {
        justify-content: center;
    }

    .has-unified-layout .detail-feature-media .section-image.is-phone-shot img {
        width: min(100%, 340px);
    }

    .has-unified-layout .detail-feature-media .section-image.is-tablet-shot img {
        width: min(100%, 520px);
    }

    .has-unified-layout .detail-hero-row .detail-hero-image {
        margin-bottom: 0;
    }

    .has-unified-layout .detail-hero-row .detail-hero-image img {
        border-radius: 20px;
        box-shadow: 0 24px 54px rgba(0, 0, 0, 0.1);
    }

    .has-unified-layout .detail-text-block {
        max-width: 800px;
        margin: 0 0 72px;
    }

    .has-unified-layout .detail-quote-block {
        max-width: 1120px;
        margin: 0 0 64px;
    }

    .has-unified-layout .detail-quote-block .section-quote {
        margin-bottom: 0;
    }

    .has-unified-layout .detail-text-pair {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
        gap: clamp(48px, 5.4vw, 84px);
        align-items: start;
        margin-bottom: 96px;
    }

    .has-unified-layout .detail-text-pair .detail-text-block {
        max-width: none;
        margin-bottom: 0;
    }

    .has-unified-layout .detail-media-block {
        margin-bottom: 96px;
    }

    .has-unified-layout .detail-main-content > :last-child {
        margin-bottom: 0;
    }
}

.section-caption {
    margin: -24px auto 40px;
    color: #86868B;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

@keyframes image-placeholder {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.section-title {
    font-size: 3rem;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.5rem;
    margin-top: 60px;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: #1D1D1F;
}

.section-subtitle2 {
    font-size: 1.25rem;
    margin-top: 40px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: #1D1D1F;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    /* iOS Safari 会在 3D 位移动画中丢失父层 filter。
       手机端改由内部合成层立即承担模糊，避免反向切换时后景卡片突然变清晰。 */
    .card-anchor .card-flipper {
        transition: transform 0.8s var(--ease), filter 0s;
        will-change: transform, filter;
    }

    .card-anchor:not(.is-active) .card-flipper {
        filter: blur(var(--card-blur, 10px));
        -webkit-filter: blur(var(--card-blur, 10px));
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .card-anchor.is-active .card-flipper {
        filter: none;
        -webkit-filter: none;
    }

    /* 移动端左右留白统一 */
    .header {
        left: 20px;
        top: 28px;
    }

    .indicator {
        right: 20px;
    }

    /* 移动端圆角缩小 */
    .card-face {
        border-radius: 28px;
    }

    .card-anchor.is-open .card-face {
        border-radius: 24px;
    }

    .detail-nav-bar {
        min-height: 64px;
        padding: 12px 20px;
        border-radius: 24px 24px 0 0;
    }

    /* 移动端字体缩小 */
    .header h1 {
        font-size: 1.2rem;
    }

    .about-trigger {
        top: 28px;
        right: 20px;
        min-width: 96px;
        min-height: 40px;
        padding: 9px 15px;
        font-size: 0.78rem;
    }

    .language-toggle {
        top: 28px;
        right: 128px;
        min-width: 48px;
        min-height: 40px;
        padding: 9px 12px;
        font-size: 0.74rem;
    }

    .about-dialog {
        width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
        border-radius: 28px;
    }

    .about-card {
        padding: 58px 28px 36px;
    }

    .about-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    .about-card h2 {
        font-size: 2.25rem;
    }

    .about-intro {
        margin-top: 22px;
        font-size: 1rem;
        line-height: 1.6;
    }

    .about-copy {
        font-size: 0.88rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.2rem;
        margin-top: 40px;
    }

    .section-subtitle2 {
        font-size: 1.05rem;
        margin-top: 28px;
    }

    .section-text {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 28px;
    }

    .section-caption {
        margin-top: -26px;
        margin-bottom: 28px;
        font-size: 0.8rem;
    }

    .detail-hero-image {
        margin-bottom: 32px;
    }

    .section-link-card {
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
        margin-bottom: 28px;
    }

    .section-link-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .section-link-cta {
        display: none;
    }

    .section-quote {
        font-size: 1.05rem;
        line-height: 1.7;
        padding: 18px 22px;
        margin-bottom: 28px;
    }

    .face-front h3 {
        font-size: 1.3rem;
    }

    .card-tag {
        font-size: 0.65rem;
    }

    .small-nav-title {
        font-size: 1rem;
    }

    .detail-large-header .project-time {
        font-size: 0.85rem;
    }

    .detail-view {
        padding: 0;
    }

    .detail-content-wrapper {
        width: calc(100% - 48px);
        padding: 40px 0 60px;
    }

    .front-info-overlay {
        padding: 0 28px 36px 28px;
        height: 130px;
    }

    .preview-img-box {
        height: calc(100% - 150px);
    }

    .melt-zone {
        bottom: 128px;
    }
}

/* 窄屏兼容：原始 180° 动画结束后再扁平化详情面，宽屏不受影响。 */
@media (max-width: 1024px) {
    /* 旋转到约 90°时切走正面，让详情内容从侧面开始自然显现。 */
    .card-anchor.is-open .face-front {
        animation: narrow-front-hide 0.8s linear both;
    }

    .card-anchor.is-open .face-back {
        backface-visibility: visible;
        -webkit-backface-visibility: visible;
    }

    .card-anchor.is-closing .face-front {
        animation: narrow-front-return 0.8s linear both;
    }

    .card-anchor.is-open.is-narrow-flip-complete .card-flipper {
        transition: none;
        transform: none !important;
        -webkit-transform: none !important;
        transform-style: flat;
        -webkit-transform-style: flat;
    }

    .card-anchor.is-open.is-narrow-flip-complete .face-front {
        visibility: hidden;
    }

    .card-anchor.is-open.is-narrow-flip-complete .face-back {
        z-index: 3;
        transform: none !important;
        -webkit-transform: none !important;
        backface-visibility: visible;
        -webkit-backface-visibility: visible;
    }

    .card-anchor.is-open.is-preparing-close .card-flipper {
        transition: none !important;
        transform: rotateY(180deg) !important;
        -webkit-transform: rotateY(180deg) !important;
    }

    .card-anchor.is-open.is-preparing-close .face-front {
        visibility: hidden;
    }

    .card-anchor.is-open.is-preparing-close .face-back {
        transform: rotateY(180deg) !important;
        -webkit-transform: rotateY(180deg) !important;
    }

    @keyframes narrow-front-hide {
        0%, 16% {
            visibility: visible;
        }
        16.1%, 100% {
            visibility: hidden;
        }
    }

    @keyframes narrow-front-return {
        0%, 16% {
            visibility: hidden;
        }
        16.1%, 100% {
            visibility: visible;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
