/* —— 顶栏 · 头像/名讳/战斗力 | 境界与灵气占比 | 灵石/仙玉 —— */
#topBar.top-bar-hud {
    position: absolute; top: 0; left: 0; right: 0; z-index: 20;
    box-sizing: border-box;
    min-height: var(--top-bar-total);
    padding: calc(4px + env(safe-area-inset-top, 0px)) 6px 5px 8px;
    display: flex; flex-direction: row; align-items: center; gap: 0;
    background: linear-gradient(180deg, rgba(14, 16, 22, 0.94) 0%, rgba(6, 8, 12, 0.9) 55%, rgba(4, 5, 8, 0.92) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#topBar.top-bar-hud::before {
    content: ""; position: absolute; inset: 0; opacity: 0.07; pointer-events: none;
    background-image: repeating-linear-gradient(90deg, transparent, transparent 6px, rgba(255,255,255,0.04) 6px, rgba(255,255,255,0.04) 7px);
}
.tb-sect { position: relative; z-index: 1; display: flex; flex-direction: row; align-items: center; gap: 6px; flex-shrink: 0; }
/* 左侧大块：玩家区与境界区按固定 fr 比例分栏，中间竖线分隔（非动态伸缩占比） */
.tb-sect.tb-hero-block {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 4px 0 0;
    display: grid;
    grid-template-columns: minmax(0, 11fr) 1px minmax(0, 9fr);
    column-gap: 6px;
    align-items: center;
}
.tb-sect.tb-hero-block .tb-player-id {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
.tb-realm-adj {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
#topBar .tb-rule--hero-mid {
    width: 1px;
    min-height: 36px;
    align-self: stretch;
    margin: 0;
    justify-self: stretch;
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.35), transparent);
    flex-shrink: 0;
}
/* 货币：固定宽度栅格，图标列与数字列左对齐，灵石/仙玉各行末各一枚加号 */
#topBar .tb-sect.tb-wallet.tb-wallet-grid {
    flex: 0 0 94px;
    width: 94px;
    min-width: 94px;
    max-width: 94px;
    display: grid;
    box-sizing: border-box;
    grid-template-columns: 18px minmax(0, 1fr) 19px;
    grid-template-rows: auto auto;
    column-gap: 6px;
    row-gap: 4px;
    align-items: center;
    justify-items: start;
    margin-left: 2px;
}
#topBar .tb-wg-ico1 { grid-column: 1; grid-row: 1; }
#topBar .tb-wg-val1 { grid-column: 2; grid-row: 1; justify-self: start; text-align: left; min-width: 0; }
#topBar .tb-wg-ico2 { grid-column: 1; grid-row: 2; }
#topBar .tb-wg-val2 { grid-column: 2; grid-row: 2; justify-self: start; text-align: left; min-width: 0; }
#topBar .tb-wg-plus-coin {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    margin-left: 0;
}
#topBar .tb-wg-plus {
    grid-column: 3;
    grid-row: 2;
    justify-self: center;
    margin-left: 0;
}
.tb-wallet-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
/* 文末 .proc-item-icon 为 width/height:auto，会盖住上方尺寸，顶栏货币图必须再锁一层 */
#topBar .tb-wallet-grid img.tb-wallet-ico.proc-item-icon {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}
#topBar .tb-wallet-grid .tb-wallet-val {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.02em;
    line-height: 1.15;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tb-wallet-val--coin { color: #a8d4ff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); }
.tb-wallet-val--jade {
    color: #7eefff;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.28);
}
#topBar .tb-plus--compact {
    width: 18px;
    height: 18px;
    margin-left: 1px;
    font-size: 13px;
}
@media (max-width: 360px) {
    .tb-pill-label { display: none; }
    .tb-pill { padding: 4px 6px; }
}
.tb-rule {
    width: 1px; align-self: stretch; min-height: 36px; margin: 0 4px;
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.35), transparent);
    flex-shrink: 0;
}
.tb-stack { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.15; }
.tb-label {
    font-size: 9px; color: var(--text-muted); letter-spacing: 2px; font-family: 'Microsoft YaHei', sans-serif;
    transform: scale(0.92); transform-origin: left center;
}
.tb-val { font-size: 15px; font-weight: bold; font-family: 'Consolas', 'Monaco', monospace; letter-spacing: 0.02em; }
.tb-val-power {
    background: linear-gradient(180deg, #fff6d4 0%, #e8c76b 45%, #b8892a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}
.tb-ico { position: relative; flex-shrink: 0; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.tb-ico-power {
    width: 34px; height: 34px;
    background: radial-gradient(circle at 35% 35%, #2a2a2a 0%, #0d0d0d 45%, #1a1a1a 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    position: relative;
}
.tb-ico-power::after {
    content: ""; position: absolute; inset: 5px; border-radius: 50%;
    background: conic-gradient(from 200deg, #1a1a1a 0deg, #f5e6b8 90deg, #1a1a1a 180deg, #4a4a4a 270deg, #1a1a1a 360deg);
    opacity: 0.92;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}
.tb-avatar-ring {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.42);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    background: radial-gradient(circle at 40% 30%, #3a3a42 0%, #121418 100%);
}
.tb-avatar-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.tb-player-stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    line-height: 1.2;
}
.tb-player-name {
    font-size: clamp(11px, 3.2vw, 13px);
    font-weight: 700;
    color: #eceff1;
    letter-spacing: 0.02em;
    max-width: 100%;
    line-height: 1.15;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.tb-player-power-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.tb-power-ico {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: conic-gradient(#b0bec5 0deg 180deg, #263238 180deg 360deg);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.tb-player-power-val {
    font-size: clamp(11px, 3.1vw, 12px);
    font-weight: bold;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.02em;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    background: linear-gradient(180deg, #fff6d4 0%, #e8c76b 45%, #b8892a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}
.tb-realm-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.tb-realm-stack--adjacent {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    flex: 0 1 auto;
}
.tb-realm-name,
.tb-realm-pct {
    color: #eecd8a;
    text-shadow: 0 0 8px rgba(255, 183, 77, 0.22), 0 1px 2px rgba(0, 0, 0, 0.9);
}
.tb-realm-name {
    font-size: clamp(10px, 2.9vw, 11px);
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.2;
    width: 100%;
    white-space: normal;
    word-break: keep-all;
    overflow: visible;
    hyphens: none;
}
.tb-realm-pct {
    font-size: clamp(12px, 3.6vw, 14px);
    font-weight: 800;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.04em;
}
/* 修炼页：综合能力数值以「修为」展示 */
.main-xiuwei-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 6px;
}
.main-xiuwei-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 3px;
}
.main-xiuwei-val {
    font-size: 17px;
}
.tb-pill {
    display: flex; flex-direction: row; align-items: center; gap: 6px;
    padding: 3px 8px 3px 5px; border-radius: 20px;
    background: rgba(0, 0, 0, 0.38); border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
}
.tb-pill-coin { border-color: rgba(100, 181, 246, 0.25); }
.tb-pill-premium { border-color: rgba(0, 229, 255, 0.22); padding-right: 4px; }
.tb-pill-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; min-width: 0; flex: 1; }
.tb-pill-txt--solo {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}
.tb-pill .tb-pill-prop-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.tb-pill-label { font-size: 8px; color: var(--text-muted); letter-spacing: 1px; }
.tb-pill-val { font-size: 12px; font-weight: bold; font-family: 'Consolas', 'Monaco', monospace; color: #e8ecf0; max-width: min(120px, 36vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-val-xianyu { color: #7eefff; text-shadow: 0 0 10px rgba(0, 229, 255, 0.35); }
.tb-pill-coin .tb-pill-val { color: #a8d4ff; }
.tb-ico-lingshi {
    width: 22px; height: 22px;
    background: radial-gradient(ellipse 70% 90% at 50% 35%, #7ecbff 0%, #2196f3 45%, #1565c0 100%);
    border: 1px solid rgba(144, 202, 249, 0.5);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.35), inset 0 -2px 4px rgba(0, 40, 80, 0.4);
}
.tb-ico-xianyu {
    width: 22px; height: 22px;
    background: conic-gradient(from 45deg, #1a1a1a, #d4af37, #fff8e1, #5c4a2a, #1a1a1a);
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25), inset 0 0 6px rgba(0, 0, 0, 0.5);
}
.tb-plus {
    flex-shrink: 0; width: 20px; height: 20px; padding: 0; margin-left: 2px;
    border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(180deg, #3a3f48 0%, #252830 100%);
    color: #ccc; font-size: 14px; line-height: 1; font-weight: bold;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.tb-plus:active { transform: scale(0.92); background: #1e2228; color: #fff; }

.resource-box { display: flex; flex-direction: column; align-items: center; flex: 1; }
.resource-label { font-size: 10px; color: var(--text-muted); font-family: sans-serif; letter-spacing: 1px; margin-bottom: 2px; white-space: nowrap;}
.resource-value { font-size: 13px; font-weight: bold; font-family: monospace; text-shadow: 0 2px 4px rgba(0,0,0,0.9); }

.panel { 
    position: absolute; top: var(--top-bar-total); bottom: calc(65px + max(4px, env(safe-area-inset-bottom, 0px))); left: 0; right: 0; z-index: 5; display: none; flex-direction: column; padding: 15px 20px; box-sizing: border-box; background: var(--ink-panel); backdrop-filter: blur(12px); border-left: 1px solid rgba(74, 64, 49, 0.5); border-right: 1px solid rgba(74, 64, 49, 0.5); 
    overflow-y: auto; overflow-x: hidden; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; pointer-events: auto;
}
.panel.active { display: flex; }
#panel-combat { background: transparent; backdrop-filter: none; pointer-events: none; border: none; box-shadow: none; padding: 0; overflow: hidden; touch-action: none; }
/* overflow-x 允许两侧圆钮红点略超出栏宽时不被 .panel 裁切 */
#panel-main {
    padding: 0;
    flex-direction: column;
    justify-content: flex-end;
    background: transparent;
    border: none;
    backdrop-filter: none;
    overflow-x: visible;
    isolation: isolate;
}
/* 修炼页全屏背景：图放 client/assets/ui/main/cultivate-bg.jpg（或改下方 url）；cover 适配各屏宽 */
#panel-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: #05080c;
    background-image: linear-gradient(180deg, rgba(3, 5, 8, 0.35) 0%, rgba(3, 5, 8, 0.72) 55%, rgba(3, 4, 6, 0.88) 100%),
        url("../assets/ui/main/cultivate-bg.jpg");
    background-size: cover, cover;
    background-position: center top, center top;
    background-repeat: no-repeat;
}

/* —— 修炼主界面 · 信息区与快捷入口 —— */
/* 相对面板顶下移少许：红点 top:-2px 会探出按钮，避免被顶栏（更高 z-index）裁切 */
.main-top-menu {
    position: absolute;
    top: 7px;
    left: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}
.main-top-menu__cluster {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    pointer-events: auto;
}
.main-top-menu__cluster--end {
    flex-direction: row-reverse;
}
@media (max-width: 360px) {
    .main-top-menu__cluster { gap: 7px; }
    .main-quick-entry .sys-icon { width: 40px !important; height: 40px !important; font-size: 15px !important; }
}
.main-quick-entry .sys-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 17px;
    font-weight: bold;
    background: linear-gradient(155deg, rgba(28, 26, 22, 0.96) 0%, rgba(10, 12, 16, 0.98) 48%, rgba(6, 8, 11, 1) 100%);
    border: 1px solid rgba(200, 170, 100, 0.28) !important;
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -6px 12px rgba(0, 0, 0, 0.35);
}
.main-quick-entry:active:not(.disabled) .sys-icon {
    filter: brightness(1.08);
}
.sys-icon--bounty {
    border-color: rgba(0, 230, 118, 0.4) !important;
    color: #7ae7b3 !important;
}
.sys-icon--rank {
    border-color: rgba(156, 39, 176, 0.38) !important;
    color: #d4a5e8 !important;
}
.sys-icon--market {
    border-color: rgba(201, 162, 39, 0.48) !important;
    color: #f0e0a8 !important;
}
.sys-icon--signin {
    border-color: rgba(232, 199, 107, 0.36) !important;
    color: #ffe082 !important;
}
.sys-icon-btn.main-quick-entry .main-quick-entry__label {
    font-size: 10px;
    font-weight: bold;
    color: rgba(210, 208, 198, 0.92);
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.sys-icon-btn.main-quick-entry.disabled .main-quick-entry__label {
    opacity: 0.55;
}

.main-panel-spacer {
    flex: 1;
    min-height: 0;
    pointer-events: none;
}

.main-hud-stack {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    /* 勿加 margin-top：会整块抬高，远离底栏与突破按钮 */
    margin-top: 0;
    padding: 4px 12px max(6px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
}

.main-hud-card {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 10px;
    margin-bottom: 0;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(8, 12, 18, 0.58) 0%, rgba(4, 6, 10, 0.48) 100%);
    border: 1px solid rgba(212, 175, 55, 0.14);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.main-realm-title {
    font-size: clamp(26px, 7.5vw, 34px);
    font-weight: bold;
    color: var(--antique-gold);
    letter-spacing: clamp(4px, 1.2vw, 8px);
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow:
        0 0 24px rgba(212, 175, 55, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.9);
}

/* 道行（综合战力）：玉牌横条，文案与数字居中 */
#panel-main .main-power-plate {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 2px auto 10px;
    padding: 10px 22px 12px;
    max-width: min(340px, 92vw);
    border-radius: 999px;
    background:
        linear-gradient(165deg, rgba(18, 22, 28, 0.92) 0%, rgba(6, 8, 12, 0.88) 100%);
    border: 1px solid rgba(212, 175, 55, 0.32);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.65) inset,
        0 4px 20px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(212, 175, 55, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#panel-main .main-power-plate__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    text-align: center;
}
#panel-main .main-power-plate__caption {
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    box-sizing: border-box;
    color: rgba(200, 184, 140, 0.88);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.25), 0 1px 3px rgba(0, 0, 0, 0.9);
    line-height: 1.2;
}
#panel-main .main-power-plate__num {
    display: block;
    width: 100%;
    font-family: ui-monospace, "Consolas", "Monaco", monospace;
    font-size: clamp(22px, 6.2vw, 30px);
    font-weight: bold;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-align: center;
    background: linear-gradient(180deg, #fff8e8 0%, #e8c878 40%, #a67c2a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(212, 175, 55, 0.22));
    font-variant-numeric: tabular-nums;
}

#panel-main .main-exp-track.progress-track {
    width: 100%;
    margin: 0 auto;
    height: 18px;
    border-radius: 5px;
    border-color: rgba(74, 64, 49, 0.55);
    background: rgba(3, 5, 8, 0.78);
}
#panel-main .main-exp-track .progress-text {
    line-height: 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(240, 242, 245, 0.95);
    text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, 0.75);
}

.cultivate-btn__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    gap: 4px;
}
.cultivate-btn__title {
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--jade-green);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 230, 118, 0.2);
    white-space: nowrap;
}
.cultivate-btn__meta {
    font-size: 14px;
    font-weight: 700;
    color: rgba(235, 238, 242, 0.92);
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px #000;
    font-variant-numeric: tabular-nums;
}
.cultivate-regen-tip {
    margin-top: -1px;
    margin-bottom: 4px;
    min-height: 16px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(218, 224, 232, 0.86);
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.main-focus-toggle {
    margin-top: 2px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(4, 8, 12, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.12);
    gap: 10px;
}
.main-focus-toggle__label {
    font-size: 12px;
    font-weight: bold;
    color: #dfc889;
    letter-spacing: 2px;
}

.btn-breakthrough-main {
    min-width: 168px;
    padding: 11px 28px;
    font-size: 15px;
    letter-spacing: 4px;
    border-radius: 6px;
}
#panel-main .btn-breakthrough-main.btn.disabled {
    border-color: rgba(212, 175, 55, 0.14);
    color: rgba(105, 118, 128, 0.95);
    background: linear-gradient(180deg, rgba(12, 14, 18, 0.95) 0%, rgba(6, 8, 10, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), inset 0 -2px 10px rgba(0, 0, 0, 0.65);
    font-weight: 600;
    letter-spacing: 5px;
}
#panel-main .btn-breakthrough-main.btn:not(.disabled):not(.btn-tribulation) {
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.65),
        0 0 22px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* 服药：与侧栏圆钮体量接近 */
#panel-main .main-square-btn.main-square-btn--pill {
    border-radius: 50%;
    width: 58px;
    height: 58px;
}

