/* ==========================================================================
   1. 全域變數與重設 (Modern Dark Glassmorphism Variables)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    /* 悠和平靜主題：淺色底 + 青綠點綴 */
    --primary-color: #7aab9a;
    --secondary-color: #8eb5c8;
    --accent-color: #c9b896;
    --bg-base: #eef5f1;
    --bg-dark: #eef5f1;
    --bg-surface: #f8fbf9;
    --card-bg: rgba(255, 255, 255, 0.78);
    --card-border: rgba(143, 184, 168, 0.32);
    --text-light: #2a3834;
    --text-gray: #5f736c;
    --nav-bg: rgba(255, 255, 255, 0.82);
    --floral-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%238fb8a8' fill-opacity='0.07'%3E%3Ccircle cx='32' cy='36' r='5'/%3E%3Ccircle cx='44' cy='32' r='4'/%3E%3Ccircle cx='24' cy='44' r='4'/%3E%3Ccircle cx='40' cy='48' r='4'/%3E%3Ccircle cx='28' cy='28' r='3'/%3E%3C/g%3E%3Cg fill='%23a8c4d4' fill-opacity='0.08'%3E%3Ccircle cx='112' cy='48' r='4'/%3E%3Ccircle cx='124' cy='44' r='3'/%3E%3Ccircle cx='104' cy='56' r='3'/%3E%3Ccircle cx='120' cy='58' r='3'/%3E%3C/g%3E%3Cellipse cx='88' cy='120' rx='14' ry='6' fill='%23d4c4a8' fill-opacity='0.1' transform='rotate(-28 88 120)'/%3E%3Cellipse cx='136' cy='104' rx='10' ry='5' fill='%238fb8a8' fill-opacity='0.09' transform='rotate(18 136 104)'/%3E%3Cpath d='M8 96 Q20 88 28 96' stroke='%238fb8a8' stroke-opacity='0.12' stroke-width='1.2' fill='none'/%3E%3Cpath d='M48 128 Q58 120 68 128' stroke='%23a8c4d4' stroke-opacity='0.1' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    --font-main: 'Noto Sans TC', sans-serif;
    --font-logo: 'Orbitron', sans-serif;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 網頁滾動條美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

* {
    box-sizing: border-box;
}

/* 首頁 hero 自帶 fixed 導覽，唔需要全站 body 上留白 */
body.index-page {
    padding-top: 0 !important;
}

body.index-page .slideshow-container {
    padding-top: 88px;
}

body.familytree-page .slideshow-container,
body.lymphoma-page .slideshow-container {
    min-height: 0 !important;
    height: auto;
    display: block;
}

/* ==========================================================================
   豬仔家族樹頁面
   ========================================================================== */
body.familytree-page .divider {
    margin: 2rem 0 2.5rem;
}

.familytree-content {
    max-width: 1400px;
    margin: 40px auto 4rem;
    padding: 0 5%;
}

.familytree-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem 2rem;
    align-items: start;
}

.familytree-main {
    min-width: 0;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.familytree-layout--has-left .familytree-main,
.familytree-layout--has-right .familytree-main {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.ft-side-videos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.ft-side-videos[hidden] {
    display: none !important;
}

.ft-video-item {
    width: 100%;
    max-width: 260px;
    height: 150px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(143, 184, 168, 0.2);
    border: 1px solid var(--card-border);
    background: var(--bg-surface);
}

.ft-video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 1024px) {
    .familytree-layout--has-left.familytree-layout--has-right {
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 260px);
    }

    .familytree-layout--has-left:not(.familytree-layout--has-right) {
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    }

    .familytree-layout--has-right:not(.familytree-layout--has-left) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
    }

    .familytree-layout--has-left .ft-side-videos--left,
    .familytree-layout--has-right .ft-side-videos--right {
        position: sticky;
        top: 120px;
    }

    .ft-side-videos--left .ft-video-item,
    .ft-side-videos--right .ft-video-item {
        margin: 0;
        max-width: none;
    }
}

@media (max-width: 1023px) {
    .ft-side-videos:not([hidden]) {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ft-video-item {
        flex: 0 1 280px;
        max-width: 100%;
        height: 160px;
    }
}

.familytree-intro-card,
.familytree-tree-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 10px 30px rgba(143, 184, 168, 0.12);
    backdrop-filter: blur(15px);
}

/* 與 about 頁 h1 一致：標題在卡片內，下接內文 */
.familytree-intro-card h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin: 0 0 20px 0;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.familytree-hint {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0 0 1.25rem 0;
}

.familytree-intro-card h2 {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
}

.familytree-intro-body p {
    color: var(--text-gray);
    line-height: 1.85;
    margin-bottom: 0.85rem;
}

