/**
 * 十字之光 (Cross) —— 基督教／天主教
 * -------------------------------------------------------------------------
 * 對應 docs/調整方案.md 2.2 主題路線圖第三順位。
 * 配色：深靛藍的夜 + 晨光的米金白，天青點綴。
 *       刻意不用「純黑 + 純白」—— 那太像訃聞，這裡要的是「破曉」而不是「哀悼」。
 *       與蓮花禪心（墨綠金）、香火長明（廟宇紅金）明顯區隔。
 *
 * 這支檔案涵蓋動效三層結構的 A 層與 C 層：
 *   A. 氛圍層（常駐背景）—— 聖光自上方斜射、巨大的十字剪影呼吸、光塵與白鴿粒子
 *   C. 進場層（前 3 秒）—— 光自十字後方漫開、十字浮現、名字浮現
 *      骨架與流程由 assets/js/theme-intro.js 負責，這裡只畫「長什麼樣子」
 *   B 層（儀式動效）在 assets/js/ritual.js，這裡只覆寫它的顏色變數 --rt-*
 *
 * 技術要求（docs/調整方案.md 2.5）：
 *   ✔ 動畫只動 transform / opacity
 *   ✔ prefers-reduced-motion: reduce 時全部停用（見檔尾）
 *   ✔ 手機端降低圖層強度（見檔尾 @media max-width:768px）
 *   ✔ 獨立檔案
 *
 * ⚠️ tier = 'new'：目前只能用 ?theme_preview= 預覽，還不能存檔套用（等 B3）。
 */

/* ★ 不是贅碼，不要順手刪（2026-09-10 iOS 26 Liquid Glass，見 CLAUDE.md 8.24）
   色值必須與下面 .theme-cross.memorial-view-page 的漸層起點一致。 */
html:has(body.theme-cross) {
    background-color: #0a1020;
}

.theme-cross {
    --theme-primary: #e6d7a8;
    /* 聖光金白 */
    --theme-secondary: #9db8dd;
    /* 天青 */
    --theme-accent: #fff6df;
    /* 晨光白 */
    --theme-bg-start: #0a1020;
    --theme-bg-mid: #131d34;
    --theme-bg-end: #24365c;
    --theme-text: #eef2f8;
    --theme-text-light: #b9c6db;

    --cr-light: 246, 234, 200;
    /* rgb 分量，方便配 rgba() */
    --cr-sky: 157, 184, 221;
    --cr-light-soft: #f6eac8;
    --cr-ink: #0a1020;

    /* B 層儀式動效的配色（ritual.js 讀這些變數）：
       火是燭白金、花瓣是百合白、光點是聖光金，整體比另外兩套冷、比另外兩套亮 */
    --rt-flame: #ffd98a;
    --rt-flame-core: #fffaf0;
    --rt-glow: var(--cr-light);
    --rt-petal-a: #dfe8f5;
    --rt-petal-b: #ffffff;
    --rt-petal-core: #e6d7a8;
    --rt-smoke: 214, 226, 242;
    --rt-glint: #fff2cf;
    --rt-letter-a: #ffffff;
    --rt-letter-b: #e8eef7;
    --rt-letter-line: 72, 92, 124;
}

.theme-cross.memorial-view-page {
    background: linear-gradient(180deg,
            var(--theme-bg-start) 0%,
            var(--theme-bg-mid) 34%,
            #1b2947 64%,
            var(--theme-bg-end) 100%);
    /* ⚠️ 上面的 background 是「簡寫」，會把 body.memorial-view-page 設的
       background-attachment: fixed 一併重設成 scroll，也會把 background-color 清成透明。
       漸層一旦變成 scroll，它會被拉伸到整份文件的高度 —— 長專頁捲一整頁都看不出顏色在變，
       等於白做。所以這兩行要明寫回來，不是贅碼。 */
    background-attachment: fixed;
    background-color: #0a1020;
    min-height: 100vh;
    position: relative;
    color: var(--theme-text);
}

/* ═════════════════════════════════════════════════════════
   A. 氛圍層（常駐背景）
   ═════════════════════════════════════════════════════════ */

/* A-1 聖光灑落：自左上斜射下來的一道光，緩慢地亮起又收斂。
   ⚠️ 用 rotate 而不是改 width／left 來讓光「擺動」—— 後者會觸發 layout，手機必掉幀。
      所以這一層做成一個比視窗大很多的傾斜方塊（200% 寬高），
      rotate 幾度都不會露出邊緣。 */