/* 修炼页：吐纳两侧大字圆钮（一念式：全文在圆内，无下挂小字） */
.main-cultivate-stage {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 430px;
    margin: 4px auto 0;
    gap: 4px 8px;
    box-sizing: border-box;
    padding: 0 2px 2px;
    pointer-events: auto;
}
.main-side-orbs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 64px;
    width: 64px;
    min-height: 0;
    padding-bottom: 2px;
    box-sizing: border-box;
}
.main-side-orbs--left {
    min-height: 0;
}
.main-cultivate-center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.main-cultivate-center .cultivate-container {
    margin: 4px auto 6px;
}

/* 修炼页圆钮：图放在 client/assets/ui/main/；透明底 + contain = 仅显示图标，无额外圆盘与内阴影；overflow 可见以不裁切红点 */
.main-disk-btn {
    position: relative;
    width: 64px;
    height: 64px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0;
    border: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    overflow: visible;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease, filter 0.12s ease;
}
.main-disk-btn:active {
    transform: scale(0.93);
    filter: brightness(1.1);
}
.main-disk-btn--roots {
    background-image: url('../assets/ui/main/disk-roots.png');
}
.main-disk-btn--body {
    background-image: url('../assets/ui/main/disk-body.png');
}
.main-disk-btn--stat {
    background-image: url('../assets/ui/main/disk-stat.png');
}
.main-disk-btn--settings {
    background-image: url('../assets/ui/main/disk-settings.png');
}
.main-disk-btn--inventory {
    background-image: url('../assets/ui/main/disk-inventory.png');
}
.main-disk-btn--remnant {
    border-radius: 50%;
    border: 2px solid rgba(179, 157, 219, 0.65);
    background:
        radial-gradient(circle at 35% 28%, rgba(200, 180, 255, 0.45) 0%, transparent 42%),
        linear-gradient(165deg, rgba(55, 40, 78, 0.98) 0%, rgba(22, 16, 36, 0.99) 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #e1bee7;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}
.main-disk-btn--remnant::before {
    content: '魂';
    text-shadow: 0 0 10px rgba(179, 157, 219, 0.55);
}

.main-breakthrough-row {
    width: 100%;
    max-width: 400px;
    margin: 8px auto 4px;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}
.main-breakthrough-row #btn-breakthrough {
    width: auto;
    min-width: 148px;
    max-width: 72%;
    box-sizing: border-box;
    padding: 9px 22px;
    font-size: 14px;
    text-align: center;
}

/* 修炼页：服药方形按钮 + 抽屉 */
.main-square-btn {
    /* 服药按钮纳入左侧按钮列（不再绝对定位，避免遮挡） */
    position: relative;
    z-index: 6;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.55);
    background:
        radial-gradient(ellipse 85% 72% at 38% 22%, rgba(255, 250, 230, 0.5) 0%, rgba(220, 190, 120, 0.14) 38%, transparent 55%),
        linear-gradient(168deg, rgba(52, 44, 32, 0.98) 0%, rgba(20, 17, 13, 0.99) 52%, rgba(8, 7, 6, 1) 100%);
    box-shadow: 0 8px 18px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -5px 14px rgba(0,0,0,0.35);
    color: var(--antique-gold);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.main-square-btn:active { transform: scale(0.96); filter: brightness(1.06); }

/* 残魂温养弹窗 */
.remnant-soul-modal-wrap .modal-content--remnant-soul {
    width: 92%;
    max-width: 520px;
    max-height: 86vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.remnant-soul-modal-wrap .modal-content--remnant-soul.modal-content--shenshi {
    max-width: 440px;
    max-height: min(88vh, 640px);
    padding-bottom: 12px;
}
.remnant-shenshi-head {
    flex-shrink: 0;
    text-align: center;
}
.dialog-title--shenshi {
    margin-bottom: 4px;
}
.remnant-shenshi-sub {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 10px;
}
/* 与顶栏/坊市/灵兽园一致：tb-pill + 道具图标 + tb-pill-val；列 flex 默认 stretch，需收窄居中 */
.remnant-shenshi-coins-row.tb-pill {
    align-self: center;
    width: fit-content;
    max-width: min(240px, 88%);
    margin: 0 auto;
}
/* 参悟按钮上方：与造化寻宝消耗行一致，已拥有/需求，不足时数字标红 */
.remnant-shenshi-meditate-cost-above.res-cost-line .res-cost-amt.tb-wallet-val--coin,
.remnant-shenshi-meditate-cost-above.res-cost-line .res-cost-amt.remnant-shenshi-meditate-cost-line {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.remnant-shenshi-meditate-cost-line {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-family: 'Consolas', 'Monaco', monospace;
}
.remnant-shenshi-meditate-cost-line .remnant-shenshi-meditate-cost-ratio {
    color: #a8d4ff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.remnant-shenshi-meditate-cost-line--short .remnant-shenshi-meditate-cost-ratio {
    color: var(--alert-red);
    text-shadow: 0 0 6px rgba(255, 59, 48, 0.35);
}
.remnant-soul-modal-wrap .remnant-shenshi-coins-row.tb-pill img.tb-pill-prop-icon.proc-item-icon {
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}
.remnant-soul-modal-wrap .remnant-shenshi-meditate-cost-above.res-cost-line img.res-cost-ico.proc-item-icon {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    object-fit: contain;
}
.remnant-shenshi-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.remnant-shenshi-compare {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    padding: 10px 10px 8px;
}
.remnant-shenshi-compare-head {
    display: grid;
    grid-template-columns: 72px 1fr 1fr;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-muted);
}
.remnant-shenshi-compare-head__tab {
    text-align: center;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--antique-gold);
    font-weight: 600;
}
.remnant-shenshi-compare-head__tab--next {
    opacity: 0.92;
    background: rgba(33, 150, 243, 0.08);
    border-color: rgba(33, 150, 243, 0.2);
}
.remnant-shenshi-compare-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.remnant-shenshi-cmp-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    align-items: center;
}
.remnant-shenshi-cmp-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remnant-shenshi-cmp-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    min-width: 0;
}
.remnant-shenshi-cmp-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 26px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}
.remnant-shenshi-cmp-inline--next {
    opacity: 0.9;
    border-color: rgba(100, 181, 246, 0.12);
    background: rgba(33, 150, 243, 0.06);
}
.remnant-shenshi-tier-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.remnant-shenshi-cmp-num {
    font-size: 11px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    color: #e8ecf0;
    line-height: 1.2;
    white-space: nowrap;
}
.remnant-shenshi-foot {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.remnant-shenshi-progress-card {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.remnant-shenshi-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.remnant-shenshi-progress-track {
    position: relative;
    height: 26px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.remnant-shenshi-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(100, 181, 246, 0.55) 0%, rgba(129, 212, 250, 0.85) 50%, rgba(77, 182, 172, 0.75) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: width 0.25s ease;
}
.remnant-shenshi-progress-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 12px;
    font-weight: 800;
    color: #f5f5f5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.remnant-shenshi-exp-detail {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}
.remnant-shenshi-meditate-wrap {
    width: 100%;
}
.remnant-shenshi-meditate-primary-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.remnant-shenshi-meditate-cost-above.res-cost-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.remnant-shenshi-close-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
}
/* 两钮同宽（与原先「关闭」列等分）；消耗仅在参悟列上方居中；底对齐 */
.remnant-shenshi-meditate-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 10px;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    box-sizing: border-box;
}
.remnant-shenshi-meditate-actions-row .remnant-shenshi-meditate-btn,
.remnant-shenshi-meditate-actions-row .remnant-shenshi-close-btn {
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
    box-sizing: border-box;
}
.remnant-shenshi-meditate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(232, 199, 107, 0.35) 0%, rgba(154, 114, 32, 0.28) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: var(--text-main);
}
.remnant-shenshi-meditate-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}
.remnant-shenshi-meditate-btn__lbl {
    letter-spacing: 0.08em;
}
.remnant-soul-lead {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.remnant-soul-shenshi-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    font-size: 13px;
    color: var(--text-main);
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}
.remnant-soul-shenshi-exp-wrap {
    color: var(--text-muted);
}
.remnant-soul-hint {
    font-size: 11px;
    color: var(--text-muted);
    min-height: 1.2em;
}
.remnant-soul-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}
@media (min-width: 520px) {
    .remnant-soul-body {
        flex-direction: row;
        align-items: flex-start;
    }
    .remnant-soul-slots-col {
        flex: 0 0 200px;
    }
    .remnant-soul-bag-col {
        flex: 1;
        min-width: 0;
    }
}
.remnant-soul-slots-title,
.remnant-soul-bag-title {
    font-size: 12px;
    color: var(--antique-gold);
    margin-bottom: 6px;
}
.remnant-soul-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.remnant-soul-slot-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.remnant-soul-slot-cap {
    font-size: 11px;
    color: var(--text-muted);
}
.remnant-soul-slot-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-sizing: border-box;
}
.remnant-soul-slot-box.slot-empty {
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.25);
}
.remnant-soul-slot-plus {
    font-size: 22px;
    line-height: 1;
}
.remnant-soul-slot-abb {
    font-size: 15px;
    font-weight: 700;
    color: inherit;
}
.remnant-soul-bag-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}
.remnant-soul-bag-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px 8px;
    text-align: center;
}
.remnant-soul-bag-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.remnant-soul-bag-row:active {
    filter: brightness(1.08);
}
.remnant-soul-bag-name {
    font-size: 13px;
    font-weight: 600;
}
.remnant-soul-bag-aff {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}
.remnant-soul-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}
.main-square-btn-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #0e100a;
    background: linear-gradient(180deg, #e8c65c 0%, #9a7220 100%);
    border: 1px solid rgba(255, 224, 130, 0.35);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.22);
}
.main-square-btn-txt {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #e8d89a;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* 高于 .red-dot (20)，避免侧栏红点盖住服药层 */
.pill-drawer-layer {
    position: absolute;
    inset: 0;
    z-index: 25;
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(1px);
}
.pill-drawer-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.02);
    pointer-events: auto;
}
.pill-drawer {
    position: absolute;
    z-index: 1;
    /* 抽屉位置由 JS 依据按钮就近摆放 */
    left: 0;
    top: 0;
    width: min(360px, calc(100% - 24px));
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(17,20,24,0.94) 0%, rgba(6,7,10,0.94) 100%);
    box-shadow: 0 14px 40px rgba(0,0,0,0.9), inset 0 0 18px rgba(255,255,255,0.02);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    animation: pillDrawerIn 0.18s ease-out forwards;
}
@keyframes pillDrawerIn {
    to { transform: translateY(0); opacity: 1; }
}
.pill-drawer-head {
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.pill-drawer-title {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 4px;
    color: var(--antique-gold);
}
.pill-drawer-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    white-space: nowrap;
}
.pill-drawer-grid {
    padding: 10px 12px 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.pill-drawer-grid > .item-slot {
    min-height: 0;
}
@media (max-width: 360px) {
    .pill-drawer-grid { grid-template-columns: repeat(3, 1fr); }
}
.pill-drawer-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease;
}
.pill-drawer-item:active { transform: scale(0.97); }
.pill-drawer-item--locked {
    filter: grayscale(1) brightness(0.65);
    opacity: 0.85;
}
.pill-drawer-item-ico img { width: 36px; height: 36px; }
.pill-drawer-item-name {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}
.pill-drawer-item-count {
    position: absolute;
    right: 6px;
    bottom: 6px;
    min-width: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-family: monospace;
    color: #fff;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
#panel-bag.panel, #panel-inventory.panel {
    overflow: hidden;
    padding-bottom: 0;
    bottom: calc(65px + max(4px, env(safe-area-inset-bottom, 0px)));
    gap: 8px;
    min-height: 0;
    /* 略增顶距，避免灵枢首行 / 套装按钮贴边被 overflow 裁切 */
    padding-top: 12px;
    padding-left: clamp(8px, 3vw, 16px);
    padding-right: clamp(8px, 3vw, 16px);
}
/* 纳戒：勿在此写 display:flex —— #panel-bag 特异性会压过 .panel{display:none}，导致离页后仍全屏盖住修炼/世界 */
#panel-bag .bag-pivot-card {
    flex: 1 1 50%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#panel-bag .bag-lower-stack {
    flex: 1 1 50%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}
/* 上半槽位区固定排版、不滚动（法宝 / 残魂一致） */
#panel-bag .bag-pivot-slots-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* 顶对齐：空间不足时优先保留下沿可见，避免居中导致顶部槽位被裁 */
    justify-content: flex-start;
}
#panel-bag .bag-pivot-slots-wrap:has(.slots-container--remnant) {
    overflow: hidden;
}
#panel-bag .bag-pivot-slots-wrap > #slots-container {
    flex-shrink: 0;
}
/* —— 纳戒上半：灵枢 / 残魂槽位（单格宽度与下方五列道具格一致） —— */
.bag-pivot-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
    background: rgba(6, 8, 12, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 12px;
    padding: 12px 10px 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.bag-pivot-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
    min-width: 0;
    flex-shrink: 0;
}
.bag-pivot-head-topline {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.bag-pivot-title {
    font-size: clamp(15px, 4.2vw, 18px);
    font-weight: bold;
    color: var(--antique-gold);
    letter-spacing: 4px;
    line-height: 1.2;
    flex-shrink: 0;
}
.bag-pivot-set-bonus-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
/* 神识与「套装效果」同排右对齐：首行仅标题，避免残魂页垫高导致切换闪动 */
#panel-bag .bag-pivot-set-bonus-row .bag-pivot-shenshi-btn {
    margin-left: auto;
    flex-shrink: 0;
}
.bag-pivot-mode-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.bag-pivot-mode-tabs .filter-tab {
    padding: 5px 12px;
    font-size: 11px;
}
/* 与造化寻宝 / 法宝养成底栏主按钮同系：金边渐变 + 标题字重字距（纳戒区域略缩小） */
#panel-bag .bag-pivot-card .bag-pivot-draw-btn {
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: 0;
    padding: 8px 14px !important;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
#panel-bag .bag-pivot-card .bag-pivot-draw-btn .fabao-summon-draw-title {
    font-size: clamp(11px, 3.1vw, 13px);
    font-weight: bold;
    letter-spacing: 0.1em;
    line-height: 1.2;
    white-space: nowrap;
}
/* 纳戒「套装效果」tips：与法宝详情分割线 + 共鸣区一致（气泡内无 .item-modal-host） */
.bag-set-bonus-tip-inner .fabao-modal-rule.bag-set-bonus-tip-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px;
    box-sizing: border-box;
}
.bag-set-bonus-tip-inner .fabao-modal-rule__gem {
    flex: 0 0 4px;
    width: 4px;
    height: 4px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgba(235, 220, 185, 0.88) 0%, rgba(165, 155, 130, 0.55) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.35);
}
.bag-set-bonus-tip-inner .fabao-modal-rule__line {
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        rgba(100, 95, 82, 0.12) 0%,
        rgba(200, 188, 155, 0.42) 18%,
        rgba(220, 205, 168, 0.55) 50%,
        rgba(200, 188, 155, 0.42) 82%,
        rgba(100, 95, 82, 0.12) 100%
    );
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.14);
}
.bag-set-bonus-tip-inner .fabao-modal-rule__title {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    color: #dcc896;
    text-shadow:
        0 0 10px rgba(220, 190, 100, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.5);
}
.bag-set-bonus-tip-body .bag-set-bonus-tip-res.affix-box {
    margin-top: 0;
}
.bag-set-bonus-tip-body .bag-set-bonus-type-block + .bag-set-bonus-type-block {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(200, 190, 160, 0.12);
}
.bag-set-bonus-tip-body .bag-set-bonus-type-head {
    font-size: 12px;
    font-weight: 600;
    color: var(--antique-gold);
    margin-bottom: 8px;
}
.bag-set-bonus-tip-body .modal-resonance-tier + .modal-resonance-tier {
    margin-top: 8px;
}
.bag-set-bonus-tip-body .modal-resonance-lines {
    margin: 0;
    padding-left: 1.1em;
}
.bag-set-bonus-tip-empty {
    margin: 6px 0 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}