.familytree-intro-body p:last-child {
    margin-bottom: 0;
}

.ft-tree {
    padding: 1.25rem 0.5rem 0.75rem;
    overflow-x: auto;
}

.ft-tree-empty {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
}

/* 樹狀結構：上級 → 下級，橫向展開子節點 */
.ft-tree-root {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.5rem;
}

.ft-tree-li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ft-tree-node-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ft-tree-li.has-children > .ft-tree-node-wrap::after {
    content: '';
    display: block;
    width: 2px;
    height: 18px;
    margin-top: 4px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(143, 184, 168, 0.35));
    border-radius: 1px;
}

.ft-tree-children {
    list-style: none;
    margin: 0;
    padding: 1.35rem 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.25rem;
    position: relative;
}

.ft-tree-children::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: rgba(143, 184, 168, 0.45);
    border-radius: 1px;
}

.ft-tree-children > .ft-tree-li {
    position: relative;
}

.ft-tree-children > .ft-tree-li::before {
    content: '';
    position: absolute;
    top: -1.35rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 14px;
    background: rgba(143, 184, 168, 0.5);
}

.ft-node {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.7rem 1.35rem;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(143, 184, 168, 0.45);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(143, 184, 168, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ft-node:hover,
.ft-node:focus-visible {
    outline: none;
    transform: translateY(-3px);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(143, 184, 168, 0.15), rgba(168, 196, 212, 0.12));
    box-shadow: 0 10px 26px rgba(143, 184, 168, 0.3);
}

.ft-node-name {
    pointer-events: none;
}

/* 成員彈出視窗 */
.ft-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ft-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ft-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 56, 52, 0.55);
    backdrop-filter: blur(6px);
}

.ft-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 24px 56px rgba(143, 184, 168, 0.35);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ft-modal.active .ft-modal-card {
    transform: scale(1) translateY(0);
}

.ft-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(143, 184, 168, 0.15);
    color: var(--text-light);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ft-modal-close:hover {
    background: var(--primary-color);
    color: #fff;
}

.ft-modal-image-wrap {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
    aspect-ratio: 4 / 3;
    background: var(--bg-surface);
}

.ft-modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ft-modal-name {
    font-size: 1.45rem;
    color: var(--primary-color);
    margin-bottom: 0.65rem;
    text-align: center;
    font-weight: 700;
}

.ft-modal-desc {
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 1rem;
    text-align: center;
    margin: 0;
}

@media (max-width: 768px) {
    .familytree-intro-card,
    .familytree-tree-card {
        padding: 1.35rem 1.15rem;
    }

    .ft-node {
        font-size: 0.92rem;
        padding: 0.6rem 1.1rem;
    }

    .ft-modal-card {
        max-width: 100%;
    }
}

/* 滾動淡入展開（首頁、肥肥相集） */
body.index-page .scroll-reveal,
body.album-page .scroll-reveal,
body.familytree-page .scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

body.index-page .scroll-reveal.is-visible,
body.album-page .scroll-reveal.is-visible,
body.familytree-page .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.index-page .scroll-reveal--soft,
body.album-page .scroll-reveal--soft,
body.familytree-page .scroll-reveal--soft {
    transform: translateY(24px);
}

body.index-page .scroll-reveal--scale,
body.album-page .scroll-reveal--scale,
body.familytree-page .scroll-reveal--scale {
    transform: translateY(32px) scale(0.97);
}

