
:root {
    --primary-color: #e07a5f;
    --secondary-color: #81b29a;
    --accent-color: #f2cc8f;
    --light-color: #fdf6f0;
    --dark-color: #3d405b;
    --text-color: #4a4a4a;

    --gradient-primary: linear-gradient(135deg, #f6a07a 0%, #e07a5f 100%);
    --gradient-secondary: linear-gradient(135deg, #a8d5c0 0%, #81b29a 100%);
    --gradient-warm: linear-gradient(135deg, #f2cc8f 0%, #e07a5f 100%);

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    --shadow-xl: 0 15px 35px rgba(0,0,0,0.16);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-normal: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--light-color);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.9rem 0;
    transition: var(--transition-normal);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color) !important;
}

.navbar-brand i { margin-right: 6px; }

.navbar-brand span { color: var(--secondary-color); }

.navbar .nav-link {
    color: var(--dark-color) !important;
    font-weight: 600;
    margin: 0 4px;
    transition: var(--transition-normal);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary-color) !important;
}

/* ========== Hero ========== */
.hero {
    background: var(--gradient-warm);
    color: #fff;
    text-align: center;
    padding: 150px 0 70px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero p {
    font-size: 1.25rem;
    max-width: 680px;
    margin: 0 auto 2rem;
    opacity: 0.96;
}

.hero .btn {
    margin: 0 8px;
}

section { padding: 70px 0; }

.section-title {
    text-align: center;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.6rem;
}

.section-description {
    text-align: center;
    color: #7a7a7a;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition-normal);
}

.btn-primary:hover {
    background: #d16849;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
}

.btn-secondary {
    background: var(--secondary-color);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
}

.btn-secondary:hover { background: #6fa088; }

.cards-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.moment-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.6rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border-top: 4px solid var(--accent-color);
}

.moment-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.moment-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.moment-card .moment-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

.moment-card h4 {
    color: var(--dark-color);
    font-weight: 700;
    margin: 0.4rem 0 0.6rem;
}

.moment-card p { color: #6a6a6a; margin: 0; }

.moment-card .badge {
    background: var(--secondary-color);
    border-radius: 20px;
    font-weight: 500;
    margin-top: 1rem;
}

.gallery-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.photo-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);

    height: 0;
    padding-top: 75%;
    aspect-ratio: 4 / 3;
    transition: var(--transition-normal);
}

.photo-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.photo-card:hover img { transform: scale(1.08); }

.photo-card .photo-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 16px 14px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.photo-card .photo-overlay h5 {
    margin: 0 0 2px;
    font-weight: 700;
    font-size: 1.05rem;
}

.photo-card .photo-overlay small { opacity: 0.9; }

/* ========== 时光记录页 ========== */
/* --- 概览 --- */
.timeline-overview {
    padding: 52px 0 12px;
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

/* --- 本季精选 --- */
.tl-featured-section { padding: 18px 0 54px; }

.tl-featured {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(224, 122, 95, 0.1);
    box-shadow: var(--shadow-lg);
}

.tl-featured-media { position: relative; min-height: 330px; }

.tl-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tl-featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.38rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #b95d46;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: var(--shadow-sm);
}

.tl-featured-body {
    padding: 2.2rem 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tl-featured-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
}

.tl-featured-body h3 {
    margin: 0.5rem 0 0.7rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-color);
}

.tl-featured-body > p {
    margin: 0 0 1.1rem;
    color: #666;
}

.tl-featured-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    display: grid;
    gap: 0.5rem;
}

.tl-featured-points li {
    position: relative;
    padding-left: 1.55rem;
    color: #555;
    font-size: 0.92rem;
}

.tl-featured-points li i {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.tl-featured-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    font-size: 0.84rem;
    color: #8a8a8a;
}

.tl-featured-foot .tl-cat { font-size: 0.76rem; }

/* --- 筛选工具条 --- */
.timeline-section {
    padding: 46px 0 34px;
    background:
        radial-gradient(circle at 12% 6%, rgba(242, 204, 143, 0.16), transparent 42%),
        radial-gradient(circle at 88% 62%, rgba(129, 178, 154, 0.16), transparent 45%);
}

.tl-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    max-width: 1040px;
    margin: 0 auto 2rem;
    padding: 0.5rem 0.7rem;
    background: #fff;
    border: 1px solid rgba(224, 122, 95, 0.1);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.tl-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.tl-filter {
    border: none;
    background: transparent;
    color: #6b6b6b;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.tl-filter:hover { background: rgba(224, 122, 95, 0.08); color: var(--primary-color); }

.tl-filter.is-active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(224, 122, 95, 0.28);
}

.tl-filter-divider {
    width: 1px;
    height: 18px;
    margin: 0 0.4rem;
    background: #eee;
}

.tl-count {
    padding-right: 0.6rem;
    font-size: 0.82rem;
    color: #9a9a9a;
    white-space: nowrap;
}

/* --- S 形曲线时间线 --- */
.snake-timeline {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 0 4px;
}

/* JS 未生效时的兜底：一条柔和的竖直中线 */
.snake-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    margin-left: -1.5px;
    border-radius: 3px;
    background: linear-gradient(180deg,
        rgba(242, 204, 143, 0) 0%,
        rgba(242, 204, 143, 0.9) 6%,
        rgba(224, 122, 95, 0.75) 50%,
        rgba(129, 178, 154, 0.9) 94%,
        rgba(129, 178, 154, 0) 100%);
}

.snake-timeline.is-curved::before { display: none; }

.snake-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.snake-path {
    stroke: url(#snakeGradient);
    stroke-width: 3;
    stroke-linecap: round;
}

.snake-glow {
    stroke: #e07a5f;
    stroke-width: 14;
    stroke-linecap: round;
    opacity: 0.10;
}

/* --- 年份分隔 --- */
.tl-year {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 4px 0 18px;
}

.tl-year span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.35rem 1.1rem;
    background: #fff;
    border: 1px solid rgba(224, 122, 95, 0.18);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    color: var(--dark-color);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.tl-year span i { color: var(--primary-color); font-size: 0.82rem; }

/* --- 单条记录：左右交替的横向紧凑卡片 --- */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 74px 22px 0;
    z-index: 1;
    animation: tlFadeIn 0.45s ease both;
}