.bag-set-bonus-tip-empty--sub {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.9;
}
.fabao-summon-entry-btn.fabao-summon-entry-btn--compact {
    flex-shrink: 0;
    padding: 8px 16px !important;
    min-width: 0 !important;
    max-width: 38%;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    line-height: 1.15 !important;
    font-size: 13px !important;
    border-radius: 8px;
}
.fabao-summon-entry-btn--compact .fabao-summon-entry-main {
    letter-spacing: 2px;
    font-size: 13px;
}
.fabao-summon-entry-btn--compact .fabao-summon-entry-sub {
    font-size: 10px;
    opacity: 0.88;
}
.bag-pivot-slots-wrap {
    min-width: 0;
    /* 与 #panel-bag .bag-grid 同列宽公式，保证上半槽位与下方道具格等大 */
    --bag-pivot-gap: clamp(6px, 2.2vw, 11px);
    --bag-pivot-slot-size: calc((100% - 4 * var(--bag-pivot-gap)) / 5);
    padding: 10px 2px 10px;
    box-sizing: border-box;
}
.slots-container.slots-container--bag {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    gap: var(--bag-pivot-gap);
    align-content: start;
    justify-items: center;
    padding: 0;
    margin: 0;
}
/* 法宝灵枢：中间为 1 号枢，左列 2·3、右列 4·5（与下方五列道具格同宽） */
.slots-container.slots-container--bag.slots-container--fabao-pivot {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    justify-items: stretch;
    align-items: stretch;
}
.slots-container.slots-container--bag.slots-container--fabao-pivot .bag-slot-cell.bag-slot-pos--fabao-0 { grid-column: 3; grid-row: 2; }
.slots-container.slots-container--bag.slots-container--fabao-pivot .bag-slot-cell.bag-slot-pos--fabao-1 { grid-column: 2; grid-row: 1; }
.slots-container.slots-container--bag.slots-container--fabao-pivot .bag-slot-cell.bag-slot-pos--fabao-2 { grid-column: 2; grid-row: 3; }
.slots-container.slots-container--bag.slots-container--fabao-pivot .bag-slot-cell.bag-slot-pos--fabao-3 { grid-column: 4; grid-row: 1; }
.slots-container.slots-container--bag.slots-container--fabao-pivot .bag-slot-cell.bag-slot-pos--fabao-4 { grid-column: 4; grid-row: 3; }
/* 残魂七窍：左列 1·2·3、右列 4·5·6、正中 7；与法宝同一套 5 列网格，槽位直接子元素占位（避免列宽循环） */
.slots-container.slots-container--bag.slots-container--remnant {
    display: block;
}
.slots-remnant-layout {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: var(--bag-pivot-gap);
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    justify-items: stretch;
}
.slots-remnant-layout > .bag-slot-cell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-0 { grid-column: 1; grid-row: 1; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-1 { grid-column: 1; grid-row: 2; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-2 { grid-column: 1; grid-row: 3; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-3 { grid-column: 5; grid-row: 1; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-4 { grid-column: 5; grid-row: 2; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-5 { grid-column: 5; grid-row: 3; }
.slots-remnant-layout > .bag-slot-cell.bag-slot-pos--remnant-6 { grid-column: 3; grid-row: 2; }
/* 七窍已装备残魂：格内为道具名（· 分行），字号略小于原单字壹贰 */
.slots-container.slots-container--bag .remnant-soul-slot-abb--twoline {
    font-weight: 800;
    line-height: 1.06;
}
.slots-container.slots-container--bag .remnant-soul-slot-abb--twoline .remnant-soul-name-row {
    font-size: calc(5px + clamp(10px, 2.65vw, 15px));
}
.slots-container.slots-container--bag .remnant-soul-slot-abb--twoline .remnant-soul-name-row--sub {
    font-size: clamp(10px, 2.65vw, 15px);
}
#panel-bag .slots-container.slots-container--bag .slot-caption {
    min-height: 2em;
    font-size: clamp(8px, 2.3vw, 10px);
}
.bag-slot-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
}
.slots-container.slots-container--bag .slot-box {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    min-height: 0;
    border-radius: 6px;
    box-sizing: border-box;
}
/* 空位与下方道具格方框同系；已装备仍走 .slot-equipped.tier-N */
.slots-container.slots-container--bag .slot-box.slot-empty,
.slots-container.slots-container--bag .slot-box.slot-locked {
    border: 1px solid rgba(42, 48, 58, 0.92);
    background: linear-gradient(145deg, #1c212a 0%, #141820 48%, #0e1118 100%);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.slot-caption {
    width: 100%;
    font-size: clamp(9px, 2.4vw, 11px);
    line-height: 1.35;
    color: rgba(200, 208, 216, 0.92);
    text-align: center;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: 2.65em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
}
.slot-caption--equipped {
    color: var(--antique-gold);
    font-weight: bold;
    font-family: 'KaiTi', 'STKaiti', serif;
}
/* 灵枢已装备法宝名：与法宝详情 / 养成详情同款品质色（不用整块 .tier-N，避免 caption 上出现 inset 光晕） */
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-0 {
    color: var(--tier-0);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-1 {
    color: var(--tier-1);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-2 {
    color: var(--tier-2);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-3 {
    color: var(--tier-3);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-4 {
    color: var(--tier-4);
    text-shadow: 0 0 5px var(--tier-4);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-5 {
    color: var(--tier-5);
    text-shadow: 0 0 6px var(--tier-5);
}
.slot-caption.slot-caption--equipped.slot-caption--fabao-tier-6 {
    color: var(--tier-6);
    text-shadow: 0 0 8px var(--tier-6);
}
.slot-caption--locked {
    color: rgba(150, 160, 170, 0.88);
    min-height: 2.65em;
}
.slot-caption-main {
    display: block;
    width: 100%;
    font-size: clamp(9px, 2.3vw, 10px);
    line-height: 1.3;
}
.slot-caption-sub {
    display: block;
    width: 100%;
    font-size: clamp(9px, 2.5vw, 10px);
    line-height: 1.35;
    color: rgba(180, 190, 200, 0.95);
}
.slots-container.slots-container--bag .slot-box.slot-locked {
    gap: 3px;
    padding: 3px 2px 4px;
    justify-content: center;
}
.slot-lock-ico {
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1;
    opacity: 0.38;
    filter: grayscale(0.2);
    flex-shrink: 0;
}
/* 未解锁灵枢：境界要求文案叠在格内、锁标正下方（避免飘到网格空隙） */
.slot-lock-req {
    display: block;
    max-width: 100%;
    min-width: 0;
    font-size: clamp(7px, 2.1vw, 9px);
    line-height: 1.12;
    text-align: center;
    color: rgba(195, 205, 215, 0.92);
    word-break: break-word;
    overflow-wrap: anywhere;
    flex-shrink: 1;
}
.slot-plus-ico {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1;
    font-weight: bold;
    opacity: 0.85;
}
.slots-container.slots-container--bag .proc-item-icon--slot {
    width: auto !important;
    height: auto !important;
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    margin: 0 !important;
}
.slots-container.slots-container--bag .slot-box.slot-pick-target.slot-equipped .proc-item-icon--slot {
    max-width: 68%;
    max-height: 68%;
    margin-top: 10px !important;
}

/* 纳戒灵枢 / 七窍：已激活套装 → 沿槽位边框绕行的柔光点（法宝 / 残魂各自独立调色，最多 3 色） */
@keyframes equip-set-orbit-dash {
    to {
        stroke-dashoffset: -100;
    }
}
.slots-container.slots-container--bag .slot-box.slot-equipped.equip-set-orbit-active {
    overflow: visible;
    isolation: isolate;
}
.slots-container.slots-container--bag .equip-set-orbit-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    filter:
        drop-shadow(0 0 1px color-mix(in srgb, var(--equip-set-orbit-c) 90%, #fff))
        drop-shadow(0 0 4px color-mix(in srgb, var(--equip-set-orbit-c) 72%, transparent))
        drop-shadow(0 0 10px color-mix(in srgb, var(--equip-set-orbit-c) 40%, transparent));
}
.slots-container.slots-container--bag .slot-box.equip-set-orbit--p0 {
    --equip-set-orbit-c: #7ec0e0;
}
.slots-container.slots-container--bag .slot-box.equip-set-orbit--p1 {
    --equip-set-orbit-c: #d8b888;
}
.slots-container.slots-container--bag .slot-box.equip-set-orbit--p2 {
    --equip-set-orbit-c: #b0a0d0;
}
.slots-container.slots-container--bag .equip-set-orbit-track {
    fill: none;
    stroke: var(--equip-set-orbit-c);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 4.5 95.5;
    animation: equip-set-orbit-dash 2.35s linear infinite;
    opacity: 1;
}
.slots-container.slots-container--bag .equip-set-orbit--p1 .equip-set-orbit-track {
    animation-delay: -0.78s;
}
.slots-container.slots-container--bag .equip-set-orbit--p2 .equip-set-orbit-track {
    animation-delay: -1.56s;
}
.slots-container.slots-container--bag .slot-box.slot-equipped.equip-set-orbit-active .proc-item-icon--slot,
.slots-container.slots-container--bag .slot-box.slot-equipped.equip-set-orbit-active .remnant-soul-slot-abb {
    position: relative;
    z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
    .slots-container.slots-container--bag .equip-set-orbit-track {
        animation: none;
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        opacity: 0.72;
    }
}

.bag-resonance-details {
    flex: 0 0 auto;
    flex-grow: 0;
    flex-shrink: 0;
    margin-top: 4px;
    border-top: 1px dashed rgba(212, 175, 55, 0.22);
    padding-top: 8px;
    min-height: 0;
}
.bag-resonance-summary {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 6px 4px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.bag-resonance-summary::-webkit-details-marker { display: none; }
.bag-resonance-summary::marker { content: ''; }
.bag-resonance-summary:active {
    background: rgba(255, 255, 255, 0.04);
}
.bag-resonance-summary-title {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: bold;
    color: var(--antique-gold);
    letter-spacing: 2px;
}
.bag-resonance-summary-meta {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.35;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bag-resonance-chevron {
    flex-shrink: 0;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(212, 175, 55, 0.7);
    transition: transform 0.2s ease;
    opacity: 0.9;
}
.bag-resonance-details[open] .bag-resonance-chevron {
    transform: rotate(180deg);
}
.bag-resonance-body {
    /* 展开时高度随内容；过长再在块内滚动，避免空内容也被撑成大片深色底 */
    flex: 0 0 auto;
    flex-grow: 0;
    min-height: 0;
    max-height: min(48vh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    margin: 4px 0 2px;
    padding: 6px 6px 8px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    box-sizing: border-box;
}
.bag-inventory-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.bag-inventory-toolbar-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.bag-inventory-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--antique-gold);
    letter-spacing: 3px;
    flex-shrink: 0;
}
.bag-filter-toolbar-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.bag-filter-toolbar-row .bag-filter-scroll {
    flex: 1 1 auto;
    min-width: 0;
}
.bag-inventory-toolbar .bag-smelt-btn--toolbar {
    flex: 0 0 auto;
    width: auto;
    max-width: 42%;
    padding: 5px 10px !important;
    font-size: 10px !important;
    line-height: 1.2;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.bag-inventory-toolbar .bag-smelt-btn {
    flex-shrink: 0;
    width: auto;
    padding: 6px 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
}
.bag-toolbar-smelt-row {
    width: 100%;
    min-width: 0;
}
.bag-toolbar-smelt-row .bag-smelt-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px !important;
    font-size: 12px !important;
}
.bag-toolbar-smelt-row--hidden {
    display: none !important;
}
.bag-filter-scroll {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-bottom: 4px;
    margin: 0 -2px;
    padding-left: 2px;
    padding-right: 2px;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.filter-container.filter-container--bag {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: max-content;
    min-width: 100%;
    padding-bottom: 2px;
    margin-bottom: 0;
}
.filter-container--bag .filter-tab {
    padding: 5px 11px;
    font-size: 11px;
    position: relative;
    overflow: visible;
}
/* 纳戒小页签：红点略出边框，与底栏穿透红点一致 */
.filter-container--bag .filter-tab .bag-filter-tab-dot.red-dot {
    top: -2px;
    right: -3px;
    width: 7px;
    height: 7px;
    z-index: 25;
    pointer-events: none;
}
.remnant-item-slot-box {
    display: flex;
    align-items: center;
    justify-content: center;
}
.remnant-item-slot-mark {
    font-size: clamp(12px, 3.5vw, 16px);
    line-height: 1;
    font-weight: bold;
    color: rgba(245, 245, 245, 0.9);
}
.item-modal-host .item-modal-icon-frame > .item-slot-box.remnant-modal-icon-fill {
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
}
/* 残魂纳戒与详情：角标「N级」、弹窗标题、主按钮共用字号（单源调节） */
:root {
    --remnant-promo-fs: clamp(10px, 3.2vw, 14px);
    --remnant-promo-fw: 800;
}
/* 残魂：道具栏角标 / 弹窗标题 / 主按钮共用排版（与纳戒残魂格「N级」一致） */
.remnant-promo-text,
.remnant-level-corner {
    font-size: var(--remnant-promo-fs, clamp(10px, 3.2vw, 14px));
    font-weight: var(--remnant-promo-fw, 800);
    letter-spacing: 0.02em;
    line-height: 1.15;
}
/* 残魂图标右下角「N级」（白字 + 深色描边，与格内缩写叠放；字号同上，仅布局与描边） */
.remnant-level-corner {
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 4;
    line-height: 1;
    color: #fff;
    pointer-events: none;
    text-shadow:
        -1px -1px 0 #1a1208,
        1px -1px 0 #1a1208,
        -1px 1px 0 #1a1208,
        1px 1px 0 #1a1208,
        0 -1px 0 #1a1208,
        0 1px 0 #1a1208,
        -1px 0 0 #1a1208,
        1px 0 0 #1a1208,
        0 0 4px rgba(0, 0, 0, 0.65);
}
/* 残魂详情：标题区不再限高，避免字被压扁；标题用 .remnant-promo-text 与角标同系字号 */
#remnant-item-modal .item-modal-head {
    align-items: center;
}
#remnant-item-modal .item-modal-head-right {
    height: auto;
    max-height: none;
    min-height: 72px;
    justify-content: center;
    gap: 6px;
}
#remnant-item-modal .item-modal-item-name.remnant-promo-text {
    flex: 0 1 auto;
    min-height: 0;
    max-height: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: block;
    text-align: center;
    font-size: var(--remnant-promo-fs, clamp(10px, 3.2vw, 14px)) !important;
    font-weight: var(--remnant-promo-fw, 800) !important;
    letter-spacing: 0.02em !important;
    line-height: 1.2 !important;
    padding: 2px 0;
    box-sizing: border-box;
}
#remnant-item-modal #remnant-modal-btn-primary.remnant-promo-text {
    font-size: var(--remnant-promo-fs, clamp(10px, 3.2vw, 14px)) !important;
    font-weight: var(--remnant-promo-fw, 800) !important;
    letter-spacing: 0.02em !important;
    line-height: 1.2 !important;
    padding: 11px 10px !important;
}
.item-modal-host .remnant-modal-remnant-abb-host .remnant-soul-slot-abb--twoline {
    font-weight: 800;
    line-height: 1.08;
}
.item-modal-host .remnant-modal-remnant-abb-host .remnant-soul-name-row {
    font-size: calc(5px + clamp(12px, 3vw, 16px));
}
.item-modal-host .remnant-modal-remnant-abb-host .remnant-soul-name-row--sub {
    font-size: clamp(12px, 3vw, 16px);
}
/* 纳戒道具栏 · 残魂：外层 .item-slot.tier-N 与法宝/道具同系底框；天品起 .item-slot--border-glow 线框 */
#panel-bag #bag-container .item-slot.item-slot--remnant-bag {
    gap: 3px;
}
/* 线框 SVG 在 z-index:1，文字缩写叠在上层 */
#panel-bag #bag-container .item-slot.item-slot--border-glow.item-slot--remnant-bag > .item-slot-box .remnant-soul-slot-abb {
    position: relative;
    z-index: 2;
}
.slots-container.slots-container--bag .slot-box.item-slot-host--border-glow .remnant-soul-slot-abb {
    position: relative;
    z-index: 2;
}
#remnant-item-modal .item-modal-icon-frame.item-slot-host--border-glow .remnant-modal-icon-fill {
    position: relative;
    z-index: 2;
}
#panel-bag #bag-container .item-slot.item-slot--remnant-bag > .item-slot-box {
    width: min(100%, 4.75rem);
    max-width: 88%;
    height: auto;
    min-height: 0;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 3px;
}
.remnant-soul-slot-abb.remnant-soul-slot-abb--twoline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: inherit;
    font-weight: 800;
    line-height: 1.06;
    text-shadow: inherit;
}
.remnant-soul-name-row {
    display: block;
    width: 100%;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.remnant-soul-name-row--sub {
    box-sizing: border-box;
    opacity: 0.96;
}
#panel-bag #bag-container .item-slot.item-slot--remnant-bag .remnant-soul-name-row {
    font-size: calc(5px + clamp(9px, 2.4vw, 14px));
}
#panel-bag #bag-container .item-slot.item-slot--remnant-bag .remnant-soul-name-row--sub {
    font-size: clamp(9px, 2.4vw, 14px);
}
#panel-bag #bag-container .item-slot.item-slot--remnant-bag > .item-name {
    font-size: clamp(8px, 2.4vw, 9px);
    line-height: 1.12;
    max-height: 2.6em;
}
#panel-bag .bag-section-title { margin-bottom: 4px; }
.bag-slots-row {
    gap: clamp(4px, 1.8vw, 10px);
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 20px;
    margin-bottom: 6px;
}
.bag-gacha-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}
.bag-gacha-title {
    margin: 0 !important;
    padding: 0 0 8px 0 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12) !important;
}
.bag-gacha-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.bag-gacha-btn {
    min-width: 0;
    padding: 11px 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.25;
    box-sizing: border-box;
}
.bag-gacha-btn-main { font-weight: bold; }
.bag-gacha-btn-sub {
    font-size: 10px;
    color: #9aa0a6;
    font-weight: normal;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    max-width: 100%;
}
.bag-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 4px;
}
.bag-toolbar-filters {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    margin: 0 -2px;
    padding-left: 2px;
    padding-right: 2px;
}
.bag-filter-row {
    flex-wrap: nowrap;
    margin-bottom: 0;
    padding-bottom: 4px;
    gap: 6px;
    min-height: 34px;
    align-items: center;
}
.bag-toolbar-smelt { width: 100%; }
.bag-smelt-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 12px;
}
#panel-bag #bag-scroll-area,
#panel-inventory #inventory-scroll-area {
    flex: 1;
    min-height: 0;
}
#panel-bag .bag-grid {
    padding: 4px 2px max(12px, env(safe-area-inset-bottom, 0px)) 2px;
    gap: clamp(6px, 2.2vw, 11px);
}
.item-modal-host .modal-content {
    width: min(78vw, 308px);
    max-width: 100%;
    padding: 18px clamp(12px, 4vw, 22px);
    padding-bottom: 18px;
    box-sizing: border-box;
    text-align: center;
}
.item-modal-host .item-modal-head {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
    text-align: left;
    box-sizing: border-box;
}
.item-modal-host .item-modal-head-right {
    flex: 1;
    min-width: 0;
    height: 72px;
    max-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    box-sizing: border-box;
}
.item-modal-host .item-modal-item-name {
    width: 100%;
    flex: 0 0 calc(33.333% - 1px);
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(15px, 4.2vw, 19px);
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.item-modal-host .item-modal-name-plus {
    white-space: nowrap;
}
.item-modal-host .item-modal-subbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    padding: 0 10px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background:
        linear-gradient(165deg, rgba(212, 175, 55, 0.09) 0%, transparent 42%),
        linear-gradient(180deg, rgba(28, 24, 18, 0.96) 0%, rgba(10, 9, 12, 0.98) 55%, rgba(6, 7, 10, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 220, 0.07),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 2px 10px rgba(0, 0, 0, 0.4);
}
.item-modal-host .item-modal-score-block {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    text-align: left;
    align-self: stretch;
}
#remnant-item-modal .item-modal-score-block {
    min-width: auto;
}
#remnant-item-modal .item-modal-score-label {
    white-space: nowrap;
}
/* 残魂详情：套装区（结构同法宝共鸣）+ 略大字号提高可读性 */
#remnant-item-modal .remnant-modal-set-bonuses {
    margin-top: 6px;
    line-height: 1.55;
}
#remnant-item-modal .remnant-modal-set-bonuses .remnant-set-rule {
    margin: 12px 0 8px;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-toggle {
    font-size: 12px;
    padding: 11px 12px;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-toggle-label {
    line-height: 1.45;
    color: #f5e6b8;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-tier-title {
    font-size: 11px;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-lines {
    font-size: 11px;
    line-height: 1.6;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-tier.is-locked .modal-resonance-tier-title {
    color: #7a7f88;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-resonance-tier.is-locked .modal-resonance-lines {
    color: #8b939e;
}
#remnant-item-modal .remnant-modal-set-bonuses .modal-res-badge {
    font-size: 10px;
}
#remnant-item-modal .remnant-set-foot {
    padding: 8px 12px 10px;
    font-size: 11px;
    line-height: 1.55;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.22);
}
#remnant-item-modal .remnant-set-foot--ok {
    color: #d8e6c8;
}
#remnant-item-modal .remnant-set-foot--muted {
    color: #aeb6c2;
}
#remnant-item-modal .modal-item-affixes .affix-item {
    font-size: 13px;
    line-height: 1.5;
}
#remnant-item-modal .item-modal-stat-row {
    font-size: 13px;
}