body.index-page .scroll-reveal--scale.is-visible,
body.album-page .scroll-reveal--scale.is-visible,
body.familytree-page .scroll-reveal--scale.is-visible {
    transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    body.index-page .scroll-reveal,
    body.album-page .scroll-reveal,
    body.familytree-page .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

body {
    font-family: var(--font-main);
    margin: 0;
    background-color: var(--bg-base);
    background-image:
        var(--floral-pattern),
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(168, 196, 212, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 95% 85%, rgba(143, 184, 168, 0.18), transparent 50%),
        linear-gradient(165deg, #f8fbf9 0%, #eef5f1 50%, #e6f0ea 100%);
    background-size: 160px 160px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    color: var(--text-light);
    padding-top: 105px; /* 預留空間給 fixed 導航欄，避免內容被蓋住 */
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 顯示與隱藏控制類別 (關鍵修復：解決雙日期、雙導航欄重疊問題) */
.desktop-only {
    display: block !important;
}
.mobile-only {
    display: none !important;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
}

/* ==========================================================================
   2. 統一導航欄 (Frosted Glass Navigation)
   ========================================================================== */
.slideshow-container {
    position: relative;
    width: 100%;
    margin: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.menu-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: var(--nav-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border) !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    padding: 1rem 5% !important;
    z-index: 1000;
    background-image: none !important;
    box-shadow: 0 4px 24px rgba(143, 184, 168, 0.15);
}

.menu-left {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0;
    min-width: 0;
}

.menu-items-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    row-gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.menu-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: static;
    transform: none;
    z-index: 2;
    background: rgba(255, 255, 255, 0.65);
    padding: 0.35rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    min-width: 0;
    width: max-content;
    flex-shrink: 0;
    text-align: left;
}

#weather {
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.date-weather {
    font-family: var(--font-logo);
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    border-right: 1px solid var(--card-border);
    padding-right: 1.5rem;
    font-weight: 700;
}

.menu-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    transition: var(--transition-smooth);
    color: var(--text-gray);
    min-width: auto;
    border: 1px solid transparent;
    background: transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(143, 184, 168, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(143, 184, 168, 0.4);
}

.menu-text {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    color: inherit;
    letter-spacing: 0.5px;
    text-shadow: none;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   3. 分隔線與首頁 Banner/Video
   ========================================================================== */
.divider {
    width: 100%;
    margin: 4rem 0;
    border-bottom: 1px solid var(--card-border);
    height: 0;
}

.content-area, .video-container {
    height: calc(100vh - 90px);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: contrast(1.06) saturate(1.08) brightness(1.04);
    background: var(--bg-surface);
}

.video-overlay {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 40%,
        rgba(42, 56, 52, 0.35) 100%
    );
    border-radius: 0;
    backdrop-filter: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    transform: none;
    padding: 2rem;
}

.video-overlay h2 {
    font-size: 3rem;
    color: #fff;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 255, 255, 0.25);
    font-weight: 700;
    margin-bottom: 1rem;
}

.video-overlay p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   4. 右側相片集
   ========================================================================== */
.photo-gallery {
    max-width: 1400px;
}

.gallery-title {
    text-align: left;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

/* 首頁相片集下方：Dignity D. 左右交替 + 副圖漸淡 https://dignityd.hk/ */
body.index-page .index-menu-cta {
    margin-top: 3.5rem;
    padding-top: 2.75rem;
    border-top: 1px solid rgba(143, 184, 168, 0.35);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

body.index-page .index-menu-cta-lead {
    font-family: var(--font-logo);
    font-size: 0.8rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-gray);
    margin: 0 0 3rem;
    text-align: center;
}

body.index-page .index-cta-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 3.5rem;
    min-height: 280px;
}

body.index-page .index-cta-row:last-child {
    margin-bottom: 0;
}

/* 圖左文右 */
body.index-page .index-cta-row--left {
    flex-direction: row;
}

/* 文左圖右 */
body.index-page .index-cta-row--right {
    flex-direction: row-reverse;
}

body.index-page .index-cta-visual {
    position: relative;
    flex: 1.15;
    min-height: 260px;
    overflow: hidden;
    background: #d8e8e2;
}

body.index-page .index-cta-visual img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
}

/* 副圖漸淡：融入頁面底色 */
body.index-page .index-cta-fade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

body.index-page .index-cta-row--left .index-cta-fade {
    background: linear-gradient(
        to right,
        rgba(238, 245, 241, 0) 0%,
        rgba(238, 245, 241, 0.15) 35%,
        rgba(238, 245, 241, 0.75) 68%,
        #eef5f1 92%
    );
}

body.index-page .index-cta-row--right .index-cta-fade {
    background: linear-gradient(
        to left,
        rgba(238, 245, 241, 0) 0%,
        rgba(238, 245, 241, 0.15) 35%,
        rgba(238, 245, 241, 0.75) 68%,
        #eef5f1 92%
    );
}

body.index-page .index-cta-copy {
    flex: 0.85;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 2.5rem;
    background: #eef5f1;
}

body.index-page .index-menu-cta-en {
    font-family: var(--font-logo);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #5f736c;
    margin: 0 0 0.65rem;
}

body.index-page .index-menu-cta-zh {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 600;
    color: #1e3d38;
    margin: 0 0 1.35rem;
    line-height: 1.35;
    letter-spacing: 0.04em;
}

body.index-page .index-cta-btn {
    display: inline-block;
    padding: 0.7rem 2.4rem;
    border-radius: 999px;
    background: #1e3d38;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition:
        background 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease;
    box-shadow: 0 4px 14px rgba(30, 61, 56, 0.25);
}

body.index-page .index-cta-btn:hover {
    background: #2a554d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 61, 56, 0.32);
}

body.index-page .index-cta-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    body.index-page .index-cta-row,
    body.index-page .index-cta-row--left,
    body.index-page .index-cta-row--right {
        flex-direction: column;
        min-height: 0;
        margin-bottom: 2.75rem;
    }

    body.index-page .index-cta-visual {
        flex: none;
        width: 100%;
        min-height: 220px;
    }

    body.index-page .index-cta-visual img {
        min-height: 220px;
    }

    body.index-page .index-cta-row--left .index-cta-fade,
    body.index-page .index-cta-row--right .index-cta-fade {
        background: linear-gradient(
            to bottom,
            rgba(238, 245, 241, 0) 0%,
            rgba(238, 245, 241, 0.2) 45%,
            #eef5f1 88%
        );
    }

    body.index-page .index-cta-copy {
        flex: none;
        width: 100%;
        padding: 1.75rem 1.25rem 2rem;
    }
}