.theme-cross.memorial-view-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    pointer-events: none;
    transform-origin: 50% 50%;
    background:
        linear-gradient(104deg,
            transparent 30%,
            rgba(var(--cr-light), 0.10) 40%,
            rgba(var(--cr-light), 0.18) 46%,
            rgba(var(--cr-light), 0.07) 53%,
            transparent 62%),
        linear-gradient(96deg,
            transparent 44%,
            rgba(var(--cr-light), 0.07) 50%,
            transparent 57%);
    animation: crHolyRay 16s ease-in-out infinite;
}

@keyframes crHolyRay {

    0%,
    100% {
        opacity: 0.66;
        transform: rotate(-1.6deg) scale(1);
    }

    50% {
        opacity: 1;
        transform: rotate(1.6deg) scale(1.04);
    }
}

/* A-2 破曉：畫面底部一層漸亮的晨光，與上方的聖光呼應。
   週期刻意跟 A-1 不同（16s vs 11s），兩層才不會同步、才像兩件事。 */
.theme-cross.memorial-view-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 44% at 50% 106%,
            rgba(var(--cr-sky), 0.22) 0%,
            rgba(var(--cr-sky), 0.07) 46%,
            transparent 76%),
        radial-gradient(ellipse 80% 30% at 50% 100%,
            rgba(var(--cr-light), 0.14) 0%,
            transparent 70%);
    animation: crDawn 11s ease-in-out infinite;
}

@keyframes crDawn {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* A-3 十字剪影：內容區背後一個巨大的十字，透明度極低、緩慢呼吸。
   它不是裝飾圖示，是「這頁的信仰是什麼」的一句話 —— 所以要大、要淡、要在內容後面。
   跟著內容捲動（絕對定位在 .memorial-container 上），不要做成貼在螢幕上的浮水印。 */
/* ⚠️ 只在「沒有封面」時壓成 z-index:1（2026-11-27）。
   有封面時 memorial-view.css 的 .memorial-container.has-hero 是 z-index:10，
   讓內容區（上緣往上疊 120px）蓋過封面底部的波浪層 .wave-stack（z-index:3）。
   這條特異度相同又載入在後，以前會把 10 蓋成 1 → 波浪反過來壓在頭像上半部，
   看起來像一條深色橫條把頭像遮掉。有封面時 10 一樣會形成堆疊環境，
   ::before 的 z-index:-1 仍留在內容後面，不需要這條。 */
.theme-cross .memorial-container:not(.has-hero) {
    position: relative;
    z-index: 1;
}

/* ⚠️ top 要讓橫槓落在頭像（含心意徽章）下方、名字附近（2026-11-27）。
   原本 2rem 時橫槓剛好在頭像後面，整支十字只露出直槓，看不出是十字。
   頭像位置：有封面時從內容區頂端開始（約 0～220px），沒有封面時往下約 100px，
   所以兩種情況分開設；頭像尺寸或 header 間距改了要回來重算。 */
.theme-cross .memorial-container::before {
    content: '';
    position: absolute;
    top: 10.25rem;
    left: 50%;
    /* ⚠️ 置中的負 margin 要用 max() 不是 min()。
       寬度是 min(A, B)，它的一半是 min(A/2, B/2)，取負之後就變成 max(-A/2, -B/2) ——
       寫成 min(-A/2, -B/2) 會挑到「比較負」的那個，元素整個往左偏出去。
       這個錯在寬螢幕特別明顯（vw 那一項比 rem 大很多），實測截圖才看得出來。 */
    width: min(21rem, 66vw);
    height: min(30rem, 94vw);
    margin-left: max(-10.5rem, -33vw);
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 200'%3E%3Cg fill='%23f6eac8'%3E%3Crect x='62' y='6' width='16' height='188' rx='3'/%3E%3Crect x='24' y='52' width='92' height='16' rx='3'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.05;
    transform-origin: 50% 30%;
    animation: crCrossBreathe 14s ease-in-out infinite;
}

.theme-cross .memorial-container.has-hero::before {
    top: 6.5rem;
}

@keyframes crCrossBreathe {

    0%,
    100% {
        opacity: 0.045;
        transform: scale(1);
    }

    50% {
        opacity: 0.1;
        transform: scale(1.035);
    }
}

/* ─────────────────────────────────────────────────────────
   A-4 氛圍粒子：聖光裡的塵埃 ＋ 白鴿掠過
   DOM 由 assets/js/theme-ambient.js 產生（每顆帶 --x/--y/--d/--t/--s/--r/--dx），
   數量與「減少動態」的判斷也在那支；這裡只管長什麼樣。

   z-index: 0 跟既有 8 套的氛圍層一致，壓在 .memorial-container（z-index:1）底下。
   ───────────────────────────────────────────────────────── */

.theme-cross .amb-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.theme-cross .amb-item {
    position: absolute;
    will-change: transform, opacity;
    /* 負延遲：一進頁面就已經有東西在飄，不會先空好幾秒 */
    animation-delay: calc(-1 * var(--d, 0s));
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* 光塵：非常小、非常慢、幾乎只是「空氣裡有東西」。
   速度是三套主題裡最慢的（× 1.6），因為聖光的語氣是靜止的。 */
.theme-cross .amb-dust {
    left: var(--x, 50vw);
    top: var(--y, 50%);
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 50%;
    background: radial-gradient(circle,
            #fffaf0 0%,
            rgba(246, 234, 200, 0.7) 45%,
            rgba(246, 234, 200, 0) 100%);
    animation-name: crDustDrift;
    animation-duration: calc(var(--t, 14s) * 1.6);
}

@keyframes crDustDrift {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(calc(var(--s, 1) * 0.6));
    }

    16% {
        opacity: 0.9;
    }

    50% {
        transform: translate3d(calc(var(--dx, 0rem) * 0.6), -7rem, 0) scale(var(--s, 1));
    }

    84% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--dx, 0rem), -15rem, 0) scale(calc(var(--s, 1) * 0.7));
    }
}