/* 残魂窍位对比：词条区与残魂详情一致；正文字号与详情对齐，仅禁止内层滚动 */
#remnant-compare-modal .modal-content--remnant-compare {
    max-width: min(420px, 96vw);
    width: 85%;
    padding: 14px 16px 16px;
    max-height: min(85vh, calc(100dvh - 32px));
    box-sizing: border-box;
}
#remnant-compare-modal .modal-content--remnant-compare .modal-body-scroll {
    overflow: hidden;
    overflow-y: hidden;
    flex: 1 1 auto;
    min-height: 0;
    touch-action: manipulation;
}
#remnant-compare-modal .modal-content--remnant-compare .dialog-title {
    margin-top: 0;
    margin-bottom: 8px;
    flex-shrink: 0;
}
#remnant-compare-modal .modal-content--remnant-compare .modal-footer.item-modal-fabao-footer {
    margin-top: 12px;
    padding-top: 4px;
    padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}
#remnant-compare-modal .remnant-compare-slot-label {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    color: rgba(212, 175, 55, 0.82);
    letter-spacing: 0.04em;
}
#remnant-compare-modal .remnant-compare-dual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#remnant-compare-modal .remnant-compare-window {
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background:
        linear-gradient(165deg, rgba(212, 175, 55, 0.07) 0%, transparent 38%),
        linear-gradient(180deg, rgba(26, 22, 18, 0.98) 0%, rgba(8, 9, 12, 0.99) 100%);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 248, 220, 0.06),
        inset 0 0 0 1px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
#remnant-compare-modal .remnant-compare-window-title {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.14em;
    text-align: center;
    color: rgba(245, 230, 180, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(0, 0, 0, 0.28);
}
#remnant-compare-modal .remnant-compare-window-inner {
    padding: 10px 10px 12px;
}
#remnant-compare-modal .remnant-compare-head.item-modal-head {
    margin-bottom: 8px;
    gap: 10px;
}
#remnant-compare-modal .remnant-compare-head .item-modal-icon-frame {
    width: 72px;
    height: 72px;
    border-radius: 6px;
}
#remnant-compare-modal .remnant-compare-head .item-modal-head-right {
    height: auto;
    max-height: none;
    min-height: 0;
    align-self: center;
    gap: 2px;
}
#remnant-compare-modal .remnant-compare-head .item-modal-item-name {
    flex: 0 1 auto;
    justify-content: flex-start;
    text-align: left;
    font-size: clamp(15px, 4.2vw, 19px);
    letter-spacing: 1px;
    line-height: 1.1;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