.timeline-item.is-right {
    margin-left: 50%;
    padding: 0 0 22px 74px;
}

@keyframes tlFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.timeline-item .dot {
    position: absolute;
    top: 16px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    box-shadow: 0 0 0 6px rgba(224, 122, 95, 0.14), var(--shadow-sm);
    /* 圆心落在中线左侧 40px 处 */
    transform: translate(calc(50% - 40px), 0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
}

.timeline-item.is-right .dot {
    right: auto;
    left: 0;
    background: var(--gradient-secondary);
    box-shadow: 0 0 0 6px rgba(129, 178, 154, 0.16), var(--shadow-sm);
    /* 圆心落在中线右侧 40px 处 */
    transform: translate(calc(40px - 50%), 0);
}

.timeline-item .tl-card {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 118px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(224, 122, 95, 0.1);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.timeline-item .tl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 122, 95, 0.22);
}

/* 卡片指向曲线的细连接线 */
.timeline-item .tl-card::after {
    content: '';
    position: absolute;
    top: 35px;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(224, 122, 95, 0.55), rgba(224, 122, 95, 0.05));
}

.timeline-item.is-left .tl-card::after { right: -28px; }

.timeline-item.is-right .tl-card::after {
    left: -28px;
    background: linear-gradient(270deg, rgba(129, 178, 154, 0.55), rgba(129, 178, 154, 0.05));
}

/* --- 图片栏位（卡片内左侧，右侧卡片自动镜像到右边） --- */
.tl-media {
    position: relative;
    flex: 0 0 148px;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 1px) 0 0 calc(var(--radius-lg) - 1px);
    background: linear-gradient(135deg, #f7ece1, #eef4ef);
}

.timeline-item.is-right .tl-media {
    border-radius: 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0;
}

.tl-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.timeline-item .tl-card:hover .tl-media img { transform: scale(1.07); }

.tl-media::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.38) 100%);
    pointer-events: none;
}

.tl-media .tl-tag {
    position: absolute;
    left: 9px;
    bottom: 9px;
    z-index: 1;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
}

/* --- 文字区 --- */
.tl-body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tl-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.28rem;
}

.tl-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.2px;
}

