
        /* ===================== 设计变量：主题3 · 熔焰琥珀（炭黑底 + 琥珀暖金） ===================== */
        :root {
            --bg-0: #f4f1ea;
            --bg-1: #efe9de;
            --panel: rgba(255, 253, 249, 0.55);
            --panel-solid: #fffdf9;
            --border: rgba(166, 31, 36, 0.20);
            --border-strong: rgba(166, 31, 36, 0.48);
            --neon-blue: #a61f24;
            --neon-cyan: #a61f24;
            --neon-purple: #7f1519;
            --neon-violet: #aa8246;
            --accent: #a61f24;
            --text: #171513;
            --muted: #746d64;
            --grad: linear-gradient(135deg, #a61f24 0%, #7f1519 50%, #aa8246 100%);
            --grad-soft: linear-gradient(135deg, rgba(166, 31, 36, .16), rgba(127, 21, 25, .16));
            --shadow-glow: 0 0 24px rgba(166, 31, 36, 0.4);
            --radius: 16px;
            --ring: conic-gradient(from 0deg, #a61f24, #aa8246, #7f1519, #a61f24);
        }

        /* ===================== 全局重置 ===================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html {
            scroll-behavior: smooth;
        }
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Source Han Sans SC', sans-serif;
            background:
                radial-gradient(1200px 600px at 12% -8%, rgba(166, 31, 36, .12), transparent 60%),
                radial-gradient(1000px 700px at 100% 0%, rgba(127, 21, 25, .14), transparent 55%),
                radial-gradient(900px 700px at 50% 120%, rgba(170, 130, 70, .10), transparent 60%),
                var(--bg-0);
            color: var(--text);
            min-height: 100vh;
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }
        a {
            color: var(--neon-cyan);
            text-decoration: none;
        }
        a:hover {
            text-decoration: underline;
        }
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb {
            background: linear-gradient(var(--neon-cyan), var(--neon-purple));
            border-radius: 8px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }

        .container {
            max-width: 1240px;
            margin: 0 auto;
            padding: 0 18px 80px;
        }

        .wiki-header {
            text-align: center;
            padding: 38px 16px 22px;
            position: relative;
        }
        .wiki-header h1 {
            font-size: clamp(1.8rem, 4.4vw, 3rem);
            font-weight: 800;
            letter-spacing: 2px;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 0 18px rgba(166, 31, 36, .45));
        }
        .wiki-header .subtitle {
            display: none;
        }
        .wiki-header .badges {
            display: none;
        }
/* QQ群多号：标签固定不动，号码区收缩后自行换行（不改变原有视觉风格） */
/* 极窄屏（≤380px）：群号字号略减一档，让三个群号仍能排成两行而不是三行 */
@media (max-width: 380px) {
}



        .nav {
            position: sticky;
            top: 0;
            z-index: 50;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
            padding: 12px 10px;
            margin-bottom: 26px;
            background: rgba(23, 21, 19, 0.74);
            backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--border);
        }
        .nav-btn {
            padding: 9px 16px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, .03);
            color: var(--muted);
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: .22s;
            white-space: nowrap;
        }
        .nav-btn:hover {
            color: var(--text);
            border-color: var(--border-strong);
            transform: translateY(-1px);
        }
        .nav-btn.active {
            color: #fffdf9;
            background: var(--grad);
            border-color: transparent;
            box-shadow: var(--shadow-glow);
        }

        .section {
            display: none;
            animation: fadeIn .3s ease;
        }
        .section.active {
            display: block;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: none;
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translate3d(0, 30px, 0);
            }
            to {
                opacity: 1;
                transform: none;
            }
        }
        @keyframes zoomIn {
            from {
                opacity: 0;
                transform: scale3d(.7, .7, .7);
            }
            to {
                opacity: 1;
                transform: none;
            }
        }
        @keyframes pulse {
            from {
                transform: scale3d(1, 1, 1);
            }
            50% {
                transform: scale3d(1.06, 1.06, 1.06);
            }
            to {
                transform: scale3d(1, 1, 1);
            }
        }
        @keyframes bounceIn {
            from {
                opacity: 0;
                transform: scale3d(.3, .3, .3);
            }
            50% {
                transform: scale3d(1.05, 1.05, 1.05);
            }
            70% {
                transform: scale3d(.9, .9, .9);
            }
            to {
                opacity: 1;
                transform: none;
            }
        }
        .animate-fadeInUp {
            animation: fadeInUp .5s ease both;
        }
        .animate-zoomIn {
            animation: zoomIn .35s ease both;
        }
        .animate-bounceIn {
            animation: bounceIn .5s ease both;
        }
        .animate-pulse:hover {
            animation: pulse .8s ease infinite;
        }
        .card {
            animation: fadeInUp .35s ease both;
        }
        .stat-card:nth-child(1) {
            animation-delay: .03s;
        }
        .stat-card:nth-child(2) {
            animation-delay: .06s;
        }
        .stat-card:nth-child(3) {
            animation-delay: .09s;
        }
        .stat-card:nth-child(4) {
            animation-delay: .12s;
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 800;
            margin: 4px 0 6px;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .section-desc {
            color: var(--muted);
            margin-bottom: 18px;
            font-size: .92rem;
        }
        #overview .section-desc {
            display: none;
        }

        .stat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: .22s;
            position: relative;
            overflow: hidden;
        }
        .stat-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--grad-soft);
            opacity: 0;
            transition: .3s;
        }
        .stat-card:hover {
            transform: translateY(-4px);
            border-color: var(--border-strong);
            box-shadow: var(--shadow-glow);
        }
        .stat-card:hover::before {
            opacity: 1;
        }
        .stat-card .num {
            font-size: 2.2rem;
            font-weight: 800;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
        }
        .stat-card .label {
            color: var(--muted);
            margin-top: 4px;
            position: relative;
        }

        .toolbar {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 14px 16px;
            margin-bottom: 22px;
            backdrop-filter: blur(8px);
        }
        .search-box {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .search-input {
            flex: 1;
            padding: 10px 16px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, .04);
            color: var(--text);
            font-size: 14px;
            outline: none;
            transition: .2s;
        }
        .search-input:focus {
            border-color: var(--neon-purple);
            box-shadow: 0 0 0 3px rgba(166, 31, 36, .22);
        }
        .filter-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin: 6px 0;
        }
        .filter-label {
            font-size: 13px;
            color: var(--muted);
            white-space: nowrap;
            min-width: 56px;
        }
        .filter-btn {
            padding: 6px 13px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, .03);
            color: var(--text);
            font-size: 13px;
            cursor: pointer;
            transition: .18s;
            white-space: nowrap;
        }
        .filter-btn:hover {
            border-color: var(--border-strong);
        }
        .filter-btn.active {
            background: var(--grad);
            color: #fffdf9;
            border-color: transparent;
            font-weight: 700;
        }
        .reset-btn {
            margin-left: auto;
            background: transparent;
            border: 1px solid var(--neon-purple);
            color: var(--neon-purple);
            padding: 6px 14px;
            border-radius: 999px;
            cursor: pointer;
            font-size: 13px;
        }
        .reset-btn:hover {
            background: rgba(166, 31, 36, .14);
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 16px;
        }
        .grid.wide {
            grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        }
        .card {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 14px;
            text-align: center;
            cursor: pointer;
            transition: .2s;
            position: relative;
            overflow: hidden;
        }
        .card::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--radius);
            background: linear-gradient(135deg, rgba(166, 31, 36, .10), rgba(127, 21, 25, .10));
            opacity: 0;
            transition: .25s;
            pointer-events: none;
        }
        .card:hover {
            transform: translateY(-5px);
            border-color: var(--border-strong);
            box-shadow: var(--shadow-glow);
        }
        .card:hover::after {
            opacity: 1;
        }
        .card .avatar {
            width: 92px;
            height: 92px;
            border-radius: 50%;
            object-fit: cover;
            padding: 3px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
            box-shadow: 0 0 18px rgba(166, 31, 36, .4);
            margin: 0 auto 10px;
            display: block;
            transition: box-shadow .2s;
        }
        .card:hover .avatar {
            box-shadow: 0 0 26px rgba(166, 31, 36, .65);
        }
        .card .card-img {
            width: 100%;
            height: 120px;
            object-fit: contain;
            border-radius: 12px;
            margin-bottom: 8px;
            background: #efe9de;
        }
        .card .name {
            font-weight: 700;
            font-size: 15px;
            margin-bottom: 6px;
        }
        .card .meta {
            display: flex;
            justify-content: center;
            gap: 5px;
            flex-wrap: wrap;
        }
        .card .talent-img {
            width: 100%;
            height: 200px;
            object-fit: contain;
            border-radius: 8px;
            margin-bottom: 8px;
            background: #efe9de;
        }
        .card .card-tags {
            display: flex;
            justify-content: center;
            gap: 5px;
            flex-wrap: wrap;
            margin-top: 7px;
        }
        .card .card-tags .badge {
            font-size: 14px;
            padding: 4px 10px;
            background: rgba(166, 31, 36, .14);
            color: #a61f24;
            border-color: rgba(166, 31, 36, .4);
        }
        .card .meta .badge.type {
            display: none;
        }
        .badge {
            padding: 2px 9px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 600;
            border: 1px solid transparent;
        }
        .badge.faction {
            background: rgba(166, 31, 36, .14);
            color: var(--neon-cyan);
            border-color: rgba(166, 31, 36, .32);
        }
        .badge.cost {
            background: rgba(127, 21, 25, .16);
            color: #a61f24;
            border-color: rgba(127, 21, 25, .38);
        }
        .badge.type {
            background: rgba(166, 31, 36, .16);
            color: #4e4943;
            border-color: rgba(166, 31, 36, .38);
        }
        .badge.tier {
            background: rgba(170, 130, 70, .18);
            color: #a61f24;
            border-color: rgba(170, 130, 70, .4);
        }
        .badge.tag {
            background: rgba(23, 21, 19, .06);
            color: var(--muted);
        }
        /* 阵容码徽章 */
        .code-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            border-radius: 999px;
            background: rgba(166, 31, 36, .12);
            border: 1px solid rgba(166, 31, 36, .35);
            color: #a61f24;
            font-size: 12px;
            font-family: monospace;
            cursor: pointer;
            user-select: none;
            transition: .2s;
            white-space: nowrap;
        }
        .code-badge:hover {
            background: rgba(166, 31, 36, .25);
            border-color: #a61f24;
        }
        .code-badge.copied {
            background: rgba(34, 197, 94, .2);
            border-color: #287a4b;
            color: #287a4b;
        }
        .code-badge .code-ico {
            font-size: 13px;
        }
        .card-tags {
            display: flex;
            justify-content: center;
            gap: 4px;
            flex-wrap: wrap;
            margin-top: 6px;
        }
        .card-tags .tag {
            padding: 2px 7px;
            border-radius: 999px;
            font-size: 10px;
            color: #4e4943;
            background: rgba(166, 31, 36, .12);
            border: 1px solid rgba(166, 31, 36, .28);
        }
        .empty {
            text-align: center;
            color: var(--muted);
            padding: 50px 0;
        }

        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(23, 21, 19, .78);
            backdrop-filter: blur(8px);
            display: none;
            justify-content: center;
            align-items: flex-start;
            z-index: 1000;
            padding: 28px 16px;
            overflow-y: auto;
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal-content {
            background: linear-gradient(180deg, #fffdf9, #f4f1ea);
            border: 1px solid var(--border-strong);
            border-radius: 22px;
            max-width: 560px;
            width: 100%;
            padding: 26px;
            position: relative;
            animation: modalIn .22s ease;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
        }
        @keyframes modalIn {
            from {
                opacity: 0;
                transform: scale(.96) translateY(10px);
            }
            to {
                opacity: 1;
                transform: none;
            }
        }
        .close-btn {
            position: absolute;
            top: 14px;
            right: 18px;
            background: none;
            border: none;
            color: var(--muted);
            font-size: 26px;
            cursor: pointer;
            line-height: 1;
        }
        .close-btn:hover {
            color: var(--text);
        }
        .modal-head {
            display: flex;
            gap: 16px;
            align-items: center;
            margin-bottom: 14px;
        }
        .modal-head img {
            width: 92px;
            height: 92px;
            border-radius: 50%;
            object-fit: cover;
            padding: 3px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
            box-shadow: 0 0 18px rgba(166, 31, 36, .4);
        }
        .modal-head .m-name {
            font-size: 1.35rem;
            font-weight: 800;
        }
        .modal-head .m-sub {
            color: var(--muted);
            font-size: .85rem;
            margin-top: 2px;
        }
        .modal-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin: 10px 0;
        }
        .modal-badges.chess-tags {
            gap: 10px;
            margin: 14px 0;
        }
        .modal-badges.chess-tags .badge {
            font-size: 14px;
            font-weight: 700;
            padding: 8px 16px;
            border-radius: 10px;
            background: rgba(166, 31, 36, .16);
            color: #a61f24;
            border-color: rgba(166, 31, 36, .42);
        }
        .box {
            background: rgba(23, 21, 19, .04);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 14px;
            margin-top: 12px;
        }
        .box .box-title {
            font-size: .92rem;
            font-weight: 700;
            color: var(--neon-cyan);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .box .box-body {
            font-size: .9rem;
            color: #4e4943;
            white-space: pre-wrap;
            line-height: 1.7;
        }
        .modal-imgs {
            display: flex;
            gap: 14px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 14px 0;
        }
        .modal-imgs img {
            width: 180px;
            max-width: 100%;
            border-radius: 12px;
            border: 1px solid var(--border);
            cursor: pointer;
            transition: .2s;
        }
        .modal-imgs img:hover {
            transform: scale(1.03);
            border-color: var(--border-strong);
        }
        .xref {
            margin-top: 8px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .xref a {
            font-size: .82rem;
            padding: 4px 10px;
            border: 1px solid var(--border);
            border-radius: 999px;
            color: var(--neon-cyan);
        }
        .xref a:hover {
            background: var(--grad-soft);
            text-decoration: none;
        }

        .equip-thumb {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 6px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: rgba(23, 21, 19, .04);
            min-width: 64px;
            cursor: pointer;
            transition: .2s;
        }
        .equip-thumb:hover {
            border-color: var(--border-strong);
            transform: translateY(-2px);
        }
        .equip-thumb img {
            width: 40px;
            height: 40px;
            object-fit: cover;
            border-radius: 8px;
            background: #efe9de;
        }
        .equip-thumb .nm {
            font-size: 11px;
            color: var(--text);
            text-align: center;
            line-height: 1.3;
            max-width: 80px;
        }

        .avatar-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        .eq-label {
            font-size: 12px;
            font-weight: 700;
            color: var(--neon-cyan);
            padding: 2px 8px;
            border-radius: 999px;
            background: rgba(23, 21, 19, .05);
            border: 1px solid var(--border);
            margin-right: 4px;
        }
        .avatar-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 5px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: rgba(23, 21, 19, .04);
            cursor: pointer;
            transition: .2s;
        }
        .avatar-item:hover {
            border-color: var(--border-strong);
            transform: translateY(-2px);
        }
        .avatar-item img {
            width: 48px;
            height: 48px;
            object-fit: cover;
            border-radius: 50%;
            padding: 2px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
        }
        .avatar-item .nm {
            font-size: 11px;
            color: var(--text);
            text-align: center;
            line-height: 1.3;
            max-width: 60px;
        }

        .chess-filter {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 6px 2px;
        }
        .chess-filter .filter-chip {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 108px;
            padding: 12px 18px;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: rgba(23, 21, 19, .04);
            cursor: pointer;
            transition: .2s;
            flex-shrink: 0;
        }
        .chess-filter .filter-chip:hover {
            border-color: var(--border-strong);
            background: rgba(23, 21, 19, .07);
        }
        .chess-filter .filter-chip.active {
            border-color: var(--neon-purple);
            box-shadow: 0 0 0 2px rgba(166, 31, 36, .3);
            background: rgba(166, 31, 36, .14);
        }
        .chess-filter .filter-chip img {
            width: 81px;
            height: 81px;
            border-radius: 50%;
            object-fit: cover;
            padding: 2px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
        }
        .chess-filter .filter-chip span {
            font-size: 21px;
            color: var(--text);
            white-space: nowrap;
        }

        .hero-card.faction-大河流域 {
            border-color: #2e7d32;
        }
        .hero-card.faction-大河流域 .tier {
            background: #2e7d32;
            color: #fff;
            box-shadow: 0 0 10px rgba(46, 125, 50, 0.6);
        }
        .hero-card.faction-河洛 {
            border-color: #c62828;
        }
        .hero-card.faction-河洛 .tier {
            background: #c62828;
            color: #fff;
            box-shadow: 0 0 10px rgba(198, 40, 40, 0.6);
        }
        .hero-card.faction-日落海 {
            border-color: #1565c0;
        }
        .hero-card.faction-日落海 .tier {
            background: #1565c0;
            color: #fff;
            box-shadow: 0 0 10px rgba(21, 101, 192, 0.6);
        }
        .hero-card.faction-三分 {
            border-color: #f57c00;
        }
        .hero-card.faction-三分 .tier {
            background: #f57c00;
            color: #fff;
            box-shadow: 0 0 10px rgba(245, 124, 0, 0.6);
        }
        .hero-card.faction-逐鹿 {
            border-color: #b8860b;
        }
        .hero-card.faction-逐鹿 .tier {
            background: #b8860b;
            color: #fff;
            box-shadow: 0 0 10px rgba(184, 134, 11, 0.6);
        }
        .hero-card.faction-无阵营 {
            border-color: #c0c0c0;
        }
        .hero-card.faction-无阵营 .tier {
            background: #c0c0c0;
            color: #efe9de;
            box-shadow: 0 0 10px rgba(192, 192, 192, 0.6);
        }

        .hero-card {
            background: var(--panel);
            border-radius: var(--radius);
            overflow: hidden;
            cursor: pointer;
            transition: .2s;
            position: relative;
            border-width: 2px;
            border-style: solid;
        }
        .hero-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-glow);
        }
        .hero-banner {
            width: 100%;
            height: 118px;
            object-fit: cover;
   object-position: center 5%;   /* 将图片显示位置下移，30% 可根据实际微调 */
            display: block;
            background: #efe9de;
        }
        .hero-traits {
            position: absolute;
            top: 8px;
            right: 8px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            align-items: flex-end;
        }
        .hero-trait {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 2px 9px 2px 3px;
            border-radius: 999px;
            font-size: 11px;
            color: var(--text);
            background: rgba(23, 21, 19, .62);
            border: 1px solid var(--border);
            backdrop-filter: blur(4px);
        }
        .hero-trait .ti {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--ring);
            color: #fffdf9;
            font-size: 9px;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .hero-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            gap: 8px;
        }
        .hero-foot .nm {
            font-weight: 800;
            font-size: 15px;
            line-height: 1.2;
        }
        .hero-foot .fac {
            font-size: 11px;
            color: var(--muted);
            margin-top: 2px;
        }
        .tier {
            flex-shrink: 0;
            min-width: 36px;
            text-align: center;
            padding: 4px 8px;
            border-radius: 8px;
            font-weight: 800;
            font-size: 13px;
            color: #fffdf9;
            background: var(--grad);
        }
        .heroes-grid {
            grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        }

        .comp-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .comp-row {
            display: flex;
            align-items: center;
            gap: 21px;
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 21px;
            padding: 21px 27px;
            cursor: pointer;
            transition: .2s;
        }
        .comp-row:hover {
            border-color: var(--border-strong);
            box-shadow: var(--shadow-glow);
            transform: translateX(4px);
        }
        .comp-left {
            display: flex;
            align-items: center;
            gap: 21px;
            flex-shrink: 0;
        }
        .comp-info {
            width: 200px;
            flex-shrink: 0;
        }
        .comp-info .nm {
            font-weight: 800;
            font-size: 22px;
            margin-bottom: 4px;
            line-height: 1.25;
        }
        .comp-eq {
            display: flex;
            gap: 4px;
            margin-top: 7px;
        }
        .comp-eq img {
            width: 33px;
            height: 33px;
            border-radius: 9px;
            border: 1px solid var(--border);
            background: #efe9de;
            object-fit: cover;
        }
        .comp-tier {
            flex-shrink: 0;
            width: 69px;
            height: 69px;
            transform: rotate(45deg);
	font-size: 22px;
            border-radius: 14px;
            background: var(--grad);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 14px rgba(166, 31, 36, .4);
        }
        .comp-tier.s {
            background: linear-gradient(135deg, #a61f24, #a61f24, #a61f24);
            box-shadow: 0 0 18px rgba(170, 130, 70, .55);
        }
        .comp-tier span {
            transform: rotate(-45deg);
            font-weight: 800;
            font-size: 25px;
            color: #fffdf9;
        }
        .comp-chess-avatar {
            flex-shrink: 0;
        }
        .comp-chess-avatar img {
            width: 103px;
            height: 103px;
            border-radius: 50%;
            object-fit: cover;
            padding: 2px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
            display: block;
        }
        .comp-factions {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
            margin-left: 22px;
        }
        .comp-factions .fi {
            height: 45px;
            padding: 0 15px;
            border-radius: 14px;
            background: rgba(23, 21, 19, .05);
            border: 1px solid var(--border);
            color: var(--neon-cyan);
            font-size: 16px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }
        .comp-heroes {
            display: flex;
            gap: 7px;
            flex: 1;
            justify-content: flex-start;
            overflow-x: auto;
            padding: 3px 2px;
        }
        .comp-heroes .hi {
            width: 69px;
            height: 69px;
            border-radius: 50%;
            object-fit: cover;
            padding: 2px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
            flex-shrink: 0;
        }
        .hiwrap {
            position: relative;
            flex-shrink: 0;
        }
        .hiwrap.core .hi {
            border-color: var(--neon-blue);
            box-shadow: 0 0 12px rgba(166, 31, 36, .6);
        }
        .hiwrap .core-mark {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 27px;
            height: 27px;
            border-radius: 50%;
            background: var(--grad);
            color: #fffdf9;
            font-size: 15px;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #f4f1ea;
        }
        .comp-arrow {
            color: var(--muted);
            font-size: 36px;
            flex-shrink: 0;
            transition: .2s;
        }
        .comp-row:hover .comp-arrow {
            color: var(--neon-cyan);
            transform: translateX(3px);
        }
/* 响应式适配 */
@media (max-width: 820px) {
    .diy-pool-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 14px;
    }
    .diy-hero-name {
        font-size: 13px;
    }
}
@media (max-width: 580px) {
    .diy-pool-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px;
    }
    .diy-hero-name {
        font-size: 11px;
    }
    .diy-chess-mini-wrapper {
        width: 28%;
    }
}
@media (max-width: 400px) {
    .diy-pool-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
    }
    .diy-hero-name {
        font-size: 10px;
    }
}
        .hero-strip {
            display: flex;
            gap: 8px;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding: 6px 2px;
        }

        .rule-cat1 {
            margin: 18px 0;
        }
        .rule-cat1>.rc1-title {
            font-size: 1.2rem;
            font-weight: 800;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            border-left: 3px solid var(--neon-purple);
            padding-left: 10px;
        }
        .rule-cat2 {
            margin: 10px 0 12px 14px;
        }
        .rule-cat2>.rc2-title {
            font-size: 1rem;
            font-weight: 700;
            color: #4e4943;
            margin-bottom: 8px;
        }
        .rule-item {
            background: var(--panel);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px 14px;
            margin-bottom: 8px;
            transition: .2s;
        }
        .rule-item:hover {
            border-color: var(--border-strong);
        }
        .rule-item .rc3 {
            font-weight: 700;
            color: var(--neon-cyan);
            margin-bottom: 4px;
            font-size: .92rem;
        }
        .rule-item .rdesc {
            color: #4e4943;
            font-size: .88rem;
            white-space: pre-wrap;
            line-height: 1.65;
        }

        .fmt-wrapper {
            width: 100%;
            max-width: 100%;
            margin: 10px auto 0;
            overflow: visible !important;
        }
        .fmt-grid {
            display: grid;
            gap: 6px;
            grid-template-columns: repeat(var(--cols, 7), 1fr);
            width: 100%;
            max-width: 480px;
            margin: 0 auto;
        }
        .fmt-cell.offset {
            transform: translateX(50%) !important;
            position: relative;
            z-index: 2;
            will-change: transform;
        }
        .fmt-cell {
            aspect-ratio: 1 / 1;
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: rgba(23, 21, 19, .03);
            overflow: hidden;
            transition: .2s;
            position: relative;
        }
        .fmt-cell.blank {
            background: rgba(23, 21, 19, .02);
        }
        .fmt-inner {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4px;
        }
        .fmt-cell.has {
            border-color: var(--border-strong);
            background: rgba(166, 31, 36, .10);
            cursor: pointer;
        }
        .fmt-cell.has:hover {
            transform: scale(1.06);
            box-shadow: 0 0 14px rgba(166, 31, 36, .35);
            z-index: 2;
        }
        .fmt-cell.has img {
            width: 82%;
            height: 82%;
            object-fit: cover;
            border-radius: 50%;
            padding: 2px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
        }

        .swiper-wrap {
            position: relative;
            overflow: hidden;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            background: var(--panel);
            margin-top: 14px;
        }
        .swiper-track {
            display: flex;
            transition: transform .35s ease;
        }
        .swiper-slide {
            flex: 0 0 100%;
            padding: 18px;
            box-sizing: border-box;
        }
        .swiper-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: 1px solid var(--border);
            background: rgba(255, 253, 249, .88);
            color: var(--text);
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3;
            transition: .2s;
        }
        .swiper-nav:hover {
            border-color: var(--border-strong);
            background: var(--grad);
            color: #fffdf9;
        }
        .swiper-nav.prev {
            left: 10px;
        }
        .swiper-nav.next {
            right: 10px;
        }
        .swiper-dots {
            display: flex;
            justify-content: center;
            gap: 6px;
            padding: 10px 0;
        }
        .swiper-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(23, 21, 19, .2);
            cursor: pointer;
            transition: .2s;
        }
        .swiper-dot.active {
            background: var(--neon-cyan);
            box-shadow: 0 0 8px var(--neon-cyan);
        }
        .slide-title {
            font-size: 1.1rem;
            font-weight: 800;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 10px;
        }
        .slide-body {
            color: #4e4943;
            font-size: .92rem;
            line-height: 1.7;
        }

        .footer {
            text-align: center;
            color: var(--muted);
            font-size: .8rem;
            margin-top: 40px;
            padding-top: 18px;
            border-top: 1px solid var(--border);
        }