#remnant-compare-modal .remnant-compare-meta {
    font-size: 11px;
    color: rgba(186, 190, 198, 0.88);
    margin-top: 2px;
    line-height: 1.35;
}
#remnant-compare-modal .remnant-compare-affix-rule.fabao-modal-rule {
    margin: 10px 0 6px;
    gap: 8px;
}
#remnant-compare-modal .remnant-compare-affix-rule .fabao-modal-rule__title {
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 0 4px;
}
/* 与 #remnant-item-modal .modal-item-affixes .affix-item 一致 */
#remnant-compare-modal .modal-item-affixes .affix-item {
    font-size: 13px;
    line-height: 1.5;
}
#remnant-compare-modal .modal-item-affixes .fabao-affix-row--normal {
    line-height: 1.45;
}
#remnant-compare-modal .remnant-compare-affix-row.fabao-affix-row--normal {
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}
#remnant-compare-modal .remnant-compare-affix-trend {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    padding-left: 6px;
}
#remnant-compare-modal .remnant-compare-arrow {
    font-size: 11px;
    line-height: 1;
    font-weight: bold;
}
#remnant-compare-modal .remnant-compare-arrow--up {
    color: #69f0ae;
    text-shadow: 0 0 8px rgba(105, 240, 174, 0.45), 0 1px 2px rgba(0, 0, 0, 0.9);
}
#remnant-compare-modal .remnant-compare-arrow--down {
    color: #ff8a80;
    text-shadow: 0 0 8px rgba(255, 138, 128, 0.4), 0 1px 2px rgba(0, 0, 0, 0.9);
}
#remnant-compare-modal .remnant-compare-score-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
    padding: 10px 12px;
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.32);
    background:
        linear-gradient(165deg, rgba(212, 175, 55, 0.1) 0%, transparent 42%),
        linear-gradient(180deg, rgba(28, 24, 18, 0.96) 0%, rgba(10, 9, 12, 0.98) 55%, rgba(6, 7, 10, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 220, 0.07),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 2px 10px rgba(0, 0, 0, 0.4);
}
#remnant-compare-modal .remnant-compare-score-label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: rgba(212, 175, 55, 0.78);
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
}
#remnant-compare-modal .remnant-compare-score-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 1.2em;
}
#remnant-compare-modal .remnant-compare-score-num {
    font-size: clamp(17px, 4.8vw, 22px);
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    color: var(--antique-gold);
    line-height: 1.15;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.28), 0 1px 2px rgba(0, 0, 0, 0.75);
}
#remnant-compare-modal .remnant-compare-score-trend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#remnant-compare-modal .remnant-compare-affix-fallback {
    margin-top: 6px;
}
#remnant-compare-modal .remnant-compare-affix-fallback .affix-item {
    font-size: 13px;
    line-height: 1.5;
}
#remnant-compare-modal .remnant-compare-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}
#remnant-compare-modal .item-modal-fabao-btn--cancel {
    border-color: rgba(120, 128, 140, 0.55) !important;
    color: rgba(210, 214, 222, 0.92) !important;
    background: linear-gradient(180deg, #22252a 0%, #121418 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85) !important;
}
.item-modal-host .item-modal-score-label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: rgba(212, 175, 55, 0.72);
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.item-modal-host .item-modal-score-val {
    font-size: clamp(15px, 4vw, 17px);
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    color: var(--antique-gold);
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.28), 0 1px 2px rgba(0, 0, 0, 0.75);
}
.item-modal-host .item-modal-type-head {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    align-self: stretch;
    text-align: right;
    justify-content: flex-end;
    font-size: clamp(10px, 2.9vw, 11.5px);
    font-weight: bold;
    letter-spacing: 2px;
    color: rgba(200, 208, 218, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.item-modal-host .item-modal-stats {
    width: 100%;
    margin-top: 2px;
    margin-bottom: 4px;
    text-align: left;
    box-sizing: border-box;
}
.item-modal-host .item-modal-stat-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: normal;
    line-height: 1.45;
    text-align: left;
}
.item-modal-host .item-modal-stat-row:last-child {
    margin-bottom: 0;
}
.item-modal-host .item-modal-stat-row--with-lock .item-modal-stat-value {
    flex: 1 1 auto;
    min-width: 0;
}
.item-modal-host .modal-fabao-lock-toggle {
    flex-shrink: 0;
    align-self: center;
    width: 34px;
    height: 34px;
    margin: 0 0 0 4px;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(40, 44, 54, 0.95) 0%, rgba(22, 26, 34, 0.98) 100%);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.item-modal-host .modal-fabao-lock-toggle:active {
    transform: scale(0.94);
}
.item-modal-host .modal-fabao-lock-toggle.modal-fabao-lock-toggle--on {
    border-color: rgba(255, 193, 7, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 12px rgba(255, 193, 7, 0.22);
}
.item-slot-box > .fabao-slot-lock-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 6;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.85);
}
/* 已上锁时熔炼仍可点以弹出说明（勿用 .btn.disabled 的 pointer-events:none） */
.item-modal-host .item-modal-fabao-btn.item-modal-fabao-btn--smelt-guard {
    opacity: 0.55;
    filter: grayscale(0.35);
    cursor: not-allowed;
}
/* 参考面板：标签为浅金 #e6d8ad 系 */
.item-modal-host .item-modal-stat-label {
    flex-shrink: 0;
    letter-spacing: 0.4px;
    font-weight: 600;
    color: #e6d8ad;
    text-shadow:
        0 0 12px rgba(230, 200, 120, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.55);
}
.item-modal-host .item-modal-stat-value {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 主数值：纯白 */
.item-modal-host .item-modal-stat-primary {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
/* 中括号及其中说明：浅金，与主数值白字区分 */
.item-modal-host .item-modal-stat-bracket {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #dcc896;
    text-shadow:
        0 0 10px rgba(220, 190, 100, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.45);
}
/* 法宝详情：词缀 / 法宝神通 — 装饰分割线（示意：两端菱形 + 中部微亮） */
.item-modal-host .fabao-modal-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 14px 0 8px;
    box-sizing: border-box;
}
.item-modal-host .item-modal-stats + .fabao-modal-rule {
    margin-top: 10px;
}
.item-modal-host .fabao-modal-rule__gem {
    flex: 0 0 4px;
    width: 4px;
    height: 4px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgba(235, 220, 185, 0.88) 0%, rgba(165, 155, 130, 0.55) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.35);
}
.item-modal-host .fabao-modal-rule__line {
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        rgba(100, 95, 82, 0.12) 0%,
        rgba(200, 188, 155, 0.42) 18%,
        rgba(220, 205, 168, 0.55) 50%,
        rgba(200, 188, 155, 0.42) 82%,
        rgba(100, 95, 82, 0.12) 100%
    );
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.14);
}
.item-modal-host .fabao-modal-rule__title {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    color: #dcc896;
    text-shadow:
        0 0 10px rgba(220, 190, 100, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.5);
}
.item-modal-host .fabao-modal-block {
    margin: 0;
    padding: 0 1px;
    background: transparent;
    border: none;
    border-radius: 0;
}
/* 法宝神通区：【名】随品质色，描述统一柔灰字 */
.item-modal-host .fabao-modal-skill {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-align: left;
}
.item-modal-host .fabao-modal-skill__desc {
    font-size: 12px;
    font-family: sans-serif;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.item-modal-host .fabao-modal-skill__name {
    display: inline;
    font-weight: 700;
    border: none;
    box-shadow: none;
    margin-right: 0.12em;
}
.item-modal-host .fabao-modal-skill__name.tier-0,
.item-modal-host .fabao-modal-skill__name.tier-1,
.item-modal-host .fabao-modal-skill__name.tier-2,
.item-modal-host .fabao-modal-skill__name.tier-3,
.item-modal-host .fabao-modal-skill__name.tier-4 {
    box-shadow: none;
    border: none;
}
.item-modal-host .fabao-modal-skill__body {
    display: inline;
    font-weight: 500;
    color: rgba(186, 194, 206, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}
.item-modal-host .fabao-skill-param {
    color: rgba(200, 168, 90, 0.98);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
/* 词缀列表区：无外层底框；特殊词缀行保留 style-cave 中带左边条的小框 */
.item-modal-host .modal-item-affixes {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
}
/* 法宝详情词缀：字号与基础属性一致（12px），其余保持随品质变色等原样 */
.item-modal-host .modal-item-affixes .affix-item {
    font-size: 12px;
    line-height: 1.45;
}
/* 仅普通词缀随品阶变色；特殊词缀与底部说明固定为最初灰金/灰色，不跟 tier 类 */
.item-modal-host .modal-item-affixes .affix-item--special {
    color: #ffe082;
}
.item-modal-host .modal-item-affixes .affix-item--special .affix-special-text {
    font-size: 12px;
    color: #ffecb3;
}
.item-modal-host .modal-fabao-affix-special-note {
    font-size: 10px;
    line-height: 1.45;
    margin-top: 8px;
    color: #888;
    font-family: sans-serif;
}
.item-modal-host .modal-item-affixes .affix-item:not(.affix-item--special) {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}
/* 普通词缀：名称与区间继承品阶色，数值白字（同基础属性主数值） */
.item-modal-host .modal-item-affixes .fabao-affix-row--normal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0 6px;
}
.item-modal-host .modal-item-affixes .fabao-affix-row__name,
.item-modal-host .modal-item-affixes .fabao-affix-row__range {
    color: inherit;
    font-weight: 600;
}
.item-modal-host .modal-item-affixes .fabao-affix-row__val {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.item-modal-host .modal-item-affixes .fabao-affix-row__bonus {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #f5c26b;
    text-shadow: 0 0 6px rgba(245, 194, 107, 0.24), 0 1px 2px rgba(0, 0, 0, 0.55);
}
/* 不用 .tier-N 挂在词缀容器上：全局 .tier-4 等含 inset 光晕，会铺到特殊说明底下 */
.item-modal-host .modal-item-affixes[data-fabao-tier='0'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-0) 58%, #d8dee6 42%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='1'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-1) 48%, #d6e2dc 52%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='2'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-2) 46%, #d4e0ee 54%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='3'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-3) 44%, #e0dbe8 56%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='4'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-4) 50%, #ebe4d6 50%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='5'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-5) 40%, #ead8d8 60%);
}
.item-modal-host .modal-item-affixes[data-fabao-tier='6'] .affix-item:not(.affix-item--special) {
    color: color-mix(in srgb, var(--tier-6) 40%, #ead6df 60%);
}
.item-modal-host .modal-footer {
    margin-top: 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
.item-modal-host .item-modal-fabao-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.item-modal-host .item-modal-fabao-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.item-modal-host .item-modal-fabao-btn {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 9px 5px !important;
    font-size: clamp(10px, 2.85vw, 12px) !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25;
    box-sizing: border-box;
    text-align: center;
}
.item-modal-host .item-modal-fabao-btn--refine {
    position: relative;
    border-color: rgba(212, 175, 55, 0.72) !important;
    color: var(--antique-gold) !important;
    background: linear-gradient(180deg, #2a2218 0%, #1a1510 100%) !important;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 248, 220, 0.1) !important;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.22) !important;
}
.item-modal-host .item-modal-fabao-refine-dot.red-dot {
    top: 1px;
    right: 3px;
    left: auto;
    z-index: 2;
}
.slots-container.slots-container--bag .slot-box .slot-fabao-yangcheng-dot.red-dot {
    top: 2px;
    right: 2px;
    left: auto;
    z-index: 6;
}
.item-modal-host .item-modal-fabao-btn--equip {
    border-color: rgba(212, 175, 55, 0.72) !important;
    color: var(--antique-gold) !important;
    background: linear-gradient(180deg, #2a2218 0%, #1a1510 100%) !important;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 248, 220, 0.1) !important;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.22) !important;
}
.item-modal-host .item-modal-fabao-btn--smelt.btn-danger {
    flex: 1 1 0;
    border-color: rgba(229, 115, 115, 0.85) !important;
    color: #ffcdd2 !important;
    background: linear-gradient(180deg, #3a1818 0%, #1c0a0a 100%) !important;
    box-shadow:
        0 0 12px rgba(255, 82, 82, 0.2),
        0 3px 10px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 200, 200, 0.08) !important;
    text-shadow: 0 0 4px rgba(255, 100, 100, 0.35) !important;
}
.item-modal-host .item-modal-fabao-btn.item-modal-fabao-btn--locked {
    border-color: #1a1c1f !important;
    color: #3d464d !important;
    background: #080a0c !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9) !important;
    text-shadow: none !important;
    filter: grayscale(0.2);
    opacity: 0.78;
}
.item-modal-host .item-modal-fabao-btn.disabled {
    opacity: 1;
}
.item-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
    width: 100%;
    box-sizing: border-box;
}
.item-modal-actions > .item-modal-btn:last-child {
    grid-column: 1 / -1;
}
.item-modal-btn {
    min-width: 0;
    padding: 12px 8px !important;
    font-size: clamp(11px, 3.1vw, 13px);
    box-sizing: border-box;
}

.section-title { color: var(--antique-gold); margin: 0 0 10px 0; border-bottom: 1px solid rgba(212, 175, 55, 0.15); padding-bottom: 8px; font-size: 16px; text-align: center; letter-spacing: 3px; flex-shrink: 0; }

.btn { background: linear-gradient(180deg, #32281d 0%, #17130e 100%); border: 1px solid var(--antique-gold); color: var(--antique-gold); padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: bold; letter-spacing: 1px; cursor: pointer; text-align: center; display: inline-block; box-shadow: 0 4px 8px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.15); transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1); position: relative; pointer-events: auto; flex-shrink: 0; text-shadow: 0 0 2px currentColor; }
/* 激励视频（与仙缘奇遇「映像厚礼」同款）：紫底、淡紫边、浅白字、左侧播放圆标 */
.btn.rewarded-ad-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border: 1px solid rgba(186, 104, 200, 0.75);
    background: linear-gradient(105deg, rgba(74, 20, 140, 0.42) 0%, rgba(18, 12, 28, 0.92) 55%, rgba(10, 8, 18, 0.95) 100%);
    color: #f3e5ff;
    box-shadow: 0 0 14px rgba(156, 39, 176, 0.28), 0 4px 8px rgba(0, 0, 0, 0.45);
    text-shadow: none;
    letter-spacing: 0.06em;
}
.btn.rewarded-ad-btn:active:not(:disabled):not(.disabled) {
    transform: none;
    filter: brightness(1.06);
    box-shadow: 0 0 16px rgba(156, 39, 176, 0.32), 0 2px 6px rgba(0, 0, 0, 0.5);
}
.btn.rewarded-ad-btn.disabled {
    opacity: 0.55;
    pointer-events: none;
    border-color: rgba(186, 104, 200, 0.45);
    color: rgba(243, 229, 255, 0.88);
    background: linear-gradient(105deg, rgba(74, 20, 140, 0.28) 0%, rgba(18, 12, 28, 0.78) 55%, rgba(10, 8, 18, 0.85) 100%);
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.12);
    font-weight: bold;
}
.btn.rewarded-ad-btn .rewarded-ad-btn__play {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    padding-left: 3px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn.rewarded-ad-btn .rewarded-ad-btn__label {
    flex: 1;
    min-width: 0;
    text-align: center;
    line-height: 1.45;
}
.btn.rewarded-ad-btn .rewarded-ad-btn__balance {
    flex-shrink: 0;
    width: 30px;
    height: 0;
    pointer-events: none;
    visibility: hidden;
}
.btn:active:not(.disabled):not(.btn-subdued):not(.rewarded-ad-btn) { transform: translateY(3px); background: linear-gradient(180deg, #17130e 0%, #221a12 100%); box-shadow: 0 1px 2px rgba(0,0,0,0.9), inset 0 2px 6px rgba(0,0,0,0.7); }
.btn.disabled { border-color: #1a1c1f; color: #3d464d; background: #080a0c; box-shadow: inset 0 2px 8px rgba(0,0,0,0.9); pointer-events: none; opacity: 1; font-weight: normal; text-shadow: none; }
.btn.disabled .res-cost-ico { opacity: 0.4; filter: grayscale(1); }
.btn-danger { border-color: #c62828; color: #ff8a80; background: linear-gradient(180deg, #2a1515 0%, #140a0a 100%); text-shadow: 0 0 2px rgba(255, 80, 80, 0.35); }
.btn-danger:active:not(.disabled) { background: linear-gradient(180deg, #140a0a 0%, #1f1010 100%); }
.cave-list-row { display: flex; justify-content: space-between; align-items: center; background: #080b0e; padding: 10px 12px; border-radius: 6px; border: 1px solid #1a1c20; gap: 8px; }
.cave-list-row .cave-row-title { font-size: 13px; font-weight: bold; color: var(--text-main); }
.body-path-tab { flex: 1; font-size: 11px; padding: 6px 0; text-align: center; }
.body-path-tab.is-selected { border-color: var(--antique-gold); color: var(--antique-gold); background: linear-gradient(180deg, #32281d 0%, #17130e 100%); font-weight: bold; text-shadow: 0 0 2px currentColor; }

/* 锻体：流派说明与加成明细 */
.body-path-tabs {
    display: flex;
    gap: 6px;
}
.body-path-panel {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 10px;
    padding: 12px 12px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.body-path-panel-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.body-path-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: var(--text-main);
    letter-spacing: 1px;
}
.body-path-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--antique-gold);
    background: linear-gradient(180deg, rgba(50, 40, 29, 0.7) 0%, rgba(10, 9, 12, 0.85) 100%);
    text-shadow: 0 0 2px rgba(212, 175, 55, 0.25);
    flex-shrink: 0;
}
.body-path-panel-tip {
    font-size: 11px;
    color: rgba(200, 205, 212, 0.72);
    line-height: 1.45;
}
.body-bonus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.body-bonus-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(8, 11, 14, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.body-bonus-k {
    font-size: 11px;
    color: rgba(200, 205, 212, 0.72);
    letter-spacing: 0.5px;
}
.body-bonus-v {
    font-size: 12px;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.body-path-footnote {
    margin-top: 10px;
    font-size: 10px;
    color: rgba(200, 205, 212, 0.55);
    line-height: 1.4;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}
.btn-root-sm { font-size: 11px; padding: 4px 8px; }
.btn-root-sm.btn-root-earth { padding: 4px 12px; margin-left: auto; }
.btn-manual-action { font-size: 12px; padding: 4px 8px; flex-shrink: 0; }
.btn-cave-action { font-size: 12px; padding: 6px 10px; flex-shrink: 0; }
.btn.btn-subdued { border-color: #2a2a2a; color: #7a7a7a; background: linear-gradient(180deg, #1f1f1f 0%, #111 100%); box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05); text-shadow: none; }
.btn.btn-subdued:active { transform: scale(0.97); box-shadow: inset 0 2px 5px rgba(0,0,0,0.8); }
.btn-tribulation { border-color: #00ffff; color: #00ffff; background: linear-gradient(180deg, #0d2833 0%, #061014 100%); animation: pulseCyan 1.5s infinite; text-shadow: 0 0 5px #00ffff; }

.sys-icon-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; cursor: pointer; transition: transform 0.1s; }
.sys-icon-btn:active:not(.disabled) { transform: scale(0.9); }
.sys-icon { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #2a2a2a, #111); border: 1px solid var(--antique-gold); color: var(--antique-gold); display: flex; justify-content: center; align-items: center; font-size: 18px; font-weight: bold; box-shadow: 0 4px 8px rgba(0,0,0,0.5); font-family: 'KaiTi', serif;}
.sys-icon-btn span { font-size: 11px; color: #ccc; text-shadow: 1px 1px 2px #000; font-weight: bold; }
.sys-icon-btn.disabled { filter: grayscale(1); opacity: 0.6; pointer-events: none; }

.cultivate-container { position: relative; width: 168px; height: 168px; margin: 12px auto; display: flex; justify-content: center; align-items: center; }
.taiji-bg {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(0, 230, 118, 0.05) 60%, transparent 70%),
                conic-gradient(from 0deg, rgba(212, 175, 55, 0.1) 0%, transparent 40%, rgba(212, 175, 55, 0.1) 50%, transparent 90%);
    border: 1px dashed rgba(212, 175, 55, 0.2); animation: spin 15s linear infinite; z-index: 0;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.manual-cultivate-btn {
    width: 108px; height: 108px; border-radius: 50%; z-index: 1;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.2) 0%, rgba(0, 0, 0, 0.9) 80%);
    border: 2px solid var(--jade-green); display: flex; justify-content: center; align-items: center;
    cursor: pointer; box-shadow: 0 0 20px rgba(0, 230, 118, 0.3), inset 0 0 15px rgba(0, 230, 118, 0.2);
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: auto; flex-shrink: 0;
}
.manual-cultivate-btn.auto-active { border-color: var(--tier-4); box-shadow: 0 0 30px rgba(232, 199, 107, 0.4), inset 0 0 20px rgba(232, 199, 107, 0.2); background: radial-gradient(circle, rgba(232, 199, 107, 0.2) 0%, rgba(0, 0, 0, 0.9) 80%); animation: autoPulse 1s infinite alternate; }
.manual-cultivate-btn:active { transform: scale(0.9); }
@keyframes autoPulse { from { filter: brightness(1); } to { filter: brightness(1.4); } }
.manual-cultivate-btn .ripple { 
    position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--jade-green); 
    animation: rippleEffect 2s infinite; pointer-events: none; top:0; left:0; box-sizing: border-box;
}
@keyframes rippleEffect { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }

.auto-toggle-box { margin-top: 5px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; color: var(--antique-gold); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #1a1a1a; transition: .3s; border-radius: 20px; border: 1px solid #333; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: #666; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: rgba(232, 199, 107, 0.2); border-color: var(--tier-4); }
input:checked + .slider:before { transform: translateX(16px); background-color: var(--tier-4); box-shadow: 0 0 8px var(--tier-4); }

.progress-track { width: 85%; margin: 15px auto; background: #06080a; border: 1px solid #2a2218; border-radius: 3px; height: 14px; position: relative; overflow: hidden; box-shadow: inset 0 3px 6px rgba(0,0,0,0.9); }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #0d47a1, #64b5f6); transition: width 0.2s; box-shadow: 0 0 10px rgba(100,181,246,0.5); }
.progress-text { position: absolute; top: 0; left: 0; right: 0; bottom: 0; text-align: center; line-height: 14px; font-size: 10px; font-family: sans-serif; text-shadow: 1px 1px 0px #000; }

.filter-container { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; flex-shrink: 0; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
.filter-tab { padding: 6px 14px; border: 1px solid #2a2a2a; border-radius: 12px; font-size: 12px; color: var(--text-muted); cursor: pointer; white-space: nowrap; background: #080b0e; transition: all 0.2s; font-family: sans-serif; flex-shrink: 0; }
.filter-tab.active { border-color: var(--antique-gold); color: var(--antique-gold); background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(0,0,0,0) 100%); box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1); }

.slots-container { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; flex-shrink: 0; align-items: flex-start; }
.slot-box { width: 48px; height: 48px; border-radius: 6px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; transition: transform 0.1s; flex-shrink: 0; }
.slot-box:active:not(.slot-locked) { transform: scale(0.92); }
.slot-locked { background: #050608; border: 1px solid #111316; color: #222; cursor: not-allowed; box-shadow: inset 0 2px 10px rgba(0,0,0,0.9); }
.slot-empty { background: rgba(20, 25, 30, 0.3); border: 1px dashed var(--antique-gold); color: var(--antique-gold); cursor: pointer; animation: breathe 2s infinite; }
/* 与 .item-slot > .item-slot-box 同系：默认灰底 + 品阶色铺底（避免装备后纯黑） */
.slot-equipped {
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(145deg, #1c212a 0%, #141820 48%, #0e1118 100%);
    border: 1px solid rgba(42, 48, 58, 0.92);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-0 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-0) 10%, #1a1f28) 0%, color-mix(in srgb, var(--tier-0) 5%, #0e1118) 100%);
    border-color: var(--tier-0);
}
.slot-box.slot-equipped.tier-1 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-1) 11%, #1a1f28) 0%, color-mix(in srgb, var(--tier-1) 6%, #0e1118) 100%);
    border-color: var(--tier-1);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 8px rgba(76, 175, 80, 0.15), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-2 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-2) 12%, #1a1f28) 0%, color-mix(in srgb, var(--tier-2) 6%, #0e1118) 100%);
    border-color: var(--tier-2);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 10px rgba(33, 150, 243, 0.15), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-3 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-3) 13%, #1a1f28) 0%, color-mix(in srgb, var(--tier-3) 7%, #0e1118) 100%);
    border-color: var(--tier-3);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 15px rgba(156, 39, 176, 0.25), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-4 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-4) 14%, #1a1f28) 0%, color-mix(in srgb, var(--tier-4) 8%, #0e1118) 100%);
    border-color: var(--tier-4);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 20px rgba(232, 199, 107, 0.3), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-5 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-5) 15%, #1a1f28) 0%, color-mix(in srgb, var(--tier-5) 9%, #0e1118) 100%);
    border-color: var(--tier-5);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 25px rgba(255, 82, 82, 0.4), 0 2px 5px rgba(0, 0, 0, 0.45);
}
.slot-box.slot-equipped.tier-6 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-6) 16%, #1a1f28) 0%, color-mix(in srgb, var(--tier-6) 10%, #0e1118) 100%);
    border-color: var(--tier-6);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 30px rgba(255, 64, 129, 0.5), 0 2px 5px rgba(0, 0, 0, 0.45);
    animation: divinePulse 2s infinite alternate;
}
.slot-label { font-size: 9px; position: absolute; bottom: -16px; color: var(--text-muted); font-family: sans-serif; white-space: nowrap; }

.gacha-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-shrink: 0; }

.fabao-summon-entry-btn {
    position: relative;
    padding: 11px 18px !important;
    min-width: 118px;
    font-size: 14px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
    border: 0;
    font-family: inherit;
    box-sizing: border-box;
}

.fabao-summon-entry-main {
    font-weight: bold;
    letter-spacing: 2px;
}

.fabao-summon-entry-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: normal;
    letter-spacing: 0.5px;
}

#bag-scroll-area, #inventory-scroll-area { flex: 1; padding-bottom: 25px; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.bag-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-content: start; padding: 45px 15px 25px 15px; box-sizing: border-box; width: 100%; }

.proc-item-icon {
    display: block; max-width: 100%; width: auto; height: auto;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 6px rgba(212, 175, 55, 0.12));
}
.proc-item-icon--slot { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85)); }
/* 法宝详情：与法宝阁格子同系品质底框；图标在框内铺底，避免 img 上 filter 在高分屏 WebView 里发糊 */
.item-modal-icon-frame {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid rgba(42, 48, 58, 0.92);
    background: linear-gradient(145deg, #1c212a 0%, #141820 48%, #0e1118 100%);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-0,
.consumable-modal-icon-frame.tier-0 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-0) 10%, #1a1f28) 0%, color-mix(in srgb, var(--tier-0) 5%, #0e1118) 100%);
    border-color: var(--tier-0);
}
.item-modal-icon-frame.tier-1,
.consumable-modal-icon-frame.tier-1 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-1) 11%, #1a1f28) 0%, color-mix(in srgb, var(--tier-1) 6%, #0e1118) 100%);
    border-color: var(--tier-1);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 8px rgba(76, 175, 80, 0.15), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-2,
.consumable-modal-icon-frame.tier-2 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-2) 12%, #1a1f28) 0%, color-mix(in srgb, var(--tier-2) 6%, #0e1118) 100%);
    border-color: var(--tier-2);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 10px rgba(33, 150, 243, 0.15), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-3,
.consumable-modal-icon-frame.tier-3 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-3) 13%, #1a1f28) 0%, color-mix(in srgb, var(--tier-3) 7%, #0e1118) 100%);
    border-color: var(--tier-3);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 15px rgba(156, 39, 176, 0.25), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-4,
.consumable-modal-icon-frame.tier-4 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-4) 14%, #1a1f28) 0%, color-mix(in srgb, var(--tier-4) 8%, #0e1118) 100%);
    border-color: var(--tier-4);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 20px rgba(232, 199, 107, 0.3), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-5,
.consumable-modal-icon-frame.tier-5 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-5) 15%, #1a1f28) 0%, color-mix(in srgb, var(--tier-5) 9%, #0e1118) 100%);
    border-color: var(--tier-5);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 25px rgba(255, 82, 82, 0.4), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.item-modal-icon-frame.tier-6,
.consumable-modal-icon-frame.tier-6 {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-6) 16%, #1a1f28) 0%, color-mix(in srgb, var(--tier-6) 10%, #0e1118) 100%);
    border-color: var(--tier-6);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 30px rgba(255, 64, 129, 0.5), 0 2px 8px rgba(0, 0, 0, 0.45);
    animation: divinePulse 2s infinite alternate;
}
/* 通用道具详情：与法宝详情框同系底框 + 可选 SVG 品质线框（.item-slot-host--border-glow） */
.consumable-modal-icon-frame {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid rgba(42, 48, 58, 0.92);
    background: linear-gradient(145deg, #1c212a 0%, #141820 48%, #0e1118 100%);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 2px 8px rgba(0, 0, 0, 0.45);
    margin: 0 auto 10px;
}
.consumable-modal-icon-frame .proc-item-icon--modal {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    filter: none !important;
}

.item-modal-icon-frame.item-slot-host--border-glow,
.slot-box.slot-equipped.item-slot-host--border-glow,
.consumable-modal-icon-frame.item-slot-host--border-glow {
    overflow: visible;
    isolation: isolate;
}

.item-modal-icon-frame .proc-item-icon--modal {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    filter: none !important;
}
.item-modal-icon-frame.item-slot-host--border-glow .proc-item-icon--modal,
.slot-box.slot-equipped.item-slot-host--border-glow .proc-item-icon--slot,
.consumable-modal-icon-frame.item-slot-host--border-glow .proc-item-icon--modal {
    z-index: 2;
}
.proc-item-icon--modal { margin: 0 auto; }

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .proc-item-icon:not(.proc-item-icon--modal) {
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 4px rgba(212, 175, 55, 0.1));
    }
    .proc-item-icon--slot {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.82));
    }
}

