@font-face {
    font-family: "Source Han Sans SC";
    src: url("../assets/v2/font/SourceHanSansSC-Regular-2.woff2") format("woff2"), url("../assets/v2/font/SourceHanSansSC-Regular-2.otf") format("opentype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Source Han Sans SC";
    src: url("../assets/v2/font/SourceHanSansSC-Medium-2.woff2") format("woff2"), url("../assets/v2/font/SourceHanSansSC-Medium-2.otf") format("opentype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "Source Han Sans SC";
    src: url("../assets/v2/font/SourceHanSansSC-Bold-2.woff2") format("woff2"), url("../assets/v2/font/SourceHanSansSC-Bold-2.otf") format("opentype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "PangMenZhengDao";
    src: url("../assets/v2/font/庞门正道粗书体.woff2") format("woff2"), url("../assets/v2/font/庞门正道粗书体.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: #070605;
    font-family: "Microsoft YaHei", "PingFang SC", "STKaiti", "KaiTi", sans-serif;
    color: #f4ecd4;
    font-size: 16px;
}
/* 點對話框推進劇情時會誤觸文字選取，整段被反藍。原版是 Unity 畫布，
   本來就不可能選字，所以整個遊戲容器關掉選取，只留輸入框可選。 */
#game-container, #game-container * {
    -webkit-user-select: none;
    user-select: none;
}
#game-container input,
#game-container textarea {
    -webkit-user-select: text;
    user-select: text;
}
.fx-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
#game-container {
    --du: 1;
    width: calc(1920px * var(--du));
    height: calc(1080px * var(--du));
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: #0c0a08;
}
img {
    max-width: none;
    -webkit-user-drag: none;
    user-select: none;
}
.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }
.hidden { display: none !important; }
.full-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.full-bg.dim { filter: brightness(.45); }

/* ===== shared chrome ===== */
.chrome-fate {
    position: absolute; left: 1.4%; top: 1.6%; z-index: 6;
    min-width: 10.6rem; height: 2.35rem;
    padding: 0 1rem 0 2.4rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_气运背景.svg") left center/100% 100% no-repeat;
    display: flex; align-items: center;
    color: #fff; font-size: 1.05rem; letter-spacing: .04em;
    pointer-events: none;
}
.chrome-fate .fate-icon {
    position: absolute; left: .15rem; top: 50%; transform: translateY(-50%);
    width: 1.85rem; height: 1.85rem; object-fit: contain;
}
.chrome-settings {
    position: absolute; right: 1.2%; top: 1.2%; z-index: 6;
    width: 4.6rem; height: 3rem; border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_设置按钮.svg") center/contain no-repeat;
}
.chrome-ver {
    position: absolute; left: 1.2%; bottom: 1.1%;
    color: #f3f6f8; font-size: .78rem; opacity: .9; z-index: 5;
}
.chrome-extra {
    position: absolute; right: 1.2%; bottom: 1.1%; z-index: 5;
    display: flex; gap: .35rem;
}
.mini-ink {
    min-width: 5.6rem; height: 1.7rem; border: 0; cursor: pointer;
    color: #f4f0e4; font-size: .78rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_默认态.svg") center/100% 100% no-repeat;
}
.ink-btn {
    width: 100%;
    min-height: 2.875rem;
    border: 0;
    color: #f6f0dc;
    font: 1.18rem/normal "STKaiti", "KaiTi", "Microsoft YaHei", serif;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_默认态.svg") center/100% 100% no-repeat;
    cursor: pointer;
}
.ink-btn:hover { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_鼠标移入态.svg"); }

/* ============================================================================
   MainPanel（標題頁）
   來源：ui bundle 的 MainPanel prefab + Atlpile\MainPanelController / MainPanelEntity。
   座標由 anchor / pivot / anchoredPosition / sizeDelta 換算（1rem = 16 設計 px）。
   2026-08-22 之前整頁是百分比湊的（logo 58%、選單 42%、氣運 1.4%/1.6% …）。
   ========================================================================== */
#title-screen { background: #0b1620; }
/* BG：AspectRatioFitter m_AspectMode = 4（EnvelopeParent）、ratio 1.600215
   → 等同 object-fit: cover（.full-bg 已經是）。 */

/* Title 768×432 @ anchor(.5,1) anchoredPos(-0.6, -262.2) → 畫布 (575.4, 46.2)。 */
.title-logo {
    position: absolute;
    left: 35.9625rem;
    top: 2.8875rem;
    width: 48rem;
    height: 27rem;
    transform: none;
    pointer-events: none;
}
/* ButtonGroup 427.46×520 @ (743.27, 414)，VerticalLayoutGroup：
   padding 0、spacing 15、ChildAlignment MiddleCenter、ForceExpand 0、ChildControl 0。
   五顆 392×92：垂直 5×92 + 4×15 = 520 剛好塞滿 → 從 0 開始、間距 107；
   水平剩 427.46 - 392 = 35.46，totalFlexible = 0 所以走 GetStartOffset，
   MiddleCenter → 偏移 17.73 → 畫布 left 761。 */
.title-menu {
    position: absolute;
    left: 47.5625rem;
    top: 25.875rem;
    width: 24.5rem;
    height: 32.5rem;
    transform: none;
    display: block;
}
.title-menu .ink-btn {
    position: absolute;
    left: 0;
    width: 24.5rem;
    height: 5.75rem;
    min-height: 5.75rem;
    /* tmptxt*：庞门正道粗书体 SDF、字級 48、rgb(220,220,220)。
       lineHeight/pointSize = 137.34/90 = 1.526。 */
    font: 400 3rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #dcdcdc;
    /* MainPanelController.Start()：PointerEnter → DOScale(1.25, 0.2s)、
       PointerExit → DOScale(1, 0.2s)。btn_Talent 在 !IsEndGame 時不放大
       —— 那時它是 disabled，:not(:disabled) 正好對應。 */
    transition: transform .2s linear;
}
.title-menu .ink-btn:nth-child(1) { top: 0; }
.title-menu .ink-btn:nth-child(2) { top: 6.6875rem; }
.title-menu .ink-btn:nth-child(3) { top: 13.375rem; }
.title-menu .ink-btn:nth-child(4) { top: 20.0625rem; }
.title-menu .ink-btn:nth-child(5) { top: 26.75rem; }
.title-menu .ink-btn:not(:disabled):hover,
.title-menu .ink-btn:not(:disabled):focus-visible { transform: scale(1.25); }
/* Button.m_DisabledColor = (0.784, 0.784, 0.784, 0.502) */
.title-menu .ink-btn:disabled {
    filter: brightness(.784);
    opacity: .502;
    cursor: default;
}
/* FateCount 204×70 @ (53.8, 40.3)，sprite 首页_气运背景。
   內部 FateIcon 46×52 @ (10.5, 6)、tmptxt_Fate 131.92×50.82 @ (67.77, 6)
   （SourceHanSansSC-Medium、28、白、靠左靠下）。
   **只套在標題頁**：抽天賦頁與命定天賦頁的氣運框還沒對過 prefab。 */
#title-screen .chrome-fate {
    left: 3.3625rem;
    top: 2.51875rem;
    min-width: 0;
    width: 12.75rem;
    height: 4.375rem;
    padding: 0;
    display: block;
    font: 500 1.75rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    letter-spacing: normal;
}
#title-screen .chrome-fate .fate-icon {
    left: 0.65625rem;
    top: 0.375rem;
    width: 2.875rem;
    height: 3.25rem;
    transform: none;
    object-fit: fill;
}
#title-screen .chrome-fate #title-fate {
    position: absolute;
    left: 4.235625rem;
    top: 0.375rem;
    width: 8.245rem;
    height: 3.17625rem;
    display: flex;
    align-items: flex-end;      /* TMP m_VerticalAlignment = Bottom */
    justify-content: flex-start;
}
/* btn_Setting 130×84 @ (1752, 37)，sprite 首页_设置按钮。
   Button.m_Transition = 1（ColorTint），highlighted 0.9608 → 幾乎看不出來。 */
#title-screen .chrome-settings {
    left: 109.5rem;
    top: 2.3125rem;
    right: auto;
    width: 8.125rem;
    height: 5.25rem;
    background-size: 100% 100%;
}
/* tmptxt_Version 400×50 @ anchor/pivot(0,0) anchoredPos(25, 0) → 畫布 (25, 1030)。
   SourceHanSansSC-Bold、25、白、靠左置中。 */
#title-screen .chrome-ver {
    left: 1.5625rem;
    top: 64.375rem;
    bottom: auto;
    width: 25rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
    font: 700 1.5625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
    opacity: 1;
}
/* ExtraGroup 2353.5×92 @ anchor/pivot(1,0) anchoredPos(0,5)、**scale 0.5**
   → 畫面上 1176.75×46，右下角貼在 (1920, 1075)。
   HorizontalLayoutGroup：padding-right 15、spacing 15、ChildAlignment LowerRight
   → 五個 392×92 的槽從局部 318.5 起、間距 407；乘 0.5 後畫布 left 902.5 + i×203.5。
   原版那五顆是 Mod / 許願 / 問號 / 存檔資料夾 / QQ，網頁只留三顆能做的，
   照原版的右對齊佔最後三個槽。 */
#title-screen .chrome-extra {
    left: 0;
    right: auto;
    top: 64.3125rem;
    bottom: auto;
    width: 120rem;
    height: 2.875rem;
    display: block;
    gap: 0;
}
#title-screen .chrome-extra .mini-ink {
    position: absolute;
    top: 0;
    min-width: 0;
    width: 12.25rem;
    height: 2.875rem;
    background-size: 100% 100%;
    /* 子項是 392×92 的 庞门正道粗书体 48，整組再乘 0.5 → 等效 196×46、字級 24。 */
    font: 400 1.5rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #dcdcdc;
}
/* 四颗占五槽的 1~4（槽距 (392+15)*0.5 = 203.5px = 12.71875rem）。 */
#title-screen .chrome-extra .mini-ink:nth-child(1) { left: 69.125rem; }
#title-screen .chrome-extra .mini-ink:nth-child(2) { left: 81.84375rem; }
#title-screen .chrome-extra .mini-ink:nth-child(3) { left: 94.5625rem; }
#title-screen .chrome-extra .mini-ink:nth-child(4) { left: 107.28125rem; }

/* ===== Birth: 3 books + pentagon + name ===== */
#character-creation, #rebirth-screen, #ending-screen { background: #0b1620; }
/* ============================================================================
   BSTalentPanel（開局抽伴生天賦）
   來源：GameModule.BSTalent.Presentation\* + ui bundle 的 BSTalentPanel prefab。
   座標由 anchor / pivot / anchoredPosition / sizeDelta 換算（1rem = 16 設計 px）。
   2026-08-22 之前這一頁是憑眼睛湊的：面板純置中（沒套 anchoredPos (10,-10)，整頁偏 10px），
   內部用百分比與魔數，五芒圖還是自創的數學。
   ========================================================================== */
/* BackGround 1252×863、anchoredPos (10, -10) → 畫布 left 344、top 118.5。 */
.birth-panel {
    position: absolute;
    left: 21.5rem;
    top: 7.40625rem;
    width: 78.25rem;
    height: 53.9375rem;
    padding: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_背景.svg") center/100% 100% no-repeat;
    color: #1c1c1c;
    overflow: visible;
}
.birth-panel > * { position: absolute; }
/* Title 370×76 @ anchor(0,1) pos(0,52) → 往上凸出面板 52。
   BSTalentTxt 字級 60。**原版寫的是「伴身天赋」（少一點的錯字），程式從不覆蓋它，
   所以照抄** —— 想改成「伴生」的話那是改動原版，不是修 bug。 */
.birth-title {
    left: 0;
    top: -3.25rem;
    width: 23.125rem;
    height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_标题背景.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 400 3.75rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    white-space: nowrap;
}
/* btn_Exit 106×102 @ anchor(1,1) pos(0,25) → 右上角外側。 */
.birth-close {
    left: 71.625rem;
    top: -1.5625rem;
    width: 6.625rem;
    height: 6.375rem;
    border: 0;
    padding: 0;
    appearance: none;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_关闭按钮.svg") center/100% 100% no-repeat;
    cursor: pointer;
}
.birth-close:hover, .birth-close:focus-visible { filter: brightness(1.15); outline: none; }

/* 灵根 132×40，sprite 伴生天赋_数值显示背景。
   內部：LingGenTxt(81×40 靠左) + tmptxt_Total(51×40 靠右) + tog_LockLingGen(38×38，
   anchor(1,.5) pos(45,0) → **凸出方框右側**)。字級 26。 */