/* ==================== 版本公告样式 ==================== */
.announcement-banner {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--grad-soft);
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    user-select: none;
}
.announcement-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(166, 31, 36, 0.08), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.announcement-banner:hover::before {
    transform: translateX(100%);
}
.announcement-banner:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: #a61f24;
    background: rgba(166, 31, 36, 0.15);
}


        /* ======================================================================
           【阵容排行DIY】专用样式
           ====================================================================== */
        .diy-tier-container {
            max-width: 1100px;
            margin: 0 auto;
            background: rgba(23, 21, 19, 0.4);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 20px;
            backdrop-filter: blur(8px);
        }
        .diy-tier-container #scroll-hint {
            text-align: center;
            color: var(--muted);
            font-size: 12px;
            margin-bottom: 10px;
            opacity: 0.6;
            user-select: none;
        }
        .diy-tier-container #screenshot-area h2 {
            text-align: center;
            font-size: 1.6rem;
            font-weight: 800;
            margin-bottom: 20px;
            background: var(--grad);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 0 18px rgba(166, 31, 36, .45));
        }
        .diy-tier-row {
            display: flex;
            align-items: stretch;
            background: var(--panel-solid);
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 8px;
            min-height: 86px;
            position: relative;
            transition: border-color 0.2s;
        }
        .diy-tier-row.drag-over {
            border-color: var(--neon-cyan);
            background: rgba(166, 31, 36, 0.10);
        }
        .diy-tier-label {
            width: 60px;
            min-width: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            font-weight: 800;
            color: #fffdf9;
            border-radius: 12px 0 0 12px;
        }