/* 道具格图标尺寸由下方「铺底」规则统一控制；翻牌正面与 .item-slot-box 同在 style-app */
.res-cost-line { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.res-cost-ico { flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 4px rgba(0, 0, 0, 0.45); vertical-align: middle; }
.res-cost-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.res-cost-suffix { opacity: 0.92; font-size: 0.95em; }

/* 外层：纵向排列方形框 + 框外名称；点击与品质色仍挂在此节点 */
.item-slot {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
    box-sizing: border-box;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
}
.item-slot:active { transform: scale(0.92); }

/* 避免 .tier-N 的 inset 光晕套在整个「框+名称」外轮廓上 */
.item-slot:has(> .item-slot-box) { box-shadow: none !important; }
.item-slot:has(> .item-slot-box).tier-6 { animation: none; }

/* 方形框：图标与数量角标仅在此容器内 */
.item-slot:not(.gacha-ten-front-slot) > .item-slot-box {
    aspect-ratio: 1;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(42, 48, 58, 0.92);
    border-radius: 6px;
    background: linear-gradient(145deg, #1c212a 0%, #141820 48%, #0e1118 100%);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 十连翻牌正面：框在卡面内占满剩余高度 */
.item-slot.gacha-ten-front-slot {
    width: 100%;
    height: 100%;
    padding: 3px;
    gap: 2px;
    justify-content: center;
}
.item-slot.gacha-ten-front-slot > .item-slot-box {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    aspect-ratio: unset;
    border: 1px solid rgba(42, 48, 58, 0.92);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.item-slot.gacha-ten-front-slot > .item-name {
    flex-shrink: 0;
    position: static;
    width: 100%;
    text-align: center;
    font-size: 9px;
    line-height: 1.12;
    padding: 2px 1px 0;
    margin: 0;
    max-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.item-slot.gacha-ten-front-slot .item-slot-box .proc-item-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    z-index: 0;
}
.item-slot.gacha-ten-front-slot .item-type-tag {
    font-size: 8px;
    padding: 0 3px;
}

/* 法宝格：品质底色与光晕在框体上 */
.item-slot.tier-0 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-0) 10%, #1a1f28) 0%, color-mix(in srgb, var(--tier-0) 5%, #0e1118) 100%);
    border-color: var(--tier-0);
}
.item-slot.tier-1 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-1) 11%, #1a1f28) 0%, color-mix(in srgb, var(--tier-1) 6%, #0e1118) 100%);
    border-color: var(--tier-1);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 8px rgba(76, 175, 80, 0.15);
}
.item-slot.tier-2 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-2) 12%, #1a1f28) 0%, color-mix(in srgb, var(--tier-2) 6%, #0e1118) 100%);
    border-color: var(--tier-2);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 10px rgba(33, 150, 243, 0.15);
}
.item-slot.tier-3 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-3) 13%, #1a1f28) 0%, color-mix(in srgb, var(--tier-3) 7%, #0e1118) 100%);
    border-color: var(--tier-3);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 15px rgba(156, 39, 176, 0.25);
}
.item-slot.tier-4 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-4) 14%, #1a1f28) 0%, color-mix(in srgb, var(--tier-4) 8%, #0e1118) 100%);
    border-color: var(--tier-4);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 20px rgba(232, 199, 107, 0.3);
}
.item-slot.tier-5 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-5) 15%, #1a1f28) 0%, color-mix(in srgb, var(--tier-5) 9%, #0e1118) 100%);
    border-color: var(--tier-5);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 25px rgba(255, 82, 82, 0.4);
}
.item-slot.tier-6 > .item-slot-box {
    background: linear-gradient(145deg, color-mix(in srgb, var(--tier-6) 16%, #1a1f28) 0%, color-mix(in srgb, var(--tier-6) 10%, #0e1118) 100%);
    border-color: var(--tier-6);
    box-shadow: inset 0 0 20px rgba(6, 10, 18, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.035), inset 0 0 30px rgba(255, 64, 129, 0.5);
    animation: divinePulse 2s infinite alternate;
}

/* 可堆叠道具名：与灵枢已装备法宝 caption 同款，按父级 .tier-N，不再逐道具内联色 */
.item-slot.tier-0 > .item-name { color: var(--tier-0); }
.item-slot.tier-1 > .item-name { color: var(--tier-1); }
.item-slot.tier-2 > .item-name { color: var(--tier-2); }
.item-slot.tier-3 > .item-name { color: var(--tier-3); }
.item-slot.tier-4 > .item-name {
    color: var(--tier-4);
    text-shadow: 0 0 5px var(--tier-4);
}
.item-slot.tier-5 > .item-name {
    color: var(--tier-5);
    text-shadow: 0 0 6px var(--tier-5);
}
.item-slot.tier-6 > .item-name {
    color: var(--tier-6);
    text-shadow: 0 0 8px var(--tier-6);
}
.item-slot.prop-tier-none > .item-name { color: var(--antique-gold); }

/* 道具（天品起 tier≥4）/法宝（天品起）：画框式静态线框（纵深 + 角饰 + 内收光），无周向流光 */
.item-slot.item-slot--border-glow > .item-slot-box {
    overflow: visible;
    isolation: isolate;
}
.item-slot-border-glow-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    color: var(--slot-glow-c);
    shape-rendering: geometricPrecision;
}
/* 最外：压暗「嵌槽」，托住品质色 */
.item-slot-border-glow-rim {
    fill: none;
    stroke: color-mix(in srgb, currentColor 22%, #03050a);
    stroke-width: 2.65;
    opacity: 0.62;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* 主环：极薄一层色相，不抢内容 */
.item-slot-border-glow-trail {
    fill: none;
    stroke: currentColor;
    stroke-width: 0.88;
    opacity: 0.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* 四角：略强调，腕表/证书框式点缀 */
.item-slot-border-glow-corner {
    fill: none;
    stroke: color-mix(in srgb, currentColor 78%, #0c0e14);
    stroke-width: 1.62;
    opacity: 0.58;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* 内圈：哑光收光，增加层次 */
.item-slot-border-glow-runner {
    fill: none;
    stroke: color-mix(in srgb, currentColor 38%, rgba(255, 255, 255, 0.16));
    stroke-width: 0.52;
    opacity: 0.34;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.item-slot.item-slot--border-glow > .item-slot-box .proc-item-icon {
    z-index: 2;
}

.item-name { font-size: 10px; font-family: 'KaiTi', serif; text-align: center; }
.item-slot > .item-name {
    white-space: normal;
    line-height: 1.15;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 全局道具格：图标铺满框内；名称在框外正下方；数量在框内右下 */
.item-slot:not(.item-slot--icon-only):not(.gacha-ten-front-slot) .item-slot-box .proc-item-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    z-index: 0;
}
.item-slot:not(.item-slot--icon-only):not(.gacha-ten-front-slot) > .item-name {
    position: static;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    max-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 9px;
    padding: 0 2px;
    margin: 0;
    z-index: auto;
    color: rgba(165, 200, 165, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 1px rgba(0, 0, 0, 0.95);
    pointer-events: none;
}
/* 法宝装备格：名称继承父级 .tier-* 字色，与详情弹窗 / 养成详情一致 */
.item-slot.item-slot--fabao:not(.gacha-ten-front-slot) > .item-name {
    color: inherit;
}
.item-slot.item-slot--fabao.tier-4:not(.gacha-ten-front-slot) > .item-name {
    text-shadow:
        0 0 5px var(--tier-4),
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 1px rgba(0, 0, 0, 0.95);
}
.item-slot.item-slot--fabao.tier-5:not(.gacha-ten-front-slot) > .item-name {
    text-shadow:
        0 0 6px var(--tier-5),
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 1px rgba(0, 0, 0, 0.95);
}
.item-slot.item-slot--fabao.tier-6:not(.gacha-ten-front-slot) > .item-name {
    text-shadow:
        0 0 8px var(--tier-6),
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 1px rgba(0, 0, 0, 0.95);
}
.item-slot:not(.gacha-ten-front-slot) .item-slot-box .item-count-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    top: auto;
    left: auto;
    font-size: 10px;
    z-index: 3;
    font-family: monospace;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.item-slot.item-slot--icon-only:not(.gacha-ten-front-slot) .item-slot-box .proc-item-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    z-index: 0;
}

.item-type-tag { position: absolute; top: -1px; left: -1px; font-size: 8px; background: rgba(0,0,0,0.8); border-right: 1px solid #333; border-bottom: 1px solid #333; padding: 1px 3px; color: #aaa; border-bottom-right-radius: 4px; border-top-left-radius: 6px; line-height: 1; z-index: 1; }
.item-slot.equipped > .item-slot-box::after { content: "阵中"; position: absolute; top: -1px; right: -1px; background: var(--antique-gold); color: #000; font-size: 8px; padding: 1px 3px; border-bottom-left-radius: 4px; border-top-right-radius: 6px; box-shadow: -1px 1px 2px rgba(0,0,0,0.5); line-height: 1; z-index: 4; }
.fabao-upgrade-arrow {
    position: absolute; top: -2px; right: 2px; font-size: 12px; font-weight: bold;
    line-height: 1; z-index: 5; pointer-events: none;
    /* 固定为提示绿：避免父级 .tier-N 的 color 继承、品阶底光叠加观感偏青，以及 emoji 字形变色 */
    color: #69f0ae !important;
    -webkit-text-fill-color: #69f0ae;
    font-variant-emoji: text;
    font-family: system-ui, "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif;
    text-shadow: 0 0 6px rgba(105, 240, 174, 0.35), 0 1px 2px rgba(0, 0, 0, 0.8);
}
/* 待选槽位：按与待装法宝的灵力对比着色 */
.slot-box.slot-pick-target.slot-compare-up {
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.55), inset 0 0 10px rgba(0, 230, 118, 0.14) !important;
    border-color: #00e676 !important;
}
.slot-box.slot-pick-target.slot-compare-down {
    box-shadow: 0 0 12px rgba(255, 82, 82, 0.5), inset 0 0 8px rgba(255, 82, 82, 0.12) !important;
    border-color: #ff5252 !important;
}
.slot-box.slot-pick-target.slot-compare-same {
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.42), inset 0 0 8px rgba(255, 193, 7, 0.1) !important;
    border-color: #ffc107 !important;
}
.slot-box.slot-pick-target.slot-compare-empty {
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.5), inset 0 0 8px rgba(0, 188, 212, 0.12) !important;
    border-color: #00bcd4 !important;
}
.slot-compare-chip {
    position: absolute; top: 0; left: 0; right: 0; text-align: center;
    font-size: 7px; font-weight: bold; line-height: 1.2; padding: 2px 1px 0;
    pointer-events: none; z-index: 3; font-family: sans-serif;
}
.slot-compare-chip.chip-up { color: #69f0ae; text-shadow: 0 0 6px rgba(105, 240, 174, 0.35), 0 1px 2px rgba(0, 0, 0, 0.8); }
.slot-compare-chip.chip-down { color: #ff8a80; text-shadow: 0 0 6px rgba(255, 138, 128, 0.3), 0 1px 2px rgba(0, 0, 0, 0.8); }
.slot-compare-chip.chip-same { color: #ffe082; text-shadow: 0 0 3px rgba(0,0,0,0.95), 0 1px 2px #000; }
.slot-compare-chip.chip-empty { color: #80deea; text-shadow: 0 0 3px rgba(0,0,0,0.95), 0 1px 2px #000; }
.slot-box.slot-pick-target.slot-compare-up .slot-label,
.slot-box.slot-pick-target.slot-compare-down .slot-label,
.slot-box.slot-pick-target.slot-compare-same .slot-label,
.slot-box.slot-pick-target.slot-compare-empty .slot-label { bottom: -18px; }
.slot-box.slot-pick-target.slot-equipped img { margin-top: 11px; margin-bottom: 0; }
.item-count-badge { position: absolute; bottom: 2px; right: 4px; font-size: 11px; font-family: monospace; color: #fff; text-shadow: 1px 1px 2px #000, -1px -1px 2px #000; z-index: 2; font-weight: bold; }

.tier-0 { border-color: var(--tier-0); color: var(--tier-0); } 
.tier-1 { border-color: var(--tier-1); color: var(--tier-1); box-shadow: inset 0 0 8px rgba(76,175,80,0.15); } 
.tier-2 { border-color: var(--tier-2); color: var(--tier-2); box-shadow: inset 0 0 10px rgba(33,150,243,0.15); } 
.tier-3 { border-color: var(--tier-3); color: var(--tier-3); box-shadow: inset 0 0 15px rgba(156,39,176,0.25); } 
.tier-4 { border-color: var(--tier-4); color: var(--tier-4); box-shadow: inset 0 0 20px rgba(232,199,107,0.3); text-shadow: 0 0 5px var(--tier-4); }
.tier-5 { border-color: var(--tier-5); color: var(--tier-5); box-shadow: inset 0 0 25px rgba(255,82,82,0.4); text-shadow: 0 0 6px var(--tier-5); }
.tier-6 { border-color: var(--tier-6); color: var(--tier-6); box-shadow: inset 0 0 30px rgba(255,64,129,0.5); text-shadow: 0 0 8px var(--tier-6); animation: divinePulse 2s infinite alternate; }
/* 勿对整块使用 hue-rotate：filter 会作用到格内全部子元素，升级箭头 ▲ 会被旋成青/蓝色 */
@keyframes divinePulse { from { filter: brightness(1); } to { filter: brightness(1.12); } }

.gacha-item-enter { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0; transform: scale(0.5); }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }

.root-item { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.4); padding: 8px 10px; border-radius: 6px; border: 1px solid transparent; transition: transform 0.1s; }
.root-item:active { transform: scale(0.96); }
.root-info { display: flex; flex-direction: column; text-align: left; }

/* ===== 法宝养成全屏（法宝强化 / 词缀洗练） ===== */
.bag-pivot-head-actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    flex-shrink: 0;
}
.bag-pivot-head-actions .fabao-summon-entry-btn--compact {
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
}
.bag-pivot-head-actions .fabao-summon-entry-btn--compact .fabao-summon-entry-main {
    color: var(--antique-gold);
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 2px;
    white-space: nowrap;
    text-shadow: 0 0 2px currentColor;
}
.fabao-refine-entry-btn {
    position: relative;
}
.fabao-refine-entry-btn.fabao-refine-entry-btn--locked {
    opacity: 0.48;
    filter: grayscale(0.35);
}
body.fabao-refine-open {
    overflow: hidden;
}

/* 系统设置 · 面板区块与音量滑条（与炼丹炼制数量条同源：凹槽轨道 + 金钮，避免原生 range 网页感） */
#settings-modal .settings-panel-section {
    position: relative;
    margin-bottom: 15px;
    padding: 14px 14px 16px;
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -14px 32px rgba(0, 0, 0, 0.42),
        0 2px 12px rgba(0, 0, 0, 0.35);
    background:
        linear-gradient(180deg, rgba(16, 18, 22, 0.97) 0%, rgba(7, 9, 12, 0.94) 100%);
    box-sizing: border-box;
}
#settings-modal .settings-panel-section::before,
#settings-modal .settings-panel-section::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    pointer-events: none;
    border-color: rgba(212, 175, 55, 0.38);
    border-style: solid;
    border-width: 0;
    z-index: 0;
}
#settings-modal .settings-panel-section::before {
    top: 6px;
    left: 6px;
    border-top-width: 2px;
    border-left-width: 2px;
    border-top-left-radius: 1px;
}
#settings-modal .settings-panel-section::after {
    bottom: 6px;
    right: 6px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-bottom-right-radius: 1px;
}
#settings-modal .settings-panel-section--last {
    margin-bottom: 25px;
}
#settings-modal .settings-panel-section__title {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--antique-gold);
    margin: 0 0 10px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}
#settings-modal .settings-panel-section__hint {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 12px;
}
#settings-modal .settings-panel-section__body {
    position: relative;
    z-index: 1;
}
#settings-modal .settings-account-status {
    font-size: 12px;
    color: #fff;
    margin-bottom: 10px;
}
#settings-modal .settings-bind-block {
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}
#settings-modal .settings-bind-input.auth-input {
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    box-sizing: border-box;
    text-align: left;
    font-size: 13px;
    background: rgba(4, 6, 9, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}