/* 白鴿掠過：從左邊飛進畫面、飛出右邊。
   身體是這個 span，翅膀是兩個偽元素，靠 scaleY 拍動（只動 transform）。
   --t 是氛圍粒子共用的秒數，鴿子取它的 0.55 倍 —— 要比塵埃快很多，
   不然看起來像在水裡游。 */
.theme-cross .amb-dove {
    left: -8rem;
    top: var(--y, 40%);
    width: 1.5rem;
    height: 0.44rem;
    border-radius: 50% 40% 45% 55%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.9), rgba(226, 236, 250, 0.62));
    filter: drop-shadow(0 0 0.5rem rgba(var(--cr-light), 0.5));
    animation-name: crDoveFly;
    animation-duration: calc(var(--t, 14s) * 0.55);
    animation-timing-function: ease-in-out;
}

.theme-cross .amb-dove::before,
.theme-cross .amb-dove::after {
    content: '';
    position: absolute;
    left: 0.42rem;
    width: 0.78rem;
    height: 0.3rem;
    border-radius: 60% 40% 50% 50%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.92), rgba(214, 228, 248, 0.5));
    transform-origin: 14% 100%;
    animation: crDoveWing 0.62s ease-in-out infinite alternate;
}

/* 上翅 */
.theme-cross .amb-dove::before {
    top: -0.2rem;
}

/* 下翅：反向拍動（animation-direction 相反），才有拍翅的立體感 */
.theme-cross .amb-dove::after {
    top: 0.16rem;
    animation-direction: alternate-reverse;
}

@keyframes crDoveWing {
    0% {
        transform: rotate(-16deg) scaleY(0.55);
    }

    100% {
        transform: rotate(14deg) scaleY(1);
    }
}

@keyframes crDoveFly {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(calc(var(--s, 1) * 0.8));
    }

    8% {
        opacity: 0.85;
    }

    /* 飛行途中微微起伏，直線飛過去會很假 */
    40% {
        transform: translate3d(46vw, -2.4rem, 0) scale(calc(var(--s, 1) * 0.9));
    }

    70% {
        transform: translate3d(78vw, 0.8rem, 0) scale(calc(var(--s, 1) * 0.85));
    }

    92% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translate3d(116vw, -1.6rem, 0) scale(calc(var(--s, 1) * 0.75));
    }
}

/* ═════════════════════════════════════════════════════════
   版面元件
   ═════════════════════════════════════════════════════════ */

/* Hero 遮罩底部邊框顏色 —— 要與波浪同色，否則會看到一條接縫 */
.theme-cross .hero-cover-overlay {
    border-bottom-color: var(--cr-ink);
}

.theme-cross .memorial-cover {
    background: linear-gradient(180deg,
            #0a1020 0%,
            #16223c 48%,
            #24365c 100%);
    position: relative;
}

/* 封面上一道自上方灑下的光 */
.theme-cross .memorial-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170%;
    height: 170%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: radial-gradient(ellipse 60% 80% at 50% -10%,
            rgba(var(--cr-light), 0.22) 0%,
            rgba(var(--cr-light), 0.08) 38%,
            transparent 68%);
    animation: crCoverGlow 7s ease-in-out infinite;
}