.diy-tier-label.t0 { background: #f87171; }      /* 对应 T0 */
.diy-tier-label.t0_5 { background: #aa8246; }    /* 对应 T0.5 */
.diy-tier-label.t1 { background: #fde047; }      /* 对应 T1 */
.diy-tier-label.t1_5 { background: #fef08a; }    /* 对应 T1.5 */
.diy-tier-label.t2 { background: #a3e635; }      /* 对应 T2 */
        .diy-tier-items {
            flex: 1;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            padding: 12px;
            min-height: 80px;
            background: rgba(23, 21, 19, 0.02);
        }
        .diy-tier-controls {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 6px;
            padding: 8px 12px;
            border-left: 1px solid var(--border);
            background: rgba(0, 0, 0, 0.2);
            border-radius: 0 12px 12px 0;
        }
        .diy-tier-controls button {
            background: rgba(23, 21, 19, 0.05);
            border: 1px solid var(--border);
            color: var(--text);
            border-radius: 6px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.15s;
        }
        .diy-tier-controls button:hover {
            background: var(--grad);
            color: #fffdf9;
            border-color: transparent;
        }
/* ==================== 修复：卡片内部布局（防止头像变形） ==================== */
.diy-hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 200px; /* 限制最大宽度，防止在超大屏上离谱放大 */
    height: auto;     /* 高度由内容撑开，绝不强制拉伸 */
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    user-select: none;
    padding: 8px 4px;
    border-radius: 12px;
    background: rgba(23, 21, 19, 0.02);
    box-sizing: border-box;
}
.diy-hero-card:hover {
    background: rgba(166, 31, 36, 0.06);
    border-radius: 12px;
}
        .diy-hero-card:active {
            cursor: grabbing;
            transform: scale(0.95);
        }
        .diy-hero-card.dragging {
            opacity: 0.4;
        }
/* 父容器：取消裁剪，让子元素可以完整显示 */
.diy-hero-avatar-wrapper {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 160px;
    margin: 0 auto;
    /* 移除 overflow: hidden; */
    /* 移除 border-radius: 50%; 父容器不再做圆形裁剪 */
    flex-shrink: 0;
    /* 可选：添加背景色使容器与背景融合 */
    background: transparent;
}
/* 英雄头像自身保持圆形，但不影响兄弟元素 */
.diy-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;        /* 保持英雄头像圆形 */
    object-fit: cover;
    padding: 4px;
    border: 3px solid #f4f1ea;
    background: var(--ring);
    box-shadow: 0 0 18px rgba(166, 31, 36, 0.35);
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
    position: relative;        /* 确保兄弟元素可以叠在上面 */
    z-index: 1;               /* 英雄头像在底层 */
}
.diy-hero-card:hover .diy-hero-avatar {
    box-shadow: 0 0 30px rgba(166, 31, 36, 0.6);
    transform: scale(1.02);
}

/* 棋手头像：保持原有尺寸和位置，并置于上层 */
.diy-chess-mini-wrapper {
    position: absolute;
    bottom: 2px;        /* 保持原位置 */
    left: 2px;          /* 保持原位置 */
    width: 38%;         /* 保持原尺寸 */
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2.5px solid #f4f1ea;
    background: #efe9de;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    z-index: 2;         /* 棋手头像在上层，不被英雄头像遮挡 */
}

.diy-chess-mini {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* ==================== 修复：阵容名称文字 ==================== */
.diy-hero-name {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: var(--text);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
    margin-top: 6px;
    width: 100%;
    flex-shrink: 0;
}
        .diy-trash-wrapper {
            display: flex;
            align-items: stretch;
            justify-content: center;
            gap: 12px;
            margin: 10px auto;
            max-width: 500px;
            flex-wrap: wrap;
        }
        .diy-trash-zone {
            flex: 1;
            height: 70px;
            border: 3px dashed #ef4444;
            border-radius: var(--radius);
            background: rgba(239, 68, 68, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ef4444;
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 2px;
            transition: all 0.2s;
            min-width: 140px;
        }
        .diy-trash-zone.drag-over {
            background: rgba(239, 68, 68, 0.25);
            transform: scale(1.02);
            border-color: #dc2626;
        }
        .diy-btn-group {
            display: flex;
            gap: 10px;
            align-items: stretch;
            flex-wrap: wrap;
        }
        #diy-clear-all-btn,
        #diy-download-btn {
            padding: 0 20px;
            border-radius: var(--radius);
            font-weight: 700;
            cursor: pointer;
            transition: 0.2s;
            font-size: 14px;
            white-space: nowrap;
            border: none;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 100px;
        }
        #diy-clear-all-btn {
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid #ef4444;
            color: #ef4444;
        }
        #diy-clear-all-btn:hover {
            background: rgba(239, 68, 68, 0.3);
            transform: scale(1.02);
        }
        #diy-download-btn {
            background: #3b82f6;
            color: #fff;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }
        #diy-download-btn:hover {
            background: #2563eb;
            transform: scale(1.02);
        }
        #diy-download-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .diy-pool-section {
            margin-top: 20px;
            border-top: 1px solid var(--border);
            padding-top: 20px;
        }
        .diy-pool-title {
            color: var(--muted);
            font-size: 14px;
            margin-bottom: 12px;
            text-align: center;
            letter-spacing: 1px;
        }
        .diy-pool-search-box {
            display: flex;
            gap: 10px;
            max-width: 550px;
            margin: 0 auto 14px auto;
        }
        .diy-pool-search-input {
            flex: 1;
            padding: 8px 16px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, .04);
            color: var(--text);
            font-size: 14px;
            outline: none;
            transition: .2s;
        }
        .diy-pool-search-input:focus {
            border-color: var(--neon-purple);
            box-shadow: 0 0 0 3px rgba(166, 31, 36, .22);
        }
        #diy-add-comp-btn {
            padding: 8px 16px;
            border-radius: 999px;
            border: none;
            background: var(--grad);
            color: #fffdf9;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: 0.2s;
        }
        #diy-add-comp-btn:hover {
            filter: brightness(1.1);
        }
        .diy-pool-subtitle {
            font-size: 13px;
            color: var(--neon-cyan);
            margin: 16px 0 8px;
            border-left: 2px solid var(--neon-purple);
            padding-left: 10px;
        }