.photo-frame {
    position: relative;
    border-radius: 20px !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #1a1a24;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
    width: 100% !important;
}

.photo-frame img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.photo-frame .photo-overlay {
    background: linear-gradient(to top, rgba(15,15,22,0.95) 0%, rgba(15,15,22,0.6) 60%, transparent 100%);
    color: var(--text-light);
    padding: 2rem 1.5rem 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.photo-frame:hover {
    transform: translateY(-10px) rotate(0deg) !important;
    box-shadow: 0 20px 40px rgba(143, 184, 168, 0.15) !important;
    border-color: rgba(143, 184, 168, 0.3);
}

.photo-frame:hover img {
    filter: none;
    transform: scale(1.1);
}

.photo-frame:hover .photo-overlay {
    opacity: 1;
    transform: translateY(0);
}

.photo-overlay h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.photo-overlay p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ==========================================================================
   5. 關於肥肥頁面樣式 (關鍵修復：解決幻燈片垂直排列、重疊問題)
   ========================================================================== */
.about-content {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 5%;
}

.about-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(15px);
}

.about-text h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.about-text h2 {
    color: var(--secondary-color);
    margin: 2rem 0 1rem 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.about-text p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-text ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.about-text li {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.about-text li strong {
    color: var(--accent-color);
}

.about-media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    flex-shrink: 0;
}

.about-media-item {
    width: 400px !important;
    height: 300px !important;
    max-width: 100%;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    padding: 0;
    position: relative;
}

.about-media-item img,
.about-media-item video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* Slideshow 圖片重疊及淡入淡出關鍵樣式 */
.about-slideshow {
    position: relative;
    width: 400px;
    height: 300px;
}

.about-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

.about-slide.active {
    opacity: 1;
    display: block;
    z-index: 2;
}

.about-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.about-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.about-dot:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.2);
}

.about-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    border-color: var(--primary-color);
}

/* ==========================================================================
   罪犯小貓頁面 (badcat.html) — 風格對齊 about.html
   ========================================================================== */
body.badcat-page .slideshow-container {
    min-height: 0 !important;
    height: auto;
    display: block;
}

body.badcat-page .divider {
    margin: 2rem 0 2.5rem;
}

.badcat-content {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 5%;
}

.badcat-hero {
    max-width: 900px;
    margin: 0 auto 2.5rem;
}

.criminal-slideshow {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.criminal-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

.criminal-slide.active {
    opacity: 1;
    display: block;
    z-index: 2;
}

.criminal-slide-top {
    object-position: 50% 15%;
}

.criminal-slideshow-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.criminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.criminal-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.criminal-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    border-color: var(--primary-color);
}

.badcat-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.criminal-sidebar {
    flex: 0 0 220px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
}

.criminal-sidebar-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.criminal-burger {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(143, 184, 168, 0.15);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-main);
}

.criminal-burger:hover {
    background: rgba(143, 184, 168, 0.3);
    border-color: var(--primary-color);
}

.criminal-burger-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.criminal-burger-menu.show {
    display: flex;
}

.criminal-burger-item {
    width: 100%;
    padding: 0.65rem 1rem;
    text-align: left;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-main);
}

.criminal-burger-item:hover {
    background: rgba(143, 184, 168, 0.2);
    border-color: rgba(143, 184, 168, 0.4);
    transform: translateX(4px);
}

.badcat-content .criminal-text {
    flex: 1;
    min-width: 0;
}

.criminal-crimes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.criminal-crime-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--card-border);
    background: rgba(143, 184, 168, 0.12);
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-main);
}

.criminal-crime-btn:hover {
    background: rgba(143, 184, 168, 0.28);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.criminal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--secondary-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-main);
}

.criminal-back:hover {
    background: rgba(168, 196, 212, 0.15);
    border-color: var(--secondary-color);
}