@keyframes crCoverGlow {

    0%,
    100% {
        opacity: 0.55;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.07);
    }
}

/* ⚠️ .memorial-profile-card 目前是**死 class** —— view.php 沒有輸出它，
   全站只有各主題的 CSS 在寫（既有 8 套也都有）。留著是為了與其他主題一致，
   但不要以為改它會有效果；標頭的實際樣式在上面那組 .pet-* 。 */
.theme-cross .memorial-profile-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--cr-light), 0.38);
    border-top-color: var(--cr-ink);
    box-shadow: 0 0 24px rgba(var(--cr-light), 0.16);
}

.theme-cross .memorial-section {
    background: rgba(17, 27, 48, 0.78);
    border: 1px solid rgba(var(--cr-light), 0.14);
    backdrop-filter: blur(8px);
}

.theme-cross .section-title {
    color: var(--cr-light-soft);
}

.theme-cross .section-title::before,
.theme-cross .section-title::after {
    background: linear-gradient(90deg, transparent, rgba(var(--cr-light), 0.62), transparent);
}

.theme-cross .memorial-section-title {
    color: var(--cr-light-soft);
}

.theme-cross .memorial-section-title .material-icons {
    color: var(--theme-primary);
}

/* ── 標頭 ──
   ⚠️ 兩個坑（與 incense.css 同）：
   ① 逝者姓名不在白色卡片裡，是直接壓在深色頁面背景上。
      `.memorial-profile-card` 只存在於各主題 CSS，view.php 從未輸出過它。
      標頭文字一律要用淺色。
   ② memorial-view.css 的 .pet-name / .pet-dates / .pet-age / .pet-epitaph
      都帶 `!important`，主題端不加 !important 蓋不掉（會安靜地失效）。 */
.theme-cross .pet-name {
    color: #fffaf0 !important;
    text-shadow: 0 0 1.6rem rgba(var(--cr-light), 0.5);
}

.theme-cross .pet-title {
    color: var(--cr-light-soft);
}

.theme-cross .pet-nickname {
    color: rgba(238, 242, 248, 0.72);
}

.theme-cross .pet-dates {
    color: #ccd8ea !important;
}

.theme-cross .pet-age {
    color: #e4ecf7 !important;
}

.theme-cross .pet-epitaph {
    color: #eef2f8 !important;
}

.theme-cross .pet-epitaph::before,
.theme-cross .pet-epitaph::after {
    color: rgba(150, 132, 84, 0.9);
}

.theme-cross .pet-avatar,
.theme-cross .pet-avatar-placeholder {
    box-shadow: 0 0 0 3px rgba(var(--cr-light), 0.5), 0 6px 20px rgba(0, 0, 0, 0.32);
}

.theme-cross .memorial-name {
    color: var(--cr-light-soft);
}

/* ── 內文 ── */
.theme-cross .story-content,
.theme-cross .letter-content,
.theme-cross .memorial-section p {
    color: var(--theme-text);
}