#settings-modal .settings-bind-code-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
}
#settings-modal .settings-bind-input--code {
    flex: 1;
    min-width: 0;
}
#settings-modal .settings-bind-sms-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    align-self: center;
    margin: 0;
}
#settings-modal .settings-bind-submit-btn {
    width: 100%;
    box-sizing: border-box;
    margin: 4px 0 0;
}
#settings-modal .settings-audio-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 12px;
    color: rgba(236, 239, 244, 0.92);
}
#settings-modal .settings-audio-row__label {
    flex: 1;
    min-width: 0;
    letter-spacing: 0.04em;
}
#settings-modal .settings-audio-glyph {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    color: rgba(232, 199, 107, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 4px;
    background: linear-gradient(165deg, rgba(40, 34, 22, 0.95) 0%, rgba(12, 10, 8, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.45);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
}
#settings-modal .settings-audio-glyph--sfx {
    font-size: 11px;
    color: rgba(200, 230, 255, 0.92);
    border-color: rgba(140, 200, 255, 0.28);
    text-shadow: 0 0 8px rgba(120, 200, 255, 0.28);
}
#settings-modal .settings-volume-pct {
    flex-shrink: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #fff6d4 0%, #e8c76b 42%, #a67c00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}
#settings-modal .settings-volume-slider {
    position: relative;
    z-index: 1;
    --settings-vol-fill-pct: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 28px;
    margin: 0 0 12px;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    box-sizing: border-box;
}
#settings-modal .settings-volume-slider:last-of-type {
    margin-bottom: 0;
}
#settings-modal .settings-volume-slider:focus {
    outline: none;
}
#settings-modal .settings-volume-slider:focus-visible {
    outline: 1px solid rgba(212, 175, 55, 0.55);
    outline-offset: 3px;
    border-radius: 4px;
}
#settings-modal .settings-volume-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 5px;
    border: 1px solid #2a3038;
    background: linear-gradient(
        90deg,
        #5c4010 0%,
        #d4af37 var(--settings-vol-fill-pct),
        #07090c var(--settings-vol-fill-pct),
        #10141a 100%
    );
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.88),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
#settings-modal .settings-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -5px;
    border-radius: 50%;
    border: 1px solid #e8c76b;
    background: radial-gradient(circle at 32% 28%, #fff8e1 0%, #e8c76b 38%, #a67c00 72%, #4a3208 100%);
    box-shadow:
        0 0 10px rgba(212, 175, 55, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.75),
        inset 0 2px 3px rgba(255, 255, 255, 0.42),
        inset 0 -2px 4px rgba(0, 0, 0, 0.38);
}
#settings-modal .settings-volume-slider:hover::-webkit-slider-thumb {
    box-shadow:
        0 0 14px rgba(212, 175, 55, 0.65),
        0 3px 8px rgba(0, 0, 0, 0.8),
        inset 0 2px 3px rgba(255, 255, 255, 0.48),
        inset 0 -2px 4px rgba(0, 0, 0, 0.32);
}
#settings-modal .settings-volume-slider:active::-webkit-slider-thumb {
    transform: scale(0.96);
}
#settings-modal .settings-volume-slider::-moz-range-track {
    height: 10px;
    border-radius: 5px;
    border: 1px solid #2a3038;
    background: #07090c;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.88),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
#settings-modal .settings-volume-slider::-moz-range-progress {
    height: 10px;
    border-radius: 5px 0 0 5px;
    background: linear-gradient(90deg, #5c4010, #d4af37);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
#settings-modal .settings-volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 1px solid #e8c76b;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff8e1 0%, #e8c76b 38%, #a67c00 72%, #4a3208 100%);
    box-shadow:
        0 0 10px rgba(212, 175, 55, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.75),
        inset 0 2px 3px rgba(255, 255, 255, 0.42);
}
#settings-modal .settings-gift-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
}
#settings-modal .settings-gift-input.auth-input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 9px 12px;
    text-align: left;
    font-size: 13px;
    letter-spacing: 0.06em;
    background: rgba(4, 6, 9, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}
#settings-modal .settings-gift-btn {
    flex-shrink: 0;
    padding: 9px 18px;
    margin: 0;
    align-self: center;
}

/* 内嵌调试控制台（设置内连点「系统设置」标题 5 次打开） */
#game-dev-console-modal .game-dev-console-content {
    width: 92%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-sizing: border-box;
}
.game-dev-console-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 10px;
}
.game-dev-console-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.game-dev-console-toolbar .btn {
    flex: 1;
    margin: 0;
}
.game-dev-console-body {
    flex: 1;
    min-height: 220px;
    max-height: min(58vh, 420px);
    margin: 0;
    padding: 10px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    color: #c8d0d8;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    box-sizing: border-box;
}

/* 系统设置 · 全局战斗特效档位：上排低/中/高，底排自动大按钮 */
.settings-combat-fx-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.settings-combat-fx-row--tier {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}
.settings-combat-fx-row--tier .settings-combat-fx-opt {
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
    font-size: 12px;
    box-sizing: border-box;
}
.settings-combat-fx-opt--auto {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: bold;
}

/* ===== 天命之路 · 副本内仅顶栏货币 + 返回条 ===== */
body.destiny-road-run #bottomNav {
    display: none !important;
}
body.destiny-road-run #task-widget {
    display: none !important;
}
body.destiny-road-run #combat-map-selector,
body.destiny-road-run #ui-map-suppress,
body.destiny-road-run #ui-map-desc,
body.destiny-road-run #map-progress-container,
body.destiny-road-run #btn-summon-boss,
body.destiny-road-run #btn-prev-map,
body.destiny-road-run #btn-next-map,
body.destiny-road-run #blessed-land-qi-combat-hud,
body.destiny-road-run #training-arena-hud,
body.destiny-road-run #training-arena-stats-panel {
    display: none !important;
}
.destiny-road-top-exit {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--top-bar-total, 62px);
    z-index: 21;
    padding: 4px 10px 8px 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 40px;
    pointer-events: none;
}
/* 副本顶部：常驻显示当前房间名（短名） */
.destiny-road-objective-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: min(68%, 320px);
    padding: 0 6px;
    box-sizing: border-box;
    text-align: center;
    font-size: clamp(14px, 3.9vw, 18px);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.28;
    color: #f5f9ff;
    pointer-events: none;
    text-shadow:
        0 0 12px rgba(0, 0, 0, 0.95),
        0 1px 2px rgba(0, 0, 0, 0.92);
}
.destiny-road-objective-hint[hidden] {
    display: none !important;
}

.destiny-road-side-hint {
    position: absolute;
    top: calc(var(--top-bar-total, 62px) + 122px);
    left: 0;
    z-index: 22;
    width: min(250px, 68%);
    padding: 8px 10px 8px 12px;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(90deg, rgba(15, 20, 25, 0.95) 0%, rgba(5, 8, 10, 0.95) 100%);
    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.62);
    pointer-events: none;
}
.destiny-road-side-hint[hidden] {
    display: none !important;
}
.destiny-road-side-hint-title {
    font-size: 12px;
    color: var(--antique-gold);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
}
.destiny-road-side-hint-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.42;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
}

/* 幻阵残亭：明鉴/妄识、破卷时刻条、禁言域提示（相对 #mobile-wrapper，宽屏居中时不跑出游戏列） */
.dr-mirror-mechanic-hud {
    position: absolute;
    right: max(10px, env(safe-area-inset-right, 0px));
    top: 48px;
    width: min(42%, 168px);
    z-index: 10056;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}
.dr-mirror-mechanic-hud[hidden] {
    display: none !important;
}

/* 玄锁镇渊：伪律层与阶段（左侧，与镜谕 HUD 对称） */
.dr-xuan-lock-mechanic-hud {
    position: absolute;
    left: max(10px, env(safe-area-inset-left, 0px));
    top: 48px;
    width: min(46%, 200px);
    z-index: 10056;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.dr-xuan-lock-mechanic-hud[hidden] {
    display: none !important;
}
.dr-xuan-lock-hud-stack {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #ffe082;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.dr-xuan-lock-hud-phase {
    font-size: 11px;
    font-weight: 600;
    color: #b2dfdb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.88);
}
.dr-mirror-hud-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.dr-mirror-hud-ming {
    color: #b2ebf2;
}
.dr-mirror-hud-wang {
    color: #e1bee7;
}
.dr-mirror-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dr-mirror-bar-wrap[hidden] {
    display: none !important;
}
.dr-mirror-bar-label {
    font-size: 10px;
    color: #ffe082;
    letter-spacing: 0.12em;
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.35);
}
.dr-mirror-bar-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(20, 24, 40, 0.88);
    border: 1px solid rgba(128, 222, 234, 0.35);
    overflow: hidden;
}
.dr-mirror-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 80ms linear;
}
.dr-mirror-bar-fill--pojuan {
    background: linear-gradient(90deg, #4dd0e1 0%, #fff59d 100%);
    box-shadow: 0 0 10px rgba(77, 208, 225, 0.45);
}
.dr-mirror-silence-wrap {
    font-size: 11px;
    font-weight: 700;
    color: #ce93d8;
    line-height: 1.35;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(40, 20, 56, 0.82);
    border: 1px solid rgba(186, 104, 200, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.dr-mirror-silence-wrap[hidden] {
    display: none !important;
}

/* 紧挨地图标题下方（#combat-overlay 流式布局），避免盖住画布中央的敌我单位 */
.destiny-road-boss-hud {
    position: relative;
    flex: 0 0 auto;
    align-self: center;
    width: min(96%, 420px);
    max-width: 100%;
    margin: 2px 0 10px;
    z-index: 6;
    pointer-events: none;
    text-align: center;
    box-sizing: border-box;
}
.destiny-road-boss-hud[hidden] {
    display: none !important;
}
.destiny-road-boss-name {
    font-size: clamp(12px, 3.3vw, 15px);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffe7c8;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
}
.destiny-road-boss-hp-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(40, 14, 20, 0.92);
    border: 1px solid rgba(255, 190, 170, 0.7);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.destiny-road-boss-hp-fill {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef5350 0%, #ff7043 48%, #ffca28 100%);
    box-shadow: 0 0 14px rgba(244, 67, 54, 0.45);
    transition: width 120ms linear;
}
.destiny-road-boss-hp-text {
    margin-top: 4px;
    font-size: clamp(9px, 2.6vw, 11px);
    line-height: 1.32;
    color: #ffe9d2;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.9);
    max-width: 100%;
    padding: 0 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}

/* 副本大字标题：相对游戏列铺满，与历练画布分层（高于顶栏） */
.destiny-road-screen-title-root {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10063;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 max(14px, env(safe-area-inset-left, 0px)) 0 max(14px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    pointer-events: none;
}
.destiny-road-screen-title-root[hidden] {
    display: none !important;
}
.destiny-road-screen-title {
    text-align: center;
    max-width: min(94%, 360px);
    font-size: clamp(20px, 5.6vw, 30px);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.38;
    color: #f2e2b8;
    white-space: normal;
    word-break: break-word;
    text-shadow:
        0 0 22px rgba(0, 0, 0, 0.95),
        0 2px 5px rgba(0, 0, 0, 0.92),
        0 0 42px rgba(200, 160, 80, 0.28);
    margin-top: -10vh;
    transform-origin: 50% 50%;
}
.destiny-road-screen-title.destiny-road-screen-title--play {
    animation: destinyRoadScreenTitleFloat var(--dr-st-dur, 2s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes destinyRoadScreenTitleFloat {
    0% {
        opacity: 0;
        transform: translateY(26px) scale(0.88);
    }
    14% {
        opacity: 1;
        transform: translateY(-8px) scale(1.04);
    }
    26% {
        transform: translateY(6px) scale(1);
    }
    38% {
        transform: translateY(-5px) scale(1);
    }
    50% {
        transform: translateY(2px) scale(1);
    }
    62% {
        transform: translateY(0) scale(1);
    }
    78% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-28px) scale(0.97);
    }
}

.destiny-road-top-exit[hidden] {
    display: none !important;
}
.destiny-road-top-exit .destiny-road-exit-btn {
    pointer-events: auto;
}
.destiny-road-dev-hud {
    position: absolute;
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    max-width: min(240px, 56%);
    pointer-events: none;
}
.destiny-road-dev-hud[hidden] {
    display: none !important;
}
.destiny-road-dev-hud .btn {
    pointer-events: auto;
}
.destiny-road-dev-hud-txt {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    line-height: 1.35;
}

/* ===== 一键分解弹窗（法宝详情式分割线 + 品阶格 + 凝神定气同款开关） ===== */
#auto-smelt-modal .modal-content--auto-smelt {
    width: min(94vw, 420px);
    max-width: 420px;
    padding: 18px 16px 16px;
    text-align: left;
}
#auto-smelt-modal .dialog-title {
    margin-bottom: 12px;
    color: var(--antique-gold);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.22), 0 2px 4px #000;
}
.auto-smelt-block {
    margin: 0;
}
.auto-smelt-block--after {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(212, 175, 55, 0.14);
}
.auto-smelt-block-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #e8d59a;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}
.auto-smelt-auto-hint {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(186, 190, 198, 0.82);
    letter-spacing: 0.03em;
}
#auto-smelt-modal .game-dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 2;
}
#auto-smelt-modal .game-dropdown--open {
    z-index: 20;
}
#auto-smelt-modal .game-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 12px 8px 14px;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.38);
    background: linear-gradient(165deg, rgba(32, 28, 22, 0.96) 0%, rgba(12, 11, 9, 0.94) 100%);
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 10px rgba(0, 0, 0, 0.35);
    color: #f0e6c8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