.badcat-media.criminal-videos {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.badcat-media.criminal-videos .badcat-media-item {
    width: 400px !important;
    height: 220px !important;
    max-width: 100%;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 0;
}

.badcat-media.criminal-videos video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* ==========================================================================
   6. 雙欄側邊社交與版面 layout (Main Content Flex)
   ========================================================================== */
.main-content-flex {
    max-width: 1400px;
    margin: 4rem auto 0 auto;
    padding: 0 5% 5% 5%;
    gap: 3rem;
}

.social-sidebar {
    flex: 0 0 15%;
    gap: 1.5rem;
    padding-top: 2rem;
}

.vertical-divider {
    background: linear-gradient(to bottom, transparent, var(--card-border), transparent);
    height: 400px;
    margin: 0;
}

/* ==========================================================================
   7. 了解貓咪淋巴癌頁面樣式
   ========================================================================== */
.lymphoma-banner {
    max-width: 1400px;
    margin: 0 auto 3rem auto;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.lymphoma-banner img {
    height: 300px;
}

/* 淋巴癌：分頁 + 手風琴 */
.lymphoma-main,
.lymphoma-main-flex {
    max-width: 920px;
    margin: 0 auto 4rem;
    padding: 0 5%;
}

.lymphoma-lead {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.lymphoma-article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem 1.75rem 2rem;
    box-shadow: 0 10px 30px rgba(143, 184, 168, 0.12);
}

.lymphoma-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.lymphoma-tab-nav-btn {
    flex: 1 1 auto;
    min-width: 7.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-main);
    color: var(--text-gray);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lymphoma-tab-nav-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.lymphoma-tab-nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(143, 184, 168, 0.35);
}

.lymphoma-tab-panel {
    display: none;
    animation: lymphomaFadeIn 0.35s ease;
}

.lymphoma-tab-panel.active {
    display: block;
}

@keyframes lymphomaFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lymphoma-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.lymphoma-acc-item {
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.lymphoma-acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-light);
    transition: background 0.2s ease, color 0.2s ease;
}

.lymphoma-acc-trigger:hover {
    background: rgba(143, 184, 168, 0.08);
    color: var(--primary-color);
}

.lymphoma-acc-item.is-open .lymphoma-acc-trigger {
    color: var(--primary-color);
    background: rgba(143, 184, 168, 0.1);
}

.lymphoma-acc-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    position: relative;
}

.lymphoma-acc-icon::before,
.lymphoma-acc-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--primary-color);
    border-radius: 1px;
    transition: transform 0.25s ease;
}

.lymphoma-acc-icon::before {
    width: 14px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.lymphoma-acc-icon::after {
    width: 2px;
    height: 14px;
    transform: translate(-50%, -50%);
}

.lymphoma-acc-item.is-open .lymphoma-acc-icon::after {
    transform: translate(-50%, -50%) scaleY(0);
}

.lymphoma-acc-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lymphoma-acc-item.is-open .lymphoma-acc-body {
    grid-template-rows: 1fr;
}

.lymphoma-acc-body-inner {
    overflow: hidden;
    padding: 0 1.15rem;
}

.lymphoma-acc-item.is-open .lymphoma-acc-body-inner {
    padding-bottom: 1.15rem;
}

.lymphoma-acc-body-inner p {
    margin: 0;
    color: var(--text-gray);
    line-height: 1.85;
    font-size: 1rem;
}

.lymphoma-empty {
    color: var(--text-gray);
    text-align: center;
    padding: 2rem;
}

/* 舊版側欄分頁（保留相容） */
.lymphoma-sidebar {
    flex: 0 0 250px;
    gap: 1rem;
    margin-right: 0;
    align-items: stretch;
}

.lymphoma-tab-btn {
    background: var(--card-bg);
    color: var(--text-gray);
    border: 1px solid var(--card-border);
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
}

.lymphoma-article {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.lymphoma-article h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
}

.lymphoma-gallery img {
    width: 100%;
    max-width: 260px;
    height: 180px;
    object-fit: cover;
    cursor: zoom-in;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
}

.lymphoma-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.25rem 0;
}

/* lymphoma 頁面強制圖片尺寸，避免被頁內舊 CSS 覆蓋 */
body.lymphoma-page .lymphoma-banner img {
    display: block;
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
}

body.lymphoma-page .lymphoma-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

body.lymphoma-page .lymphoma-gallery img.zoomable,
body.lymphoma-page #lymphomaArticleContent .lymphoma-gallery img {
    width: 260px !important;
    max-width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    cursor: zoom-in !important;
    flex: 0 0 auto !important;
}

.lymphoma-gallery img:hover {
    transform: scale(1.08);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(255,138,138,0.25);
}

.zoom-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.zoom-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.86);
    backdrop-filter: blur(8px);
}

.zoom-close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--card-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1202;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    pointer-events: auto;
}

.zoom-close-btn:hover {
    background: var(--primary-color);
    color: #000;
}