.linggen-total {
    left: 11.1875rem;
    top: 12.40625rem;
    width: 8.25rem;
    height: 2.5rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_数值显示背景.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 500 1.625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.linggen-total > * { position: absolute; }
.linggen-total .lg-label {
    left: 0; top: 0; width: 5.0625rem; height: 2.5rem;
    display: flex; align-items: center; justify-content: center;
}
.linggen-total .lg-total {
    left: 5.0625rem; top: 0; width: 3.1875rem; height: 2.5rem;
    display: flex; align-items: center; justify-content: center;
}
.linggen-lock {
    left: 8.6875rem; top: 0.0625rem;
    width: 2.375rem; height: 2.375rem;
    padding: 0; border: 0; background: transparent; cursor: pointer;
}
.linggen-lock img { width: 100%; height: 100%; object-fit: contain; display: block; }
.linggen-lock:focus-visible { outline: .125rem solid #f5dfa0; outline-offset: .125rem; }

/* Attribute 330×312，sprite 伴生天赋_五芒图背景。
   內部結構與對手詳情的 LingGenAttribute **完全相同**，只是那邊整塊 scale 0.5、這邊 1。 */
.radar-wrap { left: 28.1875rem; top: 17.03125rem; width: 20.625rem; height: 19.5rem; }
.radar-stage { position: absolute; inset: 0; }
.radar-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-stage > * { position: absolute; }
/* img_FiveStars 322.02×334.39 @ (-3, -15.18)。UIPolygon 的半徑只吃 size = min(w,h) = 322.02，
   所以 viewBox 用正方形再 preserveAspectRatio="none" 拉開（同對手詳情）。 */
#linggen-radar { left: 0.061875rem; top: 0.249063rem; width: 20.12625rem; height: 20.899375rem; }
#linggen-poly { fill: rgba(92, 101, 130, .705882); }
.radar-node { position: absolute; background-size: 100% 100%; background-repeat: no-repeat; }
.radar-node img { display: none; }   /* 底圖改用 background，保留 img 以免動到既有 JS */
.radar-node > b {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    width: 3.8125rem; height: 1.75rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_灵根属性显示背景.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 500 1.625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.radar-node.n-fire  { left: 18.4375rem; top: 4.375rem;   width: 5.3125rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/images/ui/灵根属性_火.svg"); }
.radar-node.n-water { left: -3.8125rem; top: 4.375rem;   width: 5.3125rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/images/ui/灵根属性_水.svg"); }
.radar-node.n-wood  { left: 7.84375rem; top: -4.75rem;   width: 5.1875rem; height: 5.3125rem; background-image: url("../assets/yuanwen-ui/surfaces/images/ui/灵根属性_木.svg"); }
.radar-node.n-earth { left: 14.3125rem; top: 17.5rem;    width: 5.1875rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/images/ui/灵根属性_土.svg"); }
.radar-node.n-metal { left: 0.6875rem;  top: 17.5625rem; width: 5.1875rem; height: 5.3125rem; background-image: url("../assets/yuanwen-ui/surfaces/images/ui/灵根属性_金.svg"); }
.radar-node.n-fire  > b { left: 0.975rem;  top: 4.675rem; }
.radar-node.n-water > b { left: 0.75rem;   top: 4.725rem; }
.radar-node.n-wood  > b { left: 0.6875rem; top: 4.725rem; }
.radar-node.n-earth > b { left: 0.6875rem; top: 4.575rem; }
.radar-node.n-metal > b { left: 0.6875rem; top: 4.51875rem; }

/* Group 1158.77×164.8 @ (36.53, 24)：HorizontalLayoutGroup、padding-left 12、
   spacing **-180**、ForceExpandWidth/Height 1、ChildControl 0、childAlignment MiddleCenter。
   ChildControl 關 → 三本書維持 230×78，多出來的 816.77 平均分成三個槽（各 502.2567），
   書在槽內置中；槽距 = 502.2567 - 180 = 322.2567。所以是 JS 算好的固定位置，不是 flex。 */
.birth-slots { left: 2.283437rem; top: 1.5rem; width: 72.423125rem; height: 10.3rem; }
.birth-book {
    position: absolute;
    top: 2.7125rem;
    width: 14.375rem;
    height: 4.875rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_灰.svg") center/100% 100% no-repeat;
    cursor: default;
}
.birth-book:nth-child(1) { left: 9.258021rem; }
.birth-book:nth-child(2) { left: 29.399062rem; }
.birth-book:nth-child(3) { left: 49.540104rem; }
.birth-book.lv2 { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_蓝.svg"); }
.birth-book.lv3 { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_紫.svg"); }
.birth-book.lv4 { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_橘.svg"); }
.birth-book.lv5 { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_红.svg"); }
/* tmptxt_TalentName：字級 24、靠左。 */
.birth-book .book-name {
    position: absolute; left: 31%; right: 3%; top: 0; bottom: 0;
    display: flex; align-items: center;
    font: 500 1.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #f7f1e4; text-shadow: 0 .0625rem .125rem rgba(0,0,0,.55);
    pointer-events: none;
}
.birth-book .book-lock {
    position: absolute; right: -1.25rem; top: .2rem;
    width: 2.375rem; height: 2.375rem;
    padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 2;
}
.birth-book .book-lock img { width: 100%; height: 100%; object-fit: contain; display: block; }
.birth-book .book-lock:focus-visible { outline: .125rem solid #f5dfa0; outline-offset: .125rem; }

/* Name 300×150 @ (876, 196.5)：NameTitle(200×50 上緣)、tmpinp_PlayerName(200×60)、
   tmptxt_Warning(200×50)。「姓名」字級 30。 */
.birth-name-col { left: 54.75rem; top: 12.28125rem; width: 18.75rem; height: 9.375rem; }
.birth-name-col > * { position: absolute; }
.birth-name-col label {
    left: 3.125rem; top: 0; width: 12.5rem; height: 3.125rem;
    display: flex; align-items: center; justify-content: center;
    color: #1c1c1c;
    font: 500 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.birth-name-col input {
    left: 3.125rem; top: 3.125rem; width: 12.5rem; height: 3.75rem;
    padding: 0 .6rem;
    border: .0625rem solid #4a4a4a; background: #fff;
    font: 500 1.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
}

/* Cost 132×40 @ (279.5, 669.8)，sprite 同 灵根；CostIcon 46×52 @ anchor(.5,1) pos(-67.2, 7.7)
   → 凸到方框左上外側。 */
.redraw-cost {
    left: 17.46875rem;
    top: 41.8625rem;
    width: 8.25rem;
    height: 2.5rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_数值显示背景.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 500 1.625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.redraw-cost > * { position: absolute; }
/* CostIcon 46×52 @ anchor(.5,1) pos(-67.2, 7.7) → 凸到方框左上外側。 */
.redraw-cost img { left: -1.5125rem; top: -0.48125rem; width: 2.875rem; height: 3.25rem; }
/* txt_Cost 100×48 @ anchor(0,.5) pos(21.1, -5.5)。 */
.redraw-cost span {
    left: 1.31875rem; top: 0.09375rem; width: 6.25rem; height: 3rem;
    display: flex; align-items: center;
}

/* btn_Resetting / btn_StartGame 321×92 @ anchor(.5,0)，字級 48。 */
.birth-btn {
    width: 20.0625rem;
    height: 5.75rem;
    min-height: 5.75rem;
    border: 0;
    padding: 0;
    appearance: none;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_按钮背景.svg") center/100% 100% no-repeat;
    color: #dcdcdc;
    font: 400 3rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    cursor: pointer;
}
.birth-btn.reset { left: 10.90625rem; top: 44.9375rem; }
.birth-btn.start { left: 47.96875rem; top: 44.9375rem; }
.birth-btn:hover, .birth-btn:focus-visible { filter: brightness(1.15); outline: none; }

/* 這行提示是網頁自己加的，原版 prefab 沒有對應節點 —— 擺在三本書下方、不擋任何原版元素。 */
.birth-tip {
    left: 0; right: 0; top: 12.5rem;
    width: 78.25rem;
    text-align: center;
    font: 500 .9rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #e7e9ee;
    opacity: 0;
    pointer-events: none;
}

/* ===== Game HUD ===== */
#game-screen { background: #111; }
#scene-layer { position: absolute; inset: 0; overflow: hidden; }
#scene-image {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}
#event-art {
    display: none !important;
}
#character-avatar {
    position: absolute; right: 8%; bottom: 4%; height: 68%;
    object-fit: contain;
    object-position: bottom center;
    image-rendering: auto;
    pointer-events: none;
    filter: drop-shadow(0 .625rem 1rem rgba(0,0,0,.55));
}
#year-badge {
    position: absolute; left: .8rem; top: 10.125rem;
    width: 14.25rem; height: 5.375rem; padding: 0 .7rem;
    border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_年份背景.svg") center/100% 100% no-repeat;
    color: #fff6d8; font-size: 1.75rem;
}
/* GamePropertyPanel 的新手引导「?」钮：sprite 38×40，右缘设置钮下方
   （信息引导效果图 y≈16.8%）。 */
.help-fab {
    position: absolute; right: 1.2%; top: 15.5%;
    width: 2.375rem; height: 2.5rem;
    border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_新手引导按钮.svg") center/contain no-repeat;
}

#hud-top {
    position: absolute; left: 0; right: 0; top: 0;
    height: 9.8125rem;
    display: block;
    padding: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_上栏底板.svg") top/100% 100% no-repeat;
    pointer-events: none;
}
#hud-top button { pointer-events: auto; }
.hud-id { position: absolute; inset: 0; min-width: 0; }
#hud-age-badge { display: none; }
.avatar-wrap {
    position: absolute; left: 2.1875rem; top: .15625rem;
    width: 7.5rem; height: 7.375rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_头像框.svg") center/100% 100% no-repeat;
}
#hud-avatar {
    position: absolute; left: .4375rem; top: .375rem;
    width: 6.625rem; height: 6.625rem; object-fit: cover;
    border-radius: 50%;
}
.hud-identity { position: absolute; inset: 0; min-width: 0; }
.realm-tag {
    position: absolute; left: 3.06875rem; top: 5.0375rem;
    width: 5.75rem; height: 1.875rem;
    display: flex; align-items: center; justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_修炼等级底框.svg") center/100% 100% no-repeat;
    color: #efe4c6; font-size: 1.375rem; line-height: normal; text-align: center;
}
.birth-tags {
    position: absolute; left: 2.8284375rem; top: 6.5rem;
    width: 21.75625rem; height: 2.7475rem;
    display: flex; align-items: center; flex-wrap: nowrap; gap: .5rem;
    overflow: hidden;
}
.birth-tags span {
    flex: 0 0 6.125rem; height: 1.875rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; line-height: 1;
    padding: 0 .35rem;
    background: #8a2a22 center/100% 100% no-repeat;
    border: 0;
    color: #fff6ee;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hud-bars { position: absolute; inset: 0; min-width: 0; }
.bars { display: flex; flex-direction: column; gap: .1rem; }
#hud-top .bar-row {
    position: absolute; left: 7.6525rem;
    width: 16.23125rem; height: 1.7744375rem;
}
#hud-top .bar-row:nth-child(1) { top: .69271875rem; }
#hud-top .bar-row:nth-child(2) { top: 2.56771875rem; }
#hud-top .bar-row:nth-child(3) { top: 4.44271875rem; }
#hud-top .bar-row > span { display: none; }
.bar.track {
    flex: 1; height: .72rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条底框.svg") center/100% 100% no-repeat, #1b140e;
    overflow: hidden; position: relative;
}
.bar .fill { display: block; height: 100%; width: 0; }
#hud-top .bar-row > .bar.track {
    position: absolute; left: 0; top: .3650625rem;
    width: 100%; height: 1.409375rem;
}
#hud-top .bar-row .bar .fill,
#hud-top .craft-line .bar .fill {
    position: absolute; left: .25rem; top: .264375rem;
    height: .883125rem; max-width: calc(100% - .5rem);
}
.bar .fill.hp { background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条绿.svg") left/cover; }
.bar .fill.mp { background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条蓝.svg") left/cover; }
.bar .fill.cul { background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条紫.svg") left/cover; }
.bar .fill.refine { background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条黄.svg") left/cover; }
.bar .fill.alchemy { background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条紫.svg") left/cover; }
#hud-top .bar-row > b {
    position: absolute; left: 0; top: 0;
    width: 16.053125rem; height: 1.7744375rem;
    display: flex; align-items: center; justify-content: center;
    color: #efe4c6; font-weight: 500; font-size: 1.375rem; line-height: normal;
    z-index: 2; white-space: nowrap;
}

.hud-mid { position: absolute; inset: 0; }
.linggen-row {
    position: absolute; left: 24.44875rem; top: -.10625rem;
    width: 31.938125rem; height: 4.6875rem;
    display: flex; align-items: center; gap: 1.5625rem;
    padding: 0; margin: 0;
}
.lg {
    position: relative; flex: 0 0 5.3125rem; width: 5.3125rem; height: 5.375rem;
    text-align: center; transform: scale(.55); transform-origin: center;
}
.lg:first-child { margin-left: -.5rem; }
.lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.lg b {
    position: absolute; left: .09375rem; top: 4.13125rem;
    width: 5.146875rem; height: 2.3625rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.65625rem; line-height: 1; color: #fff4d2;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_灵根属性显示背景.svg") center/100% 100% no-repeat;
}
.stat-grid {
    position: absolute; left: 24.4490625rem; top: 4.6875rem;
    width: 31.9375rem; height: 4.3125rem;
    display: grid; grid-template-columns: repeat(3, 10.625rem); grid-template-rows: repeat(2, 2.1875rem);
    gap: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数值底板.svg") center/100% 100% no-repeat;
    font-size: 1.4375rem; line-height: normal; color: #e8d9b0;
}
.stat-grid > div { display: flex; align-items: center; padding-left: 1rem; white-space: nowrap; }
.stat-grid b { display: contents; color: #fff; }

.hud-craft {
    position: absolute; left: 56.3865625rem; top: 3.768rem;
    width: 24.825rem; height: 5.857rem;
}
#hud-top .craft-line { position: absolute; inset: 0; }
.craft-title {
    position: absolute; left: .6625rem;
    width: 6.625rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_标题底框.svg") center/100% 100% no-repeat;
    text-align: center; color: #efe4c6; font-size: 1.25rem; line-height: normal;
}
#hud-top .craft-line:nth-child(1) .craft-title { top: .884rem; }
#hud-top .craft-line:nth-child(2) .craft-title { top: 3.1rem; }
#hud-top .craft-line > .bar.track {
    position: absolute; left: 8.00375rem;
    width: 16.045rem; height: 1.409375rem;
}
#hud-top .craft-line:nth-child(1) > .bar.track { top: 1.1863125rem; }
#hud-top .craft-line:nth-child(2) > .bar.track { top: 3.4550625rem; }
#hud-top .craft-line > b {
    position: absolute; left: 8.2990625rem;
    width: 15.866875rem; height: 1.7744375rem;
    display: flex; align-items: center; justify-content: center;
    color: #efe4c6; font-weight: 500; font-size: 1.15rem; line-height: normal;
    z-index: 2; white-space: nowrap;
}
#hud-top .craft-line:nth-child(1) > b { top: .77253125rem; }
#hud-top .craft-line:nth-child(2) > b { top: 3.04128125rem; }
.hud-right { position: static; text-align: right; pointer-events: auto; }
#hud-top .currency {
    position: absolute;
    width: 9.5625rem; height: 3.28125rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_气运背景.svg") center/100% 100% no-repeat;
    padding: 0; min-width: 0;
    display: block; font-size: 1.5rem;
}
#hud-top .currency:not(.qiyun) { left: 91.6515625rem; top: 2.903125rem; }
#hud-top .currency.qiyun { left: 103.625rem; top: 2.734375rem; }
#hud-top .currency img { position: absolute; object-fit: contain; }
#hud-top .currency:not(.qiyun) img { left: .09375rem; top: .078125rem; width: 2.75rem; height: 3.125rem; }
#hud-top .currency.qiyun img { left: .09375rem; top: .015625rem; width: 2.875rem; height: 3.25rem; }
#hud-top .currency span {
    position: absolute; left: 3.201875rem; top: .286375rem;
    width: 6.2663125rem; height: 2.916875rem;
    display: flex; align-items: center; justify-content: center;
    color: #efe4c6; line-height: 1;
}
#hud-top .currency.qiyun span { left: 1.7296875rem; top: .1825rem; width: 6.72rem; }
.life-box {
    position: absolute; left: 1.025rem; top: .23125rem;
    width: 3.75rem; height: 3.75rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_寿元底框.svg") center/100% 100% no-repeat;
    display: flex; align-items: center; justify-content: center;
    color: #efe4c6; font-size: 1.25rem; line-height: normal;
    z-index: 3;
}
/* 折寿红闪（R5 罗盘刀5）：战败折寿 -10/-30 时顶栏寿元红闪+抖动一次，
   飘字之外的第二重反馈。仅骤降触发（岁减 -1 不闪），动画完 JS 摘 class。 */
.life-box.life-flash { animation: life-flash-anim 1.8s ease-out 1; }
@keyframes life-flash-anim {
    0%   { color: #ff4a3a; transform: translateX(0) scale(1.28); text-shadow: 0 0 14px rgba(255, 60, 40, .95); }
    8%   { transform: translateX(-3px) scale(1.26); }
    16%  { transform: translateX(3px) scale(1.24); }
    24%  { transform: translateX(-2px) scale(1.2); }
    32%  { transform: translateX(2px) scale(1.16); color: #ff5a48; }
    55%  { color: #ff7a60; transform: translateX(0) scale(1.08); text-shadow: 0 0 8px rgba(255, 80, 50, .6); }
    100% { color: #efe4c6; transform: none; text-shadow: none; }
}
/* 余年焦黄/焦红（神界正路系统侧）：寿元 ≤12 焦黄、≤5 焦红并缓慢搏动。
   数字本身一字不改，改的是「还剩几年」这件事有没有被看见——Round9 自然档
   36 岁寿尽，死因不是数值狠，是顶栏那个数字从头到尾没人当回事。
   与 life-flash 各管一段：闪是「刚才折了」，焦色是「一直很危险」。 */
.life-box.life-low { color: #ffcf6a; text-shadow: 0 0 8px rgba(255, 190, 70, .55); }
.life-box.life-crit {
    color: #ff8a6a; text-shadow: 0 0 10px rgba(255, 90, 50, .7);
    animation: life-crit-pulse 2.2s ease-in-out infinite;
}
@keyframes life-crit-pulse {
    0%, 100% { text-shadow: 0 0 6px rgba(255, 90, 50, .45); }
    50%      { text-shadow: 0 0 14px rgba(255, 90, 50, .95); }
}
/* 折寿红闪播放期间让位，两个动画不打架。 */
.life-box.life-flash.life-low,
.life-box.life-flash.life-crit { animation: life-flash-anim 1.8s ease-out 1; }

/* 背包红点（R5 罗盘刀1）：获得可装备/可修习之物未查看时挂在背包钮右上。 */
.dock-btn.bag.bag-new::after {
    content: "";
    position: absolute;
    right: .35rem; top: .3rem;
    width: 1.05rem; height: 1.05rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff7a5c, #d92c17 70%);
    box-shadow: 0 0 6px rgba(255, 70, 40, .9);
    animation: bag-new-pulse 1.6s ease-in-out infinite;
}
@keyframes bag-new-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: .75; }
}
.gear-btn {
    position: absolute; left: 113.32375rem; top: 2.575rem;
    width: 6.09375rem; height: 3.9375rem; border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_设置按钮.svg") center/contain no-repeat;
}

#events-panel {
    position: absolute; left: 0; right: 0; bottom: 18.5rem;
    height: 31.25rem;
    pointer-events: none;
    overflow: visible;
}
.event-row {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    overflow: visible;
}
.event-card {
    position: absolute;
    overflow: visible;
    flex-shrink: 0;
    width: 18.75rem;
    height: 31.25rem;
    border: 0;
    padding: 0;
    appearance: none;
    cursor: pointer;
    background: transparent;
    color: #000;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    transform-origin: center;
}
@keyframes yearCardEnter {
    0%, 10% { transform: translateY(-9.375rem) scale(0); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes yearCardLeave {
    0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
    8% { transform: translateX(-.625rem) rotate(-2deg) scale(1); opacity: 1; }
    16% { transform: translateX(.625rem) rotate(2deg) scale(1); opacity: 1; }
    25% { transform: translateX(-.375rem) rotate(-1.2deg) scale(1); opacity: 1; }
    33% { transform: translateX(.375rem) rotate(1.2deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--leave-x, 0), var(--leave-y, -25rem)) rotate(var(--leave-rotate, 10deg)) scale(0); opacity: 0; }
}
.event-row.input-locked .event-card { pointer-events: none; }
.event-row.is-year-entering .event-card {
    animation: yearCardEnter .5s cubic-bezier(.16, 1.22, .3, 1) both;
}
.event-row.is-year-leaving .event-card {
    animation: yearCardLeave .6s cubic-bezier(.55, .055, .675, .19) both;
}
.event-card.is-hover {
    z-index: 90 !important;
    transform: scale(1.2);
    transition: transform .15s ease-out;
}
.event-row.is-year-entering .event-card.delight-gold {
    animation: yearCardEnter .5s cubic-bezier(.16, 1.22, .3, 1) both, delightGold .28s ease-in-out .5s 2;
}
.event-row.is-year-entering .event-card.delight-silver {
    animation: yearCardEnter .5s cubic-bezier(.16, 1.22, .3, 1) both, delightSilver .22s ease-in-out .5s 2;
}
@keyframes delightGold {
    50% { filter: drop-shadow(0 0 .625rem #ffe08a); }
}
@keyframes delightSilver {
    50% { filter: drop-shadow(0 0 .5rem #d7e7ff); }
}
/* 付不起的卡压灰（罗盘 R9 第五刀）：价签早就红了，卡面却和买得起的一模一样。
   压灰只压画面层，价签留在原色上（红字压灰就白红了）；悬停回一档提示「还能点，
   点了会告诉你差多少」——这是提示不是锁，锁在 guardSelect 那一层。 */
.event-card.card-unaffordable > .bg,
.event-card.card-unaffordable > .art,
.event-card.card-unaffordable > .border,
.event-card.card-unaffordable > .card-shadow { filter: grayscale(.85) brightness(.72); }
.event-card.card-unaffordable > .name,
.event-card.card-unaffordable > .name-side,
.event-card.card-unaffordable > .desc,
.event-card.card-unaffordable > .type { opacity: .58; }
.event-card.card-unaffordable.is-hover > .bg,
.event-card.card-unaffordable.is-hover > .art,
.event-card.card-unaffordable.is-hover > .border,
.event-card.card-unaffordable.is-hover > .card-shadow { filter: grayscale(.35) brightness(.9); }
.card-pay.is-short { font-weight: 700; text-shadow: 0 0 .25rem rgba(255, 0, 0, .55); }

.event-card .card-shadow,
.event-card .bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 18.75rem;
    height: 31.25rem;
    object-fit: fill;
    pointer-events: none;
}
.event-card .card-shadow {
    left: .97125rem;
    top: .5025rem;
    z-index: 0;
    opacity: .282;
    filter: brightness(0);
}
.event-card .bg { z-index: 1; }
.event-card .art {
    position: absolute;
    left: 1.25625rem;
    top: 1.4875rem;
    width: 16.2375rem;
    height: 17.9625rem;
    object-fit: fill;
    image-rendering: auto;
    pointer-events: none;
    z-index: 2;
}
.event-card .type-bg {
    position: absolute;
    left: 1.25625rem;
    top: 1.4875rem;
    width: 2.76275rem;
    height: 8.2168125rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/卡牌类型底板.svg") center/100% 100% no-repeat;
    pointer-events: none;
    z-index: 3;
}
.event-card .type {
    position: absolute;
    left: 1.25625rem;
    top: 1.4875rem;
    width: 2.76275rem;
    height: 6.0054375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .25rem;
    color: #fff;
    font: 700 1.875rem/normal Arial, "Microsoft YaHei", sans-serif;
    text-align: center;
    word-break: break-all;
    text-shadow: .1625rem .1625rem 0 rgba(0, 0, 0, .5);
    pointer-events: none;
    z-index: 4;
}
/* R7/R8 挂账：收拢态露卡名（r8-116「事件×8」盲盒）。
   竖排名条挂在类型签正下方——收拢时每张卡只露左肋，这里是唯一不被
   右邻盖住的位置。仅 .is-collapsed（layoutEventRow 按卡距<0 打开）时
   显示；悬停放大的那张已能看到底部原版名板，不再重复挂。 */
.event-card .name-side {
    display: none;
    position: absolute;
    left: 1.25625rem;
    top: 10.1rem;
    width: 2.76275rem;
    max-height: 13.5rem;
    padding: .55rem .1rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-start;
    writing-mode: vertical-rl;
    letter-spacing: .12rem;
    overflow: hidden;
    color: #f3e7cf;
    background: rgba(24, 18, 12, .62);
    border-radius: .35rem;
    font: 700 1.3rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-shadow: .1rem .1rem 0 rgba(0, 0, 0, .55);
    pointer-events: none;
    z-index: 4;
}
.event-row.is-collapsed .event-card .name-side { display: flex; }
.event-row.is-collapsed .event-card.is-hover .name-side { display: none; }
.event-card .name {
    position: absolute;
    left: 1.338125rem;
    top: 19.7508125rem;
    width: 16.07375rem;
    height: 2.474625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    color: #fff;
    font: 700 1.5rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    word-break: break-all;
    text-shadow: .125rem .125rem 0 rgba(0, 0, 0, .5);
    pointer-events: none;
    z-index: 3;
}
.event-card .desc {
    position: absolute;
    left: .50875rem;
    top: 22.611875rem;
    width: 17.7325rem;
    height: 6.1588125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    color: #000;
    font: 700 1.5rem/normal Arial, "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    pointer-events: none;
    z-index: 3;
}
.event-card .border {
    position: absolute;
    inset: 0;
    width: 18.75rem;
    height: 31.25rem;
    object-fit: fill;
    pointer-events: none;
    z-index: 8;
}
.card-hearts {
    display: flex;
    gap: .0625rem;
    pointer-events: none;
}
.card-hearts img { width: .75rem; height: .75rem; object-fit: contain; }
.event-card .card-hearts {
    position: absolute;
    left: 3.9425rem;
    top: 17.2056875rem;
    gap: .3725rem;
    z-index: 6;
}
.event-card .card-hearts img { width: 1.875rem; height: 1.875rem; object-fit: fill; }
.card-need {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.card-need-mask {
    position: absolute;
    left: 1.25625rem;
    top: 16.8364375rem;
    width: 16.2375rem;
    height: 2.6135rem;
    object-fit: fill;
    z-index: 0;
}
.card-year {
    position: absolute;
    left: 12.365625rem;
    top: 17.401875rem;
    width: 4.4936875rem;
    height: 1.482625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/nian bg.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 700 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    text-shadow: .125rem .125rem 0 rgba(0, 0, 0, .5);
    z-index: 2;
}
.card-pay {
    position: absolute;
    left: 1.65575rem;
    top: 17.326625rem;
    width: 8.1524375rem;
    height: 1.63325rem;
    z-index: 2;
}
.card-pay img {
    position: absolute;
    left: 0;
    top: 0;
    width: 1.7085rem;
    height: 1.63325rem;
    object-fit: fill;
}
.card-pay span {
    position: absolute;
    left: 2.1735625rem;
    top: -.4901875rem;
    width: 5.978875rem;
    height: 2.6135rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: inherit;
    font: 700 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: left;
    white-space: nowrap;
    text-shadow: .1625rem .1625rem 0 rgba(0, 0, 0, .5);
}
.card-realm {
    position: absolute;
    left: 2.00625rem;
    top: 17.28075rem;
    width: 3.5rem;
    height: 1.75rem;
    object-fit: fill;
    z-index: 2;
}
.card-diff {
    position: absolute;
    left: 4.375rem;
    top: 16.8615rem;
    width: 10rem;
    height: 2.5885rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font: 400 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: normal;
    text-shadow: .125rem .125rem 0 rgba(0, 0, 0, .5);
    z-index: 2;
}
.card-rewards {
    position: absolute;
    left: 50%;
    top: 32.1875rem;
    width: 10.75rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .625rem;
    transform: translateX(-50%);
    z-index: 9;
    pointer-events: none;
}
.card-rewards span {
    width: 10.75rem;
    height: 2.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font: 500 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: nowrap;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/二周目奖励bg.svg") center/100% 100% no-repeat;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000;
}
/* 折寿价签（首见常显，通关评价 §2.3）：复用二周目奖励条位置，红字标代价。 */
.card-life-cost span { color: #ff6b5e; }

#choices-panel {
    position: absolute;
    left: 27.31875rem;
    top: 49.0059375rem;
    width: 61.9875rem;
    height: 7.03818125rem;
    overflow: visible;
    pointer-events: none;
    z-index: 103;
}
.choice-row {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(var(--choice-count, 1), minmax(0, 1fr));
    overflow: visible;
    pointer-events: none;
}
.choice-item {
    position: relative;
    min-width: 0;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
.choice-button {
    position: absolute;
    left: calc(50% + .53901875rem);
    top: calc(50% + .079725rem);
    width: 15.9735125rem;
    /* 四列时格宽 15.5rem 小于按钮 15.97rem，相邻按钮盒会压 5px（藏在底图透明边里，但布局断言会报）。按格宽封顶。 */
    max-width: 100%;
    height: 5.54409375rem;
    border: 0;
    padding: .189503125rem .625rem;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transform: translate(-50%, -50%);
    /* 必須用 background 縮寫（或顯式 background-color: transparent）。
       只設 background-image 清不掉 UA 的 buttonface；Windows Chrome 那層近白，
       而 btbg*.png 四周 12.8% 是透明的，看起來就像摳圖白底。
       .ink-btn 用縮寫所以標題頁沒這問題。原版 Image 沒有這層底板。 */
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}
.choice-button.item-condition {
    background: transparent url("../assets/yuanwen-ui/surfaces/images/icon/dialog_btn/btbg1.svg") center / 100% 100% no-repeat;
}
.choice-button.attr-condition {
    background: transparent url("../assets/yuanwen-ui/surfaces/images/icon/dialog_btn/btbg2.svg") center / 100% 100% no-repeat;
}
.choice-button.free-choice {
    background: transparent url("../assets/yuanwen-ui/surfaces/images/icon/dialog_btn/btbg3.svg") center / 100% 100% no-repeat;
}
.choice-button:hover,
.choice-button:focus-visible { filter: brightness(.9607843); outline: none; }
.choice-button:active { filter: brightness(.7843137); }
.choice-button-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    color: #fff;
    font: 500 2.25rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    text-shadow: .0625rem .0625rem 0 rgba(0, 0, 0, .5);
    pointer-events: none;
}
.choice-needs {
    position: absolute;
    left: calc(50% + .539075rem);
    top: calc(50% - 4.70369375rem);
    width: 15.97375rem;
    height: 4.93505625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
}
/* 选项自带 Image（世界包六选一出身卡）：按钮下方一张 258:284 小卡面，纯装饰不接点击。 */
.choice-art {
    position: absolute;
    left: calc(50% + .53901875rem);
    top: calc(50% + 3.1rem);
    width: 9.45rem;
    height: 10.4rem;
    transform: translateX(-50%);
    object-fit: cover;
    border: .12rem solid rgba(255, 225, 170, .55);
    border-radius: .3rem;
    box-shadow: 0 .3rem .8rem rgba(0, 0, 0, .6);
    pointer-events: none;
    z-index: 2;
}
/* 五个以上选项（原版最多四个）：按钮收窄到格宽以内、字号缩一档，六个并排不再互相压住。 */
/* 死路选项（账本闸门制透明条款，世界包 meta.copy 有 deathConfirm 时才出现）：右上角「生死」小标＋左上对手境界小牌。
   .choice-button 本身 position:absolute，是子元素的定位参照，不另加 position。 */
.choice-death-tag {
    position: absolute;
    right: .35rem;
    top: .25rem;
    padding: 0 .35rem;
    border: .09rem solid rgba(255, 120, 110, .85);
    border-radius: .25rem;
    background: rgba(90, 10, 10, .78);
    color: #ffd9d4;
    font: 600 1.05rem/1.5 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    letter-spacing: .05rem;
    pointer-events: none;
}
.choice-realm {
    position: absolute;
    left: .35rem;
    top: .3rem;
    width: 3.2rem;
    height: 1.6rem;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 .1rem .2rem rgba(0, 0, 0, .7));
}
.choice-row.many .choice-button { width: 9.9rem; height: 4.6rem; padding: .15rem .3rem; }
.choice-row.many .choice-button-text { font-size: 1.5rem; line-height: 1.15; }
.choice-row.many .choice-needs { width: 9.9rem; }
/* R7 顺手刀：门槛未达的选项点击抖动（配引擎「条件未达」toast 双反馈）。 */
.choice-button.choice-shake { animation: choice-shake-anim .38s ease-in-out 1; }
@keyframes choice-shake-anim {
    0%, 100% { transform: translateX(0); }
    18% { transform: translateX(-.5rem); }
    36% { transform: translateX(.45rem); }
    54% { transform: translateX(-.35rem); }
    72% { transform: translateX(.25rem); }
    88% { transform: translateX(-.12rem); }
}
.choice-condition,
.choice-warning {
    flex: 0 0 2.38006875rem;
    width: 10.55776875rem;
    height: 2.38006875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    color: #fff;
    font: 500 1.5rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: nowrap;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_数值显示背景.svg") center/100% 100% no-repeat;
    text-shadow: .0625rem .0625rem 0 rgba(0, 0, 0, .5);
}
.choice-warning { color: #ff0; }
.choice-condition .choice-required.is-missing { color: #f00; }
.choice-condition .choice-target { color: #b57942; }
/* 好感增益常显角标（Round2 P1 双剑线可发现性）：挂在选择按钮下缘 */
.choice-love-hint {
    position: absolute;
    left: calc(50% + .539075rem);
    top: calc(50% + 3.6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    transform: translateX(-50%);
    color: #ff9fb2;
    font: 500 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-shadow: .0625rem .0625rem 0 rgba(0, 0, 0, .6);
    pointer-events: none;
}
.choice-love-hint img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}
/* 负好感角标（可见的政治代价）：冷色与粉色正向区分；
   双角标（+4/-1）并排时不许竖排换行 */
.choice-love-hint { white-space: nowrap; }
.choice-love-hint .love-neg { color: #9fb8d8; }
.choice-rewards {
    position: absolute;
    left: 50%;
    top: calc(50% + 4.375rem);
    width: 6.25rem;
    height: .625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .625rem;
    transform: translate(-50%, -50%);
    overflow: visible;
    pointer-events: none;
    z-index: 3;
}
.choice-rewards span {
    flex: 0 0 2.375rem;
    width: 10.75rem;
    height: 2.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font: 500 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
    white-space: nowrap;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/二周目奖励bg.svg") center/100% 100% no-repeat;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000;
}

#dialogue-mask {
    position: absolute;
    inset: 0;
    width: 120rem;
    height: 67.5rem;
    background: rgba(0, 0, 0, .705882);
    pointer-events: auto;
    z-index: 100;
    animation: dialoguePanelFadeIn .2s ease-out both;
}

#dialogue-box {
    position: absolute;
    left: calc(50% - 1.1515rem);
    top: calc(50% - 4.29730625rem);
    width: 61.9743375rem;
    height: 35.5499875rem;
    transform: translate(-50%, -50%);
    padding: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/diban_.svg") center/100% 100% no-repeat;
    color: #000;
    cursor: pointer;
    z-index: 102;
    animation: dialoguePanelFadeIn .2s ease-out both;
}
#dialogue-box.choice-state { cursor: default; }
#dialogue-box.choice-state #dialogue-continue { visibility: hidden; }
#dialogue-box.no-head #dialogue-head-wrap { display: none; }
#dialogue-player-wrap {
    position: absolute;
    left: 9.3621875rem;
    top: 4.8125rem;
    width: 6.25rem;
    height: 6.25rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_头像框.svg") center/100% 100% no-repeat;
}
#dialogue-player-head {
    position: absolute;
    left: .625rem;
    top: .625rem;
    width: 5rem;
    height: 5rem;
    object-fit: fill;
}
#dialogue-head-wrap {
    position: absolute;
    left: 52.6121875rem;
    top: 4.8125rem;
    width: 6.25rem;
    height: 6.25rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_头像框.svg") center/100% 100% no-repeat;
}
#dialogue-head {
    position: absolute;
    left: .625rem;
    top: .625rem;
    width: 5rem;
    height: 5rem;
    object-fit: fill;
    transform: scaleX(-1);
}
#dialogue-box .dlg-main { position: static; padding: 0; }
#speaker-name {
    position: absolute;
    left: 3.3154375rem;
    top: 2.527875rem;
    width: 5.161075rem;
    height: 28.281575rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    /* tmptxt_Location：TMP fontSize 48、lineSpacing -48.4，字體資產 庞门正道粗书体 SDF。
       行距 = (137.34 - 48.4) * 48 / 90 = 47.43px = 0.9882em */
    font: 400 3rem/0.9882 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    text-shadow: .125rem 0 #000, -.125rem 0 #000, 0 .125rem #000, 0 -.125rem #000;
}
#dialogue-text {
    position: absolute;
    left: 15.487375rem;
    top: 9.9168125rem;
    width: 38.70506875rem;
    height: 17.08509375rem;
    overflow-x: hidden;
    overflow-y: auto;
    color: #000;
    /* txt_Dec 是舊版 UI.Text：m_FontSize 24、m_LineSpacing 1.0、m_FontStyle 0(正常)、黑字。
       lineSpacing 1.0 表示用字體自身行高，對應 CSS line-height: normal；
       之前寫成 700 粗體 + 行高 1，中文字形會實測重疊 7px。 */
    font: 400 1.5rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: normal;
    overflow-wrap: break-word;
    scrollbar-width: auto;
}
#dialogue-text::-webkit-scrollbar {
    width: .875rem;
}
#dialogue-text::-webkit-scrollbar-track { background: rgba(30, 38, 50, .16); }
#dialogue-text::-webkit-scrollbar-thumb { background: rgba(44, 54, 68, .58); }
.avatar-pop { animation: dialogueAvatarPop .25s cubic-bezier(.18, .89, .32, 1.28) both; }
@keyframes dialoguePanelFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogueAvatarPop {
    0% { transform: scale(0); }
    72% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ── 主介面下欄：全部照 GameItemPanel prefab 的絕對座標，不再用 flex 猜間距 ──
   Background   1817×177，anchoredPos (-18, 0)，pivot(0.5,0)，底邊貼畫布底部
   btn_Magic    154×136，錨左中 (93.5, -20.5)
   btn_Knapsack 132×136，錨右中 (-76, -20.5)
   Equipment    368×126 @ (380, -15.4)，3 格 80×80，局部 x 59/157/255（pitch 98）
   MagicWeapon  1037×126 @ (615, -16)，10 格 80×80，局部 x 57 起（pitch 96.5）
   txt_Equip / txt_FaBao  38.6×50，TMP 36，lineSpacing -61.5 → 行高 21.06px
   底板美術本身就畫了凹槽與標籤板，座標一偏就會像圖層沒對齊。 */
#action-bar {
    position: absolute;
    left: calc(50% - 1.125rem);
    bottom: 0;
    width: 113.5625rem;
    height: 11.0625rem;
    transform: translateX(-50%);
    padding: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品_下栏底板.svg") center/100% 100% no-repeat;
}
.dock-btn {
    position: absolute;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    cursor: pointer;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}
.dock-btn:focus-visible {
    outline: .125rem solid rgba(245, 223, 160, .9);
    outline-offset: -.25rem;
}
.dock-btn.skills {
    left: 1.03125rem;
    top: 2.5625rem;
    width: 9.625rem;
    height: 8.5rem;
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品_法术按钮.svg");
}
/* 天玄（称谓层 glossary.js 给 <html> 挂 world-tianxuan）：书封上烤着的「法術」换成「玄技」（tools/art_tianxuan.py skill-button）。 */
html.world-tianxuan .dock-btn.skills {
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品_玄技按钮.svg");
}
.dock-btn.bag {
    left: 104.6875rem;
    top: 2.5625rem;
    width: 8.25rem;
    height: 8.5rem;
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品_背包按钮.svg");
}
/* 這兩層只當語意容器，排版一律交給下面的絕對座標。 */
.dock-block,
.slot-row {
    position: static;
    display: block;
}
.dock-tab {
    position: absolute;
    top: 4.9625rem;
    width: 2.4125rem;
    height: 3.125rem;
    color: #fff;
    /* txt_Equip / txt_FaBao：TMP fontSize 36、lineSpacing -61.5、盒 38.6×50、無旋轉。
       字體資產是「庞门正道粗书体 SDF」（不是 Source Han Sans）：
       faceInfo.pointSize 90、lineHeight 137.34。
       TMP 行距 = (lineHeight + lineSpacing) * fontSize / pointSize
                = (137.34 - 61.5) * 36 / 90 = 30.34px = 0.8427em
       原版就是這樣緊貼堆疊，`audit_text_layout.js` 會把它報成重疊，那是預期的。 */
    font: 400 2.25rem/0.8427 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    text-align: center;
    letter-spacing: 0;
}
.equip-block .dock-tab { left: 12.28125rem; }
.fabao-block .dock-tab { left: 38.575rem; }
.eq-slot,
.fb-slot {
    position: absolute;
    width: 5rem;
    height: 5rem;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.eq-slot { top: 3.99375rem; }
.eq-slot:nth-child(1) { left: 15.9375rem; }
.eq-slot:nth-child(2) { left: 22.0625rem; }
.eq-slot:nth-child(3) { left: 28.1875rem; }
.eq-slot.weapon { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_装备格_武器.svg"); }
.eq-slot.armor { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_装备格_衣服.svg"); }
.eq-slot.shoes { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_装备格_鞋子.svg"); }
/* 原版 FaBaoSlotRoot 的 img_slot 是「背景黑」，img_Lock 是疊在上面的一層，不是換底圖。 */
.fb-slot {
    top: 4.03125rem;
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景黑.svg");
}
.fb-slot.locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景锁.svg") center/100% 100% no-repeat;
    pointer-events: none;
}
.fb-slot:nth-child(1) { left: 42rem; }
.fb-slot:nth-child(2) { left: 48.03125rem; }
.fb-slot:nth-child(3) { left: 54.0625rem; }
.fb-slot:nth-child(4) { left: 60.09375rem; }
.fb-slot:nth-child(5) { left: 66.125rem; }
.fb-slot:nth-child(6) { left: 72.15625rem; }
.fb-slot:nth-child(7) { left: 78.1875rem; }
.fb-slot:nth-child(8) { left: 84.21875rem; }
.fb-slot:nth-child(9) { left: 90.25rem; }
.fb-slot:nth-child(10) { left: 96.28125rem; }

/* Battle */
#battle-screen {
    background: #000;
    isolation: isolate;
}
.battle-full-mask {
    position: absolute;
    inset: 0;
    width: 120rem;
    height: 67.5rem;
    object-fit: fill;
    background: rgba(0, 0, 0, .56);
    z-index: 0;
}
.battle-shell {
    /* 一個「設計秒」的實際長度。CombatPanelController 把 DOTween.timeScale
       設成 timeScale(2/4/6)，所以所有 DOTween 表現都是 設計秒 ÷ timeScale。 */
    --battle-sec: .5s;
    position: absolute;
    left: calc(50% - .2625rem);
    top: calc(50% - .648125rem);
    width: 92.2825rem;
    height: 52.104375rem;
    transform: translate(-50%, -50%);
    overflow: visible;
    isolation: isolate;
    z-index: 1;
}
.battle-backdrop {
    position: absolute;
    inset: 0;
    width: 92.2825rem;
    height: 52.104375rem;
    object-fit: fill;
    z-index: 0;
}
.battle-shell-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 96.0625rem;
    height: 56.5625rem;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}
.battle-top-mask {
    position: absolute;
    left: 50%;
    top: 0;
    width: 92.75rem;
    height: 9rem;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}
.battle-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}
.fighter {
    position: absolute;
    top: 1.125rem;
    display: flex;
    align-items: center;
    gap: .8125rem;
    height: 7.375rem;
}
.fighter.player { left: 4.75rem; }
.fighter.enemy { right: 4.75rem; }
.battle-portrait {
    position: relative;
    flex: 0 0 7.5rem;
    width: 7.5rem;
    height: 7.375rem;
}
.battle-head-frame {
    position: absolute;
    inset: 0;
    width: 7.5rem;
    height: 7.375rem;
    object-fit: contain;
    z-index: 1;
}
.battle-head-mask {
    position: absolute;
    left: .625rem;
    top: .5625rem;
    width: 6.25rem;
    height: 6.25rem;
    overflow: hidden;
    border-radius: 50%;
    z-index: 2;
}
.battle-head-mask img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6.625rem;
    height: 6.625rem;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.fighter-meta {
    display: flex;
    width: 16.23125rem;
    flex-direction: column;
    gap: .5rem;
}
.fighter-name { display: none; }
.battle-stat-bar {
    position: relative;
    width: 16.23125rem;
    height: 1.409375rem;
    overflow: hidden;
    background: rgba(20, 20, 20, .82) url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_数据条底框.svg") center/100% 100% no-repeat;
    box-shadow: inset 0 0 0 .0625rem rgba(0, 0, 0, .85);
}
/* CombatPanelEntity.sliderSpeed = 1f 設計秒。 */
.battle-stat-bar .fill {
    position: absolute;
    inset: .125rem auto .125rem .125rem;
    width: 0;
    transition: width var(--battle-sec) linear;
}
.battle-stat-bar .fill.hp { background: #76a94c; }
.battle-stat-bar .fill.mp { background: #3b82ad; }
.battle-stat-bar b {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 1.375rem/normal "Microsoft YaHei", sans-serif;
    text-shadow: 0 .0625rem .125rem #000, 0 0 .1875rem #000;
    white-space: nowrap;
    z-index: 2;
}
.battle-buffs {
    position: absolute;
    top: 7.0065625rem;
    width: 21.875rem;
    height: 2.1875rem;
    display: flex;
    gap: .1875rem;
    overflow: visible;
    z-index: 7;
}
.battle-buffs.player { left: 9.4460625rem; justify-content: flex-start; }
.battle-buffs.enemy { right: 9.3884375rem; justify-content: flex-end; }
.battle-buff {
    position: relative;
    flex: 0 0 2.3125rem;
    width: 2.3125rem;
    height: 2.3125rem;
}
.battle-buff img { width: 100%; height: 100%; object-fit: contain; }
.battle-buff b {
    position: absolute;
    right: .0625rem;
    bottom: -.0625rem;
    color: #fff;
    font: 700 .75rem/normal "Microsoft YaHei", sans-serif;
    text-shadow: 0 .0625rem .125rem #000;
}
/* 舞台與 img_BG（.battle-shell）同框，讓角色 / popup 都能直接用 prefab 設計像素。 */
.battle-stage {
    position: absolute;
    left: 0;
    top: 0;
    width: 92.2825rem;
    height: 52.104375rem;
    pointer-events: none;
    z-index: 3;
}
/* img_LShade / img_RShade：rect 242×61、localScale.x = ±1.5 → 實際 363×61。
   受擊位移（DOLocalMoveX ±50）發生在這一層，角色是它的子節點。 */
.battle-side {
    position: absolute;
    top: 40.2400938rem;
    width: 22.6875rem;
    height: 3.8125rem;
}
.battle-side.player { left: 3.3523125rem; }
.battle-side.enemy { left: 66.5503125rem; }
.battle-side:not(.has-role) > img { display: none; }
.battle-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
/* img_LRole / img_RRole：rect 700×700，父層 1.5 疊自身 (0.4, 0.6) → 420×420。
   Image.preserveAspect = 0，所以是拉滿而非 contain。 */
.battle-role,
.battle-role-tint {
    position: absolute;
    top: -23.90625rem;
    width: 26.25rem;
    height: 26.25rem;
    object-fit: fill;
}
.battle-side.player .battle-role,
.battle-side.player .battle-role-tint { left: -.34375rem; }
.battle-side.enemy .battle-role,
.battle-side.enemy .battle-role-tint {
    left: -3.21875rem;
    transform: scaleX(-1);
}
.battle-role-tint {
    opacity: 0;
    pointer-events: none;
}
/* Image.DOColor(Color.red / Color.green, 0.5f) → 0.5s 染色、0.5s 回白，
   乘色以同圖疊層 + feColorMatrix 精確重現。 */
.battle-side.take-damage .battle-role-tint {
    filter: url("#battle-tint-red");
    animation: battle-role-tint var(--battle-sec) ease-out both;
}
.battle-side.take-heal .battle-role-tint {
    filter: url("#battle-tint-green");
    animation: battle-role-tint var(--battle-sec) ease-out both;
}
@keyframes battle-role-tint {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}
/* 出手可讀性（網頁版補作，原版無）：攻擊方朝對面一記短突進再歸位。
   放在 take-damage 規則之前：同元素兩類同時在時，受擊位移優先生效。 */
.battle-side.player.attack-lunge { animation: battle-lunge-right calc(var(--battle-sec) * .8) cubic-bezier(.2, .8, .3, 1) both; }
.battle-side.enemy.attack-lunge { animation: battle-lunge-left calc(var(--battle-sec) * .8) cubic-bezier(.2, .8, .3, 1) both; }
@keyframes battle-lunge-right {
    0% { transform: translateX(0); }
    30% { transform: translateX(2.75rem); }
    100% { transform: translateX(0); }
}
@keyframes battle-lunge-left {
    0% { transform: translateX(0); }
    30% { transform: translateX(-2.75rem); }
    100% { transform: translateX(0); }
}
/* 閃避（網頁版補作）：受擊方往外一小步側閃並短暫變淡，配合白字「闪避」。 */
.battle-side.player.dodge-step { animation: battle-dodge-left calc(var(--battle-sec) * .8) ease-out both; }
.battle-side.enemy.dodge-step { animation: battle-dodge-right calc(var(--battle-sec) * .8) ease-out both; }
@keyframes battle-dodge-left {
    0% { transform: translateX(0); opacity: 1; }
    35% { transform: translateX(-1.75rem); opacity: .45; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes battle-dodge-right {
    0% { transform: translateX(0); opacity: 1; }
    35% { transform: translateX(1.75rem); opacity: .45; }
    100% { transform: translateX(0); opacity: 1; }
}
/* img_LShade 往 -50、img_RShade 往 +50，各 0.5 設計秒後歸位。 */
.battle-side.player.take-damage { animation: battle-knock-left var(--battle-sec) ease-out both; }
.battle-side.enemy.take-damage { animation: battle-knock-right var(--battle-sec) ease-out both; }
@keyframes battle-knock-left {
    0% { transform: translateX(0); }
    50% { transform: translateX(-3.125rem); }
    100% { transform: translateX(0); }
}
@keyframes battle-knock-right {
    0% { transform: translateX(0); }
    50% { transform: translateX(3.125rem); }
    100% { transform: translateX(0); }
}
/* 命中火花（網頁版補作）：受擊方軀幹處一朵短促的斬擊光斑。
   位置釘在角色立繪中心偏上，遠離頂部血條與 popup 錨點，不擋數字。
   透明度上限 .8、尺寸 7rem、時長 0.55 個戰鬥秒 —— 刻意短小，避免閃屏。 */
.battle-impact {
    position: absolute;
    top: 26.5rem;
    width: 7rem;
    height: 7rem;
    margin-left: -3.5rem;
    pointer-events: none;
    z-index: 8;
    animation: battle-impact calc(var(--battle-sec) * .55) ease-out both;
}
.battle-impact.left { left: 16.13rem; }
.battle-impact.right { left: 76.46rem; }
.battle-impact::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 244, 214, .45) 34%, rgba(255, 244, 214, 0) 68%);
}
.battle-impact::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8.5rem;
    height: .28rem;
    margin: -.14rem 0 0 -4.25rem;
    border-radius: .14rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 45%, #fff 55%, rgba(255, 255, 255, 0));
    transform: rotate(-38deg);
}
.battle-impact.crit::before {
    background: radial-gradient(circle, rgba(255, 200, 120, .9) 0%, rgba(255, 115, 23, .5) 36%, rgba(255, 115, 23, 0) 70%);
}
.battle-impact.crit::after {
    background: linear-gradient(90deg, rgba(255, 170, 60, 0), #ffcf8a 45%, #ffcf8a 55%, rgba(255, 170, 60, 0));
}
@keyframes battle-impact {
    0% { transform: scale(.35); opacity: 0; }
    18% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.22); opacity: 0; }
}
/* 技能元素光效 DOM 兜底（Round2 战斗画面刀）：无 WebGL / Spine runtime 没载到时
   按 SkillInfo.Element 上色出形——至少火是火、水是水，不再全场一个样。
   锚点沿用 battle-impact 的躯干位。 */
.battle-skill-fx {
    position: absolute;
    top: 24.5rem;
    width: 11rem;
    height: 11rem;
    margin-left: -5.5rem;
    pointer-events: none;
    z-index: 8;
    animation: battle-skill-fx var(--battle-sec) ease-out both;
}
.battle-skill-fx.left { left: 16.13rem; }
.battle-skill-fx.right { left: 76.46rem; }
/* 敌方起手的 DOM 兜底（Spine runtime 缺席时）：一圈由外向内收的赤金气环，
   收拢的方向读作「聚气」，与 buff_07_loop 的语义对齐。 */
.battle-windup {
    position: absolute;
    top: 22rem;
    width: 15rem;
    height: 15rem;
    margin-left: -7.5rem;
    pointer-events: none;
    z-index: 7;
    border-radius: 50%;
    border: .22rem solid rgba(255, 196, 96, .0);
    animation: battle-windup var(--battle-sec) ease-in both;
}
.battle-windup.left { left: 16.13rem; }
.battle-windup.right { left: 76.46rem; }
@keyframes battle-windup {
    0%   { transform: scale(1.45); border-color: rgba(255, 196, 96, 0); box-shadow: none; }
    45%  { transform: scale(1.05); border-color: rgba(255, 196, 96, .85); box-shadow: 0 0 1.6rem rgba(255, 170, 60, .55) inset; }
    100% { transform: scale(.55); border-color: rgba(255, 226, 150, 0); box-shadow: 0 0 2.4rem rgba(255, 190, 80, .1) inset; }
}
.battle-skill-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .35) 40%, rgba(255, 255, 255, 0) 70%);
}
.battle-skill-fx::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10rem;
    height: .3rem;
    margin: -.15rem 0 0 -5rem;
    border-radius: .15rem;
    background: linear-gradient(90deg, transparent, #fff 45%, #fff 55%, transparent);
    transform: rotate(-32deg);
}
/* 金：金白十字闪 */
.battle-skill-fx.el-1::before { background: radial-gradient(circle, rgba(255, 236, 170, .9) 0%, rgba(230, 190, 90, .45) 42%, rgba(230, 190, 90, 0) 70%); }
.battle-skill-fx.el-1::after { background: linear-gradient(90deg, transparent, #ffe9a8 45%, #fff6d8 55%, transparent); transform: rotate(0deg); box-shadow: 0 0 1.2rem rgba(255, 224, 130, .8); }
/* 木：翠绿气旋 */
.battle-skill-fx.el-2::before { background: radial-gradient(circle, rgba(190, 255, 170, .85) 0%, rgba(80, 200, 90, .45) 42%, rgba(80, 200, 90, 0) 70%); }
.battle-skill-fx.el-2::after { background: linear-gradient(90deg, transparent, #9fe27a 45%, #d3ffb8 55%, transparent); transform: rotate(58deg); }
/* 水：碧蓝涟漪（横向压扁的环） */
.battle-skill-fx.el-3::before { background: radial-gradient(circle, rgba(180, 226, 255, .9) 0%, rgba(70, 150, 231, .5) 42%, rgba(70, 150, 231, 0) 70%); transform: scaleY(.55); }
.battle-skill-fx.el-3::after { background: linear-gradient(90deg, transparent, #9fd4ff 45%, #e2f3ff 55%, transparent); transform: rotate(-8deg) scaleY(.7); }
/* 火：焰橙上腾 */
.battle-skill-fx.el-4 { animation-name: battle-skill-fx-rise; }
.battle-skill-fx.el-4::before { background: radial-gradient(circle at 50% 62%, rgba(255, 222, 140, .95) 0%, rgba(255, 110, 30, .55) 40%, rgba(255, 60, 20, 0) 72%); }
.battle-skill-fx.el-4::after { background: linear-gradient(0deg, transparent, #ffb35c 45%, #ffe3a8 55%, transparent); transform: rotate(90deg); }
/* 土：土黄下沉重击 */
.battle-skill-fx.el-5 { animation-name: battle-skill-fx-slam; }
.battle-skill-fx.el-5::before { background: radial-gradient(circle at 50% 70%, rgba(233, 205, 151, .9) 0%, rgba(164, 120, 62, .5) 44%, rgba(164, 120, 62, 0) 72%); transform: scaleY(.7); }
.battle-skill-fx.el-5::after { background: linear-gradient(90deg, transparent, #d8b276 45%, #f2dcae 55%, transparent); transform: rotate(0deg) scaleY(.8); }
@keyframes battle-skill-fx {
    0% { transform: scale(.4); opacity: 0; }
    20% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.28); opacity: 0; }
}
@keyframes battle-skill-fx-rise {
    0% { transform: scale(.45) translateY(1.6rem); opacity: 0; }
    22% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(1.18) translateY(-2.4rem); opacity: 0; }
}
@keyframes battle-skill-fx-slam {
    0% { transform: scale(.5) translateY(-1.8rem); opacity: 0; }
    26% { transform: scale(1.05) translateY(.7rem); opacity: 1; }
    44% { transform: scale(1) translateY(.35rem); opacity: 1; }
    100% { transform: scale(1.12) translateY(.5rem); opacity: 0; }
}
/* 暴击舞台微震（Round2 战斗画面刀）。幅度 ≤.3rem、0.4 战斗秒，刻意收着不晃眼。 */
.battle-shell.stage-shake { animation: battle-stage-shake calc(var(--battle-sec) * .4) linear both; }
@keyframes battle-stage-shake {
    0% { translate: 0 0; }
    20% { translate: .3rem -.2rem; }
    40% { translate: -.28rem .18rem; }
    60% { translate: .2rem .12rem; }
    80% { translate: -.12rem -.1rem; }
    100% { translate: 0 0; }
}
/* 立绘待机呼吸（Round2 战斗画面刀：敌方立绘静态站桩）。
   用独立的 translate/rotate 属性做，不碰 transform——敌方 .battle-role 的
   scaleX(-1) 与受击位移都挂在 transform 上，互不干扰。敌我错相位。 */
.battle-side.player .battle-role,
.battle-side.player .battle-role-tint { animation: battle-idle-breathe 3.2s ease-in-out infinite; }
.battle-side.enemy .battle-role,
.battle-side.enemy .battle-role-tint { animation: battle-idle-breathe 2.7s ease-in-out .9s infinite; }
@keyframes battle-idle-breathe {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    50% { translate: 0 .4rem; rotate: .35deg; }
}
#battle-fx { position: absolute; inset: 0; pointer-events: none; }
/* DamageNum / AddSpeed / BuffName / SkillName 的 prefab 根都是 102×53、
   掛在固定錨點：tf_LNum(287,125) / tf_LSkill(287,155) / tf_LBuff(287,195)，
   右側鏡像為 -287。文字 TMP fontSize = 26 設計像素。 */
.battle-pop {
    position: absolute;
    width: 6.375rem;
    min-width: 6.375rem;
    height: 3.3125rem;
    max-height: 3.3125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    color: #fff;
    font: 700 1.625rem/normal "Microsoft YaHei", sans-serif;
    text-shadow: 0 .125rem 0 rgba(0, 0, 0, .85), 0 0 .375rem #000;
    animation-duration: var(--battle-sec);
    animation-timing-function: linear;
    animation-fill-mode: both;
    z-index: 9;
}
.battle-pop.left { left: 16.5085625rem; }
.battle-pop.right { left: 76.0815625rem; }
.battle-pop.num { top: 17.9358125rem; animation-name: battle-num-pop; }
/* AddSpeed.InitData：提速綠字、减速紅字。 */
.battle-pop.speed {
    top: 13.5608125rem;
    color: #74ec3c;
    animation-name: battle-speed-pop;
}
/* BuffName 與 AddSpeed 同構：同一個錨點 tf_LBuff / tf_RBuff、同一組 DOTween 曲線。
   差別只在顏色 —— BuffName.InitData 把文字包成 <color=#FFFFFF>，
   而 AddSpeed 是綠 / 紅，所以這裡不覆寫 color，沿用 .battle-pop 的白。 */
.battle-pop.buff {
    top: 13.5608125rem;
    animation-name: battle-speed-pop;
}
.battle-pop.crit { color: #ff7317; }
.battle-pop.heal { color: #74ec3c; }
.battle-pop.slow { color: #d93c3c; }
.battle-crit-icon {
    flex: 0 0 1.75rem;
    width: 1.75rem;
    height: 1.5rem;
    margin-right: .1875rem;
    object-fit: contain;
}
/* DamageNum 的 DOTweenAnimation：LocalMove y→130 (1.0s)、
   Scale 1→1.8 (0～0.2s)、1.8→1.6 (0.5～0.8s)、Fade 1→0 (0.4～0.8s)。 */
@keyframes battle-num-pop {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    20% { transform: translate(-50%, calc(-50% - 1.625rem)) scale(1.8); opacity: 1; }
    40% { transform: translate(-50%, calc(-50% - 3.25rem)) scale(1.8); opacity: 1; }
    50% { transform: translate(-50%, calc(-50% - 4.0625rem)) scale(1.8); opacity: .75; }
    80% { transform: translate(-50%, calc(-50% - 6.5rem)) scale(1.6); opacity: 0; }
    100% { transform: translate(-50%, calc(-50% - 8.125rem)) scale(1.6); opacity: 0; }
}
/* AddSpeed / BuffName：Scale 1→1.8 (InOutSine 0.2s)、1.8→1.3 (OutSine 0.5～0.9s)、
   LocalMove y→130 (1.0s)、Fade 1→0 (0.4～0.8s)。 */
@keyframes battle-speed-pop {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    10% { transform: translate(-50%, calc(-50% - .8125rem)) scale(1.4); opacity: 1; }
    20% { transform: translate(-50%, calc(-50% - 1.625rem)) scale(1.8); opacity: 1; }
    40% { transform: translate(-50%, calc(-50% - 3.25rem)) scale(1.8); opacity: 1; }
    50% { transform: translate(-50%, calc(-50% - 4.0625rem)) scale(1.8); opacity: .75; }
    70% { transform: translate(-50%, calc(-50% - 5.6875rem)) scale(1.447); opacity: .25; }
    80% { transform: translate(-50%, calc(-50% - 6.5rem)) scale(1.338); opacity: 0; }
    100% { transform: translate(-50%, calc(-50% - 8.125rem)) scale(1.3); opacity: 0; }
}
/* SkillName：底板 Image 221×70，掛在 tf_LSkill / tf_RSkill 正中。 */
#skill-banner {
    position: absolute;
    left: 16.5085625rem;
    top: 16.0608125rem;
    width: 13.8125rem;
    height: 4.375rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/招式名称底板.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 400 1.625rem/normal "STKaiti", "KaiTi", serif;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 .0625rem .125rem #000;
    pointer-events: none;
    animation: battle-skill-pop var(--battle-sec) linear both;
    z-index: 8;
}
#skill-banner.enemy { left: 76.0815625rem; }
/* SkillName 的 DOTweenAnimation：Scale 1→1.6 (InOutSine 0.3s)、
   LocalMove y→100 (0.4～1.0s)、Fade 1→0 (0.7～1.0s)。 */
@keyframes battle-skill-pop {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    15% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1.6); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1.6); opacity: 1; }
    70% { transform: translate(-50%, calc(-50% - 3.125rem)) scale(1.6); opacity: 1; }
    100% { transform: translate(-50%, calc(-50% - 6.25rem)) scale(1.6); opacity: 0; }
}
/* Scroll 542.74×170.62，go_Item 的 TMP 是 22 設計像素白字（rich text 只給
   技能名 / 傷害數字套色），所以整行底色不再用 class 全塗。 */
/* Round2 P2「日志首行被中央墨条压住半截」（截图 26）实measure复盘：
   墨条其实是行动条的水墨轨道图（shell y 39~105），日志顶缘在 132，两者不相交；
   被切的是 overflow auto 滚动后停在容器顶缘的半行字，因紧贴墨条而被归因于它。
   修法双管：①顶缘再让位 1.25rem 拉开与墨条的视觉距离（底缘不动），
   ②顶部 1.6rem 渐隐 mask——半行淡出而不是硬切。 */
#battle-log {
    position: absolute;
    left: calc(50% - .275625rem);
    top: calc(50% - 11.8075rem);
    width: 33.92125rem;
    height: 9.41375rem;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 1.6rem);
    mask-image: linear-gradient(180deg, transparent 0, #000 1.6rem);
    transform: translate(-50%, -50%);
    overflow: hidden auto;
    padding: .3125rem .75rem;
    color: #fff;
    font: 400 1.375rem/1.4 "Microsoft YaHei", sans-serif;
    text-align: center;
    text-shadow: 0 .0625rem .125rem #000;
    scrollbar-width: none;
    z-index: 7;
}
#battle-log::-webkit-scrollbar { display: none; }
#battle-log p { min-height: 1.4em; }
/* 以下整行著色只留給沒有分段資料的舊存檔 result.log。 */
#battle-log p.player { color: #74ec3c; }
#battle-log p.enemy { color: #d93c3c; }
#battle-log p.crit { color: #ff7317; }
#battle-log p.damage { color: #d93c3c; }
#battle-action-bar {
    position: absolute;
    left: calc(50% + .25225rem);
    top: 2.4503125rem;
    bottom: auto;
    width: 37.5rem;
    height: 4.125rem;
    transform: translateX(-50%);
    z-index: 7;
}
.battle-action-track {
    position: absolute;
    inset: 0;
    width: 37.5rem;
    height: 4.125rem;
    object-fit: fill;
}
.battle-runner {
    --runner-x: 3.125rem;
    position: absolute;
    left: var(--runner-x);
    width: 5.25rem;
    height: 5.1625rem;
    transform: translate(-50%, -50%);
    transition: left .8s linear;
    overflow: visible;
}
.battle-runner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_属性_头像框.svg") center/100% 100% no-repeat;
    pointer-events: none;
    z-index: 1;
}
.battle-runner.player { top: 50%; z-index: 2; }
.battle-runner.enemy { top: 50%; z-index: 1; }
.battle-runner img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4.6375rem;
    height: 4.6375rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}
/* tf_LItemGroup：GridLayoutGroup cellSize 84×84、spacing.x 13、MiddleCenter，
   錨在 Left 底部 +73，所以整排隨法寶數量置中，沒帶的格子不出現。 */
/* Spine 特效層：蓋滿 .battle-shell，本身不吃事件。
   原版 PlayLsfx/PlayRsfx 把 Renderer.sortingOrder 設成 100 —— 在角色、投影之上，
   但 popup（DamageNum / SkillName / BuffName，z-index 9）與控制列還要更上層。
   canvas 的 backing store 由 JS 依實際像素設定，這裡只管版面。 */
.battle-sfx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
}
.battle-weapon-slots {
    position: absolute;
    left: calc(50% + .1538125rem);
    top: 43.8963438rem;
    height: 5.25rem;
    display: flex;
    gap: .8125rem;
    transform: translateX(-50%);
    z-index: 8;
}
.battle-weapon-slot {
    position: relative;
    flex: 0 0 5.25rem;
    width: 5.25rem;
    height: 5.25rem;
}
/* 子節點順序照 prefab：Bk（品質底）→ Bord（品質框）→ 道具圖 → Gray（消耗遮罩）。 */
.battle-weapon-slot img {
    position: absolute;
    inset: 0;
    width: 5.25rem;
    height: 5.25rem;
    object-fit: fill;
}
/* img_LItems{j}Gray：prefab 裡 SetActive(false)，SetItemIcon 也不換它的 sprite，
   所以它一直是 主界面_物品格_背景蓝、Image 顏色 (0.3736, 0.3736, 0.3736, 0.6667)。
   Unity 的 Image.color 是逐通道相乘 → 灰階乘色等同 CSS brightness()，alpha 等同 opacity。
   先前這裡寫死 rgba(0,0,0,.55) 是憑感覺湊的，已改回 prefab 值。 */
.battle-weapon-slot img.gray {
    display: none;
    filter: brightness(.373585);
    opacity: .666667;
}
.battle-weapon-slot.used img.gray { display: block; }
/* CombatPanelEntity.HideItemByPos → tweenerDic[pos].RewindThenRecreateTweenAndPlay()。
   LItems{j} 上的 DOTweenAnimation：ShakePosition、duration 0.7、strength (15,15,15)、
   optionalInt0（vibrato）15、optionalFloat0（randomness）90、optionalBool1（fadeOut）1。
   段長與振幅照 DOTween.ShakeTween 推算（見 scratchpad 的推導：10 段、段長 ∝ i+1、
   振幅 15 × (1 - i/10)、最後一段回原點）。角度原版每次重擲，這裡取固定序列 ——
   能對齊的是包絡，不是軌跡。 */
.battle-weapon-slot.shake {
    animation: battle-weapon-shake calc(var(--battle-sec, 1s) * .7) linear both;
}
@keyframes battle-weapon-shake {
    0% { transform: translate(0, 0); }
    1.818% { transform: translate(0.74872rem, 0.5642rem); }
    5.455% { transform: translate(-0.58177rem, 0.61112rem); }
    10.909% { transform: translate(0.72787rem, -0.18084rem); }
    18.182% { transform: translate(-0.25781rem, -0.60349rem); }
    27.273% { transform: translate(-0.32378rem, 0.45997rem); }
    38.182% { transform: translate(0.13754rem, -0.44812rem); }
    50.909% { transform: translate(-0.34486rem, 0.14729rem); }
    65.455% { transform: translate(0.22542rem, 0.16819rem); }
    81.818% { transform: translate(-0.0774rem, -0.17078rem); }
    100% { transform: translate(0, 0); }
}
.battle-control {
    position: absolute;
    top: calc(50% + 20.398125rem);
    width: 4.9375rem;
    height: 3.5rem;
    transform: translate(-50%, -50%);
    border: 0;
    color: #f4eee2;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/倍速bg-普通态.svg") center/100% 100% no-repeat;
    cursor: pointer;
    z-index: 10;
}
.battle-control:hover:not(:disabled), .battle-control:focus-visible {
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/倍速bg-激活态.svg");
    outline: none;
}
.battle-control.pause { left: calc(50% - 40.1125rem); }
.battle-control.speed { left: calc(50% + 35.7625rem); }
.battle-control.skip { left: calc(50% + 42.10625rem); font: 400 1.125rem/normal "STKaiti", "KaiTi", serif; }
.battle-control:disabled { cursor: default; opacity: .36; }
.battle-control.pause img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2rem;
    height: 2rem;
    transform: translate(-50%, -50%);
    object-fit: contain;
}
.battle-control.speed img {
    position: absolute;
    left: .875rem;
    top: 1.0625rem;
    width: 1.3125rem;
    height: 1.375rem;
    object-fit: contain;
}
.battle-control.speed span {
    position: absolute;
    left: 2.75rem;
    top: .875rem;
    color: #fff;
    font: 700 1.375rem/normal "Microsoft YaHei", sans-serif;
    text-shadow: 0 .0625rem .125rem #000;
}
/* TipForBattlePanel（跳出「重新推演」的提示）。
   root 是 stretch 滿畫布的 Image、色值 (1,1,1,0) —— 完全透明但照樣吃 raycast，
   所以這裡是一個透明的點擊阻擋層，**不是**半透明遮罩，不要自己加深色底。
   BkGround 564×404 置中，sprite tc-diban；內部三個框由 prefab 的 anchor/pivot 換算。 */
.battle-review-prompt {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: transparent;
}
.brp-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 35.25rem;
    height: 25.25rem;
    transform: translate(-50%, -50%);
    background: url("../assets/yuanwen-ui/surfaces/images/ui/tc-diban.svg") center/100% 100% no-repeat;
}
/* Text (TMP)「提示」：anchor/pivot (0.5,1)/(0.5,0.5)、pos (0,-43.2)、200×50、
   SourceHanSansSC-Medium-2 SDF 40、白字（行距 130.32/90 = 1.448em）。
   先前網頁完全沒有這一行。 */
.brp-title {
    position: absolute;
    left: 11.375rem;
    top: 1.1375rem;
    width: 12.5rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 500 2.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
}
/* txt_Desc：310×159.61 @ (121.74, 102.17)、TMP 28、置中、word wrap。
   顏色來自文字裡的 <color=#394255>（TMP 的 fontColor 本身是白的）。
   注意 prefab 指定的字體資產是 LiberationSans SDF —— TMP 內建、沒有中文字形，
   實際畫出來的是 TMP 的 fallback，prefab 裡看不出是哪一支，所以這裡沿用
   專案的中文預設（Source Han Sans SC）與它的行距 1.448em。 */
.battle-review-prompt p {
    position: absolute;
    left: 7.60875rem;
    top: 6.385937rem;
    width: 19.375rem;
    height: 9.975625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #394255;
    font: 500 1.75rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
}
/* BtnArea 463.6×90.28 @ (50.2, 275.86)。兩顆按鈕在它內部各自定位，
   不是 flex 平均分配 —— btn_yes 的 left 是負的（凸出 BtnArea 左緣 4.6）。 */
.battle-review-actions {
    position: absolute;
    left: 3.1375rem;
    top: 17.24125rem;
    width: 28.975rem;
    height: 5.6425rem;
}
.battle-review-btn {
    position: absolute;
    top: 0.434375rem;
    width: 12.5rem;
    height: 4.375rem;
    border: 0;
    padding: 0;
    appearance: none;
    /* Text (TMP) 30、色 (0.7765, 0.7961, 0.8392) = #c6cbd6、庞门正道粗书体 SDF
       （行距 137.34/90 = 1.526em）。先前用的是 STKaiti，字體對不上。 */
    color: #c6cbd6;
    font: 400 1.875rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    cursor: pointer;
}
.battle-review-btn.accept {
    left: -0.2875rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/确认bg.svg") center/100% 100% no-repeat;
}
.battle-review-btn.replay {
    left: 15.7625rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/取消 bg.svg") center/100% 100% no-repeat;
}
.battle-review-btn:hover { filter: brightness(1.15); }
.battle-review-btn:focus-visible { outline: .125rem solid #f7e3a3; outline-offset: -.5rem; }
.battle-shell.playback-paused .battle-side,
.battle-shell.playback-paused .battle-role-tint,
.battle-shell.playback-paused .battle-role,
.battle-shell.playback-paused .battle-pop,
.battle-shell.playback-paused .battle-impact,
.battle-shell.playback-paused .battle-skill-fx,
.battle-shell.playback-paused #skill-banner { animation-play-state: paused; }
.battle-shell.playback-paused.stage-shake { animation-play-state: paused; }
.battle-shell.playback-paused .battle-stat-bar .fill,
.battle-shell.playback-paused .battle-runner { transition-duration: 0s; }

.veil {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.58);
    z-index: 20;
}
.veil .ink-panel {
    position: relative; inset: auto; margin: 6% auto; width: min(55rem, 86%); max-height: 84%;
    padding: 1.2rem 1.6rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_面板背景.svg") center/100% 100% no-repeat;
    color: #1c1c1c; overflow: auto;
}
.ink-panel-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .8rem; }
/* R11 刀C：结算面板的城后微文本——叙事行用楷体淡墨，与数字结算行分层。 */
#craft-body .craft-micro {
    color: #4a4438;
    font-family: "STKaiti", "KaiTi", serif;
    margin-bottom: .45rem;
}
#cg-image { max-width: 92%; max-height: 92%; display: block; margin: 3% auto; }

/* ── 商店 StorePanel ───────────────────────────────────────────────────────
   prefab：根 StorePanel **沒有 Image**（所以原版開店不壓暗背景），底下兩塊
   共用同一個錨點 (0.508, 0.5) 往兩邊撐：

     StorePanel（商品列表） 418.353×561.18  pivot(0.963,.5)  sprite 宝器坊-diban
     BagPanel（玩家背包）   874.57 ×561.18  pivot(0.025,.5)  anchoredPos (32,0)

   換算到畫布：商品列表 (311.846, 259.41)、背包 (724.856, 259.41)
   —— 兩塊**刻意重疊 5.34**，背包在後面所以蓋在商店右緣上。
   離開走背包右上角的 btn_Exit，原版沒有另外的「离开」鈕。 */
.store-root {
    position: absolute; inset: 0;
    z-index: 20;
    /* 试玩 Round0/2 P2：货架+背包与身后事件卡/敌方卡三层并排视觉噪音。
       全屏挡板顺便当压暗 Mask——货架(20)/背包(21)浮在暗场上，
       身后年卡全部沉下去（is-hover z90 在开店时已被清除+关指针）。 */
    background: rgba(0, 0, 0, .55);
}
.store-root.hidden { display: none !important; }
.store-shop {
    position: absolute;
    left: 19.490379rem;
    top: 16.213125rem;
    width: 26.147063rem;
    height: 35.07375rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/宝器坊-diban.svg") center/100% 100% no-repeat;
}
/* 商店自身关闭钮（R5 罗盘刀6）：与背包 btn_Exit 同款 x.png，凸出货架左上角。
   R4b P2#1：关店唯一入口在旁边背包面板右上角，首玩找了很久。 */
.store-shop .store-close {
    position: absolute;
    left: -1.4rem;
    top: -1.35625rem;
    width: 3.125rem;
    height: 3.125rem;
    z-index: 2;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/x.svg") center/100% 100% no-repeat;
}
/* img_ShopNameBk 393.569×51.312 @ (14.288, 22.191)。
   **這個節點沒有 Image 元件**，只是文字容器，別自己補底板。字級 30、置中、白。 */
.store-name {
    position: absolute;
    left: 0.893rem;
    top: 1.386938rem;
    width: 24.598063rem;
    height: 3.207rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font: 500 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
}
/* BagArea 370.698×465.538 @ (21.6195, 73.503)；格子照 StorePanel 的序列化參數
   paddingLeft 10 / paddingTop 25 / spaceX,Y 10 / cellSize 80 / col 4。 */
#shop-body.store-grid {
    position: absolute;
    display: grid;
    left: 1.351219rem;
    top: 4.593937rem;
    width: 23.168625rem;
    height: 29.096125rem;
    grid-template-columns: repeat(4, 5rem);
    padding: 1.5625rem 0 1rem .625rem;
    overflow: auto;
}
/* 開店時背包蓋在商店右緣上（prefab 的兄弟順序），veil 不壓暗。
   veil 根是全屏 inset:0，z=21 > store-root 20：不關 pointer-events 的話
   整個商店貨架被透明遮罩攔死，hover 無 tips、點擊無購買——只讓
   背包面板本體接指針，其餘穿透給下層 store-root（它同為全屏，
   順便吃掉空白處的誤點，等價原版的 Mask 擋板）。 */