.diy-pool-container {
    display: grid;
    /* 默认桌面端每行5个 */
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    background: var(--panel-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 80px;
    transition: border-color 0.2s;
    max-width: 100%;
    box-sizing: border-box;
    /* 关键修复：防止网格项被拉伸变形，确保卡片高度由内容决定 */
    align-items: start;
    justify-items: center;
}
        .diy-pool-container.drag-over {
            border-color: var(--neon-cyan);
            background: rgba(166, 31, 36, 0.08);
        }
        .diy-empty-hint {
            color: var(--muted);
            font-size: 12px;
            opacity: 0.5;
            width: 100%;
            text-align: center;
            padding: 10px 0;
            pointer-events: none;
        }

        .diy-custom-select-wrapper {
            position: relative;
            width: 100%;
        }
        .diy-custom-select-input {
            width: 100%;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, 0.05);
            color: var(--text);
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: space-between;
        }
        .diy-custom-select-input .selected-display {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
        }
        .diy-custom-select-input .selected-display img {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            object-fit: cover;
        }
        .diy-custom-dropdown-list {
            position: absolute;
            top: 110%;
            left: 0;
            right: 0;
            background: #efe9de;
            border: 1px solid var(--border);
            border-radius: 8px;
            max-height: 220px;
            overflow-y: auto;
            display: none;
            z-index: 100;
            padding: 8px 0;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
        }
        .diy-custom-dropdown-list.open {
            display: block;
        }
        .diy-custom-dropdown-search {
            width: calc(100% - 16px);
            margin: 4px 8px 8px 8px;
            padding: 6px 10px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, 0.08);
            color: var(--text);
            font-size: 13px;
        }
        .diy-custom-dropdown-list .item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            cursor: pointer;
            transition: background 0.1s;
        }
        .diy-custom-dropdown-list .item:hover,
        .diy-custom-dropdown-list .item.active {
            background: rgba(166, 31, 36, 0.2);
        }
        .diy-custom-dropdown-list .item img {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            object-fit: cover;
            border: 1px solid #f4f1ea;
        }
        .diy-custom-dropdown-list .item span {
            color: var(--text);
            font-size: 14px;
        }
        .diy-custom-dropdown-list .item.no-img {
            padding: 8px 16px;
        }
        .diy-custom-dropdown-list .item.no-img span {
            font-weight: 600;
            font-size: 15px;
        }
        .diy-custom-dropdown-list .item.no-img:hover {
            background: rgba(166, 31, 36, 0.25);
        }
        .diy-custom-dropdown-list .item.no-img.active {
            background: rgba(166, 31, 36, 0.3);
        }

        .diy-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(23, 21, 19, 0.85);
            backdrop-filter: blur(4px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 999;
        }
        .diy-modal-content {
            background: var(--panel-solid);
            border: 1px solid var(--border-strong);
            border-radius: var(--radius);
            padding: 24px;
            width: 100%;
            max-width: 420px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .diy-modal-content h3 {
            text-align: center;
            margin-bottom: 8px;
            color: var(--neon-cyan);
        }
        .diy-modal-content label {
            font-size: 13px;
            color: var(--muted);
            margin-top: 4px;
        }
        .diy-modal-content input {
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, 0.05);
            color: var(--text);
            font-size: 14px;
        }
        .diy-modal-content input:focus {
            outline: none;
            border-color: var(--neon-purple);
        }
        .diy-modal-content select {
            padding: 10px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: rgba(23, 21, 19, 0.05);
            color: var(--text);
            font-size: 14px;
            width: 100%;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a975' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            background-size: 12px 8px;
        }
        .diy-modal-content select:focus {
            outline: none;
            border-color: var(--neon-purple);
            box-shadow: 0 0 0 3px rgba(166, 31, 36, 0.15);
        }
        .diy-modal-content select option {
            background: #efe9de;
            color: var(--text);
        }
        .diy-modal-actions {
            display: flex;
            gap: 12px;
            margin-top: 12px;
            justify-content: flex-end;
        }
        .diy-modal-actions button {
            padding: 10px 20px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
        }
        .diy-modal-actions .btn-confirm {
            background: var(--grad);
            color: #fffdf9;
        }
        .diy-modal-actions .btn-cancel {
            background: #333;
            color: var(--text);
        }
        .diy-modal-actions .btn-confirm:hover {
            filter: brightness(1.1);
        }
        .diy-modal-actions .btn-cancel:hover {
            background: #444;
        }

        .diy-detail-overlay {
            position: fixed;
            inset: 0;
            background: rgba(23, 21, 19, .78);
            backdrop-filter: blur(8px);
            display: none;
            justify-content: center;
            align-items: flex-start;
            z-index: 1000;
            padding: 28px 16px;
            overflow-y: auto;
        }
        .diy-detail-overlay.show {
            display: flex;
        }
        .diy-detail-content {
            background: linear-gradient(180deg, #fffdf9, #f4f1ea);
            border: 1px solid var(--border-strong);
            border-radius: 22px;
            max-width: 620px;
            width: 100%;
            padding: 26px;
            position: relative;
            animation: modalIn .22s ease;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
        }
        .diy-detail-content .close-btn {
            position: absolute;
            top: 14px;
            right: 18px;
            background: none;
            border: none;
            color: var(--muted);
            font-size: 26px;
            cursor: pointer;
            line-height: 1;
            z-index: 10;
        }
        .diy-detail-content .close-btn:hover {
            color: var(--text);
        }
        .diy-detail-head {
            display: flex;
            gap: 16px;
            align-items: center;
            margin-bottom: 14px;
        }
        .diy-detail-head img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            padding: 3px;
            border: 2px solid #f4f1ea;
            background: var(--ring);
            box-shadow: 0 0 18px rgba(166, 31, 36, .4);
        }
        .diy-detail-head .d-name {
            font-size: 1.3rem;
            font-weight: 800;
        }
        .diy-detail-head .d-sub {
            color: var(--muted);
            font-size: .85rem;
            margin-top: 2px;
        }
        .diy-detail-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin: 10px 0;
        }
        .diy-detail-badges .badge {
            padding: 4px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: rgba(166, 31, 36, .14);
            color: #a61f24;
            border: 1px solid rgba(166, 31, 36, .32);
        }
        .diy-detail-badges .badge.faction {
            background: rgba(166, 31, 36, .14);
            color: var(--neon-cyan);
            border-color: rgba(166, 31, 36, .32);
        }
        .diy-detail-badges .badge.tag {
            background: rgba(23, 21, 19, .06);
            color: var(--muted);
            border-color: rgba(23, 21, 19, .12);
        }
        .diy-detail-box {
            background: rgba(23, 21, 19, .04);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 14px;
            margin-top: 14px;
        }
        .diy-detail-box .box-title {
            font-size: .92rem;
            font-weight: 700;
            color: var(--neon-cyan);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .diy-detail-box .box-desc {
            color: #4e4943;
            font-size: .9rem;
            line-height: 1.6;
            white-space: pre-wrap;
        }
/* ==================== 分页控件 ==================== */
.diy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 0 4px;
    flex-wrap: wrap;
}
.diy-pagination button {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(23, 21, 19, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    font-weight: 500;
    min-height: 36px;
}
.diy-pagination button:hover:not(:disabled) {
    background: rgba(166, 31, 36, 0.15);
    border-color: var(--border-strong);
}
.diy-pagination button.active {
    background: var(--grad);
    color: #fffdf9;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(166, 31, 36, 0.35);
}
.diy-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.diy-pagination .page-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}
.diy-pagination .page-numbers button {
    min-width: 38px;
    text-align: center;
    padding: 6px 10px;
}
.diy-pagination .ellipsis {
    color: var(--muted);
    padding: 0 4px;
    font-size: 14px;
    user-select: none;
}