#zoom-img {
    position: relative;
    z-index: 1201;
    max-width: min(92vw, 1200px);
    max-height: 86vh;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
    object-fit: contain;
    pointer-events: auto;
}

/* ==========================================================================
   8. 肥肥相集（統一細格網格 + 點擊放大）
   ========================================================================== */
.album-content {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 5%;
}

.album-main-flex {
    display: flex;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    gap: 2rem;
}

/* 左側選單 */
.album-sidebar {
    flex: 0 0 260px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 120px;
}

.album-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.album-sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.album-sidebar-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-toggle:hover {
    background: rgba(143, 184, 168, 0.12);
    color: var(--primary-color);
    border-color: rgba(143, 184, 168, 0.35);
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: block;
    padding: 0.85rem 1rem;
    color: var(--text-gray);
    font-size: 0.98rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
}

.sidebar-menu a::before {
    content: '◆';
    font-size: 0.55rem;
    margin-right: 0.6rem;
    color: var(--text-gray);
    opacity: 0.5;
    vertical-align: middle;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, rgba(143, 184, 168, 0.22), rgba(168, 196, 212, 0.15));
    color: var(--primary-color);
    border-color: rgba(143, 184, 168, 0.45);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(143, 184, 168, 0.15);
}

.sidebar-menu a.active::before {
    color: var(--primary-color);
    opacity: 1;
}

/* 右側相片：同 lymphoma-gallery 尺寸與排版 */
.album-gallery {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-content: flex-start;
    margin: 0;
}

.album-gallery .album-thumb {
    position: relative;
    flex: 0 0 300px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    cursor: zoom-in;
    margin: 0 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.album-page .album-gallery .album-thumb.scroll-reveal--scale.is-visible:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 14px 28px rgba(143, 184, 168, 0.28);
}

.album-gallery .album-thumb img,
.album-gallery .album-thumb video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block;
    border-radius: 0 !important;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.album-page .album-gallery .album-thumb.scroll-reveal--scale.is-visible:hover img,
body.album-page .album-gallery .album-thumb.scroll-reveal--scale.is-visible:hover video {
    transform: scale(1.08) rotate(1deg);
}

.album-gallery .album-thumb video {
    background: #000;
}

.album-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 36, 40, 0.45);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.album-gallery .album-thumb:hover .album-thumb-overlay {
    opacity: 1;
}

.album-thumb-zoom {
    font-size: 0.85rem;
    color: #fff;
    background: rgba(143, 184, 168, 0.9);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
}

.album-gallery .zoom-btn {
    display: none;
}

/* 放大 modal（深色遮罩：文字統一淺色，唔跟各頁 --text-light） */
.album-zoom-modal {
    --album-zoom-text: #f2f7f4;
    --album-zoom-text-muted: #c5d6cf;
    --album-zoom-caption-bg: rgba(255, 255, 255, 0.14);
    --album-zoom-caption-border: rgba(143, 184, 168, 0.55);
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(12px);
    padding: 2rem;
}

.album-zoom-bg {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.album-zoom-content {
    position: relative;
    z-index: 2;
    max-width: min(92vw, 1000px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.album-zoom-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 1203;
    width: 44px;
    height: 44px;
    border: 1px solid var(--album-zoom-caption-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--album-zoom-text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.album-zoom-close:hover {
    background: var(--primary-color);
    color: #000;
}

#album-zoom-img,
#album-zoom-video {
    max-width: min(88vw, 900px);
    max-height: 72vh;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.album-zoom-desc {
    text-align: center;
    color: var(--album-zoom-text);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 600px;
    padding: 0.85rem 1.35rem;
    background: var(--album-zoom-caption-bg);
    border: 1px solid var(--album-zoom-caption-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.album-zoom-modal .album-zoom-desc:empty {
    display: none;
}

/* ==========================================================================
   9. 樺心姊妹 / wahsumkai 頁面（對齊 about 版面與標題間距）
   ========================================================================== */
body.wahsumkai-page .slideshow-container {
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

body.wahsumkai-page .divider {
    margin: 0.75rem 0 1.25rem;
}

.huaxin-content {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 5%;
}

.wahsumkai-page-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin: 0 0 1.5rem 0;
}

.huaxin-main-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.huaxin-text-section {
    flex: 1;
    min-width: 0;
}

.huaxin-cat-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(15px);
    margin-bottom: 2rem;
}

.huaxin-cat-section:last-child {
    margin-bottom: 0;
}

/* 標題與內文間距：同 about-text */
.huaxin-cat-section h2 {
    color: var(--secondary-color);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 0.65rem 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border);
}

.huaxin-cat-section p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0 0 1rem 0;
}

.huaxin-cat-section p:last-child {
    margin-bottom: 0;
}

.huaxin-image-section {
    flex: 1;
    min-width: 0;
}

/* 主圖相框 + 左右切換 */
.huaxin-carousel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 1rem;
}

.huaxin-carousel-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(143, 184, 168, 0.35);
    transition: var(--transition-smooth);
    padding: 0;
}

.huaxin-carousel-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    transform: scale(1.08);
}