#game-container.store-open #bag-overlay {
    background: none;
    display: block;
    z-index: 21;
    pointer-events: none;
}
/* 開店瞬間剛點過的年卡還掛著 .is-hover（z=90 > store 20），指針不出卡區
   hover 永不解除，抬着的卡持續蓋住左半貨架吃指針（無 tips、點不到購買）。
   開店期間事件卡一律關指針，杜絕 hover 重新抬起；殘留的 is-hover 由
   showShop 進場時清除。 */
#game-container.store-open #events-list .event-card { pointer-events: none; }
#game-container.store-open #bag-overlay .game-panel {
    position: absolute;
    left: 45.303484rem;
    top: 16.213125rem;
    pointer-events: auto;
}
.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
    gap: .75rem .55rem;
    padding: .2rem .4rem 1rem;
}
.shop-slot, .inv-slot, .skill-slot, .queue-slot {
    width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: .28rem;
    color: #1c2430; font: inherit;
}
/* 原版 slot：img_slot 底 → img_Bk → img_itemIcon → img_borad，四層完全同框。
   .icon-wrap 少了 position:relative，害 .slot-quality-border 的 inset:0 貼到
   更高的 .inv-slot（含名稱列）上，再被 object-fit:contain 縮放 → 就是那個錯位雙框。 */