.theme-cross .letter-paper {
    background: linear-gradient(180deg, #ffffff 0%, #eef3fa 100%);
    border: 1px solid rgba(var(--cr-sky), 0.45);
}

.theme-cross .letter-paper .letter-content {
    color: #2c3c58;
}

.theme-cross .letter-signature {
    color: #4a5e80;
}

/* ── 生命歷程（timeline） ── */
.theme-cross .timeline::before {
    background: linear-gradient(180deg,
            transparent,
            rgba(var(--cr-light), 0.5) 12%,
            rgba(var(--cr-light), 0.5) 88%,
            transparent);
}

.theme-cross .timeline-dot {
    background: var(--theme-primary);
    box-shadow: 0 0 0 4px rgba(var(--cr-light), 0.2);
}

.theme-cross .timeline-date {
    color: var(--theme-primary);
}

.theme-cross .timeline-title {
    color: var(--cr-light-soft);
}

.theme-cross .timeline-desc {
    color: var(--theme-text-light);
}

/* ── 相簿 ── */
.theme-cross .photo-item {
    border: 1px solid rgba(var(--cr-light), 0.2);
}

.theme-cross .photo-item:hover {
    border-color: rgba(var(--cr-light), 0.55);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
}

/* ── 留言 ── */
.theme-cross .message-compose-card,
.theme-cross .message-preview-card,
.theme-cross .message-empty-card,
.theme-cross .message-login-card {
    background: rgba(22, 34, 60, 0.74);
    border: 1px solid rgba(var(--cr-light), 0.18);
}

.theme-cross .preview-author {
    color: var(--cr-light-soft);
}

.theme-cross .preview-date,
.theme-cross .preview-content {
    color: var(--theme-text-light);
}

/* ── 按鈕 ── */
.theme-cross .light-candle-btn {
    background: linear-gradient(135deg, #5a77a8 0%, #e6d7a8 100%);
    color: #17223a;
    border: 1px solid rgba(var(--cr-light), 0.6);
}

.theme-cross .light-candle-btn:hover:not(:disabled):not(.lit) {
    background: linear-gradient(135deg, #47628e 0%, #cfbf8f 100%);
    color: #17223a;
}

.theme-cross .light-candle-btn.lit {
    background: rgba(var(--cr-light), 0.18);
    color: var(--cr-light-soft);
}

.theme-cross .candle-count {
    color: var(--cr-light-soft);
}

.theme-cross .submit-btn,
.theme-cross .section-action-btn {
    background: linear-gradient(135deg, #4f6d9e 0%, #e6d7a8 100%);
    color: #17223a;
}

.theme-cross .memorial-tribute-btn:hover {
    border-color: rgba(var(--cr-light), 0.65);
}

.theme-cross .memorial-tribute-btn.active {
    background: rgba(var(--cr-light), 0.18);
    border-color: rgba(var(--cr-light), 0.75);
}

/* ═════════════════════════════════════════════════════════
   C. 進場層（開啟頁面的前 3 秒）
   骨架 DOM（.ti-intro / .ti-scene / .ti-art / .ti-text）由 theme-intro.js 產生。
   ═════════════════════════════════════════════════════════ */

.theme-cross .ti-intro {
    --ti-bg: #070c17;
    --ti-title: #f6eac8;
    --ti-sub: rgba(246, 234, 200, 0.7);
    --ti-skip-bg: rgba(246, 234, 200, 0.14);
    --ti-skip: rgba(246, 234, 200, 0.88);
    --ti-skip-bg-hover: rgba(246, 234, 200, 0.26);
}

/* C-1 聖光自十字後方漫開 */
.theme-cross .ti-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 56% 62% at 50% 34%,
            rgba(var(--cr-light), 0.34) 0%,
            rgba(var(--cr-light), 0.12) 40%,
            transparent 72%),
        radial-gradient(ellipse 120% 40% at 50% 108%,
            rgba(var(--cr-sky), 0.24) 0%,
            transparent 74%);
    opacity: 0;
    animation: crIntroWash 2.8s ease-out 0.2s forwards;
}

@keyframes crIntroWash {
    0% {
        opacity: 0;
        transform: scale(1.14);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* C-2 十字浮現
   ⚠️ 坑一：.ti-art 的骨架 CSS 用 `transform: translate(-50%,-50%)` 置中，
      這裡一旦寫 transform 動畫就會蓋掉它，所以**每個 keyframe 都要把 -50% 帶著**。

   ⚠️ 坑二（截圖才看得出來）：十字不能置中。
      第一版把十字放在畫面正中央、名字用 margin-top 往下推，
      結果名字與生卒年**整個壓在十字的直桿上**，字被桿子切成兩半。
      改成「十字在上、名字在下」的直式構圖：.ti-art 用 top 定位（不是置中），
      名字再用 margin-top 讓到十字下方。
      改十字的 height 時，.ti-text 的 margin-top 要一起改，否則又會疊到。 */
.theme-cross .ti-art {
    top: 6%;
    bottom: auto;
    left: 50%;
    width: min(17rem, 52vw);
    height: min(24rem, 72vw);
    transform: translate(-50%, 0) scale(1);
    transform-origin: 50% 40%;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 200'%3E%3Cg fill='%23f6eac8'%3E%3Crect x='62' y='6' width='16' height='188' rx='3'/%3E%3Crect x='24' y='52' width='92' height='16' rx='3'/%3E%3C/g%3E%3C/svg%3E");
    filter: drop-shadow(0 0 2rem rgba(var(--cr-light), 0.6));
    animation: crIntroCross 2.9s cubic-bezier(.16, .8, .28, 1) 0.35s forwards;
}

@keyframes crIntroCross {
    0% {
        opacity: 0;
        transform: translate(-50%, 1.2rem) scale(0.74);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1.03);
    }

    72% {
        transform: translate(-50%, 0) scale(0.995);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* C-3 光自十字交會處向外放射（一圈擴散開的光暈，像光「打開」了）。
   ⚠️ 圓心要對準十字的交會處，不是畫面中央。
      SVG viewBox 是 140×200，橫木在 y=52~68（中心 60），也就是十字高度的 30%。
      .ti-art 從 top:6% 起、高 min(24rem,72vw)，所以交會處在
      6% + 0.30 × min(24rem,72vw) = 6% + min(7.2rem, 21.6vw)。 */
.theme-cross .ti-scene::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(6% + min(7.2rem, 21.6vw));
    width: min(30rem, 88vw);
    height: min(30rem, 88vw);
    margin: max(-15rem, -44vw) 0 0 max(-15rem, -44vw);
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(255, 250, 240, 0.34) 0%,
            rgba(var(--cr-light), 0.14) 32%,
            transparent 64%);
    opacity: 0;
    animation: crIntroBurst 2.6s ease-out 1.1s forwards;
}

@keyframes crIntroBurst {
    0% {
        opacity: 0;
        transform: scale(0.24);
    }

    26% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}

/* 名字讓到十字下方。
   用 margin-top（不是 transform）—— .ti-intro 是 flex column 置中，margin 推得動，
   也不會跟 .ti-title 自己的 tiTitleIn 位移動畫互相覆蓋。
   數字要跟上面 .ti-art 的 height 綁著看：十字底在 6% + min(24rem,72vw)，
   名字要落在它下面。 */
.theme-cross .ti-text {
    margin-top: min(23rem, 69vw);
}

.theme-cross .ti-title {
    text-shadow: 0 0 1.8rem rgba(var(--cr-light), 0.5);
}

/* ═════════════════════════════════════════════════════════
   手機：降低圖層強度
   粒子數量由 theme-ambient.js 自動減半，這裡再把最貴的那幾層關掉或放慢。
   ═════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* 聖光那層是 200%×200% 的大方塊在轉，手機上重繪面積最大 —— 不轉了，只留呼吸 */
    .theme-cross.memorial-view-page::before {
        animation-duration: 22s;
    }

    .theme-cross.memorial-view-page::after {
        animation-duration: 15s;
    }

    .theme-cross .memorial-container::before {
        width: min(15rem, 62vw);
        height: min(22rem, 90vw);
        margin-left: max(-7.5rem, -31vw);
        animation-duration: 18s;
    }

    .theme-cross .memorial-cover::before {
        animation-duration: 10s;
    }

    /* 進場層：留十字與聖光，放射光暈省掉（全螢幕大圓縮放最貴） */
    .theme-cross .ti-scene::after {
        display: none;
    }

    .theme-cross .ti-art {
        width: min(12rem, 44vw);
        height: min(17rem, 62vw);
    }

    /* 跟著上面的 height 走：十字底在 6% + min(17rem,62vw)，名字要落在它下面 */
    .theme-cross .ti-text {
        margin-top: min(16rem, 58vw);
    }
}

/* ═════════════════════════════════════════════════════════
   減少動態：全部停用（docs/調整方案.md 2.5）
   ⚠️ 只把 animation 關掉是不夠的 —— 好幾個圖層的初始狀態是 opacity:0，
      關掉動畫會讓它們永遠停在看不見的狀態，進場層甚至會變成一片全黑。
   ═════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    .theme-cross.memorial-view-page::before,
    .theme-cross.memorial-view-page::after,
    .theme-cross .memorial-container::before,
    .theme-cross .memorial-cover::before,
    .theme-cross .amb-item,
    .theme-cross .amb-dove::before,
    .theme-cross .amb-dove::after,
    .theme-cross .ti-scene::before,
    .theme-cross .ti-scene::after,
    .theme-cross .ti-art {
        animation: none !important;
        transition: none !important;
    }

    .theme-cross .ti-scene::before {
        opacity: 1 !important;
        transform: none !important;
    }

    /* ⚠️ .ti-art 不能寫 transform:none —— 它靠 translate(-50%,-50%) 置中，
       清掉會讓十字往右下偏半個身。只還原 opacity 與縮放。 */
    .theme-cross .ti-art {
        opacity: 1 !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* 放射光暈是「光打開」這個動作本身，靜止下來只是一團霧；粒子同理 */
    .theme-cross .ti-scene::after,
    .theme-cross .amb-layer {
        display: none !important;
    }
}