.huaxin-gallery {
    flex: 1;
    min-width: 0;
    position: relative;
    max-width: 600px;
    margin-bottom: 0;
}

/* 不用 filter:blur，避免換相時整頁卡頓 */
.huaxin-gallery::before {
    content: none;
}

.huaxin-frame {
    position: relative;
    z-index: 1;
    padding: 14px;
    background: linear-gradient(160deg, #ffffff 0%, #f4faf7 45%, #eaf3ee 100%);
    border-radius: 28px;
    box-shadow:
        0 22px 48px rgba(143, 184, 168, 0.22),
        0 0 0 1px rgba(143, 184, 168, 0.35),
        inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

.huaxin-frame::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 22px;
    border: 2px dashed rgba(143, 184, 168, 0.25);
    pointer-events: none;
    z-index: 2;
}

.huaxin-main-image {
    position: relative;
    width: 100%;
    height: 450px;
    background: var(--bg-surface);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    contain: layout paint;
}

.huaxin-main-image img,
.huaxin-main-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.12s ease;
}

.huaxin-main-image.is-fading img,
.huaxin-main-image.is-fading video {
    opacity: 0;
}

.huaxin-main-image-placeholder {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.huaxin-main-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(143, 184, 168, 0.45);
    box-shadow: 0 8px 22px rgba(143, 184, 168, 0.35);
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
}

.huaxin-main-arrow svg {
    width: 26px;
    height: 26px;
    stroke: var(--primary-color);
    stroke-width: 2.5;
    fill: none;
    transition: stroke 0.25s ease;
}

.huaxin-main-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(143, 184, 168, 0.45);
}

.huaxin-main-arrow:hover svg {
    stroke: #fff;
}

.huaxin-main-arrow:active {
    transform: translateY(-50%) scale(0.96);
}

.huaxin-main-arrow.left {
    left: 14px;
}

.huaxin-main-arrow.right {
    right: 14px;
}

.huaxin-main-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.huaxin-slide-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgba(42, 56, 52, 0.72);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.huaxin-thumbnails-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.huaxin-thumbnails-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 8px;
    padding: 0 40px;
    scrollbar-width: none;
}

.huaxin-thumbnails-container::-webkit-scrollbar {
    display: none;
}

.huaxin-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.huaxin-thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.huaxin-thumbnail:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--secondary-color);
}

.huaxin-thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(143, 184, 168, 0.3);
}

.huaxin-thumbnail img,
.huaxin-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.huaxin-thumbnail-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}

.huaxin-thumbnail-arrow:hover {
    background: rgba(143, 184, 168, 0.2);
    border-color: var(--primary-color);
}

.huaxin-thumbnail-arrow.left {
    left: 0;
}

.huaxin-thumbnail-arrow.right {
    right: 0;
}

.huaxin-thumbnail-arrow svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-light);
    stroke-width: 2;
    fill: none;
}

.huaxin-thumbnail-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ==========================================================================
   10. 統一頁腳 (Frosted Glass Footer)
   ========================================================================== */
.footer {
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--card-border);
    padding: 4rem 5% 2rem 5%;
    margin-top: 6rem;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -8px 24px rgba(143, 184, 168, 0.12);
}

.footer-header {
    border-bottom: 1px solid rgba(143, 184, 168, 0.2);
}

.footer-logo img {
    border: 2px solid var(--primary-color);
}

.footer-logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-sitemap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem 4rem;
    margin: 0 auto 3rem;
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(143, 184, 168, 0.25);
    box-shadow: 0 4px 18px rgba(143, 184, 168, 0.1);
}

.footer-section {
    text-align: center;
    min-width: 140px;
}