.shop-slot .icon-wrap, .inv-slot .icon-wrap, .skill-slot .icon-wrap, .queue-slot .icon-wrap {
    position: relative;
    /* BagController / SkillPanelController 的 cellSize = 80，BagSlotRoot 的
       sizeDelta 也是 80×80。88×90 是 主界面_物品格_背景黑.png 的原生尺寸，
       Unity 用 type Simple 把它壓到 80×80，所以格子是 80×80 不是 88×90。 */
    width: 5rem; height: 5rem;
    background-size: 100% 100%; background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
}
/* 原版格子是手排的虛擬化網格，不是 GridLayoutGroup：
     BagController.UpdateSlot()
       localPosition = ( (i % col) * (cellSize + spaceX) + paddingLeft,
                        -(i / col) * (cellSize + spaceY) )
   序列化參數（讀自 prefab 的 MonoBehaviour）：
     BagPanel    paddingLeft 20  paddingTop 25  spaceX/Y 10  cellSize 80  col 8
     SkillPanel  paddingLeft 10  paddingTop 50  spaceX/Y 10  cellSize 80  col 7
     StorePanel  paddingLeft 10  paddingTop 25  spaceX/Y 10  cellSize 80  col 4
   所以欄寬要固定 5rem(80)、間距 .625rem(10)，不能用 1fr 撐滿。 */
.slot-grid {
    grid-template-columns: repeat(8, 5rem);
    grid-auto-rows: 5rem;
    gap: .625rem;
    /* 容器比內容高時，align-content 預設會把剩餘空間攤給 auto 列，
       列高被拉成 201px，垂直間距就不等於 cellSize + spaceY 了。 */
    align-content: start;
    justify-content: start;
    padding: 1.5625rem 0 1rem 1.25rem;
}
.skill-cols-7 {
    grid-template-columns: repeat(7, 5rem);
    padding: 3.125rem 0 1rem .625rem;
}
.shop-slot, .inv-slot, .skill-slot, .queue-slot { position: relative; }
/* 原版 BagSlotRoot / SkillSlotRoot 底下只有 圖 + 數量，沒有名稱文字；
   名稱是 hover 時的 SkillTipsPanel（#item-tip）。多一層 .name 會把列高
   從 80 撐到 211，垂直間距就不可能等於 cellSize + spaceY。
   這條必須排在上面 .shop-slot/.inv-slot/.skill-slot 之後才蓋得掉 width:100%。 */
.shop-slot, .inv-slot, .skill-slot, .queue-slot {
    width: 5rem;
    height: 5rem;
    gap: 0;
}
.shop-slot .name, .inv-slot .name, .skill-slot .name { display: none; }
/* 原版商店格子沒有價格文字，價格走 TipEntity.SetItemPrice → #item-tip-price。 */
.shop-slot .price { display: none; }
/* 原版 img_borad 是 stretch 且 preserveAspect = 0，所以 fill 不是 contain。 */
.slot-quality-border {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none;
}
/* BagSlotRoot / StoreSlotRoot 的 tmptxt_numText：71.121x18.032 @ 槽內 (0, 50)、
   TMP 字級 20、白、靠右置中。**沒有描邊**（m_sharedMaterial 是字體的預設材質），
   所以不要自己加 text-shadow —— 那會讓數字看起來比原版粗一圈。 */