#auto-smelt-modal .game-dropdown__trigger::after {
    content: "";
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid rgba(212, 175, 55, 0.75);
    border-bottom: 2px solid rgba(212, 175, 55, 0.75);
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.9;
}
#auto-smelt-modal .game-dropdown--open .game-dropdown__trigger::after {
    transform: rotate(-135deg) translateY(2px);
}
#auto-smelt-modal .game-dropdown__trigger:active {
    border-color: rgba(235, 210, 140, 0.55);
}
#auto-smelt-modal .game-dropdown__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: min(52vh, 280px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: linear-gradient(180deg, rgba(14, 14, 16, 0.98) 0%, rgba(8, 8, 10, 0.98) 100%);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.65),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    -webkit-overflow-scrolling: touch;
}
#auto-smelt-modal .game-dropdown__opt {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 4px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(220, 222, 226, 0.92);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}
#auto-smelt-modal .game-dropdown__opt:last-child {
    margin-bottom: 0;
}
#auto-smelt-modal .game-dropdown__opt:active {
    background: rgba(255, 255, 255, 0.06);
}
#auto-smelt-modal .game-dropdown__opt--active {
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.08);
}
#auto-smelt-modal .game-dropdown__opt--mute {
    color: rgba(160, 164, 172, 0.88);
    font-weight: 600;
}
#auto-smelt-modal .game-dropdown__opt--t0 {
    color: var(--tier-0);
}
#auto-smelt-modal .game-dropdown__opt--t1 {
    color: var(--tier-1);
}
#auto-smelt-modal .game-dropdown__opt--t2 {
    color: var(--tier-2);
}
#auto-smelt-modal .game-dropdown__opt--t3 {
    color: var(--tier-3);
}
#auto-smelt-modal .game-dropdown__opt--t4 {
    color: var(--tier-4);
}
#auto-smelt-modal .game-dropdown__opt--t5 {
    color: var(--tier-5);
}
#auto-smelt-modal .game-dropdown__opt--t6 {
    color: var(--tier-6);
}
.auto-smelt-intro {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(200, 202, 206, 0.88);
    letter-spacing: 0.02em;
}
.auto-smelt-intro__warn {
    color: #ff7070;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 82, 82, 0.32);
}
.auto-smelt-sheet {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 12px;
    padding: 12px 12px 14px;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.auto-smelt-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px;
    box-sizing: border-box;
}
.auto-smelt-rule--spaced {
    margin-top: 16px;
    margin-bottom: 10px;
}
.auto-smelt-rule__gem {
    flex: 0 0 4px;
    width: 4px;
    height: 4px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgba(235, 220, 185, 0.88) 0%, rgba(165, 155, 130, 0.55) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.35);
}
.auto-smelt-rule__line {
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        rgba(100, 95, 82, 0.12) 0%,
        rgba(200, 188, 155, 0.42) 18%,
        rgba(220, 205, 168, 0.55) 50%,
        rgba(200, 188, 155, 0.42) 82%,
        rgba(100, 95, 82, 0.12) 100%
    );
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.14);
}
.auto-smelt-rule__title {
    flex: 0 1 auto;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    color: #dcc896;
    text-shadow: 0 0 10px rgba(220, 190, 100, 0.22), 0 1px 2px rgba(0, 0, 0, 0.5);
}
.auto-smelt-tiers {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 400px) {
    .auto-smelt-tiers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 320px) {
    .auto-smelt-tiers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.auto-smelt-tiers--remnant {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 380px) {
    .auto-smelt-tiers--remnant {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
.auto-smelt-tier {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.auto-smelt-tier input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.auto-smelt-tier__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 4px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(28, 32, 40, 0.95) 0%, rgba(12, 14, 18, 0.92) 100%);
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    overflow: hidden;
}
.auto-smelt-tier:active .auto-smelt-tier__frame {
    transform: scale(0.97);
}
.auto-smelt-tier__text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
#auto-smelt-modal .auto-smelt-tier--t0 .auto-smelt-tier__text,
#auto-smelt-modal .auto-smelt-tier--t0 .auto-smelt-tier__text { color: var(--tier-0); }
#auto-smelt-modal .auto-smelt-tier--t1 .auto-smelt-tier__text,
#auto-smelt-modal .auto-smelt-tier--t1 .auto-smelt-tier__text { color: var(--tier-1); }
#auto-smelt-modal .auto-smelt-tier--t2 .auto-smelt-tier__text,
#auto-smelt-modal .auto-smelt-tier--t2 .auto-smelt-tier__text { color: var(--tier-2); }
#auto-smelt-modal .auto-smelt-tier--t3 .auto-smelt-tier__text,
#auto-smelt-modal .auto-smelt-tier--t3 .auto-smelt-tier__text { color: var(--tier-3); }
#auto-smelt-modal .auto-smelt-tier--t4 .auto-smelt-tier__text,
#auto-smelt-modal .auto-smelt-tier--t4 .auto-smelt-tier__text { color: var(--tier-4); }
#auto-smelt-modal .auto-smelt-tier--t5 .auto-smelt-tier__text { color: var(--tier-5); }
#auto-smelt-modal .auto-smelt-tier--t6 .auto-smelt-tier__text { color: var(--tier-6); }
#auto-smelt-modal .auto-smelt-tier--t0 .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t0 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-0) 40%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t1 .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t1 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-1) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t2 .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t2 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-2) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t3 .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t3 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-3) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t4 .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t4 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-4) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t5 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-5) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier--t6 .auto-smelt-tier__frame {
    border-color: color-mix(in srgb, var(--tier-6) 38%, rgba(255, 255, 255, 0.06));
}
#auto-smelt-modal .auto-smelt-tier input:checked + .auto-smelt-tier__frame::after,
#auto-smelt-modal .auto-smelt-tier input:checked + .auto-smelt-tier__frame::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 5px;
    height: 9px;
    border: solid rgba(255, 255, 255, 0.92);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0.9;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
    pointer-events: none;
}
#auto-smelt-modal .auto-smelt-tier--t0 input:checked + .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t0 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-0);
    box-shadow:
        inset 0 0 14px color-mix(in srgb, var(--tier-0) 24%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-0) 32%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.42);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-0) 14%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t1 input:checked + .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t1 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-1);
    box-shadow:
        inset 0 0 14px color-mix(in srgb, var(--tier-1) 22%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-1) 30%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.42);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-1) 12%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t2 input:checked + .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t2 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-2);
    box-shadow:
        inset 0 0 14px color-mix(in srgb, var(--tier-2) 22%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-2) 30%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.42);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-2) 12%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t3 input:checked + .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t3 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-3);
    box-shadow:
        inset 0 0 16px color-mix(in srgb, var(--tier-3) 24%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-3) 30%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.42);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-3) 12%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t4 input:checked + .auto-smelt-tier__frame,
#auto-smelt-modal .auto-smelt-tier--t4 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-4);
    box-shadow:
        inset 0 0 18px color-mix(in srgb, var(--tier-4) 20%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-4) 35%, transparent),
        0 4px 14px rgba(0, 0, 0, 0.45);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-4) 12%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t5 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-5);
    box-shadow:
        inset 0 0 20px color-mix(in srgb, var(--tier-5) 22%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-5) 35%, transparent),
        0 4px 14px rgba(0, 0, 0, 0.45);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-5) 12%, #1a1e26) 0%, #0c1018 100%);
}
#auto-smelt-modal .auto-smelt-tier--t6 input:checked + .auto-smelt-tier__frame {
    border-color: var(--tier-6);
    box-shadow:
        inset 0 0 22px color-mix(in srgb, var(--tier-6) 24%, transparent),
        0 0 0 1px color-mix(in srgb, var(--tier-6) 38%, transparent),
        0 4px 16px rgba(0, 0, 0, 0.48);
    background: linear-gradient(165deg, color-mix(in srgb, var(--tier-6) 12%, #1a1e26) 0%, #0c1018 100%);
}
.auto-smelt-auto-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 11px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.auto-smelt-auto-card:active {
    background: rgba(255, 255, 255, 0.05);
}
.auto-smelt-auto-card:focus-within {
    border-color: rgba(212, 175, 55, 0.28);
}
.auto-smelt-auto-card__text {
    flex: 1;
    margin: 0;
    min-width: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(198, 200, 204, 0.9);
    letter-spacing: 0.02em;
}
.auto-smelt-name-tier {
    font-weight: 700;
}
.auto-smelt-name-tier--0 { color: var(--tier-0); }
.auto-smelt-name-tier--1 { color: var(--tier-1); }
#auto-smelt-modal .switch--auto-smelt {
    flex-shrink: 0;
    transform: scale(1.05);
}
.modal-footer--auto-smelt {
    margin-top: 14px;
    padding-top: 2px;
}
.auto-smelt-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.auto-smelt-footer-actions .auto-smelt-footer-row .btn {
    flex: 1;
    min-width: 0;
}
.auto-smelt-footer-close-wide {
    width: 100%;
    box-sizing: border-box;
}
.auto-smelt-footer-row {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.auto-smelt-footer-row .btn {
    flex: 1;
    min-width: 0;
}
.auto-smelt-footer-actions .auto-smelt-confirm-btn {
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ========== 仙榜 ========== */
/* 固定整页高度：不随条目多少伸缩；仅中间榜单区域上下滚动 */
#leaderboard-modal.modal-wrapper > .modal-content.leaderboard-modal-sheet {
    width: 90%;
    max-width: 400px;
    padding: 16px 14px 18px;
    box-sizing: border-box;
    overflow: hidden;
    height: min(540px, calc(100vh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    max-height: min(540px, calc(100vh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    min-height: min(540px, calc(100vh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
}
#leaderboard-modal .leaderboard-modal-title.dialog-title {
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 22px;
    letter-spacing: 0.42em;
    padding-left: 0.42em;
    margin-bottom: 12px;
}
#leaderboard-modal .leaderboard-nav-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(74, 64, 49, 0.75);
    padding-bottom: 10px;
    flex-wrap: wrap;
}
#leaderboard-modal .leaderboard-nav-tabs .daily-tab-btn {
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.14em;
    padding: 7px 14px;
}
#leaderboard-modal .leaderboard-subtitle {
    margin: 0 0 12px;
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(188, 176, 152, 0.92);
    text-align: center;
    letter-spacing: 0.08em;
}
#leaderboard-modal .leaderboard-body.modal-body-scroll {
    flex: 1 1 0%;
    min-height: 0;
    padding-right: 4px;
}
#leaderboard-modal .leaderboard-modal-footer.modal-footer {
    margin-top: 8px;
    flex-shrink: 0;
}
#leaderboard-modal .leaderboard-modal-footer .btn {
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 15px;
    letter-spacing: 0.35em;
    padding-left: 0.35em;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(22, 26, 32, 0.92) 0%, rgba(8, 10, 14, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.leaderboard-row__rank {
    min-width: 32px;
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 16px;
    font-weight: bold;
    color: var(--antique-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.28), 0 1px 2px rgba(0, 0, 0, 0.95);
    text-align: center;
    flex-shrink: 0;
}
.leaderboard-row__name {
    flex: 1;
    min-width: 0;
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 14px;
    font-weight: bold;
    color: rgba(248, 242, 228, 0.96);
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88);
}
/* 与主界面道行数字同系：金箔渐变字，避免等宽绿字割裂仙侠风格 */
.leaderboard-row__score {
    flex-shrink: 0;
    max-width: 48%;
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: right;
    background: linear-gradient(180deg, #fff8e8 0%, #e8c878 45%, #b8893a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.14));
    font-variant-numeric: tabular-nums;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .leaderboard-row__score {
        color: var(--tier-4);
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        filter: none;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    }
}
.leaderboard-msg {
    text-align: center;
    padding: 28px 12px;
    font-family: "STKaiti", "KaiTi", "华文楷体", serif;
    font-size: 13px;
    line-height: 1.65;
    letter-spacing: 0.1em;
    color: rgba(150, 158, 168, 0.96);
}

/* ========== 七日礼谒 ========== */
.seven-day-signin-sheet.modal-content {
    width: 92%;
    max-width: 420px;
    padding: 14px 12px 16px;
    box-sizing: border-box;
}
.seven-day-signin-meta {
    margin: 0 0 12px;
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-muted);
    text-align: left;
}
.seven-day-signin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, auto);
    gap: 8px;
    align-items: stretch;
}
.seven-day-signin-day {
    position: relative;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid var(--bronze-border);
    border-radius: 8px;
    padding: 8px 6px 10px;
    text-align: center;
    min-width: 0;
}
.seven-day-signin-day--grand {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.seven-day-signin-day--grand .seven-day-signin-slots {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}
.seven-day-signin-day-head {
    font-size: 11px;
    font-weight: 700;
    color: var(--antique-gold);
    margin-bottom: 6px;
    letter-spacing: 0.06em;
    min-height: 1.35em;
}
.seven-day-signin-day-head--countdown {
    color: var(--jade-green);
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;
    letter-spacing: 0.04em;
    text-shadow: 0 0 10px color-mix(in srgb, var(--jade-green) 45%, transparent);
}
.seven-day-signin-slots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.seven-day-signin-slot-outer {
    position: relative;
    width: 100%;
    max-width: 104px;
    margin: 0 auto;
}
.seven-day-signin-slot-outer .seven-day-signin-slot.item-slot {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}
/* 已领：道具格略压暗，与金印呼应 */
.seven-day-signin-slot-outer--claimed .item-slot-box {
    filter: grayscale(0.35) brightness(0.72) contrast(1.05);
    transition: filter 0.2s ease;
}
.seven-day-signin-slot .item-name {
    font-size: 10px;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
}
.seven-day-signin-day--claimable {
    border-color: color-mix(in srgb, var(--tier-4) 70%, var(--bronze-border));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--tier-4) 35%, transparent),
        0 0 14px color-mix(in srgb, var(--tier-4) 22%, transparent);
}
.seven-day-signin-day--claimed {
    opacity: 0.92;
}
.seven-day-signin-day--locked {
    opacity: 0.42;
}
/* 印章式「已领」：暗底描金，与顶栏古金风格一致 */
.seven-day-signin-claimed-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    z-index: 8;
    pointer-events: none;
    box-sizing: border-box;
    min-width: 48px;
    padding: 8px 10px 7px;
    border: 2px solid color-mix(in srgb, var(--antique-gold) 78%, #2a2210);
    border-radius: 3px;
    background: linear-gradient(
        152deg,
        rgba(22, 18, 12, 0.88) 0%,
        rgba(10, 9, 14, 0.92) 48%,
        rgba(16, 12, 8, 0.9) 100%
    );
    color: color-mix(in srgb, var(--antique-gold) 92%, #fff6dc);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.18em;
    white-space: nowrap;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 232, 190, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 5px 16px rgba(0, 0, 0, 0.55);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 14px color-mix(in srgb, var(--antique-gold) 22%, transparent);
}