/* ==================== 核心修复：多尺寸屏幕适配（移动端专项优化） ==================== */
@media (max-width: 900px) {
    .diy-pool-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        padding: 16px;
    }
    .diy-hero-avatar-wrapper {
        max-width: 130px;
    }
    .diy-hero-name {
        font-size: 14px;
    }
}

@media (max-width: 680px) {
    .diy-pool-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 14px;
    }
    .diy-hero-avatar-wrapper {
        max-width: 130px;
    }
    .diy-chess-mini-wrapper {
        width: 32%;       /* 原来 28%，调大 */
        bottom: 2px;
        left: 2px;
    }
    .diy-hero-name {
        font-size: 13px;
    }
}

@media (max-width: 460px) {
    .diy-pool-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 12px;
    }
    .diy-hero-avatar-wrapper {
        max-width: 120px;
    }
    .diy-chess-mini-wrapper {
        width: 28%;       /* 原来 26%，调大 */
        bottom: 2px;
        left: 2px;
    }
    .diy-hero-name {
        font-size: 12px;
        white-space: normal;
        line-height: 1.2;
        max-height: 32px;
    }
    .diy-hero-card {
        padding: 6px 2px;
    }
}

@media (max-width: 380px) {
    .diy-pool-container {
        gap: 8px;
        padding: 8px;
    }
    .diy-hero-avatar-wrapper {
        max-width: 90px;
    }
    .diy-hero-name {
        font-size: 10px;
    }
}

/* ==================== 分页控件移动端适配 ==================== */
@media (max-width: 600px) {
    .diy-pagination {
        gap: 6px;
        padding: 8px 0;
    }
    .diy-pagination button {
        padding: 4px 10px;
        font-size: 12px;
        min-height: 30px;
        min-width: 30px;
    }
    .diy-pagination .page-numbers button {
        min-width: 30px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

        .diy-save-section {
            margin: 16px auto 0;
            padding: 14px 16px;
            border-top: 1px solid var(--border);
            background: rgba(23, 21, 19, 0.3);
            border-radius: var(--radius);
            max-width: 800px;
        }
        .diy-save-section button:hover {
            filter: brightness(1.15);
            transform: scale(1.03);
        }
        #diy-load-select option {
            background: #efe9de;
            color: var(--text);
        }
#diy-version-select option {
    background: #efe9de;
    color: var(--text);
}
    