.slot-count {
    position: absolute;
    left: 0;
    top: 3.125rem;
    width: 4.445063rem;
    height: 1.127rem;
    display: flex; align-items: center; justify-content: flex-end;
    font: 500 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
    overflow: visible;
    pointer-events: none;
}
/* 釋放順序的序號是網頁自己加的（原版靠 ReleaseQuenePanel 的排序呈現）。 */
.slot-index {
    position: absolute; right: .25rem; bottom: .125rem; font-size: .72rem; color: #fff;
    text-shadow: 0 0 .125rem #000, 0 .0625rem .125rem #000; pointer-events: none;
}
.queue-slot.is-locate { transform: scale(1.12); z-index: 3; }
/* ReleaseQueue 幽靈拖拽（DragController.cs）：pointer 事件驅動，touch-action:none
   讓觸屏也能拖；幽靈 = 滿尺寸副本 fixed 跟指針；原格 SetNull 挖空；命中格描邊。 */
.queue-slot { touch-action: none; }
.queue-ghost {
    position: fixed; z-index: 200; margin: 0; pointer-events: none;
    opacity: .92; transform: scale(1.08);
    filter: drop-shadow(0 .3rem .6rem rgba(0, 0, 0, .55));
}
.queue-slot.drag-hollow .icon-wrap img,
.queue-slot.drag-hollow .slot-index { opacity: .15; }
.queue-slot.drag-over { outline: .18rem solid rgba(255, 214, 130, .95); outline-offset: -.18rem; z-index: 2; }
#bag-btn-quick-eat { width: auto; margin: 0; padding: .15rem .7rem; }
.q0 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景黑.svg"); }
.q1 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景灰.svg"); }
.q2 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景绿.svg"); }
.q3 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景蓝.svg"); }
.q4 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景紫.svg"); }
.q5 .icon-wrap { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景橘.svg"); }
.inv-slot.empty, .skill-slot.empty { pointer-events: none; opacity: .85; }
/* 原版 img_itemIcon 是 stretch 填滿整格（preserveAspect 0），不是縮到 68%。 */
.shop-slot .icon-wrap img, .inv-slot .icon-wrap img, .skill-slot .icon-wrap img,
.queue-slot .icon-wrap img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill;
}
.shop-empty { text-align: center; padding: 1.4rem 0; }
.shop-panel .ink-btn, .veil .ink-btn { width: 12.5rem; display: block; margin: .4rem auto 0; }
.rebirth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .6rem; }
/* ── MDTalentPanel（命定天赋页）────────────────────────────────────────
   存量 bug：.rebirth-panel 此前没有任何规则（.ink-panel 只在 .veil 下有样式），
   面板塌成 block flow、被 position:absolute 的 .full-bg 整个盖住 ——
   天赋列表与返回钮完全不可见不可点（结局 → 重入轮回也走这页，等于流程死）。
   命定天赋_背景.png 是 1310×880 的面板图（与 EnemyDetailPanel BG 同规格），
   被 .full-bg 以 cover 拉到 1920×1290 后上下各裁 105：纸面亮区（实测行 160..740 /
   列 200..1184，×1.4656 再减裁切）映射到画布约 (293,130)~(1735,980)。
   prefab 本身在本环境没有 ui bundle 可 dump，以下是「落在纸面内」的务实版式，
   不是 prefab 换算值 —— 精确对齐记在 HANDOFF 做不到清单。 */
.rebirth-panel {
    position: absolute;
    left: 19.5rem; top: 9.5rem; width: 87.5rem; height: 50rem;
    z-index: 2;
    display: flex; flex-direction: column;
    color: #2c3242;
}
.rebirth-panel .ink-panel-title {
    text-align: center; color: #394255;
    font: 400 2.8rem/1.526 "PangMenZhengDao-Cu", "PangMenZhengDao", "STKaiti", serif;
    margin-bottom: .2rem;
}
#rebirth-points { text-align: center; margin: 0 0 .8rem; font-size: 1.4rem; color: #55350f; }
.rebirth-panel .rebirth-grid {
    flex: 1 1 auto; overflow-y: auto; align-content: start;
    grid-auto-rows: min-content;
    padding: 0 1rem .5rem;
}
.rebirth-panel .rebirth-grid .ink-btn { min-height: 3.4rem; padding: .3rem .6rem; }
/* 命定天赋效果说明常显（通关评价 §2.4）：名字+价格一行、Tips 一行。
   hover 的 TipPanel 仍在，这里只是把「买前必须可见」的信息放上台面。 */
.rebirth-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; }
.rebirth-item-name { font: inherit; }
.rebirth-item-tips {
    font: 400 .92rem/1.3 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #e4d9b8;
    opacity: .92;
    white-space: normal;
    text-align: center;
}
/* 0 点只读浏览（罗盘 R9 第五刀）：整页永远进得来，买不起的压灰、价签红显，
   点数行自己说明白点数从哪儿来。压灰不是禁用——disabled 连 hover 说明都没了。 */
.rebirth-item-cost { font: inherit; opacity: .9; }
.rebirth-item-cost.is-short { color: #ff6a5a; opacity: 1; }
.rebirth-item.is-locked { opacity: .62; filter: grayscale(.5); }
.rebirth-item.is-locked:hover { opacity: .82; filter: grayscale(.2); }
.rebirth-item.is-maxed .rebirth-item-cost { color: #9ad48a; }
/* 只读那一行比常态长，压小一档是对的——但颜色得留在纸面读得出的深棕里。
   头一版写成 #d8c79a（浅金），那是给深底用的色，落在这张宣纸上几乎看不见，
   偏偏这行是唯一解释「为什么整页都是灰的」的字。 */
#rebirth-points.is-readonly {
    font-size: 1.15rem; color: #6b4a12;
}
#btn-rebirth-back {
    flex: 0 0 auto; width: 15rem; min-height: 3.4rem;
    margin: .8rem auto 0;
}
/* ── StaffPanel（制作名单，自动下卷）─────────────────────────────────── */
.credits-panel { display: flex; flex-direction: column; align-items: center; }
.credits-scroll {
    width: 100%; height: 24rem; overflow-y: auto; margin: .6rem 0 1rem;
    /* 原版 ScrollRect 无滚动条皮肤：内容自己往上卷。 */
    scrollbar-width: none;
}
.credits-scroll::-webkit-scrollbar { display: none; }
.credits-roll {
    display: flex; flex-direction: column; align-items: center; gap: .55rem;
    text-align: center;
    /* 上下留整屏空当，卷动时名单从底部升起、末行能停在视野中央。 */
    padding: 10rem 0 12rem;
    color: #1c1c1c;
}
.credits-roll b { font-size: 2rem; font-weight: 700; }
.credits-roll i { font-style: normal; color: #5a4a30; letter-spacing: .12em; }
.credits-roll em {
    font-style: normal; margin-top: 1.6rem;
    font-size: 1.05rem; color: #8a7a5c; letter-spacing: .3em;
}
.credits-roll span { font-size: 1.35rem; }
.credits-roll .credits-note { font-size: .95rem; color: #9a8a6a; letter-spacing: .08em; }
.credits-roll .credits-end { margin-top: 2.4rem; font-size: 1.5rem; color: #6b4a12; }

/* ── TipPanel（通用悬停小卡 266×190，命定天赋_提示面板背景）──────────── */
#ui-tip {
    position: fixed; z-index: 110;
    width: 16.625rem; min-height: 11.875rem;
    pointer-events: none;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/命定天赋_提示面板背景.svg") center/100% 100% no-repeat;
    display: flex; align-items: center; justify-content: center;
}
#ui-tip.hidden { display: none; }
#ui-tip-text {
    padding: 2rem 2.2rem;
    color: #e8dcc0; text-align: center;
    font: 500 1.15rem/1.5 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: pre-line;
}

/* ── tmpdd_Mode 难度下拉（姓名栏下方；prefab 无读数，对齐名列几何）────── */
.birth-mode { left: 54.75rem; top: 21.8rem; width: 18.75rem; height: 3.2rem; }
.birth-mode > * { position: absolute; }
.birth-mode label {
    left: 3.125rem; top: 0; width: 4.4rem; height: 3.2rem;
    display: flex; align-items: center;
    color: #1c1c1c;
    font: 500 1.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.birth-mode select {
    left: 7.6rem; top: .2rem; width: 8rem; height: 2.8rem;
    background: #2a2118; color: #e8dcc0;
    border: .0625rem solid #6a583c; padding: 0 .4rem;
    font: 500 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    cursor: pointer;
}
.birth-mode.hidden { display: none; }
/* BtnInteraction：背包左键点格子弹出的「装备/使用」浮钮，锚在格子上缘居中。 */
.bag-interaction-btn {
    position: fixed;
    transform: translate(-50%, -100%);
    z-index: 92;
    background: rgba(26, 20, 12, .95);
    color: #f6edd4;
    border: .0625rem solid #b08d4f;
    border-radius: .25rem;
    padding: .3rem 1.1rem;
    font: 500 1.05rem/1.3 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    cursor: pointer;
    box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .55);
}
.bag-interaction-btn:hover { background: rgba(66, 50, 26, .97); }
/* z-index 250：對白層 mask 100 / box 102、結算 150、天雷 160、拖拽幽靈 200 之上。
   此前是 50，起名屏蔽詞、選項缺物品、商店售出這些提示全被面板蓋掉 —— 玩家看起來像沒反應。 */
.toast {
    position: fixed; left: 50%; bottom: 14%; transform: translateX(-50%);
    /* 提示只是看的，不拦点：手机上它正压在选项行上，2.2 秒内不能挡住玩家点选项。 */
    pointer-events: none;
    background: rgba(16,12,8,.92); color: #f6edd4; border: .0625rem solid #8a6a3a;
    padding: .4rem 1rem; z-index: 250;
    font-size: 1.1rem;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .5);
    animation: toast-pop .18s ease-out both;
}
@keyframes toast-pop {
    0% { transform: translateX(-50%) translateY(.5rem); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}
/* 舊版結局面板的 #ending-image { max-height: 22.5rem } 已移除：
   那條會壓過 .ending-img，讓 EnvelopeParent 的 cover 只鋪出 360px 高的一條。 */
.reward-line { margin: .35rem 0; }
.favor-mini { display: flex; gap: .45rem; flex-wrap: wrap; font-size: .72rem; color: #f3c6d4; margin-top: .2rem; }
.favor-mini { cursor: pointer; }
.favor-mini.hidden { display: none !important; }
.favor-row { display: flex; align-items: center; gap: .6rem; margin: .45rem 0; }
.favor-row b { min-width: 4.5rem; }
/* ============================================================================
   TipsPanel（hover 提示）
   來源：ui bundle 的 TipsPanel prefab + MTF_SCP\TipController / TipEntity。
   根 327.46×189.97，sprite `tips-bg{品質}`（**type 1 = Sliced**，
   m_Border = (l 0, b 0, r 0, t 44) → 只有上緣 44 不拉伸）。
   底下三個互斥版型：ItemPanel / SkillTipsPanel / EffectDesc（第三個網頁還沒做）。
   2026-08-22 之前是自創版面：16rem 寬、流式堆疊、亮色內文（原版內文是深色 rgb(57,66,85)）。
   ========================================================================== */
.item-tip {
    position: fixed;
    z-index: 90;
    width: 20.46625rem;
    height: 11.873125rem;
    padding: 0;
    pointer-events: none;
    background: none;
    color: #fff;
    font: 500 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* 9-slice 的底圖放在 ::before，避免 border-width 把子節點的絕對定位基準往內縮。 */
.item-tip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-style: solid;
    border-width: 2.75rem 0 0 0;
    border-image-source: var(--tip-bg, none);
    border-image-slice: 44 0 0 0 fill;
    border-image-repeat: stretch;
}
.item-tip .tip-variant { position: absolute; inset: 0; }
.item-tip .tip-variant.hidden { display: none !important; }
.item-tip .tip-variant > * { position: absolute; }

/* ── ItemPanel ─────────────────────────────────────────────────────────── */
/* TipBk 297.46×41.157 @ (16.664, 0)（**沒有 Image**，名條是 tips-bg 上緣那 44）；
   txt_Tip 311.62×41.157 比 TipBk 寬，實際左緣 9.584。TMP 22、白、靠左置中。 */
#item-tip-name {
    left: 0.599rem; top: 0; width: 19.47625rem; height: 2.572312rem;
    display: flex; align-items: center;
    font-size: 1.375rem;
    white-space: nowrap; overflow: hidden;
}
/* RightClick 100×41.157 @ 右上角；Image 23.081×32.093 @ (3.5, 4.532)、
   Text 66.56×32.094 @ (26.581, 4.5315)，TMP 15 白置中。
   `SetRightClick(show, isItem, isEquip)`：**只有圖示會被 SetActive(false)**，文字永遠在。 */
.tip-right { left: 14.21625rem; top: 0; width: 6.25rem; height: 2.572312rem; }
.tip-right img {
    position: absolute; left: 0.21875rem; top: 0.28325rem;
    width: 1.442562rem; height: 2.005813rem; object-fit: fill;
}
.tip-right.no-icon img { visibility: hidden; }
.tip-right span {
    position: absolute; left: 1.661312rem; top: 0.283219rem;
    width: 4.16rem; height: 2.005875rem;
    display: flex; align-items: center; justify-content: center;
    font-size: .9375rem; white-space: nowrap;
}
/* DescArea 是 stretch：左右固定、**下緣固定 39.0085**，所以面板長高時它跟著長。
   txt_Desc TMP 20、rgb(57,66,85)、靠左靠上、overflowMode 0（溢出照畫）。 */
.tip-desc-area {
    left: 1.0415rem; top: 2.783281rem; right: 0.833375rem; bottom: 2.438031rem;
}
.tip-desc {
    position: absolute; left: 0; top: 0; width: 100%;
    color: #394255;
    font-size: 1.25rem;
    overflow: visible;
}
/* TypeBk 85.77×26.65，錨點 (0.03, 0.037) pivot(0,0) → 用百分比才會跟著面板高度走。 */
.tip-type {
    left: calc(3% - 0.1625rem);
    bottom: calc(3.7% - 0.01875rem);
    width: 5.360625rem; height: 1.665625rem;
    display: flex; align-items: center;
    padding-left: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/leibie-jiaobiao.svg") center/100% 100% no-repeat;
}
.tip-type span {
    display: flex; align-items: center;
    width: 100%; height: 100%;
    font-size: 1.25rem; color: #fff;
}
/* PriceBk 98.873×34.619，錨點 (0.985, 0.021) pivot(1,0)。
   price == 0 → 顯示 txt_NoSold、藏掉 PriceImage（含價格數字）。 */
.tip-price {
    right: calc(1.5% + 0.04375rem);
    bottom: calc(2.1% + 0.025rem);
    width: 6.179563rem; height: 2.163687rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/jiage-bg.svg") center/100% 100% no-repeat;
}
.tip-price-img {
    position: absolute; left: 0.16875rem; top: 0.17225rem;
    width: 1.768687rem; height: 1.841438rem;
    background: url("../assets/yuanwen-ui/surfaces/images/icon/common/lingshi.svg") center/100% 100% no-repeat;
}
.tip-price-img > b {
    position: absolute; left: 1.576844rem; top: 0.359375rem;
    width: 3.838375rem; height: 1.637938rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: 1.25rem; color: #fff;
}
.tip-nosold {
    position: absolute; left: 0.268469rem; top: 0.531625rem;
    width: 5.3155rem; height: 1.637938rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
}
.tip-price.no-sold .tip-price-img { display: none; }
.tip-price:not(.no-sold) .tip-nosold { display: none; }
/* UpdatePanel：開店時 price > 身上灵石 → SetPriceTxtColor(Color.red)。 */
.tip-price.too-expensive .tip-price-img > b { color: #f00; }

/* ── SkillTipsPanel ────────────────────────────────────────────────────── */
.tips-name {
    left: 3.272406rem; top: 0.297031rem; width: 16.345188rem; height: 2.453688rem;
    display: flex; align-items: center;
    font-size: 1.375rem; color: #fff;
    white-space: nowrap; overflow: hidden;
}
/* img_CostBk 58×34 @ 右上，sprite 灵力消耗；txt_Cost 50.973×24.891 置中。 */
.tips-cost {
    left: 15.69125rem; top: 0.45rem; width: 3.625rem; height: 2.125rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/灵力消耗.svg") center/100% 100% no-repeat;
}
.tips-cost span {
    position: absolute; left: 0.238406rem; top: 0.215656rem;
    width: 3.185812rem; height: 1.555687rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
}
.tips-cost.empty { background-image: none; }
.tips-desc-area { left: 0.968781rem; top: 2.75075rem; right: 0.848656rem; bottom: 0.418063rem; }
.tips-desc {
    position: absolute; left: 0.14375rem; top: 0; width: 100%;
    color: #394255;
    font-size: 1.25rem;
    overflow: visible;
}
/* Image 55.981×55.981，**localScale 0.6** 且 pivot(0,1) → 左上角不動、實際 33.5886。 */
.tips-icon {
    left: 0.96875rem; top: 0.39375rem;
    width: 2.099287rem; height: 2.099287rem;
    object-fit: fill;
}
.tips-icon.hidden { display: none !important; }
.favor-mini .fv { background: rgba(80,20,40,.45); border: .0625rem solid #8a4a5a; padding: .05rem .35rem; border-radius: .1875rem; }
.love-mark { position: absolute; right: 6%; top: 8%; color: #c9c9c9; font-size: 1.1rem; text-shadow: 0 0 .25rem #000; z-index: 3; }
.love-mark.filled { color: #ff6b8a; }
/* ============================================================================
   SettingPanel（設定）
   來源：ui bundle 的 SettingPanel prefab + Atlpile\SettingPanelController / SettingPanelEntity。
   根 Image 是黑 alpha 0.7058823（自己就是遮罩，沒有另一層 Mask）；
   BG 1565×898.11 @ anchoredPos (14, -27.21) → 畫布 (191.5, 118.155)。
   2026-08-22 之前只有音樂/音效兩條 + 一個勾選 + 一行寫死的「画面：16:9」。
   ========================================================================== */
#settings-overlay {
    position: absolute; inset: 0;
    /* 原版 SettingPanel 走 PushPanel 压顶。之前 22 会被对白层（mask 100 / box 102）
       盖住——对白进行中点齿轮，设置面板陷在卷轴底下。103 = 压过对白；
       FadePanel（95）无依赖：退出流程先 closeSettings 再淡入。 */
    z-index: 103;
    background: rgba(0, 0, 0, .705882);
}
#settings-overlay.hidden { display: none !important; }
/* SettingPanelController.OnShow：CanvasGroup DOFade(0→1, ShowTime 0.5)。 */
#settings-overlay:not(.hidden) { animation: setting-fade-in .5s linear; }
@keyframes setting-fade-in { from { opacity: 0; } to { opacity: 1; } }
.set-bg {
    position: absolute;
    left: 11.96875rem;
    top: 7.384688rem;
    width: 97.8125rem;
    height: 56.131875rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_面板背景.svg") center/100% 100% no-repeat;
}
.set-bg > * { position: absolute; }
/* Title 370×76 @ (9.1, 48) 錨左上 → 往上凸出面板 48；Image alpha 0.8。
   tmptxtTitle 130.69×76 @ 標題內 (63.055, 0)，庞门正道粗书体 61.5、白。 */
.set-title {
    left: 0.56875rem; top: -3rem; width: 23.125rem; height: 4.75rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_标题背景.svg") center/100% 100% no-repeat;
    opacity: .8;
}
.set-title span {
    position: absolute; left: 3.940938rem; top: 0; width: 8.168125rem; height: 4.75rem;
    display: flex; align-items: center; justify-content: center;
    font: 400 3.84375rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #fff;
}
/* btn_Close 106×102 @ 右上角外側，sprite 命定天赋_退出按钮。 */
.set-close {
    left: 89.9rem; top: -1.59375rem; width: 6.625rem; height: 6.375rem;
    border: 0; padding: 0; appearance: none; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/命定天赋_退出按钮.svg") center/100% 100% no-repeat;
}
.set-close:hover, .set-close:focus-visible { filter: brightness(1.15); outline: none; }
/* 三個群組標題 196×76（设置_参数标题背景）；內文 TMP 55 但 localScale 0.9。 */
.set-head {
    width: 12.25rem; height: 4.75rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_参数标题背景.svg") center/100% 100% no-repeat;
}
.set-head span {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    transform: scale(.9);
    font: 400 3.4375rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #fff;
}
.set-head-audio { left: 4.46875rem; top: 3.084688rem; }
.set-head-video { left: 4.5125rem; top: 19.590938rem; }
.set-head-func  { left: 4.5125rem; top: 37.515938rem; }
/* Line 1028×12（设置_分界线），掛在群組標題下方 68 / 69。 */
.set-line {
    width: 64.25rem; height: 0.75rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_分界线.svg") center/100% 100% no-repeat;
}
.set-line-audio { left: 4.46875rem; top: 7.334688rem; }
.set-line-video { left: 4.5125rem; top: 23.903438rem; }
.set-line-func  { left: 4.5125rem; top: 41.828438rem; }
/* 每一列的左邊都是 234×62 的參數名稱底板（设置_参数名称背景），內文 TMP 30 白。 */
.set-row > * { position: absolute; }
.set-name {
    left: 0; top: 0; width: 14.625rem; height: 3.875rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_参数名称背景.svg") center/100% 100% no-repeat;
}
.set-name span {
    position: absolute; width: 12.5rem; height: 3.125rem;
    display: flex; align-items: center; justify-content: center;
    font: 500 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
}
.set-row-music { left: 4.50625rem; top: 9.109688rem; width: 63.275rem; height: 3.875rem; }
.set-row-eff   { left: 4.43125rem; top: 14.353438rem; width: 63.35rem; height: 3.875rem; }
.set-row-res   { left: 4.5rem;     top: 26.459688rem; width: 37.91875rem; height: 3.875rem; }
.set-row-full  { left: 4.50625rem; top: 32.259688rem; width: 37.875rem; height: 3.875rem; }
.set-row-music .set-name span { left: 1.0125rem; top: 0.2375rem; }
.set-row-eff .set-name span   { left: 1.0125rem; top: 0.2375rem; }
.set-row-res .set-name span   { left: 1.03125rem; top: 0.24375rem; }
.set-row-full .set-name span  { left: 1.05625rem; top: 0.2375rem; }
/* sld_* 628×53.338：Background / Fill 都是 26.669 高（錨 0.25~0.75）、
   Handle 34×17.852 在 601.873 寬的滑軌上跑。原生 range 透明疊在最上面吃事件。 */
.set-slider { width: 39.25rem; height: 3.333625rem; }
.set-row-music .set-slider { left: 16.525rem; top: 0.276938rem; }
.set-row-eff .set-slider   { left: 16.6rem;   top: 0.158188rem; }
.set-slider > i { position: absolute; display: block; }
.set-slider .sl-bg {
    left: 0; top: 0.833406rem; width: 39.25rem; height: 1.666813rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_滑动条未填充背景.svg") center/100% 100% no-repeat;
}
.set-slider .sl-fill {
    left: 0.3125rem; top: 0.833406rem; width: 0; height: 1.666813rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_滑动条填充背景.svg") left center/38.9375rem 100% no-repeat;
}
.set-slider .sl-handle {
    left: 0; top: 1.108625rem; width: 2.125rem; height: 1.11575rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_滑动条.svg") center/100% 100% no-repeat;
}
.set-slider input[type="range"] {
    position: absolute; inset: 0; width: 100%; height: 100%;
    margin: 0; padding: 0; opacity: 0; cursor: pointer; appearance: none;
}
/* tmptxt_Music / tmptxt_Effect 110×50，SourceHanSans Bold 30、rgb(29,33,42)。 */
.set-value {
    width: 6.875rem; height: 3.125rem;
    display: flex; align-items: center; justify-content: center;
    font: 700 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #1d212a;
}
.set-row-music .set-value { left: 57.3125rem; top: 0.25625rem; }
.set-row-eff .set-value   { left: 57.34375rem; top: 0.075rem; }
/* tmpdd_* 342×55（设置_下拉菜单选中时背景），Arrow 19×16 距右緣 43.5。 */
.set-dd {
    width: 21.375rem; height: 3.4375rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_下拉菜单选中时背景.svg") center/100% 100% no-repeat;
}
.set-dd-res    { left: 16.54375rem;  top: 0.2rem; }
.set-dd-fps    { left: 40.459375rem; top: 0.21875rem; }
.set-dd-screen { left: 16.5rem;      top: 0.2625rem; }
.set-dd select {
    position: absolute; inset: 0; width: 100%; height: 100%;
    margin: 0; padding: 0 3.5rem 0 0;
    border: 0; appearance: none; background: none; cursor: pointer;
    text-align: center; text-align-last: center;
    font: 500 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
}
.set-dd select option { color: #1d212a; }
.set-dd .dd-arrow {
    position: absolute; right: 2.21875rem; top: 50%;
    width: 1.1875rem; height: 1rem;
    transform: translateY(-50%);
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_下拉菜单箭头.svg") center/100% 100% no-repeat;
    pointer-events: none;
}
/* GameObject 318.14×20 @ (80.13, 704.255)，VerticalLayoutGroup spacing 34、
   ForceExpand 1 但容器只有 20 高（surplus < 0）→ 三列間距固定 54。
   勾選框 32×32 凸在列的左上外側 (-6, -6)；Label 598.857×17 @ (37.84, -0.7)。 */
.set-togs { left: 5.008125rem; top: 44.015938rem; width: 19.88375rem; height: 1.25rem; }
.set-tog {
    position: absolute; left: 0; width: 19.88375rem; height: 1.25rem;
    display: block; cursor: pointer;
}
.set-tog:nth-child(1) { top: 0; }
.set-tog:nth-child(2) { top: 3.375rem; }
.set-tog:nth-child(3) { top: 6.75rem; }
.set-tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.set-tog > i {
    position: absolute; left: -0.375rem; top: -0.375rem; width: 2rem; height: 2rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/未勾选.svg") center/100% 100% no-repeat;
}
.set-tog > i::after {
    content: "";
    position: absolute; inset: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/勾选.svg") center/100% 100% no-repeat;
    opacity: 0;
}
.set-tog input:checked ~ i::after { opacity: 1; }
.set-tog > span {
    position: absolute; left: 2.365rem; top: -0.04375rem;
    width: 37.428562rem; height: 1.0625rem;
    display: flex; align-items: center;
    font: 400 1.875rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #394152;
    white-space: nowrap;
}
/* ButtonGroup 321×650 @ (1155.9, 197.11)：VerticalLayoutGroup spacing 25、
   ChildAlignment LowerCenter、ForceExpandHeight 0 → totalFlexible 0，
   剩餘 650 - 326 = 324 全推到上面 → 第一顆從 324 開始、間距 117。 */
.set-buttons { left: 72.24375rem; top: 12.319375rem; width: 20.0625rem; height: 40.625rem; }
.set-btn {
    position: absolute; left: 0; width: 20.0625rem; height: 5.75rem;
    border: 0; padding: 0; appearance: none; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_选项按钮.svg") center/100% 100% no-repeat;
    font: 400 3.125rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #fff;
}
.set-btn:nth-child(1) { top: 20.25rem; }
.set-btn:nth-child(2) { top: 27.5625rem; }
.set-btn:nth-child(3) { top: 34.875rem; }
.set-btn:hover, .set-btn:focus-visible { filter: brightness(1.12); outline: none; }
.set-btn.is-off { display: none !important; }

/* ============================================================================
   ModalPanel / IsOrNotPanel（確認框）
   來源：ui bundle 的 ModalPanel / IsOrNotPanel prefab + Xpzhnl\ModalPanelController。
   兩者版面完全一樣（Bk 564x404 tc-diban、標題 200x50、按鈕 200x70），
   差別只在 ModalPanel 多一層 Mask（黑 alpha 0.7058823），IsOrNotPanel 沒有。
   2026-08-22 之前用的是通用 `.veil` + `.ink-panel`（設置_面板背景 + 58% 遮罩）。
   ========================================================================== */
#modal-overlay {
    position: absolute; inset: 0;
    /* IsOrNotPanel 是 PushPanel 的頂層確認框。此前 z=20 被
       .event-card.is-hover(90) 和 #dialogue-box(102) 蓋住——點戰鬥卡後
       滑鼠必然還懸在卡上，「是否做好准备」整塊被卡壓住，要挪開滑鼠才看得到。
       104 = 高於對白/懸停卡，仍低於 ui-tip(110)/三選一(140)/結算(150)。 */
    z-index: 104;
    /* Mask 的 Image：黑、alpha 180/255 */
    background: rgba(0, 0, 0, .705882);
}
#modal-overlay.hidden { display: none !important; }
/* IsOrNotPanel 跟 ModalPanel 共用這塊版面，但 prefab 裡**沒有 Mask 節點**。 */
#modal-overlay.no-mask { background: none; }
/* ModalPanelController.OnShow：CanvasGroup DOFade(0→1, ShowTime 0.1)。 */
#modal-overlay:not(.hidden) { animation: modal-fade-in .1s linear; }
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-bk {
    position: absolute;
    left: 42.375rem;
    top: 21.125rem;
    width: 35.25rem;
    height: 25.25rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/tc-diban.svg") center/100% 100% no-repeat;
}
.modal-bk > * { position: absolute; }
/* tmptxt_title 200x50 @ (182, 18.2)：SourceHanSans Medium 40、白、置中。 */
.modal-title {
    left: 11.375rem; top: 1.1375rem; width: 12.5rem; height: 3.125rem;
    display: flex; align-items: center; justify-content: center;
    font: 500 2.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
}
/* tmptxt_context 501.888x174.311 @ (25, 92.196)：江西拙楷2.0 28、rgb(57,66,85)、置中。 */
.modal-context {
    left: 1.5625rem; top: 5.762219rem; width: 31.368rem; height: 10.894438rem;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    font: 400 1.75rem/1.309 "JiangXiZhuoKai", "STKaiti", "KaiTi", serif;
    color: #394255;
    white-space: pre-wrap;
}
/* BtnArea 463.6x90.28 @ (50.2, 275.86)；btn_ok/btn_cancel 各 200x70。 */
.modal-btns { left: 3.1375rem; top: 17.24125rem; width: 28.975rem; height: 5.6425rem; }
.modal-btns .ink-btn {
    position: absolute;
    top: 0.434375rem;
    width: 12.5rem;
    height: 4.375rem;
    min-height: 4.375rem;
    margin: 0;
    /* 兩顆按鈕的字都是 庞门正道粗书体 40、rgb(198,203,214)。 */
    font: 400 2.5rem/1.526 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: #c6cbd6;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/确认bg.svg") center/100% 100% no-repeat;
}
.modal-btns .ink-btn:nth-child(1) { left: -0.2875rem; }
.modal-btns .ink-btn:nth-child(2) {
    left: 15.7625rem;
    background-image: url("../assets/yuanwen-ui/surfaces/images/ui/取消 bg.svg");
}
.modal-btns .ink-btn:hover, .modal-btns .ink-btn:focus-visible { filter: brightness(1.12); outline: none; }
.game-panel-veil {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 18;
    display: flex; align-items: center; justify-content: center;
}
.game-panel-veil.hidden { display: none !important; }
/* 面板尺寸一律照 prefab 根節點，不要用百分比：
     BagPanel    874.57×561.18  → 54.660625rem × 35.07375rem
     SkillPanel  700×561.18     → 43.75rem     × 35.07375rem
     StorePanel  1920×818.42    → 120rem       × 51.15125rem
   三者 anchoredPos 都是 (0,0) 置中，所以 veil 的 flex 居中是對的，只有尺寸錯。 */
.game-panel {
    width: 54.660625rem;
    height: 35.07375rem;
    padding: 1.4rem 1.6rem 1rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/弹窗底板.svg") center/100% 100% no-repeat;
    color: #1c2430;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.panel-title {
    min-width: 8rem; height: 2.2rem; line-height: 2.2rem;
    text-align: center; font-size: 1.45rem; font-weight: 700; color: #eef4ff;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/标题底板.svg") center/100% 100% no-repeat;
}
.panel-close {
    width: 2.4rem; height: 2.3rem; border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/伴生天赋_关闭按钮.svg") center/contain no-repeat;
}
.panel-tabs { display: flex; gap: .35rem; margin: .35rem 0; }
.panel-tab {
    min-width: 4.6rem; height: 1.85rem; border: 0; cursor: pointer;
    color: #f4f0e4; font-size: .82rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_默认态.svg") center/100% 100% no-repeat;
}
.panel-tab.on { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_鼠标移入态.svg"); }
/* 原版 tog_* 的 Background 是 alpha 0（看不見），選中狀態只有 Checkmark 的
   `选中底板`。BagPanel 把它乘上 (27,31,38,129/255) → 近黑半透明；
   SkillPanel 的 Checkmark 顏色是白 (1,1,1,1) → 就是 sprite 原色 rgb(28,34,45)。
   sprite 本身是實心深色塊，所以用 mask + background-color 重現 Unity 的相乘。 */
#bag-overlay .panel-tab,
#skill-overlay .panel-tab {
    background: none;
    color: #c7c7c7;
    font: 500 1.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
#bag-overlay .panel-tab.on,
#skill-overlay .panel-tab.on {
    background-image: none;
    -webkit-mask: url("../assets/yuanwen-ui/surfaces/images/ui/选中底板.svg") center/100% 100% no-repeat;
    mask: url("../assets/yuanwen-ui/surfaces/images/ui/选中底板.svg") center/100% 100% no-repeat;
}
#bag-overlay .panel-tab.on { background-color: rgba(3, 4, 7, .505882); }
#skill-overlay .panel-tab.on { background-color: rgb(28, 34, 45); }
/* SkillPanel 根是 700×561.18，比背包窄 */
#skill-overlay .game-panel { width: 43.75rem; }
/* TogArea 720.125×62.026 @ 面板局部 (66.485, 13.279)；
   tog_* 各 144.74×62.962，5 個分頁 */
#bag-overlay .panel-tabs,
#skill-overlay .panel-tabs {
    height: 3.876625rem;
    gap: 0;
    margin: 0;
}
#bag-overlay .panel-tab,
#skill-overlay .panel-tab {
    min-width: 9.04625rem;
    width: 9.04625rem;
    height: 3.935125rem;
}
/* 天玄玄技面板有 6 个分页（全部＋风雷水火土），6×9.05rem = 54rem 超出 43.75rem 面板，
   第 6 页「土」整页被 overflow:hidden 裁掉、点不到（1920/1366 实测）。玄技面板的分页改为等分收缩。 */
#skill-overlay .panel-tab {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}
/* ── BagPanel 內部照 prefab 絕對定位 ───────────────────────────────────────
   TogArea 720.125×62.026 @ (66.4875, 13.279)、BagArea 746.15×459.525 @
   (66.487, 75.3055)、btn_Exit 50×50 @ (813.97, -21.7)（凸出面板上緣）。
   **prefab 沒有標題列**，所以網頁也不要有。 */
#bag-overlay .game-panel {
    position: relative;   /* 沒有這行，底下的絕對定位會跑去貼 #bag-overlay */
    display: block;
    padding: 0;
    overflow: visible;
}
/* 5 個 tog_* 各 144.74 寬，加起來 723.7 > TogArea 的 720.125。
   Unity 的 HorizontalLayoutGroup 在 surplus < 0 時不縮子項、從 padding.left 排起，
   所以是往右溢出 3.575 —— flex 靠 min-width 擋住收縮，得到同樣結果。 */
#bag-overlay .panel-tabs {
    position: absolute;
    left: 4.155469rem;
    top: 0.829938rem;
    width: 45.007813rem;
    overflow: visible;
}
#bag-overlay #bag-grid {
    position: absolute;
    left: 4.155438rem;
    top: 4.706594rem;
    width: 46.634375rem;
    height: 28.720312rem;
    flex: none;
}
#bag-overlay .panel-close {
    position: absolute;
    left: 50.873125rem;
    top: -1.35625rem;
    width: 3.125rem;
    height: 3.125rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/x.svg") center/100% 100% no-repeat;
}
/* QuickEatButton 與 Tog_XiuLian / Tog_RanXue 在原版掛 HideWhileNotEditor，
   `SetActive(GetManager<AssetBundleManager>().IsEditorLoadMode)` → 正式版永遠關閉，
   玩家點不到。節點與程式都留著（跟原版一樣是死碼），但不要顯示出來。 */