.timeline-item.is-right .tl-date { color: #5f9382; }

.tl-place {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #9b9b9b;
    font-size: 0.76rem;
}

.tl-place i { font-size: 0.68rem; }

.tl-cat {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(129, 178, 154, 0.12);
    border-radius: 20px;
    padding: 1px 9px;
}

.timeline-item h4 {
    color: var(--dark-color);
    margin: 0 0 0.28rem;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
}

.timeline-item p {
    margin: 0;
    color: #6f6f6f;
    font-size: 0.84rem;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 筛选后被隐藏的记录 */
.timeline-item.is-filtered-out,
.timeline-item.is-folded,
.tl-year.is-filtered-out { display: none; }

/* 折叠 / 展开更多 */
.tl-more {
    display: none;
    max-width: 1040px;
    margin: 0.2rem auto 1.8rem;
    justify-content: center;
}

.tl-more.is-visible { display: flex; }

.tl-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.6rem;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid rgba(224, 122, 95, 0.35);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.tl-more-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 空状态 */
.tl-empty {
    display: none;
    max-width: 1040px;
    margin: 1rem auto 2rem;
    padding: 2.4rem 1rem;
    text-align: center;
    color: #979797;
    background: #fff;
    border: 1px dashed rgba(224, 122, 95, 0.3);
    border-radius: var(--radius-lg);
}

.tl-empty.is-visible { display: block; }

.tl-empty i { display: block; font-size: 1.6rem; margin-bottom: 0.6rem; color: #d9c3b6; }

/* --- 时光剪影 --- */
.tl-silhouette {
    padding: 52px 0 44px;
    background: linear-gradient(180deg, var(--light-color) 0%, #fdf1e8 100%);
}

.tl-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.tl-strip figure {
    position: relative;
    margin: 0;
    /* 兼容旧内核（Chromium 86 / 360极速13）：用 padding-top 撑出正方形，
       aspect-ratio 仅作为新版浏览器上的补充声明 */
    height: 0;
    padding-top: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tl-strip img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.tl-strip figure:hover img { transform: scale(1.08); }

.tl-strip figcaption {
    position: absolute;
    /* inset 简写要 Chromium 87+，这里用四个方向属性兼容旧内核 */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

/* 月份主题标题 + 悬停展开的描述 */
.tl-strip .strip-cap { display: block; }

.tl-strip .strip-desc {
    display: block;
    font-size: 0.66rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.86);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.tl-strip figure:hover .strip-desc {
    max-height: 1.4em;
    opacity: 1;
}

@media (max-width: 1199.98px) {
    .tl-media { flex-basis: 132px; }
    .timeline-item { padding-right: 66px; }
    .timeline-item.is-right { padding-left: 66px; }
}

@media (max-width: 991.98px) {
    .timeline-overview { padding: 36px 0 8px; }

    .tl-featured { grid-template-columns: 1fr; }
    .tl-featured-media { min-height: 240px; }
    .tl-featured-body { padding: 1.6rem 1.5rem 1.8rem; }

    .timeline-section { padding: 34px 0 22px; }

    .tl-toolbar { border-radius: var(--radius-lg); justify-content: center; }
    .tl-count { width: 100%; text-align: center; padding: 0 0 0.2rem; }

    .snake-timeline::before { left: 26px; margin-left: 0; }

    .snake-timeline .timeline-item,
    .snake-timeline .timeline-item.is-right {
        width: 100%;
        margin-left: 0;
        padding: 0 0 18px 66px;
    }

    .snake-timeline .timeline-item .dot,
    .snake-timeline .timeline-item.is-right .dot {
        top: 14px;
        left: 0;
        right: auto;
        transform: translate(6px, 0);
    }

    .timeline-item .tl-card::after,
    .timeline-item.is-right .tl-card::after { display: none; }

    /* 移动端统一图片在左，避免阅读方向来回跳动 */
    .timeline-item.is-right .tl-media {
        border-radius: calc(var(--radius-lg) - 1px) 0 0 calc(var(--radius-lg) - 1px);
    }

    .tl-strip { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 575.98px) {
    .snake-timeline .timeline-item,
    .snake-timeline .timeline-item.is-right { padding-left: 56px; }

    .snake-timeline .timeline-item .dot,
    .snake-timeline .timeline-item.is-right .dot {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
        transform: translate(1px, 0);
    }

    .snake-timeline::before { left: 17px; }

    .tl-media { flex-basis: 112px; }
    .tl-body { padding: 0.7rem 0.8rem 0.75rem; }
    .timeline-item h4 { font-size: 0.94rem; }
    .timeline-item p { font-size: 0.8rem; -webkit-line-clamp: 2; }
    .tl-featured-body { padding: 1.3rem 1.2rem 1.5rem; }
    .tl-featured-body h3 { font-size: 1.3rem; }
    .tl-strip { grid-template-columns: repeat(3, 1fr); }
}


.page-header {
    background: var(--gradient-secondary);
    color: #fff;
    text-align: center;
    padding: 130px 0 60px;
}

.page-header h1 { font-weight: 800; margin-bottom: 0.6rem; }
.page-header p { opacity: 0.95; margin: 0; }

.form-control {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 2px solid #eee;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(224,122,95,0.15);
}

.form-label { font-weight: 600; color: var(--dark-color); }

.quote-card {
    background: #fff;
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.quote-card .q-name { font-weight: 700; color: var(--dark-color); }
.quote-card .q-relation { color: var(--secondary-color); font-size: 0.85rem; }

.footer {
    background: var(--dark-color);
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 0;
}

.footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.footer p { color: rgba(255,255,255,0.75); }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    transition: var(--transition-normal);
}
.footer-links a:hover { color: var(--accent-color); }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    margin-right: 10px;
    transition: var(--transition-normal);
}
.footer-social a:hover { background: var(--primary-color); transform: translateY(-3px); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 1rem;
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.65);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #d16849; color: #fff; }

@media (max-width: 768px) {
    .hero { padding: 120px 0 50px; }
    .hero h1 { font-size: 2.1rem; }
    .hero p { font-size: 1.05rem; }
    section { padding: 50px 0; }
    .page-header { padding: 110px 0 45px; }
    .footer h5 { margin-top: 1rem; }
}

.section-soft {
    background: var(--light-color);
    padding-top: 0;
    margin-top: -24px;
}

.section-heading {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.4rem;
}

.section-heading h2 {
    color: var(--dark-color);
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.section-heading h2 i { color: var(--primary-color); }

.section-heading p {
    color: #8a8a8a;
    margin: 0;
}

.life-notes {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 960px;
    margin: 0 auto;
}

.life-note-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition-normal);
}

.life-note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.note-head {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.note-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.note-meta {
    display: flex;
    flex-direction: column;
    margin-left: 0.8rem;
    line-height: 1.3;
}

.note-author {
    font-weight: 700;
    color: var(--dark-color);
}

.note-date {
    font-size: 0.8rem;
    color: #9a9a9a;
}

.note-mood {
    margin-left: auto;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.78rem;
    padding: 2px 12px;
    border-radius: 20px;
}

.note-content {
    margin: 0;
    color: var(--text-color);
}

.photo-stories {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

.story-row {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.story-row.story-reverse {
    flex-direction: row-reverse;
}

.story-img {
    position: relative;
    flex: 0 0 46%;
    width: 46%;
    height: 0;
    padding-top: 32%;
    aspect-ratio: 16 / 11;
}

.story-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-text {
    flex: 1;
    padding: 1.6rem 1.8rem;
}

.story-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.86rem;
}

.story-text h3 {
    color: var(--dark-color);
    font-weight: 800;
    margin: 0.4rem 0 0.6rem;
}

.story-text p {
    margin: 0;
    color: var(--text-color);
}

.reflection-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
}

.reflection-card {
    position: relative;
    text-align: center;
    background: var(--gradient-warm);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.6rem 1.6rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.reflection-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.reflection-quote {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.7;
    margin: 0 0 0.9rem;
}

.reflection-sign {
    font-size: 0.86rem;
    opacity: 0.95;
}

.reflection-author {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.reflection-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.28);
}

.reflection-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.life-cta {
    text-align: center;
    max-width: 640px;
    margin: 3rem auto 0;
}

.life-cta p {
    color: var(--text-color);
    margin-bottom: 1.2rem;
}

@media (max-width: 767.98px) {
    .story-row,
    .story-row.story-reverse {
        flex-direction: column;
    }

    .story-img {
        flex: 0 0 auto;
        width: 100%;
        padding-top: 62%;
        aspect-ratio: 16 / 10;
    }

    .story-text {
        padding: 1.2rem 1.4rem 1.5rem;
    }
}

.life-note-carousel {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 48px 48px;
}

.life-note-carousel .carousel-item .life-note-card {
    margin: 0;
    padding: 0;
    border-left: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    height: calc(170px * 3 + 1.1rem * 2);
}

.note-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.4rem 1.5rem 1.6rem;
    min-height: 0;
}

.note-image {
    /* 左右各留 2% 空白并居中 */
    width: 96%;
    margin: 2rem auto 0;
    height: 310px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.note-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.life-note-card:hover .note-image img {
    transform: scale(1.06);
}

.life-note-carousel .carousel-control-prev,
.life-note-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.85;
    transition: var(--transition-normal);
}

.life-note-carousel .carousel-control-prev { left: 0; }
.life-note-carousel .carousel-control-next { right: 0; }

.life-note-carousel .carousel-control-prev:hover,
.life-note-carousel .carousel-control-next:hover {
    opacity: 1;
    background: var(--dark-color);
}

.life-note-carousel .carousel-control-prev-icon,
.life-note-carousel .carousel-control-next-icon {
    width: 18px;
    height: 18px;
}

.life-note-carousel .carousel-indicators {
    bottom: 0;
    margin-bottom: 0;
}

.life-note-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background-color: var(--accent-color);
    opacity: 0.6;
}

.life-note-carousel .carousel-indicators .active {
    background-color: var(--primary-color);
    opacity: 1;
}

.note-tags {
    margin-top: 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.note-tag {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    line-height: 1.6;
}

.note-tag::before {
    content: '#';
    opacity: 0.6;
    margin-right: 1px;
}

.tag-warm   { background: rgba(224,122,95,0.15);  color: #c75a3d; }
.tag-green  { background: rgba(129,178,154,0.18); color: #4f8268; }
.tag-yellow { background: rgba(242,204,143,0.28); color: #b8862f; }
.tag-blue   { background: rgba(108,152,197,0.16); color: #3f6ea3; }
.tag-pink   { background: rgba(224,122,160,0.16); color: #c14d84; }
.tag-purple { background: rgba(142,123,195,0.16); color: #6b54a8; }

@media (max-width: 575.98px) {
    .life-note-carousel {
        padding: 0 10px 44px;
    }

    .life-note-carousel .carousel-control-prev,
    .life-note-carousel .carousel-control-next {
        width: 32px;
        height: 32px;
    }
}

.section-heading-left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.life-note-carousel.carousel {
    max-width: none;
}

.reflection-scroller {
    --card-h: 128px;
    --card-gap: 18px;
    height: calc(var(--card-h) * 4 + var(--card-gap) * 3);
    position: relative;
    /* 无脚本时的兜底：显示 4 张高度，可手动滚动查看其余内容 */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(224, 122, 95, 0.35) transparent;
}

/* 脚本完成循环准备后：隐藏滚动条，用上下渐隐蒙版，交给动画滚动 */
.reflection-scroller.is-looping {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.reflection-track {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    /* 底部补一个与 gap 等高的空隙：两份内容高度一致，-50% 正好是一整组，实现无缝循环 */
    padding-bottom: var(--card-gap);
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.reflection-scroller.is-looping .reflection-track {
    animation: reflectionScroll 26s linear infinite;
}

.reflection-scroller.is-looping:hover .reflection-track {
    animation-play-state: paused;
}

.reflection-scroller .reflection-card {
    flex: 0 0 var(--card-h);
    height: var(--card-h);
    padding: 0.9rem 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

.reflection-scroller .reflection-quote {
    font-size: 0.96rem;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes reflectionScroll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@media (max-width: 991.98px) {
    .section-heading-left {
        text-align: center;
    }

    .reflection-scroller {
        margin-top: 0.5rem;
    }

    .life-note-carousel .carousel-item .life-note-card {
        height: auto;
    }

    .note-image {
        width: 96%;
        height: 220px;
    }
}

/* 家人留言区刻意不做 prefers-reduced-motion 降级：
   该区域要求任何系统设置下都自动滚动（系统关闭"动画效果"时同样滚动）。
   鼠标悬停暂停、可读性不受影响。 */

/* ===== life page fixes (appended, overrides defaults) ===== */
.section-heading-left { text-align: center; }

.reflection-card:nth-child(6n + 1) { background: linear-gradient(135deg, #f6a07a 0%, #e07a5f 100%); }
.reflection-card:nth-child(6n + 2) { background: linear-gradient(135deg, #a8d5c0 0%, #81b29a 100%); }
.reflection-card:nth-child(6n + 3) { background: linear-gradient(135deg, #7fb3d5 0%, #4f8bc2 100%); }
.reflection-card:nth-child(6n + 4) { background: linear-gradient(135deg, #f0b5cb 0%, #d9739f 100%); }
.reflection-card:nth-child(6n + 5) { background: linear-gradient(135deg, #f2cc8f 0%, #e6a23c 100%); }
.reflection-card:nth-child(6n + 6) { background: linear-gradient(135deg, #b1a0da 0%, #8e7bc3 100%); }

.life-cta-section { padding-top: 0; }
.life-cta { margin: 0 auto; padding-top: 0.2rem; }
.life-cta::before {
    content: "";
    display: block;
    width: 320px;
    max-width: 70%;
    height: 2px;
    margin: 0 auto 1.8rem;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

/* life carousel arrows: auto hide, show on hover */
.life-note-carousel .carousel-control-prev,
.life-note-carousel .carousel-control-next { opacity: 0; pointer-events: none; }
.life-note-carousel:hover .carousel-control-prev,
.life-note-carousel:hover .carousel-control-next { opacity: 0.85; pointer-events: auto; }
.life-note-carousel:hover .carousel-control-prev:hover,
.life-note-carousel:hover .carousel-control-next:hover { opacity: 1; }


/* ===== 家庭成员 ===== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
    margin-top: 2.5rem;
}

.member-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.4rem 1.8rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border-top: 4px solid var(--secondary-color);
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.member-avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 4px solid var(--light-color);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-role {
    display: inline-block;
    background: var(--gradient-warm);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.2rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
}

.member-name {
    color: var(--dark-color);
    font-weight: 800;
    margin-bottom: 0.7rem;
}

.member-intro {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 991.98px) {
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .member-grid {
        grid-template-columns: 1fr;
    }
}

/* Home page section spacing */
.home-about {
    padding-bottom: 28px;
}

.home-moments {
    padding-top: 28px;
    padding-bottom: 28px;
}

.home-members {
    padding-top: 28px;
}

/* Gallery overview */
.gallery-overview {
    padding: 52px 0 34px;
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

.gallery-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 2.5rem;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2.4rem 2.6rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(224, 122, 95, 0.1);
}

.gallery-eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    color: var(--primary-color);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.gallery-intro h2 {
    margin: 0 0 0.8rem;
    color: var(--dark-color);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.3;
}

.gallery-intro p {
    margin: 0;
    color: #666;
}

.gallery-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.gallery-themes span {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #b95d46;
    background: rgba(224, 122, 95, 0.12);
    border: 1px solid rgba(224, 122, 95, 0.16);
}

.gallery-themes span:nth-child(2) { color: #527f69; background: rgba(129, 178, 154, 0.16); }
.gallery-themes span:nth-child(3) { color: #9f7628; background: rgba(242, 204, 143, 0.24); }
.gallery-themes span:nth-child(4) { color: #a34f78; background: rgba(224, 122, 160, 0.14); }
.gallery-themes span:nth-child(5) { color: #426e9a; background: rgba(108, 152, 197, 0.15); }
.gallery-themes span:nth-child(6) { color: #7057a6; background: rgba(142, 123, 195, 0.15); }

.gallery-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    margin-top: 1.6rem;
}

.gallery-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 136px;
    padding: 1.15rem 0.8rem 1rem;
    background: #fff;
    border: 1px solid rgba(224, 122, 95, 0.1);
    border-bottom: 4px solid var(--accent-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.gallery-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.gallery-stat strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--primary-color);
}

.gallery-stat span {
    margin-top: 0.6rem;
    color: #606270;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.gallery-stat:nth-child(2) {
    border-bottom-color: var(--secondary-color);
}

.gallery-stat:nth-child(2) strong {
    color: #5b9378;
}

.gallery-stat:nth-child(3) {
    border-bottom-color: #8aaed3;
}

.gallery-stat:nth-child(3) strong {
    color: #5d88b6;
}

.gallery-stat:nth-child(4) {
    border-bottom-color: #b69bda;
}

.gallery-stat:nth-child(4) strong {
    color: #8d70bb;
}

.gallery-showcase {
    padding-top: 44px;
    background: #fffaf6;
}

.gallery-showcase .gallery-grid {
    margin-top: 2.2rem;
}

.gallery-showcase .photo-card {
    border: 1px solid rgba(61, 64, 91, 0.08);
}

.gallery-showcase .photo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.gallery-keepsake {
    padding: 58px 0 70px;
    background: linear-gradient(180deg, var(--light-color), #fff);
}

.keepsake-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    margin-top: 2.2rem;
}

.keepsake-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition-normal);
}

.keepsake-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.keepsake-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--gradient-primary);
}

.keepsake-icon svg {
    width: 28px;
    height: 28px;
}

.keepsake-card h3 {
    margin: 0 0 0.65rem;
    color: var(--dark-color);
    font-weight: 800;
    font-size: 1.15rem;
}

.keepsake-card p {
    margin: 0;
    color: #666;
}

.gallery-story-banner {
    margin-top: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.8rem 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #3d405b, #575b7d);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.gallery-story-banner span {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0.78;
}

.gallery-story-banner h3 {
    margin: 0;
    font-weight: 800;
    font-size: 1.25rem;
}

.gallery-story-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.gallery-story-actions .btn {
    min-width: 138px;
}

@media (max-width: 991.98px) {
    .gallery-intro {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .gallery-themes {
        justify-content: flex-start;
    }

    .keepsake-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .gallery-overview {
        padding: 36px 0 26px;
    }

    .gallery-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-story-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .gallery-story-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .gallery-story-actions .btn {
        flex: 1 1 180px;
    }
}

@media (max-width: 575.98px) {
    .gallery-intro {
        padding: 1.5rem;
    }

    .gallery-stats {
        gap: 0.7rem;
    }

    .gallery-stat {
        min-height: 96px;
    }

    .keepsake-grid {
        grid-template-columns: 1fr;
    }
}

/* Album topic links */
.keepsake-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.keepsake-card:hover,
.keepsake-card:focus {
    color: inherit;
    text-decoration: none;
}

.keepsake-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--primary-color);
    font-size: 0.86rem;
    font-weight: 800;
}

/* Album detail */
.album-intro-section {
    padding: 42px 0 24px;
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

.album-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem 2.5rem;
    align-items: center;
    padding: 2rem 2.2rem;
    background: #fff;
    border: 1px solid rgba(224, 122, 95, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.album-back {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.album-back:hover {
    color: var(--dark-color);
}

.album-intro-text {
    margin: 0;
    color: #5f6170;
    font-size: 1.02rem;
    line-height: 1.9;
}

.album-count {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3rem;
    min-width: 132px;
    padding: 0.75rem 1rem;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.album-count strong {
    font-size: 1.45rem;
}

.album-photos-section {
    padding: 34px 0 72px;
    background: var(--light-color);
}

.album-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.album-photo {
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.album-photo:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.album-photo-img {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 68%;
    overflow: hidden;
    background: #eee;
}

.album-photo-img img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.album-photo:hover .album-photo-img img {
    transform: scale(1.06);
}

.album-photo-body {
    padding: 1.25rem 1.3rem 1.35rem;
}

.album-photo-title {
    margin: 0 0 0.5rem;
    color: var(--dark-color);
    font-size: 1.12rem;
    font-weight: 800;
}

.album-photo-caption {
    min-height: 3.2em;
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.65;
}

.album-photo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(61, 64, 91, 0.09);
}

.album-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #838593;
    font-size: 0.8rem;
}

.album-meta-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .album-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .album-intro {
        grid-template-columns: 1fr;
        padding: 1.6rem;
    }

    .album-count {
        justify-self: start;
    }
}

@media (max-width: 575.98px) {
    .album-intro-section {
        padding-top: 30px;
    }

    .album-photo-grid {
        grid-template-columns: 1fr;
    }

    .album-photo-caption {
        min-height: 0;
    }
}

/* Album list with ranking panel */
.album-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1.6rem;
    align-items: start;
}

.album-main .album-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.album-photo {
    display: block;
    color: inherit;
    text-decoration: none;
}

.album-photo:hover,
.album-photo:focus {
    color: inherit;
    text-decoration: none;
}

.album-photo-img {
    position: relative;
}

.album-photo-count {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.55rem;
    color: #fff;
    background: rgba(28, 30, 47, 0.72);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
}

.album-side {
    position: sticky;
    top: 96px;
}

.rank-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.rank-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f7f4f2;
    border-bottom: 1px solid rgba(61, 64, 91, 0.08);
}

.rank-tab {
    padding: 0.85rem 0.25rem;
    color: #6f7180;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.rank-tab:hover,
.rank-tab.active {
    color: var(--primary-color);
    background: #fff;
    border-bottom-color: var(--primary-color);
}

.rank-list {
    margin: 0;
    padding: 0.55rem 1rem 0.7rem;
    list-style: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px dashed rgba(61, 64, 91, 0.1);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-no {
    color: #9294a0;
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
}

.rank-item:nth-child(-n + 3) .rank-no {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #45485f;
    font-size: 0.84rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #fff;
    background: #ef5d76;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Photo series detail */
.photo-page-header {
    padding-bottom: 48px;
}

.photo-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.photo-back:hover {
    color: #fff;
    text-decoration: none;
}

.photo-detail-section {
    padding: 46px 0 72px;
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

.photo-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
    gap: 2rem;
    align-items: start;
}

.photo-carousel {
    overflow: hidden;
    background: #272a3d;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.photo-carousel .carousel-item {
    position: relative;
    height: 0;
    padding-top: 64%;
}

.photo-carousel .carousel-item img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-carousel .carousel-control-prev,
.photo-carousel .carousel-control-next {
    width: 12%;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.photo-carousel:hover .carousel-control-prev,
.photo-carousel:hover .carousel-control-next {
    opacity: 1;
}

.photo-slide-counter {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.3rem 0.65rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.photo-thumbnails {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.95rem;
    padding: 0.15rem;
    overflow-x: auto;
}

.photo-thumbnails button {
    flex: 0 0 84px;
    height: 58px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 3px solid transparent;
    border-radius: var(--radius-sm);
    opacity: 0.65;
    transition: var(--transition-normal);
}

.photo-thumbnails button:hover,
.photo-thumbnails button.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.photo-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-detail-info {
    padding: 1.9rem;
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.photo-detail-label {
    display: inline-block;
    padding: 0.28rem 0.75rem;
    color: #4d7d67;
    background: rgba(129, 178, 154, 0.16);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.photo-detail-info h2 {
    margin: 1rem 0 0.75rem;
    color: var(--dark-color);
    font-size: 1.65rem;
    font-weight: 800;
}

.photo-detail-caption {
    margin: 0;
    color: #626472;
    line-height: 1.85;
}

.photo-detail-meta {
    margin: 1.5rem 0 0;
    border-top: 1px solid rgba(61, 64, 91, 0.1);
}

.photo-detail-meta > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(61, 64, 91, 0.08);
}

.photo-detail-meta dt {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #7b7e8c;
    font-size: 0.86rem;
    font-weight: 700;
}

.photo-detail-meta dt svg {
    color: var(--primary-color);
}

.photo-detail-meta dd {
    margin: 0;
    color: var(--dark-color);
    font-size: 0.88rem;
    font-weight: 800;
    text-align: right;
}

.photo-pager {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.photo-pager a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.2rem;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.09);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: var(--transition-normal);
}

.photo-pager a:last-child {
    text-align: right;
}

.photo-pager a:hover {
    color: inherit;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.photo-pager span {
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
}

.photo-pager strong {
    overflow: hidden;
    color: var(--dark-color);
    font-size: 0.96rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    .album-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .rank-list {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
}

@media (max-width: 991.98px) {
    .album-layout,
    .photo-detail-layout {
        grid-template-columns: 1fr;
    }

    .album-main .album-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .album-side {
        position: static;
    }

    .rank-panel {
        max-width: 680px;
        margin: 0 auto;
    }

    .photo-detail-info {
        max-width: 680px;
    }
}

@media (max-width: 575.98px) {
    .album-main .album-photo-grid,
    .photo-pager {
        grid-template-columns: 1fr;
    }

    .rank-tab {
        font-size: 0.7rem;
    }

    .photo-detail-section {
        padding-top: 30px;
    }

    .photo-detail-info {
        padding: 1.45rem;
    }

    .photo-detail-info h2 {
        font-size: 1.4rem;
    }

    .photo-pager a:last-child {
        text-align: left;
    }
}

/* Album photo pagination */
.album-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 2rem;
}

.album-page-link,
.album-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.8rem;
    color: var(--dark-color);
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.12);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition-normal);
}

.album-page-link:hover,
.album-page-number:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-2px);
}

.album-page-number.active {
    color: #fff;
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

.album-page-disabled {
    color: #a9abb4;
    background: #f5f5f5;
    border-color: #e7e7e7;
    box-shadow: none;
    cursor: not-allowed;
}

.album-page-summary {
    margin-top: 0.85rem;
    color: #858794;
    font-size: 0.84rem;
    text-align: center;
}

.album-page-summary strong {
    color: var(--primary-color);
    font-weight: 800;
}

@media (max-width: 575.98px) {
    .album-pagination {
        gap: 0.35rem;
        margin-top: 1.5rem;
    }

    .album-page-link,
    .album-page-number {
        min-width: 34px;
        height: 34px;
        padding: 0 0.65rem;
        font-size: 0.8rem;
    }

    .album-page-summary {
        font-size: 0.78rem;
    }
}

/* Gallery theme entry cards */
.photo-theme-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.photo-theme-card:hover,
.photo-theme-card:focus {
    color: inherit;
    text-decoration: none;
}

.photo-theme-card .photo-overlay {
    padding-top: 42px;
}

.photo-theme-enter {
    display: inline-block;
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(6px);
    transition: var(--transition-normal);
}

.photo-theme-card:hover .photo-theme-enter,
.photo-theme-card:focus .photo-theme-enter {
    opacity: 1;
    transform: translateY(0);
}

/* Showcase theme album */
.theme-page-header {
    padding-bottom: 48px;
}

.theme-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    padding: 0.42rem 0.8rem;
    color: #b9533d;
    background: rgba(224, 122, 95, 0.13);
    border: 1px solid rgba(224, 122, 95, 0.24);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    transition: var(--transition-normal);
}

.theme-back-link svg {
    flex: 0 0 auto;
}

.theme-back-link:hover,
.theme-back-link:focus {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.theme-album-intro-section {
    padding: 40px 0 24px;
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

.theme-album-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.8rem;
    padding: 1.75rem 2rem;
    background: #fff;
    border: 1px solid rgba(224, 122, 95, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.theme-album-eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.theme-album-intro p {
    max-width: 850px;
    margin: 0;
    color: #5f6170;
    line-height: 1.85;
}

.theme-album-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    min-height: 102px;
    padding: 0.7rem 1rem;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.theme-album-stat strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.2rem;
    line-height: 1;
}

.theme-album-stat span {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.theme-album-section {
    padding: 30px 0 72px;
    background: var(--light-color);
}

.theme-album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.theme-photo-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.09);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.theme-photo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.theme-photo-cover {
    position: relative;
    display: block;
    height: 0;
    padding-top: 68%;
    overflow: hidden;
    color: inherit;
    background: #2f3248;
    text-decoration: none;
}

.theme-photo-cover img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.theme-photo-cover:hover img,
.theme-photo-cover:focus img {
    transform: scale(1.06);
}

.theme-photo-cover:focus {
    outline: 3px solid rgba(224, 122, 95, 0.45);
    outline-offset: -3px;
}

.theme-photo-count {
    position: absolute;
    z-index: 2;
    top: 0.8rem;
    right: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.32rem 0.58rem;
    color: #fff;
    background: rgba(24, 26, 40, 0.72);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    pointer-events: none;
}

.theme-photo-body {
    display: flex;
    flex-direction: column;
    min-height: 216px;
    padding: 1.2rem 1.25rem 1.15rem;
}

.theme-photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 26px;
    margin-bottom: 0.7rem;
}

.theme-photo-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.4;
}

.theme-photo-tag.tag-warm {
    color: #bc5a43;
    background: rgba(224, 122, 95, 0.14);
}

.theme-photo-tag.tag-green {
    color: #4d7d67;
    background: rgba(129, 178, 154, 0.18);
}

.theme-photo-tag.tag-purple {
    color: #7056a9;
    background: rgba(142, 123, 195, 0.16);
}

.theme-photo-body h2 {
    margin: 0 0 0.55rem;
    color: var(--dark-color);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
}

.theme-photo-caption {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #666;
    font-size: 0.88rem;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.theme-photo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(61, 64, 91, 0.09);
}

.theme-photo-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-width: 0;
    color: #858794;
    font-size: 0.76rem;
    white-space: nowrap;
}

.theme-photo-meta svg {
    flex: 0 0 auto;
    color: var(--primary-color);
}

.theme-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 2.2rem;
}

.theme-page-link,
.theme-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.85rem;
    color: var(--dark-color);
    background: #fff;
    border: 1px solid rgba(61, 64, 91, 0.12);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition-normal);
}

.theme-page-link:hover,
.theme-page-number:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-2px);
}

.theme-page-number.active {
    color: #fff;
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    pointer-events: none;
}

.theme-page-link.is-disabled {
    color: #afb1bb;
    background: #f4f4f4;
    border-color: #e5e5e5;
    box-shadow: none;
    cursor: not-allowed;
}

.theme-page-summary {
    margin: 0.85rem 0 0;
    color: #858794;
    font-size: 0.85rem;
    text-align: center;
}

.theme-page-summary strong {
    color: var(--primary-color);
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .theme-album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .theme-album-intro {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .theme-album-stat {
        justify-self: start;
        min-width: 140px;
        min-height: 88px;
    }
}

@media (max-width: 575.98px) {
    .theme-album-intro-section {
        padding-top: 28px;
    }

    .theme-album-section {
        padding-top: 22px;
    }

    .theme-album-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .theme-photo-body {
        min-height: 0;
    }

    .theme-pagination {
        gap: 0.35rem;
        margin-top: 1.6rem;
    }

    .theme-page-link,
    .theme-page-number {
        min-width: 34px;
        height: 34px;
        padding: 0 0.65rem;
        font-size: 0.78rem;
    }
}

/* Showcase theme photo detail */
.theme-photo-detail-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.75rem;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.theme-photo-detail-link:hover {
    color: var(--dark-color);
    text-decoration: none;
}

.theme-photo-page-header {
    background: linear-gradient(135deg, #9ccbb5 0%, #81b29a 100%);
}

.theme-photo-detail-section {
    background: linear-gradient(180deg, #fffaf6 0%, var(--light-color) 100%);
}

.theme-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 1.25rem;
}

.theme-detail-tags .theme-photo-tag {
    font-size: 0.78rem;
    padding: 0.27rem 0.7rem;
}

.theme-photo-detail-section .photo-detail-label {
    color: #4d7d67;
    background: rgba(129, 178, 154, 0.18);
}

@media (max-width: 575.98px) {
    .theme-photo-detail-link {
        margin-top: 0.65rem;
    }
}

/* ==========================================================
   照片里的故事：列表卡片可点击 + 详情页（参考技术博客文章页排版）
   ========================================================== */

/* --- 列表卡片：整块可点击 --- */
.photo-stories .story-row {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

.photo-stories .story-row:hover {
    color: inherit;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.photo-stories .story-row:hover .story-img img {
    transform: scale(1.05);
}

.story-img img {
    transition: transform 0.5s ease;
}

.story-cover-tip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-size: 0.76rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition: var(--transition-normal);
}

.photo-stories .story-row:hover .story-cover-tip {
    opacity: 1;
    transform: translateY(0);
}

.story-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.7rem;
}

.story-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.88rem;
}

.story-more i {
    transition: transform 0.3s ease;
}

.photo-stories .story-row:hover .story-more i {
    transform: translateX(4px);
}

/* --- 详情页头部 --- */
.story-detail-header {
    padding-bottom: 42px;
}

/* 返回上一页（左上角） */
.story-topbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1.1rem;
}

.story-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.story-back-btn i {
    font-size: 0.82rem;
    transition: transform 0.25s ease;
}

.story-back-btn:hover,
.story-back-btn:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.story-back-btn:hover i {
    transform: translateX(-3px);
}

.story-back-btn:active {
    transform: translateX(-1px) scale(0.98);
}

.story-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    margin-bottom: 0.9rem;
    opacity: 0.92;
}

.story-breadcrumb a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
}

.story-breadcrumb a:hover { opacity: 1; text-decoration: underline; }

.story-breadcrumb .current { opacity: 0.75; }

.story-detail-header h1 {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 0.7rem;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.1rem;
    font-size: 0.85rem;
    opacity: 0.95;
}

.story-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* --- 详情页主体：左文章 + 右侧栏 --- */
.story-detail-section {
    padding: 44px 0 70px;
}

.story-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
}

.story-article {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.4rem 2.6rem 2rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.story-lead {
    font-size: 1.02rem;
    color: var(--dark-color);
    background: linear-gradient(135deg, rgba(242, 204, 143, 0.22), rgba(224, 122, 95, 0.12));
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin: 0 0 1.8rem;
    line-height: 1.85;
}

.story-body .story-p {
    font-size: 1rem;
    line-height: 2;
    color: #3f3f3f;
    margin: 0 0 1.4rem;
    letter-spacing: 0.01em;
}

.story-body .story-p:last-child { margin-bottom: 1.6rem; }

/* --- 富文本正文（story.contentHtml） ---
   图片同时受「正文列宽」和「最大高度」约束：
   宽度超过正文列（约 709px）按列宽等比缩小，竖长图超过高度上限再等比缩小，
   两者取更小值，始终不改变原始宽高比，不会再把详情页撑开。 */
.story-rich {
    min-width: 0;
    overflow-wrap: break-word;
}

.story-rich img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 600px;
    margin: 1.6rem auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: #f7f5f2;
    object-fit: contain;
}

/* 图片单独成段（<p><img></p>）时收紧一点上下间距 */
.story-rich p > img:only-child {
    margin: 1.3rem auto;
}

.story-rich figure {
    margin: 1.6rem 0;
}

.story-rich figure img {
    margin: 0 auto;
}

.story-figure {
    margin: 0 0 1.8rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, #f7ece1, #eef4ef);
    box-shadow: var(--shadow-sm);
}

.story-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.story-figure figcaption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    color: #8b8b8b;
    background: #fafafa;
    border-top: 1px solid #f0eeee;
}

/* --- 标签 --- */
.story-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 1.1rem 0 0;
    border-top: 1px dashed #ececec;
}

.story-tags-label {
    color: #9a9a9a;
    font-size: 0.84rem;
}

.story-tag {
    padding: 0.22rem 0.72rem;
    border-radius: 999px;
    background: rgba(129, 178, 154, 0.16);
    color: #4d7d67;
    font-size: 0.8rem;
    font-weight: 600;
}

/* --- 相关推荐 --- */
.story-related {
    margin-top: 2.2rem;
    padding-top: 1.8rem;
    border-top: 1px solid #f0eeee;
}

.story-related-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1.1rem;
}

.story-related-title i { color: var(--primary-color); }

.story-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.story-related-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem;
    border: 1px solid #f0eeee;
    border-radius: var(--radius-md);
    background: #fcfcfc;
    color: inherit;
    text-decoration: none;
    transition: var(--transition-normal);
}

.story-related-card:hover {
    color: inherit;
    border-color: rgba(224, 122, 95, 0.4);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.story-related-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 66px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f2f2f2;
}

.story-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-related-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.story-related-body h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-related-body span {
    font-size: 0.76rem;
    color: #9a9a9a;
}

/* --- 上一篇 / 下一篇 --- */
.story-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 2rem;
}

.story-pager-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid #f0eeee;
    border-radius: var(--radius-md);
    background: #fcfcfc;
    text-decoration: none;
    transition: var(--transition-normal);
}

.story-pager-item.is-next { text-align: right; }

.story-pager-item:hover {
    border-color: rgba(224, 122, 95, 0.45);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.story-pager-item .pager-label {
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 700;
}

.story-pager-item .pager-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 右侧栏 --- */
.story-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.story-author,
.story-facts {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.4rem;
    text-align: center;
}

.story-author-avatar {
    width: 62px;
    height: 62px;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.4rem;
}

.story-author h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark-color);
    margin: 0 0 0.4rem;
}

.story-author p {
    font-size: 0.82rem;
    color: #8b8b8b;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.story-author-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-normal);
}

.story-author-btn:hover {
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.story-facts { text-align: left; }

.story-facts h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--dark-color);
    margin: 0 0 0.9rem;
}

.story-facts ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.story-facts li {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: 0.84rem;
}

.story-facts li span { color: #9a9a9a; }

.story-facts li strong {
    color: var(--dark-color);
    font-weight: 700;
    text-align: right;
}

/* --- 响应式 --- */
@media (max-width: 991.98px) {
    .story-detail-section { padding: 30px 0 48px; }
    .story-detail-layout { grid-template-columns: 1fr; gap: 20px; }
    .story-article { padding: 1.6rem 1.3rem 1.4rem; }
    .story-aside { position: static; }
}

@media (max-width: 575.98px) {
    .story-related-grid { grid-template-columns: 1fr; }
    .story-pager { grid-template-columns: 1fr; }
    .story-pager-item.is-next { text-align: left; }
    .story-body .story-p { font-size: 0.96rem; line-height: 1.95; }
    /* 手机端：竖长图再压一档高度，保证一屏能看到正文与图片的关系 */
    .story-rich img { max-height: 460px; margin: 1.2rem auto; }
    .story-cover-tip { opacity: 1; transform: none; }
    .story-detail-header { padding-bottom: 34px; }
    .story-topbar { margin-bottom: 0.85rem; }
    .story-back-btn { font-size: 0.82rem; padding: 0.4rem 0.9rem 0.4rem 0.75rem; }
    .story-breadcrumb { font-size: 0.78rem; }
}

/* ===== 退出登录轻提示（服务端回跳时带 logout=1 触发） ===== */
.fam-toast {
    position: fixed;
    left: 50%;
    top: 84px;
    transform: translate(-50%, -12px);
    z-index: 3000;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: var(--dark-color);
    color: #fff;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    animation: fam-toast-in 0.28s ease forwards;
}

.fam-toast-out {
    animation: fam-toast-out 0.5s ease forwards;
}

@keyframes fam-toast-in {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fam-toast-out {
    from { opacity: 1; transform: translate(-50%, 0); }
    to   { opacity: 0; transform: translate(-50%, -12px); }
}

/* ===== 导航栏账号下拉（登录 / 头像+昵称） ===== */
.nav-account { position: relative; }

.nav-account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.nav-account-toggle .nav-caret {
    font-size: 0.66rem;
    opacity: 0.55;
    transition: transform 0.2s ease;
}

.nav-account.open .nav-caret { transform: rotate(180deg); }

.nav-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6a07a 0%, #e07a5f 100%);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(224, 122, 95, 0.28);
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-avatar.is-icon { background: linear-gradient(135deg, #a8d5c0 0%, #81b29a 100%); }

.nav-account-name {
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 178px;
    padding: 0.4rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(61, 64, 91, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1200;
}

.nav-account.open .nav-account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-account-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    color: var(--dark-color);
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-normal);
}

.nav-account-item i {
    width: 1.05rem;
    text-align: center;
    font-size: 0.86rem;
    opacity: 0.72;
}

.nav-account-item:hover,
.nav-account-item:focus {
    background: rgba(224, 122, 95, 0.1);
    color: var(--primary-color);
}

.nav-account-item.is-current {
    background: rgba(224, 122, 95, 0.12);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-account-divider {
    height: 1px;
    margin: 0.3rem 0.5rem;
    background: rgba(61, 64, 91, 0.08);
}

.nav-badge {
    margin-left: auto;
    padding: 0.05rem 0.42rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.4;
}

/* 移动端展开后菜单改为内嵌，避免浮层溢出屏幕 */
@media (max-width: 991.98px) {
    .nav-account-menu {
        position: static;
        display: none;
        min-width: 0;
        margin: 0.15rem 0 0.35rem 2.3rem;
        padding: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-account.open .nav-account-menu { display: block; }

    .nav-account-toggle { justify-content: flex-start; }
}