.footer-section h3 {
    color: var(--text-light);
    border-bottom: none;
    display: inline-block;
    position: relative;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section a {
    color: var(--text-gray);
    transition: var(--transition-smooth);
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 5px;
}

.footer-copyright {
    border-top: 1px solid rgba(143, 184, 168, 0.2);
    color: var(--text-gray);
}

/* ==========================================================================
   11. 手機響應式斷點與選單調整 (Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
    body {
        padding-top: 88px;
    }

    .menu-nav {
        padding: 0.8rem 5% !important;
    }

    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }

    .menu-left {
        flex: 1;
        min-width: 0;
        gap: 0.65rem 1rem !important;
    }

    .menu-left > .date-weather.mobile-only,
    .menu-nav-date-mobile {
        display: block !important;
        flex: 1;
        min-width: 0;
        border-right: none !important;
        padding-right: 0 !important;
        font-size: 0.8rem !important;
        line-height: 1.35;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-drawer-date {
        display: none !important;
        width: 85%;
        max-width: 320px;
        text-align: center;
        font-family: var(--font-logo);
        font-size: 0.95rem;
        color: var(--primary-color);
        font-weight: 700;
        padding-bottom: 1.25rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--card-border);
    }

    .menu-items-row.show .menu-drawer-date,
    .menu-items-row.active .menu-drawer-date {
        display: block !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        background: rgba(255, 255, 255, 0.92) !important;
        border: 1px solid var(--card-border) !important;
        border-radius: 50% !important;
        align-items: center !important;
        width: 44px !important;
        height: 44px !important;
        padding: 11px 10px !important;
        position: relative !important;
        z-index: 10002 !important;
        box-shadow: 0 4px 16px rgba(143, 184, 168, 0.2);
        cursor: pointer;
    }

    .mobile-menu-toggle .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text-light);
        border-radius: 2px;
        transition: var(--transition-smooth);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 手機版全屏選單覆蓋 */
    .menu-items-row {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 5rem 8% 3rem !important;
        box-sizing: border-box !important;
        background: rgba(238, 245, 241, 0.98) !important;
        backdrop-filter: blur(28px) !important;
        -webkit-backdrop-filter: blur(28px) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1.25rem !important;
        transition: opacity 0.35s ease, visibility 0.35s ease !important;
        z-index: 10001 !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .menu-items-row.show,
    .menu-items-row.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.menu-open {
        overflow: hidden !important;
    }

    .menu-item {
        width: 80%;
        padding: 0.8rem 1.5rem !important;
    }

    .menu-text {
        font-size: 1.1rem !important;
    }

    /* 手機版佈局重整 */
    .main-content-flex {
        flex-direction: column-reverse !important;
        gap: 2rem !important;
        padding: 0 5% 3rem 5% !important;
    }

    .vertical-divider {
        width: 100% !important;
        height: 1px !important;
    }

    .social-sidebar {
        flex-direction: row !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* 淋巴癌手機版 */
    .lymphoma-main,
    .lymphoma-main-flex {
        padding: 0 4% 3rem;
    }

    .lymphoma-article-card {
        padding: 1.15rem 1rem 1.5rem;
    }

    .lymphoma-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.75rem;
    }

    .lymphoma-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .lymphoma-tab-nav-btn {
        flex: 0 0 auto;
        min-width: auto;
        white-space: nowrap;
        font-size: 0.88rem;
        padding: 0.55rem 0.9rem;
    }

    .lymphoma-acc-trigger {
        font-size: 0.98rem;
        padding: 0.9rem 1rem;
    }

    /* 相集手機版 */
    .album-main-flex {
        display: flex !important;
        flex-direction: column !important;
    }

    .album-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        flex: none !important;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-menu {
        display: none;
        margin-top: 0.5rem;
    }

    .sidebar-menu.open {
        display: flex;
    }

    body.album-page .album-gallery .album-thumb {
        width: min(300px, 100%) !important;
        height: min(300px, 100vw) !important;
        min-width: unset !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    /* 罪犯小貓手機版 */
    .badcat-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .criminal-sidebar {
        flex: none !important;
        width: 100% !important;
    }

    .badcat-media.criminal-videos {
        width: 100% !important;
        align-items: center !important;
    }

    .badcat-media.criminal-videos .badcat-media-item {
        width: 100% !important;
        max-width: 400px !important;
    }

    .criminal-slideshow {
        height: 220px !important;
    }

    /* 關於肥肥頁面手機自適應 */
    .about-container {
        flex-direction: column !important;
        align-items: center !important;
    }
    .about-media {
        width: 100% !important;
        align-items: center !important;
    }
    .about-media-item {
        width: 100% !important;
        max-width: 400px !important;
    }

    /* 樺心姊妹手機版 */
    .huaxin-main-container {
        flex-direction: column !important;
    }

    .huaxin-main-image {
        height: 300px !important;
    }

    .huaxin-main-arrow {
        width: 42px;
        height: 42px;
    }

    .huaxin-main-arrow.left {
        left: 8px;
    }

    .huaxin-main-arrow.right {
        right: 8px;
    }
}

@media (max-width: 480px) {
    .photo-container {
        grid-template-columns: 1fr !important;
    }
    
    .about-text, .lymphoma-article, .huaxin-cat-section, .badcat-content .criminal-text {
        padding: 1.5rem !important;
    }
}