.editor-only { display: none !important; }
.panel-tools { display: flex; align-items: center; gap: 1rem; margin: .2rem 0 .4rem; font-size: .82rem; }
.panel-tools label { display: flex; align-items: center; gap: .25rem; }
.queue-box { margin: .2rem 0 .45rem; }
.queue-title { font-size: .82rem; margin-bottom: .2rem; }
.panel-tip { min-height: 1.4em; font-size: .78rem; margin-top: .3rem; }
#bag-grid, #skill-grid { flex: 1; overflow: auto; }
/* ReleaseQueuePanel 是 col=7 / cellSize 80 的虛擬化網格（prefab 序列化參數同
   SkillPanel）。#skill-queue 沒掛 goods-grid，display:grid 要自己補，
   否則空格 div 沒有幾何、也接不到拖拽落點。空格是合法落點（Swap 追加），
   所以不能學 .inv-slot.empty 關 pointer-events。 */
.queue-grid { display: grid; max-height: 12rem; overflow: auto; margin: .4rem 0; }
.queue-slot.empty { opacity: .85; }
.queue-list { max-height: 7.5rem; overflow: auto; margin: .4rem 0; }
.queue-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .2rem .4rem; border-bottom: .0625rem solid #4a3a28; }
.queue-row .ink-btn { width: auto; margin: 0; padding: .15rem .6rem; }
.fate-reroll { width: auto !important; margin: .4rem .4rem 0 !important; }
#btn-fate-reroll { position: absolute; right: 2%; bottom: 14%; z-index: 8; width: auto; padding: .25rem .8rem; }
#battle-review-prompt #btn-battle-replay { margin: 0; }
/* ============================================================================
   TipCultivationPanel（提示框：年 16 历练提示 / 击败天道残像提示）
   来源：Xpzhnl\TipCultivationPanelController / TipCultivationPanelEntity（7 节点：
   btn_Close / tmptxt_Title / tmptxt_Tips + 底板等）。
   ⚠ prefab 未入库（Steam ui bundle 不在仓库，dump_ui_prefab.py 跑不了），
   几何按已对齐惯例近似，待 bundle 可 dump 再钉：
     底板走 ModalPanel 的 tc-diban 564×404 置中（水墨弹窗底板惯例）；
     标题走 ModalPanel tmptxt_title 惯例 200×50、SourceHanSans Medium 40 白；
     正文走 ModalPanel tmptxt_context 惯例 501.888×174.311、江西拙楷 28、rgb(57,66,85)；
     btn_Close 走 SettingPanel/EnemyDetail 惯例：命定天赋_退出按钮 106×102 贴右上角。
   两处调用都是 uiManager.PushPanel（阻塞模态）→ 遮罩用已验证的黑 alpha 0.7058823。
   ========================================================================== */
#tip-cultivation-overlay {
    position: absolute; inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, .705882);
}
#tip-cultivation-overlay.hidden { display: none !important; }
.tipc-panel {
    position: absolute;
    left: 42.375rem; top: 21.125rem;      /* (1920-564)/2, (1080-404)/2 */
    width: 35.25rem; height: 25.25rem;    /* 564×404 */
    background: url("../assets/yuanwen-ui/surfaces/images/ui/tc-diban.svg") center/100% 100% no-repeat;
}
.tipc-panel > * { position: absolute; }
.tipc-title {
    left: 11.375rem; top: 1.1375rem; width: 12.5rem; height: 3.125rem;
    display: flex; align-items: center; justify-content: center;
    font: 500 2.5rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
}
/* tmptxt_Tips：SetTips 直塞 TMP，\n 要保留（历练提示原文带换行）。 */
.tipc-text {
    left: 1.5625rem; top: 5.762219rem; width: 31.368rem; height: 10.894438rem;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    font: 400 1.75rem/1.309 "JiangXiZhuoKai", "STKaiti", "KaiTi", serif;
    color: #394255;
    white-space: pre-wrap;
}
/* btn_Close：原版没有「确定」文案钮，是右上角的关闭钮（106×102）。 */
.tipc-close {
    left: 31.9375rem; top: -1.59375rem;
    width: 6.625rem; height: 6.375rem;
    border: 0; padding: 0; appearance: none; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/命定天赋_退出按钮.svg") center/100% 100% no-repeat;
}
.tipc-close:hover, .tipc-close:focus-visible { filter: brightness(1.15); outline: none; }

/* ============================================================================
   GameTipPanel（主界面属性栏 hover 提示）
   来源：Atlpile\GameTipPanelController / GameTipTrigger + ui bundle 的 GameTipPanel
   prefab（交接档 §8 已录：295 宽 @ anchor(0,0) anchoredPos (474.9, 789.9)，
   sprite 主界面_Buff提示 type 1 Sliced，ContentSizeFitter 垂直 PreferredSize，
   VerticalLayoutGroup padding (左22, 右15, 上6, 下10) spacing 13，
   tmptxt_Title SourceHanSans Bold 25 白、tmptxt_Content Regular 20 rgb(57,66,85)）。
   坐标换算（§4）：anchor(0,0) 在画布左下 → CSS left = 474.9（≠ 960+x，那是
   stretch 置中的公式）；Unity y 向上 → CSS top = 1080 - 789.9 = 290.1。
   ⚠ 近似项（bundle 未入库无法 dump）：pivot 按 (0,1) 顶边固定、向下长高；
   Sliced 的 m_Border 未录，底图上缘深色题条约 45px，照 TipsPanel 的 t44 惯例
   用 45 fill 近似。待 bundle 可 dump 再钉。
   ========================================================================== */
#game-tip-panel {
    position: absolute;
    left: 29.68125rem;   /* 474.9 */
    top: 18.13125rem;    /* 1080 - 789.9 = 290.1 */
    width: 18.4375rem;   /* 295（含 padding，Unity rect 即外框） */
    z-index: 55;
    box-sizing: border-box;
    padding: .375rem .9375rem .625rem 1.375rem;  /* VLG (top6, right15, bottom10, left22) */
    pointer-events: none;   /* 提示不能挡住 HUD 点击 */
}
#game-tip-panel.hidden { display: none !important; }
/* 9-slice 底图放 ::before，同 .item-tip 的做法（border-width 会缩子节点基准）。 */
#game-tip-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-style: solid;
    border-width: 2.8125rem 0 0 0;
    border-image: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_Buff提示.svg") 45 0 0 0 fill stretch;
}
#game-tip-title {
    position: relative;
    margin: 0 0 .8125rem;   /* VLG spacing 13 */
    font: 700 1.5625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
}
#game-tip-content {
    position: relative;
    font: 400 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #394255;
    white-space: pre-wrap;
}

/* ============================================================================
   GameEventRewardPanel（奖励飘字）
   来源：Xpzhnl\GameEventRewardPanelController / GameEventRewardEntity。
   RewardGroup 246.622×77.92 @ anchor(1,.5) pivot(.5,.5) anchoredPos (-123.311, 200)
   → 画布 (1673.378, 301.04)（HANDOFF §8.9.2）。
   时序照 C# 序列化默认值：delay .2、show .3、duration 4、hide .3、offsetY -60、move .2；
   动画 scale .75→1.05(OutBack 1.7)→1(OutElastic)、fade in、呼吸 1.02 yoyo、
   4 秒后 InBack 收 0（JS 用 WAAPI 播，缓动以 cubic-bezier 近似）。
   ⚠ 近似项：pool 项 GameEventReward 的 prefab 未 dump，底板 sprite 奖励 bg
   （350×68）按组宽 246.622 等比缩成 246.622×47.92、文字置中 22 号深色。
   ========================================================================== */
#reward-float-group {
    position: absolute;
    left: 104.586125rem;   /* 1673.378 */
    top: 18.815rem;        /* 301.04 */
    width: 15.413875rem;   /* 246.622 */
    height: 4.87rem;       /* 77.92 */
    z-index: 50;
    pointer-events: none;
}
.reward-float {
    position: absolute;
    left: 0;
    width: 15.413875rem;
    height: 2.995rem;      /* 47.92 = 68 × (246.622/350) */
    display: flex; align-items: center; justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/奖励 bg.svg") center/100% 100% no-repeat;
    font: 400 1.375rem/1 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #394255;
    white-space: nowrap;
    opacity: 0;
    /* MoveExistingRewards：DOLocalMoveY(0.2s, Ease.OutQuad) */
    transition: top .2s cubic-bezier(.25, .46, .45, .94);
}
/* 呼吸：DOScale(1.02, 2s).SetEase(InOutSine).SetLoops(-1, Yoyo) */
.reward-float.breathe { animation: reward-breathe 4s ease-in-out infinite; }
@keyframes reward-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
/* FadePanel：滿版黑，`Atlpile\FadePanelController` 的 fadeDuration 序列化成 **0.3**。
   進遊戲（MainPanelController.OnButtonStartClick）與離開回標題
   （SettingPanelController.OnButtonExitClick）都會先 FadeIn 再 FadeOut。 */
#fade-panel {
    position: absolute; inset: 0;
    z-index: 95;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s linear;
}
#fade-panel.hidden { display: none !important; }
#fade-panel.on { opacity: 1; pointer-events: auto; }
#thunder-fx {
    pointer-events: none; position: fixed; inset: 0; z-index: 80;
    background: radial-gradient(circle at 50% 0%, rgba(220,240,255,.85), transparent 55%);
}
#thunder-fx.play { animation: thunder-flash .9s ease-out; }
/* ── 突破天雷（PlayBreakThroughEffect，GameEventSystem.cs L1243）──────────
   Spine thunder_001 的滿舞台層：原版掛在 GameEventPanel、localPosition 0
   → 特效原點就是畫布中心。播放中 pointer-events: auto 擋掉所有點擊
   （原版 GameEventPanel.DisableInteraction）。上面的 #thunder-fx 只是
   runtime 沒載到時的 CSS 閃光退路。 */
#thunder-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 160;
    display: none;
    pointer-events: none;
}
#thunder-canvas.on { display: block; pointer-events: auto; }
/* ── 剧情满舞台演出 StoryFx（js/mod/story-fx.js）─────────────────────────
   与突破天雷的关键差别：**不挡点击**，层级夹在对白遮罩（z 100）与对白框
   （z 102）之间——演出看得见，字照样读得清，玩家想立刻点掉也点得掉。 */
#story-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
    display: none;
    pointer-events: none;
}
#story-canvas.on { display: block; }
/* 以下是没有 WebGL / runtime 没载到时的退路。骨架在时这层永远不亮。 */
#story-fx {
    position: absolute;
    inset: 0;
    z-index: 101;
    pointer-events: none;
    overflow: hidden;
}
#story-fx.hidden { display: none; }
#story-fx::before,
#story-fx::after { content: ""; position: absolute; inset: 0; }
/* 坠渊：天光（径向亮点）从中上方缩小远去，黑从四周合拢。 */
#story-fx.story-fx-abyss::before {
    background: radial-gradient(ellipse 34% 26% at 50% 34%, rgba(255, 240, 210, .85), transparent 70%);
    animation: story-abyss-sky 2.4s ease-in both;
}
#story-fx.story-fx-abyss::after {
    background: radial-gradient(circle at 50% 78%, rgba(70, 150, 190, .35), transparent 46%),
                radial-gradient(circle at 50% 46%, transparent 22%, rgba(6, 7, 12, .96) 78%);
    animation: story-abyss-maw 2.4s ease-in both;
}
@keyframes story-abyss-sky {
    0%   { opacity: 0; transform: scale(1.2) translateY(0); }
    12%  { opacity: .9; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(.18) translateY(-9rem); }
}
@keyframes story-abyss-maw {
    0%   { opacity: 0; transform: scale(1.6); }
    45%  { opacity: .8; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}
/* 天门：一条竖光缝从无到有、由细变宽，缝后一圈金晕。 */
#story-fx.story-fx-gate::before {
    background: linear-gradient(90deg, transparent 49.2%, rgba(255, 255, 255, .95) 50%, transparent 50.8%);
    animation: story-gate-seam 2.8s ease-out both;
}
#story-fx.story-fx-gate::after {
    background: radial-gradient(ellipse 16% 46% at 50% 50%, rgba(255, 232, 176, .5), transparent 72%);
    animation: story-gate-halo 2.8s ease-out both;
}
@keyframes story-gate-seam {
    0%   { opacity: 0; transform: scaleY(.1) scaleX(1); }
    18%  { opacity: 1; transform: scaleY(.7) scaleX(1); }
    60%  { opacity: 1; transform: scaleY(1) scaleX(2.4); }
    100% { opacity: .92; transform: scaleY(1) scaleX(9); }
}
@keyframes story-gate-halo {
    0%   { opacity: 0; transform: scale(.2); }
    55%  { opacity: .7; transform: scale(1.2); }
    100% { opacity: .55; transform: scale(2); }
}
@keyframes thunder-flash {
    0% { opacity: 0; }
    8% { opacity: 1; }
    16% { opacity: .15; }
    28% { opacity: .9; }
    40% { opacity: .1; }
    55% { opacity: .55; }
    100% { opacity: 0; }
}

/* ── 修炼三选一 ThreeSelectOnePanel ────────────────────────────────────────
   Mask          全屏，Image 無 sprite，黑 alpha 0.7058823
   img_Tile      371×44.078 @ anchoredPos (0, 318.539)  → left 774.5  top 199.42
   txt_Title     539×67.078，LegacyText 48、Alignment 4(置中)、白字
   CardsGroup    1053.236×572.392 @ (-11,-11) → left 422.382 top 264.804
                 HorizontalLayoutGroup / MiddleCenter / spacing 0 / ForceExpandWidth
                 三張 311 寬的卡在 1053.236 內平分 → 等同 justify-content: space-around
   btn_Abandon   240×80 @ (0,-330) → left 840 top 830，sprite 首页_按钮背景_默认态

   SkillCardsBtn 311×504，sprite 法术卡牌底板
     txt_SkillName  311×46.439  @ top 0        LegacyText 27 置中 白 + Outline
     img_LingGenIcon 54.714×57.945 @ left 6.14 top -6.15   灵根属性_{金木水火土}
     LingLiConsumptionBG 58×34 @ left 239.7 top 9.2        sprite 灵力消耗
       txt_Consumption  LegacyText 20 置中 #fefefe + Outline
     img_SkillIcon  90×90 @ left 110.5 top 82   icon/skill/{Icon}
       img_SkillBorder 同框                     icon/common/{Quality}_k
     txt_description 224.016×226.754 @ left 44.298 top 236.468
                     LegacyText 21 左上 #d9d9d9 + Outline
   prefab 裡還有一個 sprite 法术卡牌、alpha 0.16 的 Image，但 m_IsActive = False，
   原版沒有啟用，所以這裡不畫。
   所有 LegacyText 的 m_LineSpacing 都是 1.0 → CSS line-height: normal。 */
#three-select-overlay {
    position: absolute;
    inset: 0;
    z-index: 140;
}
#three-select-overlay.hidden { display: none; }
.tso-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .70588);
}
.tso-tile {
    position: absolute;
    left: 48.40625rem;
    top: 12.46375rem;
    width: 23.1875rem;
    height: 2.754875rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/标题底板.svg") center/100% 100% no-repeat;
}
.tso-title {
    position: absolute;
    left: 43.34375rem;
    top: 11.838875rem;
    width: 33.6875rem;
    height: 4.192375rem;
    /* 试玩 Round2 P2：12 字突破标题折出孤字「功\n法」——单行禁折，
       长标题由 .is-long 降字号（ui-manager setTsoTitle）。 */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 3rem/normal "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000,
        .0625rem -.0625rem 0 #000, -.0625rem .0625rem 0 #000;
}
.tso-title.is-long { font-size: 2.5rem; }
.tso-cards {
    position: absolute;
    left: 26.398875rem;
    top: 16.55025rem;
    width: 65.82725rem;
    height: 35.7745rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.tso-card {
    position: relative;
    flex: 0 0 19.4375rem;
    width: 19.4375rem;
    height: 31.5rem;
    padding: 0;
    border: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/法术卡牌底板.svg") center/100% 100% no-repeat;
    cursor: pointer;
    transition: transform .12s ease-out;
}
.tso-card:hover:not(:disabled),
.tso-card:focus-visible { transform: translateY(-.5rem); outline: none; }
.tso-card:disabled { cursor: default; filter: grayscale(.6) brightness(.75); }
.tso-name {
    position: absolute;
    left: 0;
    top: 0;
    width: 19.4375rem;
    height: 2.9024375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 1.6875rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000,
        .0625rem -.0625rem 0 #000, -.0625rem .0625rem 0 #000;
}
.tso-lg {
    position: absolute;
    left: .38375rem;
    top: -.384375rem;
    width: 3.419625rem;
    height: 3.6215625rem;
    object-fit: fill;
}
.tso-mana {
    position: absolute;
    left: 14.98125rem;
    top: .575rem;
    width: 3.625rem;
    height: 2.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/灵力消耗.svg") center/100% 100% no-repeat;
    color: #fefefe;
    font: 400 1.25rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000,
        .0625rem -.0625rem 0 #000, -.0625rem .0625rem 0 #000;
}
.tso-icon {
    position: absolute;
    left: 6.90625rem;
    top: 5.125rem;
    width: 5.625rem;
    height: 5.625rem;
}
.tso-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
/* AlchemyCardsBtn 的數量文字（tmptxt_numText，SetNumText：num == 1 不顯示）。
   這張卡的 prefab 還沒 dump，先照 BagSlotRoot 的數量字（TMP 20、白、靠右）
   貼在圖示框右下；量到設計值後再釘。 */
.tso-icon .tso-num {
    position: absolute;
    right: .125rem;
    bottom: .125rem;
    font: 500 1.25rem/1 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: #fff;
    text-shadow: 0 0 .1875rem #000;
}
.tso-desc {
    position: absolute;
    left: 2.768625rem;
    top: 14.77925rem;
    width: 14.001rem;
    height: 14.172125rem;
    overflow: hidden;
    color: #d9d9d9;
    font: 400 1.3125rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    text-shadow: .0625rem .0625rem 0 #000, -.0625rem -.0625rem 0 #000,
        .0625rem -.0625rem 0 #000, -.0625rem .0625rem 0 #000;
}
.tso-abandon {
    position: absolute;
    left: 52.5rem;
    top: 51.875rem;
    width: 15rem;
    height: 5rem;
    padding: 0;
    border: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_默认态.svg") center/100% 100% no-repeat;
    color: #dcdcdc;
    font: 400 2.25rem/normal "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    cursor: pointer;
}
.tso-abandon:hover, .tso-abandon:focus-visible { filter: brightness(1.15); outline: none; }

/* ── SettlementPanel 結算總覽 ──────────────────────────────────────────────
   root 是 stretch 滿畫布（1920×1080，中心 960,540）。
   所有區塊 sizeDelta 1500×h、anchoredPos.x = -170、pivot(0.5,0.5)
     → 中心 x = 960 - 170 = 790 → left 40（2.5rem）、寬 1500（93.75rem）

   區塊              anchoredPos.y   高      → CSS top
   Reincarnation        485          50        30      (1.875rem)
   Talent               373          74       130      (8.125rem)
   Event                216         126       261      (16.3125rem)
   Ending                24         128       452      (28.25rem)
   Property           -152.89     225.78      580      (36.25rem)
   Skill              -322.24        90       817.24   (51.0775rem)
   MagicWeapon        -434.92        90       929.92   (58.12rem)
   Reinstone   pivot(1,1) @ (850,467) 260×132 → left 1550 top 73
   btn_Close          (724.5,-444)  321×92    → left 1524 top 938

   文字（全 TMP、lineSpacing 0、Source Han Sans → line-height: normal）：
     Reincarnation 32 白    ReinstoneTitle 40 白    tmptxt_ReinstoneCount 30 白
     各區 Title 32 白       EventText 32.12         其餘 32
     天賦名 24 白           天賦說明 20 #393f55
   字串樣板照 SettlementEventController / SettlementEndingController。 */
#settlement-overlay {
    position: absolute;
    inset: 0;
    z-index: 150;
    color: #fff;
    /* SettlementPanel 沒有獨立 Mask 子節點，但根節點自己掛 Image，
       色值 (0,0,0,0.8)。原版只從 GameEndPanel 疊出來，所以底下透出的是
       結局畫面（全屏黑 + 結局圖），不是遊戲 HUD。
       先前這裡用不透明 #0b0d12 是誤判，已改回 prefab 值。 */
    background: rgba(0, 0, 0, .8);
    /* SettlementPanelController.FadeIn/FadeOut 預設 duration = 0.2f，DOTween 線性。 */
    opacity: 1;
    transition: opacity .2s linear;
}
#settlement-overlay.hidden { display: none; }
#settlement-overlay.st-fading { opacity: 0; }
/* ===== GameEndPanel 結局畫面（座標由 prefab 換算，1rem = 16 設計 px）=====
   Mask       stretch 全屏，Image color (0,0,0,1)
   img_EndImg AspectRatioFitter 置中
   CanvasGroup stretch 全屏，內含下面兩塊
   tmptxt_EndTxt anchor/pivot (0.5,0) pos (0,28.23) size 299.79×111.54 字級 48
                 → left 810.105 top 940.23
   ButtonGroup   anchor/pivot (1,0) pos (-75,50) size 321×511.77
                 → left 1524 top 518.23；VerticalLayoutGroup spacing 10、
                   childAlignment=LowerCenter（7）→ 三顆按鈕靠底排
   btn_*         321×92，sprite 设置_选项按钮，字級 50 白字 */
.ending-mask {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 1;
}
/* img_EndImg 掛 AspectRatioFitter，m_AspectMode = 4 = EnvelopeParent
   → 維持比例並完整覆蓋父層（超出的裁掉），等同 object-fit: cover。
   m_AspectRatio = 1.7785389，和 1920×1080 幾乎一致，實際就是鋪滿全屏。 */
.ending-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}
.ending-canvasgroup {
    position: absolute;
    inset: 0;
    opacity: 1;
}
/* GameEndPanelController.StartAnimationSequence。兩條來源交叉核對：
   C# 的 DOTween Sequence 與 GameEndPanel prefab 序列化欄位皆為 1s / 2s / 2s。
   animation-fill-mode: both 讓後兩段在 delay 期間維持 SetInitialOpacity 的 alpha=0。 */
@keyframes ending-mask-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ending-image-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ending-canvas-fade-in { from { opacity: 0; } to { opacity: 1; } }
#ending-screen.ending-entering .ending-mask {
    animation: ending-mask-fade-in 1s linear 0s both;
}
#ending-screen.ending-entering .ending-img {
    animation: ending-image-fade-in 2s linear 1s both;
}
#ending-screen.ending-entering .ending-canvasgroup {
    animation: ending-canvas-fade-in 2s linear 3s both;
    pointer-events: none;
}
/* R10 刀5 之一：结局屏亮着的时候，下层那套对白面一律不接点击。
   一世目实录——死亡结局出来后点原对白区，最后一句被无限重放，玩家当成卡死。
   ui-manager 的 switch("ending") 已经把它 hidden 掉了，这条是第二道保险：
   哪怕将来有别的路径把对白面留在那儿，也点不动。 */
#game-container:has(#ending-screen.active) #dialogue-box,
#game-container:has(#ending-screen.active) #dialogue-mask,
#game-container:has(#ending-screen.active) #choices-panel {
    pointer-events: none;
}
.ending-title {
    position: absolute;
    left: 50.631563rem;
    top: 58.764375rem;
    width: 18.736875rem;
    height: 6.97125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 3rem/normal "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    white-space: nowrap;
}
.ending-button-group {
    position: absolute;
    left: 95.25rem;
    top: 32.389375rem;
    width: 20.0625rem;
    height: 31.985625rem;
    display: flex;
    flex-direction: column;
    /* childAlignment = LowerCenter：內容靠下、水平居中 */
    justify-content: flex-end;
    align-items: center;
    gap: .625rem;
    /* GameEndPanelController.FadeIn/FadeOutButtonGroup 都是 0.2s，
       藏起來時連點擊一起停掉（原版是 CanvasGroup.interactable = false）。 */
    opacity: 1;
    transition: opacity .2s linear;
}
.ending-button-group.eg-hidden {
    opacity: 0;
    pointer-events: none;
}
.ending-btn {
    flex: 0 0 auto;
    width: 20.0625rem;
    height: 5.75rem;
    padding: 0;
    border: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/设置_选项按钮.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 400 3.125rem/normal "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    cursor: pointer;
}
.ending-btn:hover, .ending-btn:focus-visible { filter: brightness(1.15); outline: none; }
.ending-btn:disabled { pointer-events: none; }
/* btn_Playback 需要 GamePropertyPanel.PlayBackEnemyID，尚未移植；
   原版在 ID 為 -1 時只播 Invalid 音效、不做事，這裡照樣不可用。 */
.ending-btn.is-unavailable { cursor: not-allowed; filter: brightness(.6); }
.st-block,
.st-line,
.st-reinstone {
    position: absolute;
    left: 2.5rem;
    width: 93.75rem;
}
.st-line {
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 2rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-align: center;
}
.st-reincarnation { top: 1.875rem; }
.st-talent { top: 8.125rem; height: 4.625rem; }
.st-event { top: 16.3125rem; height: 7.875rem; }
.st-ending { top: 28.25rem; height: 8rem; }
.st-property { top: 36.25rem; height: 14.11125rem; }
.st-skill { top: 51.0775rem; height: 5.625rem; }
.st-weapon { top: 58.12rem; height: 5.625rem; }
/* 區塊內的 .st-line 改成相對區塊定位 */
.st-block .st-line { position: absolute; left: 0; top: 0; width: 93.75rem; }
.st-block .st-line-2 { top: 4.75rem; }
.st-ending .st-line-2 { top: 4.875rem; }
.st-title {
    position: absolute;
    left: 0;
    top: 0.99875rem;
    width: 92.565625rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
    /* 各區 Title 的盒是 1481.05 寬（幾乎整個面板），若置中就會壓在
       TalentRoot / SkillRoot 這些同樣居中的內容上。左對齊才不衝突，
       也跟 Property.Title 那個 270.7 窄盒的呈現一致。 */
    justify-content: flex-start;
    font: 400 2rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* Property.Title 270.7×50 @ 局部 (0.01, 104) */
.st-title-prop { top: 6.5rem; width: 16.919rem; }
.st-title-row { top: 1.235rem; }
/* TalentRoot 766.15×73.8 @ 局部 left 380.025 top 0.1；Talent 233×82 × 0.9 = 209.7×73.8 */
.st-talent-root {
    position: absolute;
    left: 23.7515625rem;
    top: .00625rem;
    width: 47.884375rem;
    height: 4.6125rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.45625rem;
    padding-left: .728125rem;
    box-sizing: border-box;
}
.st-talent-item {
    position: relative;
    flex: 0 0 13.10625rem;
    width: 13.10625rem;
    height: 4.6125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    outline: none;
}
.st-talent-name {
    width: 100%;
    text-align: center;
    font: 400 1.5rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* img_TipBG：266 寬、父節點 scale .9 → 239.4；anchoredPos.y=110 → 視覺中心 y=-62.1。
   ContentSizeFitter + VerticalLayout padding 20/20/13/13 同樣乘 .9。 */
.st-talent-tip {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: -3.88125rem;
    width: 14.9625rem;
    min-height: 2.925rem;
    padding: .73125rem 1.125rem;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: #393f55;
    font: 400 1.125rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: pre-wrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s linear, visibility 0s linear .2s;
}
.st-talent-item:hover .st-talent-tip,
.st-talent-item:focus-visible .st-talent-tip {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
/* 灵根属性 511.01×75 scale 1.1 → 562.111×82.5 @ 局部 left 395.14 top 11.3 */
.st-linggen {
    position: absolute;
    left: 24.696rem;
    top: .70625rem;
    width: 35.1319375rem;
    height: 5.15625rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.st-lg { display: flex; flex-direction: column; align-items: center; }
.st-lg img { width: 2.9219rem; height: 2.9563rem; object-fit: fill; }
.st-lg b { font: 400 1.25rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif; }
/* 基础属性 994.28×111.22 @ 局部 left 397.77 top 111.63 */
.st-stats {
    position: absolute;
    left: 24.8606rem;
    top: 6.9769rem;
    width: 62.1425rem;
    height: 6.95125rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-content: center;
    gap: .25rem 1rem;
    font: 400 1.375rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
.st-stats span { white-space: nowrap; }
.st-stats b { color: #ffe7a8; }
/* SkillRoot 1059.34×90 @ 局部 left 390.03；10 格 88×90、spacing 20。 */
.st-slot-row {
    position: absolute;
    left: 24.376875rem;
    top: 0;
    width: 66.20875rem;
    height: 5.625rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.st-slot {
    position: relative;
    flex: 0 0 5.5rem;
    width: 5.5rem;
    height: 5.625rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/主界面_物品格_背景黑.svg") center/100% 100% no-repeat;
}
.st-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
/* R3 未修 #5：无法宝时整行空白像漏渲染——占位一句，弱化色不抢终值属性 */
.st-slot-empty {
    align-self: center;
    color: rgba(214, 199, 168, 0.55);
    font: 400 1.125rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.08em;
}
.st-slot-quality-bg { z-index: 1; }
.st-slot-icon { z-index: 2; }
.st-slot-border { z-index: 3; }
.st-slot-order {
    position: absolute;
    z-index: 4;
    left: .15625rem;
    top: .2375rem;
    width: 1.75rem;
    height: 1.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/顺序编号2.svg") center/100% 100% no-repeat;
    color: #fff;
    font: 400 .875rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* btn_Left / btn_Right：107×88，scale(±.5,.5)，所以視覺盒 53.5×44。 */
.st-page-button {
    position: absolute;
    z-index: 2;
    top: 1.2925rem;
    width: 3.34375rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_关闭按钮.svg") center/100% 100% no-repeat;
    cursor: pointer;
}
.st-page-button.prev { left: 19.9984375rem; }
.st-page-button.next { left: 91.6203125rem; transform: scaleX(-1); }
.st-page-button:hover, .st-page-button:focus-visible { filter: brightness(1.15); outline: none; }
/* Reinstone 260×132 @ left 1550 top 73 */
.st-reinstone { left: 96.875rem; top: 4.5625rem; width: 16.25rem; height: 8.25rem; }
.st-reinstone-title {
    position: absolute;
    left: 0;
    top: 0;
    width: 16.25rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 2.5rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* Icon 46×52 scale 1.1 → 50.6×57.2，中心 @ 局部 (55.497, 103.66) */
.st-reinstone-icon {
    position: absolute;
    left: 1.90613rem;
    top: 4.6913rem;
    width: 3.1625rem;
    height: 3.575rem;
    object-fit: fill;
}
/* tmptxt_ReinstoneCount 157.81×47.5 @ anchor(0,1) pos(181.101,-103.65) */
.st-reinstone-count {
    position: absolute;
    left: 6.38763rem;
    top: 4.99375rem;
    width: 9.863125rem;
    height: 2.96875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 1.875rem/normal "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
/* btn_Close 321×92 @ left 1524 top 938 */
.st-close {
    position: absolute;
    left: 95.25rem;
    top: 58.625rem;
    width: 20.0625rem;
    height: 5.75rem;
    padding: 0;
    border: 0;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/首页_按钮背景_默认态.svg") center/100% 100% no-repeat;
    color: #dcdcdc;
    font: 400 2.25rem/normal "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    cursor: pointer;
}
.st-close:hover, .st-close:focus-visible { filter: brightness(1.15); outline: none; }

/* ============================================================================
   EnemyDetailPanel（对手详情）
   來源：GameModule.EnemyDetail\*.cs + ui bundle 的 EnemyDetailPanel prefab。
   每一層的 left/top/width/height 都由該層自己的 anchor / pivot / anchoredPosition /
   sizeDelta 換算（1rem = 16 設計 px），不是憑眼睛湊的。
   prefab 上的 localScale 一律用 transform: scale() 保留，因為 Unity 的縮放繞 pivot
   進行、不改變 rect 本身，跟直接把寬高乘進去不等價（子節點座標會偏）。
   ========================================================================== */
/* 面板標題與各組標籤用 江西拙楷2.0。字體檔本來就在 assets/v2/font，但從沒宣告過。
   TMP 行距 = faceInfo.lineHeight / pointSize = 117.81 / 90 = 1.309em（交接檔 §5.2）。 */
@font-face {
    font-family: "JiangXiZhuoKai";
    src: url("../assets/v2/font/江西拙楷2.0.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
/* 根節點自己掛 Image、色值 (0,0,0,0.5)；沒有獨立 Mask 子節點。 */
#enemy-detail-overlay {
    position: absolute;
    inset: 0;
    z-index: 145;
    background: rgba(0, 0, 0, .5);
}
#enemy-detail-overlay.hidden { display: none; }
/* prefab 的每個節點都是絕對定位的 rect，唯一例外是 FaShuGroup 底下那五格 ——
   它們由 HorizontalLayoutGroup 排，對應 CSS flex，絕對定位會讓五格疊在一起。
   這條選擇器的權重是 (1,0,0)，壓得過 .edp-slot { position: relative }，
   所以例外必須寫進選擇器本身，不能指望後面的規則覆蓋（交接檔 §10.6）。 */
#enemy-detail-overlay *:not(.edp-slot) { position: absolute; }
/* BG 1310×880、anchoredPos (10,-6)、scale 1.1。縮放繞中心，中心維持在 (970, 546)。 */
.edp-bg {
    left: 19.6875rem;
    top: 6.625rem;
    width: 81.875rem;
    height: 55rem;
    transform: scale(1.1);
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/命定天赋_背景.svg") center/100% 100% no-repeat;
}
.edp-title {
    left: 17rem;
    top: -1.10625rem;
    width: 31.25rem;
    height: 12.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 5.9375rem/1.309 "JiangXiZhuoKai", "STKaiti", "KaiTi", serif;
    white-space: nowrap;
}
.edp-exit {
    left: 66.79375rem;
    top: 2.63125rem;
    width: 6.625rem;
    height: 6.375rem;
    transform: scale(.95);
    border: 0;
    padding: 0;
    appearance: none;
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/命定天赋_退出按钮.svg") center/100% 100% no-repeat;
    cursor: pointer;
}
.edp-exit:hover, .edp-exit:focus-visible { filter: brightness(1.15); outline: none; }
/* 五組標籤共用 sprite talentbg1，Image 顏色 (0.8,0.8,0.8) → brightness(.8)。 */
.edp-cap {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 400 1.375rem/1.309 "JiangXiZhuoKai", "STKaiti", "KaiTi", serif;
    white-space: nowrap;
}
.edp-cap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/v2/sprite/talentbg1.png") center/100% 100% no-repeat;
    filter: brightness(.8);
    z-index: -1;
}

/* ---- LingGen 275.33×197.156 ---- */
.edp-linggen { left: 47.010625rem; top: 9.3425rem; width: 17.208125rem; height: 12.32225rem; }
.edp-linggen > .edp-cap { left: 0; top: 0; width: 6.0625rem; height: 1.6875rem; }
/* LingGenAttribute 330×312、scale 0.5。五個底板刻意超出這個框，原版就是這樣排的。 */
.edp-star {
    left: 1.739375rem;
    top: -2.30275rem;
    width: 20.625rem;
    height: 19.5rem;
    transform: scale(.5);
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/伴生天赋_五芒图背景.svg") center/100% 100% no-repeat;
}
/* UIPolygon：sides 5、rotation 54、m_Color rgba(92,101,130,.706)。
   半徑只吃 size = min(w,h) = 322.02，但框是 322.02×334.39，所以 viewBox 用正方形
   再 preserveAspectRatio="none" 拉開 —— 這才跟 Unity 的行為一致。
   FillPolygon 0.6s、t = (elapsed/0.6)^5，用 JS 逐幀寫 points（CSS 沒有等價曲線）。 */
.edp-star-poly { left: 0.061875rem; top: 0.249063rem; width: 20.12625rem; height: 20.899375rem; }
.edp-star-poly > polygon { fill: rgba(92, 101, 130, .705882); }
.edp-lg-fire, .edp-lg-water, .edp-lg-wood, .edp-lg-earth, .edp-lg-gold {
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.edp-lg-fire  { left: 18.4375rem;  top: 4.375rem;   width: 5.3125rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/灵根属性_火.svg"); }
.edp-lg-water { left: -3.8125rem;  top: 4.375rem;   width: 5.3125rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/灵根属性_水.svg"); }
.edp-lg-wood  { left: 7.84375rem;  top: -4.75rem;   width: 5.1875rem; height: 5.3125rem; background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/灵根属性_木.svg"); }
.edp-lg-earth { left: 14.3125rem;  top: 17.5rem;    width: 5.1875rem; height: 5.375rem;  background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/灵根属性_土.svg"); }
.edp-lg-gold  { left: 0.6875rem;   top: 17.5625rem; width: 5.1875rem; height: 5.3125rem; background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/灵根属性_金.svg"); }
.edp-lg-num {
    width: 3.8125rem;
    height: 1.75rem;
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/伴生天赋_灵根属性显示背景.svg") center/100% 100% no-repeat;
}
.edp-lg-fire  > .edp-lg-num { left: 0.975rem;  top: 4.675rem; }
.edp-lg-water > .edp-lg-num { left: 0.75rem;   top: 4.725rem; }
.edp-lg-wood  > .edp-lg-num { left: 0.6875rem; top: 4.725rem; }
.edp-lg-earth > .edp-lg-num { left: 0.6875rem; top: 4.575rem; }
.edp-lg-gold  > .edp-lg-num { left: 0.6875rem; top: 4.51875rem; }
/* tmptxt_* 是 TxtBk 的 stretch 子節點，字級 26、置中。 */
.edp-lg-num > b {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 500 1.625rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

/* ---- Property 230.78×94.19 ---- */
.edp-property { left: 51.244375rem; top: 25.719063rem; width: 14.42375rem; height: 5.886875rem; }
.edp-property > .edp-cap { left: -4.23375rem; top: -2.212813rem; width: 6.0625rem; height: 1.6875rem; }
/* 每個 Property 盒掛 RectMask2D，裡面的底板 Image 是 324 寬 → 被裁成 110.58。 */
.edp-stat {
    width: 6.91125rem;
    height: 2.736875rem;
    overflow: hidden;
}
/* prefab 子節點順序 Property / (1) / (2) / (3)，四個 anchoredPosition 各自不同。
   這裡刻意用明確的 s1~s4，不用 :nth-of-type —— .edp-cap 也是 div，會佔掉
   nth-of-type(1)，害四格整體位移一格、最後一格還沒規則可套。 */
.edp-stat.s1 { left: 0.0125rem;  top: 0; }             /* Property     攻击 / 速度 */
.edp-stat.s2 { left: 7.5125rem;  top: 0; }             /* Property (1) 暴击 / 爆伤 */
.edp-stat.s3 { left: 0;          top: 3.15rem; }       /* Property (2) 命中 / 闪避 */
.edp-stat.s4 { left: 7.48125rem; top: 3.15rem; }       /* Property (3) 增伤 / 减伤 */
.edp-stat-plate {
    left: -6.669375rem;
    top: -0.006563rem;
    width: 20.25rem;
    height: 2.75rem;
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/主界面_属性_数值底板.svg") center/100% 100% no-repeat;
}
.edp-stat > span, .edp-stat > b {
    height: 1.368437rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 500 1rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
}
.edp-stat > .edp-k1 { left: 0.018125rem;  top: 0;           width: 4.375rem; }
.edp-stat > .edp-k2 { left: 0.018125rem;  top: 1.246719rem; width: 4.375rem; }
.edp-stat > .edp-v1 { left: 3.455625rem;  top: 0;           width: 3.455625rem; }
.edp-stat > .edp-v2 { left: 3.455625rem;  top: 1.246719rem; width: 3.455625rem; }

/* ---- FaShu / FaBao 366.853×87.743 ---- */
.edp-group { width: 22.928313rem; height: 5.483937rem; }
.edp-group.is-fashu { left: 47.009219rem; top: 32.437094rem; }
.edp-group.is-fabao { left: 47.009219rem; top: 39.020531rem; }
.edp-group > .edp-cap { left: 0.001406rem; top: 0.000406rem; width: 6.0625rem; height: 1.6875rem; }
.edp-group.is-fabao > .edp-cap { left: -0.298344rem; top: -0.408031rem; }
/* btn_Left 的 localScale.x 是負的：同一張 sprite 鏡像成左箭頭。 */
.edp-page-l, .edp-page-r {
    top: 2.554469rem;
    width: 2.625rem;
    height: 2.5rem;
    border: 0;
    padding: 0;
    appearance: none;
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/新手引导_翻页按钮.svg") center/100% 100% no-repeat;
    cursor: pointer;
}
.edp-page-l { left: -0.785844rem; transform: scale(-.5, .5); }
.edp-page-r { left: 21.089156rem; transform: scale(.5); }
.edp-page-l:hover, .edp-page-r:hover,
.edp-page-l:focus-visible, .edp-page-r:focus-visible { filter: brightness(1.15); outline: none; }
/* 到頭時原版照樣畫按鈕、點下去只播 Invalid 音效，所以這裡不 disable，只調暗當提示。 */
.edp-page-l.is-end, .edp-page-r.is-end { filter: brightness(.55); }
/* FaShuGroup：HorizontalLayoutGroup spacing 14、childAlignment MiddleLeft(3)、
   ForceExpand / ChildControl 全關 → 五格從 rect 左緣往右排、超出 rect 也不收縮。
   rect 只有 88×90，整排靠 scale 0.636 縮到剛好落在兩顆翻頁鍵之間。 */
.edp-slots {
    left: 0.485156rem;
    top: 0.881656rem;
    width: 5.5rem;
    height: 5.625rem;
    transform: scale(.636);
    display: flex;
    align-items: center;
    gap: .875rem;
}
.edp-slot {
    position: relative;
    flex: 0 0 auto;
    width: 5.5rem;
    height: 5.625rem;
    background: url("../assets/yuanwen-ui/surfaces/v2/common/bg-h.svg") center/100% 100% no-repeat;
}
/* 四層同框：bg-h（SlotItem 自己）→ BorderBG 品質底 → Icon → Border 品質框。
   RefreshCurrentSkills 在有資料時**不呼叫 SetBorderBG**（法寶與釋放隊列才呼叫），
   所以法术格沒有品質底 —— 這是原版的不一致，照抄。 */
.edp-slot > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.edp-slot > .lay-bg { z-index: 1; }
.edp-slot > .lay-icon { z-index: 2; }
.edp-slot > .lay-border { z-index: 3; }
/* Tips 掛自己的 Canvas（override sorting）；CanvasGroup 初始 alpha 0、blocksRaycasts false。
   EnemySlotTips.FadeIn / FadeOut 都是 0.2 秒。 */
.edp-tip {
    left: 6.65625rem;
    top: -3.125rem;
    width: 20.3125rem;
    height: 11.875rem;
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s linear;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.edp-tip.is-on { opacity: 1; }
.edp-tip-fabao { left: 0.522125rem; top: -0.542625rem; width: 19.47625rem; height: 6.651875rem; }
.edp-tip-fashu { left: -0.080875rem; top: -1.601438rem; width: 21.055875rem; height: 8.704375rem; }
.edp-tip-name {
    display: flex;
    align-items: center;
    color: #fff;
    font: 500 1.375rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
}
.edp-tip-desc {
    color: #394255;
    font: 500 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
}
.edp-tip-fabao > .edp-tip-name { left: 0; top: 0.542656rem; width: 19.47625rem; height: 2.572312rem; }
.edp-tip-fabao > .edp-tip-desc { left: 0.519375rem; top: 3.325938rem; width: 18.437625rem; height: 6.651875rem; }
.edp-tip-fashu > .edp-tip-name { left: 3.276406rem; top: 1.898469rem; width: 16.345188rem; height: 2.453688rem; }
.edp-tip-fashu > .edp-tip-desc { left: 1.193406rem; top: 4.352188rem; width: 18.494813rem; height: 8.704375rem; }
.edp-tip-fashu > .edp-tip-el { left: 1.049625rem; top: 1.995187rem; width: 3.498813rem; height: 3.498813rem; transform: scale(.6); }
/* prefab 裡 Fashu 區塊還有 img_FashuCost（灵力消耗底圖 + tmptxt_FashuCost「123」），
   但它 IsActive = False，EnemySlotTips 連對應欄位都沒有、SetFaShuTipInfo 也沒設它
   —— 原版從來不顯示這個徽章，所以這裡連規則都不留。 */

/* ---- Role 468.61×507.2 ---- */
.edp-role { left: 14.1125rem; top: 14.125rem; width: 29.288125rem; height: 31.7rem; }
.edp-avatar { left: -5.711875rem; top: -8.75rem; width: 43.75rem; height: 43.75rem; transform: scale(.6); }
/* RoleName 的 localScale.y 是 -1.1（背景圖上下翻轉），
   兩個子節點各自再乘一次負 scale 把自己翻回來 —— 原版的做法，照抄。 */
.edp-rolename {
    left: 0.6375rem;
    top: -2.0875rem;
    width: 12.75rem;
    height: 4.375rem;
    transform: scale(1.1, -1.1);
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/首页_气运背景.svg") center/100% 100% no-repeat;
}
.edp-rolename > .edp-rolename-txt {
    left: 4.1875rem;
    top: 1.25rem;
    width: 6.25rem;
    height: 3.125rem;
    transform: scale(.909, -.909);
    display: flex;
    align-items: center;
    color: #fff;
    font: 400 1.875rem/1.309 "JiangXiZhuoKai", "STKaiti", "KaiTi", serif;
    white-space: nowrap;
}
.edp-rolename > .edp-realm {
    left: 0.875rem;
    top: 1.75rem;
    width: 3.5rem;
    height: 1.75rem;
    transform: scale(.773, -.773);
}
.edp-head {
    left: 6.525rem;
    top: 25.0625rem;
    width: 7.5rem;
    height: 7.375rem;
    transform: scale(.8);
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/主界面_属性_头像框.svg") center/100% 100% no-repeat;
}
/* Image 掛 Mask、sprite Circle、alpha 0.0118（幾乎全透明，只當遮罩用）。 */
.edp-head-mask {
    left: 0.625rem;
    top: 0.5625rem;
    width: 6.25rem;
    height: 6.25rem;
    overflow: hidden;
    border-radius: 50%;
}
.edp-head-mask > img { left: -0.625rem; top: -0.5625rem; width: 7.5rem; height: 7.375rem; transform: scale(.85); }
/* 兩條 Slider 的 m_Value 都是 1、m_HandleRect 是 0（沒有 Handle）、m_Interactable = 0，
   而 EnemyRoleController 只設文字、從不動 value → 條永遠是滿的。
   tmptxt_Health / tmptxt_Magic 是 slider 的 stretch 子節點，疊印在條上（同 §5.8 的做法）。 */
.edp-bar {
    left: 11.5125rem;
    width: 14.375rem;
    height: 1.409375rem;
    transform: scale(.85);
    overflow: hidden;
    background: url("../assets/yuanwen-ui/surfaces/v2/ui/主界面_属性_数据条底框.svg") center/100% 100% no-repeat;
}
.edp-bar.is-hp { top: 27.320312rem; }
.edp-bar.is-mp { top: 28.757812rem; }
.edp-bar > .fill {
    inset: .125rem;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
.edp-bar.is-hp > .fill { background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/主界面_属性_数据条绿.svg"); }
.edp-bar.is-mp > .fill { background-image: url("../assets/yuanwen-ui/surfaces/v2/ui/主界面_属性_数据条蓝.svg"); }
.edp-bar > b {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 500 1.25rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    text-shadow: 0 .0625rem .125rem #000, 0 0 .1875rem #000;
    white-space: nowrap;
    z-index: 2;
}

/* ---- 事件卡右下角的「右键 详情」提示（GameEventBtn/detalDiv）----
   detalDiv 本身沒有 Image，只有 RightKeyImage(右键点击) + detailTxt「详情」16px 黑字。
   GameEventBtnController.OnPointerEnter 才 SetActive(IsBattleOrMatch)，移出時關掉。 */
.card-detail-hint {
    position: absolute;
    left: 13.124437rem;
    top: 26.971688rem;
    width: 5.625563rem;
    height: 4.278313rem;
    display: none;
    pointer-events: none;
}
.event-card.is-hover > .card-detail-hint { display: block; }
.card-detail-hint > img {
    position: absolute;
    left: 0.738344rem;
    top: 0.767469rem;
    width: 1.975313rem;
    height: 2.746688rem;
}
.card-detail-hint > span {
    position: absolute;
    left: 2.713687rem;
    top: 1.602375rem;
    width: 2.18625rem;
    height: 1.276875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font: 500 1rem/1.448 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    white-space: nowrap;
}

/* ============================================================================
   AchievePanel 结局成就 + GalleryPanel + GuidePanel 信息引导
   來源：Atlpile\AchievePanelController/Entity、GalleryPanelController/Entity、
   GuidePanelController/Entity。prefab 幾何沒 dump（本環境沒有 ui bundle），
   版面按 结局成就_示例图 / 信息引导效果图 兩張 mockup 對位，
   sprite 全用原檔自然尺寸（px ÷ 16 = rem）。
   ========================================================================== */
#achieve-overlay {
    position: absolute; inset: 0; z-index: 70;
    background: rgba(0, 0, 0, .65);
}
#achieve-overlay.hidden { display: none !important; }
/* 背景底板 1310×880 居中（卷轴含左右轴杆）。 */
.achieve-panel {
    position: absolute; left: 50%; top: 50%;
    width: 81.875rem; height: 55rem;
    transform: translate(-50%, -50%);
    background: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_背景底板.svg") center/100% 100% no-repeat;
}
/* 标题 521×155，压在卷轴上缘外（示例图：标题底缘咬住面板顶）。 */
.achieve-title {
    position: absolute; left: 50%; top: -4.6875rem;
    width: 32.5625rem; height: 9.6875rem;
    transform: translateX(-50%);
    pointer-events: none;
}
/* 关闭按钮 107×88，骑在卷轴纸面右上角（示例图 y≈165-234 画布px）。 */
.achieve-close {
    position: absolute; right: 1.25rem; top: 3.5rem;
    width: 6.6875rem; height: 5.5rem;
    border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_关闭按钮.svg") center/contain no-repeat;
}
/* 2×2 结局格，格子用 成就背景底板 402×266 自然尺寸。 */
.achieve-grid {
    position: absolute; left: 50%; top: 9.5rem;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(2, 25.125rem);
    gap: 1.25rem 2rem;
}
.achieve-item {
    position: relative;
    width: 25.125rem; height: 16.625rem;
    border: 0; padding: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_成就背景底板.svg") center/100% 100% no-repeat;
}
.achieve-item.locked { cursor: default; }
/* 底板内部：截图区约 (8,8)-(394,212)，下方蓝条是名字带（量自 402×266 原图）。 */
.achieve-shot {
    position: absolute; left: 2%; top: 3%;
    width: 96%; height: 76.7%;
    display: block; overflow: hidden;
}
.achieve-shot > img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* img_Lock：背景锁 294×157 整块盖住截图区（不透光，自然遮剧透）。 */
.achieve-lock {
    position: absolute; left: 0; top: 0;
    width: 100% !important; height: 100% !important;
}
.achieve-lock-note {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #c9c1ad; font-size: 1rem; letter-spacing: .08em;
    pointer-events: none;
}
.achieve-name {
    position: absolute; left: 2%; bottom: 0;
    width: 96%; height: 20.3%;
    display: flex; align-items: center; justify-content: center;
    color: #e8eef8; font-size: 1.375rem;
}
/* 翻页箭头 42×40（新手引导_翻页按钮），prev 镜像。 */
.achieve-arrow {
    position: absolute; top: 50%;
    width: 2.625rem; height: 2.5rem;
    border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/新手引导_翻页按钮.svg") center/contain no-repeat;
}
.achieve-arrow.prev { left: 6.5rem; transform: translateY(-50%) scaleX(-1); }
.achieve-arrow.next { right: 6.5rem; transform: translateY(-50%); }
/* 页点 23×23：选中/未选中两张 sprite（CreatePage / SetNext(Prev)Page 的换图），
   落在卷轴白纸内、格子下方（示例图 y≈763-786 画布px）。 */
.achieve-dots {
    position: absolute; left: 50%; bottom: 10.5rem;
    transform: translateX(-50%);
    display: flex; gap: 1.5rem;
}
.page-dot {
    width: 1.4375rem; height: 1.4375rem;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_页未选中态.svg") center/contain no-repeat;
}
.page-dot.on { background-image: url("../assets/yuanwen-ui/surfaces/images/ui/结局成就_页选中态.svg"); }

/* ── GalleryPanel：满屏 img_BG + 标题 + btn_Exit ────────────────────────── */
#gallery-overlay {
    position: absolute; inset: 0; z-index: 75;
    background: #000;
}
#gallery-overlay.hidden { display: none !important; }
#gallery-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
}
#gallery-title {
    position: absolute; left: 50%; top: 3.5rem;
    transform: translateX(-50%);
    color: #fff; font-size: 2.5rem; font-weight: 700; letter-spacing: .3em;
    text-shadow: 0 0 .5rem #000, 0 .125rem .375rem #000;
    pointer-events: none;
}
.gallery-exit { right: 2.5rem; top: 2rem; }

/* ── GuidePanel 信息引导：背景 1565×863，左浅区示例、右深区注解 ─────────── */
#guide-overlay {
    position: absolute; inset: 0; z-index: 70;
    background: rgba(0, 0, 0, .45);
}
#guide-overlay.hidden { display: none !important; }
.guide-panel {
    position: absolute; left: 50%; top: 50%;
    width: 97.8125rem; height: 53.9375rem;
    transform: translate(-50%, -50%);
    background: url("../assets/yuanwen-ui/surfaces/images/ui/新手引导_背景.svg") center/100% 100% no-repeat;
}
/* 标题手写体白字在左上（效果图 x≈272 y≈90 画布px）。 */
.guide-title {
    position: absolute; left: 5.9rem; top: -1.2rem;
    color: #fff; font-size: 2.5rem; font-weight: 700; letter-spacing: .12em;
    text-shadow: 0 .125rem .375rem #000;
    pointer-events: none;
}
.guide-close { right: 1.1rem; top: 0; }
.guide-arrow {
    position: absolute; top: 50%;
    width: 2.625rem; height: 2.5rem;
    border: 0; cursor: pointer;
    background: url("../assets/yuanwen-ui/surfaces/images/ui/新手引导_翻页按钮.svg") center/contain no-repeat;
}
.guide-arrow.prev { left: -2rem; transform: translateY(-50%) scaleX(-1); }
.guide-arrow.next { right: -2.5rem; transform: translateY(-50%); }
/* 左浅区：本页主题示例（效果图左列是 HUD 元件截图，网页用代表性 sprite）。 */
.guide-sample {
    position: absolute; left: 4rem; top: 8rem;
    width: 33rem; height: 38rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.2rem;
}
.guide-sample img { max-width: 60%; max-height: 40%; object-fit: contain; }
.guide-sample b { color: #2b3346; font-size: 2rem; letter-spacing: .1em; }
/* 右深区：注解行（效果图右侧「图标＋说明」列表）。 */
.guide-notes {
    position: absolute; left: 40.5rem; top: 4.5rem;
    width: 48rem; height: 42.5rem;
    padding: 1.5rem 1.8rem; overflow: auto;
}
.guide-note {
    display: flex; align-items: baseline; gap: 1rem;
    margin-bottom: 1.6rem;
}
.guide-note b {
    flex: 0 0 auto; min-width: 6.5rem;
    padding: .25rem .8rem; text-align: center;
    background: #1c2230; color: #fff;
    font-size: 1.375rem;
}
.guide-note span { color: #dfe6f2; font-size: 1.375rem; line-height: 1.5; }
/* 效果图页点 y≈924 画布px，落在纸面内、笔刷边框上方。 */
.guide-dots { bottom: 2.2rem; }

/* ============================================================================
   呈现层：大年题卡（YearDrama，js/rules/year-drama.js）+ 降级墨条横幅。
   题卡盖过常规 UI（93），在 FadePanel（95）与拖拽幽灵（200）之下；
   :not(.on) 不吃指针，淡出期间年卡入场在底下照常跑。
   ========================================================================== */
#year-drama {
    position: absolute; inset: 0;
    z-index: 93;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(24, 20, 14, 0) 0%, rgba(8, 6, 4, .55) 62%, rgba(0, 0, 0, .92) 100%),
        rgba(10, 8, 6, .93);
    opacity: 0;
    transition: opacity .55s ease;
    cursor: pointer;
}
#year-drama.hidden { display: none !important; }
#year-drama.on { opacity: 1; }
#year-drama:not(.on) { pointer-events: none; }
.yd-box { text-align: center; transform: translateY(-4%); }
.yd-era {
    font: 400 1.6rem/1.6 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: rgba(232, 226, 210, .72);
    letter-spacing: .5rem;
    text-indent: .5rem;
}
.yd-title {
    margin-top: .8rem;
    font: 400 7.5rem/1.2 "PangMenZhengDao", "STKaiti", "KaiTi", serif;
    color: var(--yd-accent, #e8e2d2);
    letter-spacing: 1.4rem;
    text-indent: 1.4rem;
    text-shadow: 0 0 2.2rem rgba(0, 0, 0, .9);
}
.yd-stroke {
    display: block; width: 26rem; height: .22rem; margin: 1.6rem auto 0;
    background: linear-gradient(90deg, transparent, var(--yd-accent, #e8e2d2), transparent);
    opacity: .55;
}
.yd-sub {
    margin: 1.9rem auto 0; max-width: 46rem;
    font: 400 1.7rem/1.9 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: rgba(236, 230, 214, .88);
    letter-spacing: .18rem;
}
.yd-hint {
    margin-top: 3rem;
    font: 400 1.1rem/1.4 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    color: rgba(220, 214, 198, .4);
    letter-spacing: .3rem;
    text-indent: .3rem;
    animation: yd-hint-pulse 1.8s ease-in-out infinite;
}
@keyframes yd-hint-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
/* 题卡内元素依次浮现（纪年→题名→笔锋→旁白）。 */
#year-drama.on .yd-era { animation: yd-rise .8s ease .1s both; }
#year-drama.on .yd-title { animation: yd-rise .9s ease .3s both; }
#year-drama.on .yd-stroke { animation: yd-grow .8s ease .7s both; }
#year-drama.on .yd-sub { animation: yd-rise .9s ease .95s both; }
@keyframes yd-rise { from { opacity: 0; transform: translateY(1.4rem); } to { opacity: 1; transform: none; } }
@keyframes yd-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 降级墨条横幅（音画关、旁白开）：顶部浮现，不锁输入。
   纯信息展示——不关指针的话挂着的 5.4s 里横幅区域会吃顶部点击
   （z≥20 指针审计第六案，静态审计见 tests/pointer-audit.js）。 */
#year-aside {
    position: absolute; left: 50%; top: 8%;
    transform: translate(-50%, -.8rem);
    pointer-events: none;
    z-index: 40;
    max-width: 60rem;
    padding: .55rem 1.6rem;
    background: rgba(16, 12, 8, .88);
    border: .0625rem solid rgba(176, 141, 79, .8);
    color: #efe6cd;
    font: 400 1.25rem/1.7 "Source Han Sans SC", "Microsoft YaHei", sans-serif;
    letter-spacing: .12rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease, transform .6s ease;
}
#year-aside.on { opacity: 1; transform: translate(-50%, 0); }

/* 设置面板呈现层开关：底图纵向只装得下三行，这两行排右侧第二列。
   坐标账（相对 .set-bg）：列起点 5.01+38≈43rem，span 右缘 43+2.37+21≈66.4rem，
   离按钮列（72.24rem）留 ~6rem，热区不相压。 */
.set-tog.set-tog-p { left: 38rem; width: 24rem; }
.set-tog.set-tog-p:nth-child(4) { top: 0; }
.set-tog.set-tog-p:nth-child(5) { top: 3.375rem; }
.set-tog.set-tog-p > span { width: 21rem; }
