
        /* ================= 基础变量与重置 ================= */
        /*
         * BGM 三类接口(文件在 assets/；曲目切换逻辑见 js/core/audio.js → AudioSys.BGM / playBGMTrack)
         *   bgm_boss.mp3   — 鬼门关 Boss(遭遇 id：enc_yan_luo_wang)
         *   bgm_combat.mp3 — 除 Boss 以外的战斗
         *   bgm_world.mp3  — 大地图与事件界面共用
         */
        /*
         * 主角立绘(文件在 `./../assets/`；相对本 CSS 文件)
         *   portrait_info.png   — 「侠客信息」中栏全幅(见 .info-portrait-layer)
         *   portrait_combat.png — 战斗 #player 槽(见 .player-combat-portrait)
         */
        :root {
            --portrait-info-url: url('./../assets/portrait_info.png');
            --portrait-combat-url: url('./../assets/portrait_combat.png');
            --ink-bg: #050507;
            --ink-panel: #121216;
            --ink-light: #d1d5db;
            --ink-border: #2a2a30;
            --blood-red: #8b1818;
            --gold: #b8860b;
            --gold-light: #ffd700;
            --mid-color: #a0aab5; 
            --abar-height: 10vh;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
        body, html { width: 100%; height: 100%; background-color: var(--ink-bg); color: var(--ink-light); font-family: 'Noto Serif SC', 'Georgia', serif; overflow: hidden; touch-action: none; }

        /* ================= 移动端竖屏拦截 ================= */
        #orientation-prompt { display: none; }
        @media screen and (orientation: portrait) {
            #orientation-prompt {
                display: flex; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
                background: #050507; z-index: 9999999; flex-direction: column; 
                justify-content: center; align-items: center; color: var(--gold); text-align: center;
            }
            .screen, #abar, #toast { display: none !important; }
        }

        /* ================= 共有层与层级管理 ================= */
        #bgCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.5; }
        .vignette { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, transparent 40%, #000 100%); pointer-events: none; z-index: 1; }
        
        .screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; display: none; flex-direction: column; background-color: var(--ink-bg); }
        .screen.active { display: flex; }
        
        #screen-map, #screen-event, #screen-combat, #screen-settlement { padding-top: var(--abar-height); }
        .screen-content { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; } 

        /* ================= UI 组件 ================= */
        .btn-g { background: linear-gradient(90deg, transparent, rgba(30,30,35,0.8), transparent); border: 1px solid transparent; color: #ccc; padding: 15px 40px; font-size: 24px; cursor: pointer; transition: all 0.3s; font-family: inherit; text-align: center; }
        .btn-g:hover { border-bottom: 1px solid var(--blood-red); color: white; text-shadow: 0 0 10px var(--blood-red); transform: scale(1.05); }
        .btn-g.reco-choice {
            border-color: var(--gold-light) !important;
            color: var(--gold-light) !important;
            box-shadow: 0 0 14px rgba(255, 215, 0, 0.35), inset 0 0 10px rgba(184,134,11,0.2);
        }
        .asset-placeholder { display: flex; justify-content: center; align-items: center; background: rgba(30,30,30,0.5); border: 1px dashed #555; color: #888; font-size: 14px; text-align: center; padding: 10px; }

        /* ================= 前期界面 ================= */
        #screen-main { background: url('./../assets/main_menu_bg.png') center/cover, var(--ink-bg); justify-content: center; align-items: center; }
        #screen-saves { background: url('./../assets/saves_menu_bg.png') center/cover, var(--ink-bg); justify-content: center; align-items: center; }
        #screen-class { background: url('./../assets/class_select_bg.png') center/cover, var(--ink-bg); justify-content: center; align-items: center; }
        
        .game-title { font-size: 100px; color: #eee; letter-spacing: 30px; text-shadow: 0 0 20px rgba(139,24,24,0.8); margin-bottom: 50px; }
        .saves-container { display: flex; gap: 50px; }
        .save-slot {
            width: 220px; height: 320px;
            background: linear-gradient(180deg, rgba(10,14,20,0.62), rgba(8,10,14,0.76));
            border: 1px solid rgba(149, 167, 188, 0.22);
            box-shadow: inset 0 0 24px rgba(6,10,16,0.42), 0 10px 26px rgba(0,0,0,0.38);
            backdrop-filter: blur(1.6px);
            -webkit-backdrop-filter: blur(1.6px);
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            cursor: pointer; transition: 0.28s ease;
        }
        .save-slot:hover {
            border-color: rgba(196, 137, 137, 0.55);
            background: linear-gradient(180deg, rgba(12,16,24,0.68), rgba(10,12,18,0.8));
            transform: translateY(-8px);
            box-shadow: inset 0 0 24px rgba(8,14,22,0.45), 0 14px 28px rgba(0,0,0,0.48);
        }
        
        #pv-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index: 300; display: none; justify-content: center; align-items: center; flex-direction: column; }
        
        .class-wheel { position: relative; width: 500px; height: 500px; margin-bottom: 30px; }
        .class-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; border: 2px solid #444; border-radius: 50%; background: rgba(0,0,0,0.8); display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; }
        .class-center:hover { border-color: var(--blood-red); box-shadow: 0 0 30px rgba(139,24,24,0.6); }
        .class-btn { position: absolute; width: 60px; height: 60px; background: #1a1a20; border: 1px solid #444; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; cursor: pointer; transition: 0.2s; transform: translate(-50%, -50%); }
        .class-btn:hover, .class-btn.selected { background: var(--blood-red); color: white; transform: translate(-50%, -50%) scale(1.2); }
        .pos-1 { top: 10%; left: 50%; } .pos-2 { top: 30%; left: 84.6%; } .pos-3 { top: 70%; left: 84.6%; }
        .pos-4 { top: 90%; left: 50%; } .pos-5 { top: 70%; left: 15.4%; } .pos-6 { top: 30%; left: 15.4%; }

        /* ================= Abar 系统 ================= */
        #abar { 
            position: absolute; top: 0; left: 0; width: 100%; height: var(--abar-height); 
            z-index: 100; background: linear-gradient(to bottom, #1a1a1f, #0a0a0c); 
            border-bottom: 2px solid #2a2a30; display: flex; justify-content: space-between; align-items: center; 
            padding: 0 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.8); 
        }
        .abar-btn { background: linear-gradient(145deg, #2a2a30, #1a1a20); box-shadow: 3px 3px 6px #050505, -3px -3px 6px #2b2b35; border: 1px solid #333; border-radius: 8px; width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; font-size: 20px; color: #ccc; cursor: pointer; transition: 0.1s; }
        .abar-btn:active { box-shadow: inset 3px 3px 6px #050505, inset -3px -3px 6px #2b2b35; color: var(--blood-red); }

        .modal { position: absolute; top: var(--abar-height); left: 0; width: 100%; height: calc(100% - var(--abar-height)); background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 200; display: none; justify-content: center; align-items: center; }
        .modal.active { display: flex; }
        /* info 面板需高于事件/村肆等流程模态，避免点击后被遮挡 */
        #info-panel.modal,
        #info-detail-panel.modal { z-index: 700; }
        
        /* ================= 面板专项排版 ================= */
        #info-content, #deck-content, #pile-content { width: 900px; max-width: 90%; height: 600px; max-height: 85%; background: var(--ink-panel); border: 1px solid #444; display: flex; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.9); }
        .info-col { flex: 1; padding: 25px; display: flex; flex-direction: column; position: relative; }
        .info-col.info-col-portrait { min-width: 0; }
        .info-portrait-layer {
            position: absolute; inset: 0;
            background-image: var(--portrait-info-url);
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            opacity: 0.92;
            pointer-events: none;
        }
        .close-btn { position: absolute; top: 15px; right: 15px; width: 40px; height: 40px; background: rgba(30,30,35,0.8); border: 1px solid #444; border-radius: 8px; display: flex; justify-content: center; align-items: center; color: #aaa; font-size: 20px; cursor: pointer; transition: 0.2s; z-index: 210; }
        .close-btn:hover { background: var(--blood-red); color: #fff; border-color: #fff; }

        .info-title { color: var(--blood-red); margin-bottom: 20px; font-size: 22px; border-bottom: 1px solid #333; padding-bottom: 5px; font-weight: bold; letter-spacing: 2px;}
        .attr-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 18px; color: #ccc; border-bottom: 1px dashed #222; padding-bottom: 5px;}
        .attr-label { color: #888; }
        .attr-val { color: #fff; font-weight: bold;}
        .equip-box { border: 2px dashed #444; border-radius: 8px; background: rgba(30,30,35,0.4); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #666; transition: 0.3s; cursor:pointer;}
        .equip-box:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 15px rgba(184,134,11,0.2) inset; }
        /* 神兵栏：仅展示，拾取仍走遭遇与荒村货摊 */
        .equip-box.equip-box-readonly { opacity: 0.52; cursor: default; pointer-events: none; filter: grayscale(0.35); }
        .equip-box.equip-box-readonly:hover { border-color: #444; color: inherit; box-shadow: none; }

        /* 诗句卡片(信息面板内) */
        #info-poetry { gap: 10px; overflow-y: auto; justify-content: flex-start !important; align-items: stretch !important; }
        #info-poetry::-webkit-scrollbar { width: 4px; }
        #info-poetry::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
        .poetry-card { background: linear-gradient(135deg, rgba(40,30,18,0.9), rgba(18,14,10,0.95)); border: 1px solid var(--gold); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: inset 0 0 10px rgba(184,134,11,0.18), 0 2px 6px rgba(0,0,0,0.6); cursor: default; flex-shrink: 0; }
        .poetry-card .poetry-text { font-family: 'Ma Shan Zheng', cursive; font-size: 22px; color: var(--gold-light); letter-spacing: 4px; text-shadow: 0 0 6px rgba(184,134,11,0.5); }
        .poetry-card .poetry-source { font-size: 11px; color: #888; }
        .poetry-card .poetry-pattern { font-size: 13px; color: #cbb47a; letter-spacing: 6px; padding: 2px 4px; border-top: 1px dashed #4a3a20; border-bottom: 1px dashed #4a3a20; margin: 2px 0; font-family: 'Noto Serif SC','Georgia',serif; }
        .poetry-card .poetry-effect { font-size: 12px; color: #ddd; line-height: 1.4; text-align: center; }
        #info-detail-body { align-items: stretch; justify-content: flex-start; }
        .info-detail-empty {
            color: #777;
            text-align: center;
            padding: 30px 10px;
            border: 1px dashed #444;
            border-radius: 8px;
            background: rgba(20, 20, 24, 0.75);
        }
        .info-detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 14px;
            width: 100%;
        }
        .info-detail-entry {
            background: linear-gradient(135deg, #1a1a22, #101016);
            border: 1px solid #555;
            border-radius: 8px;
            padding: 12px;
            min-height: 155px;
            box-shadow: 0 5px 10px rgba(0,0,0,0.45);
            transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
        }
        .info-detail-entry:hover {
            transform: translateY(-4px);
            border-color: var(--gold);
            box-shadow: 0 0 14px rgba(184,134,11,0.22);
        }
        .info-detail-entry-title {
            color: var(--gold-light);
            font-size: 20px;
            letter-spacing: 2px;
            line-height: 1.3;
            margin-bottom: 8px;
            font-family: 'Ma Shan Zheng', cursive;
            border-bottom: 1px solid #333;
            padding-bottom: 6px;
        }
        .info-detail-entry-meta {
            color: #8b8b96;
            font-size: 12px;
            margin-bottom: 8px;
        }
        .info-detail-entry-line {
            color: #d6c189;
            font-size: 13px;
            letter-spacing: 3px;
            margin-bottom: 8px;
        }
        .info-detail-entry-desc {
            color: #c9c9d3;
            font-size: 13px;
            line-height: 1.6;
        }

        /* ================= 核心：卡牌与 Hover 术语特效 ================= */
        /* 卡面：冷灰绢底 + 顶缘柔光 + 深内晕，整体哑光；稀有度只做细描边/环，避免与外置战斗光效糊在一起 */
        .kw { position: relative; text-decoration: underline dashed var(--blood-red); cursor: help; font-weight: bold; color: #e5e7eb; }
        .kw:hover::after { display: none; }
        #kw-tooltip { position: fixed; transform: translate(-50%, -100%); background: rgba(10,10,12,0.98); color: var(--gold); padding: 10px 14px; border-radius: 6px; border: 1px solid var(--blood-red); white-space: pre-wrap; width: max-content; max-width: 200px; font-size: 12px; z-index: 999999; font-weight: normal; line-height: 1.5; text-shadow: none; text-align: left; box-shadow: 0 5px 15px rgba(0,0,0,0.8); pointer-events: none; display: none; }
        
        .deck-card, .card {
            width: 150px; height: 230px;
            position: relative;
            padding: 10px;
            border-radius: 10px;
            user-select: none;
            display: flex;
            flex-direction: column;
            transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
            border: 1px solid rgba(135, 125, 105, 0.42);
            background:
                linear-gradient(168deg, rgba(255, 253, 245, 0.055) 0%, transparent 38%),
                linear-gradient(148deg, #1e2229 0%, #15181f 42%, #0b0d12 100%);
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(255, 255, 255, 0.075),
                inset 0 -10px 22px rgba(0, 0, 0, 0.4);
        }
        .deck-card.mid-rarity-card, .card.mid-rarity-card {
            border-color: rgba(148, 165, 188, 0.55);
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(210, 220, 235, 0.07),
                inset 0 -10px 22px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(90, 110, 140, 0.28);
        }
        .deck-card.high-rarity-card, .card.high-rarity-card {
            border-color: rgba(200, 168, 90, 0.52);
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(255, 230, 170, 0.09),
                inset 0 -10px 22px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(120, 90, 40, 0.22);
        }
        .deck-card:hover, .card:hover { z-index: 100 !important; transform: translateY(-10px); }
        .card:hover {
            transform: translateY(-40px) scale(1.1);
            border-color: rgba(175, 168, 150, 0.65);
            box-shadow:
                0 14px 28px rgba(0, 0, 0, 0.85),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                inset 0 -10px 22px rgba(0, 0, 0, 0.38);
        }
        .card.dragging {
            cursor: grabbing;
            transition: none;
            z-index: 999 !important;
            opacity: 0.95;
            border-color: rgba(196, 167, 125, 0.75);
            box-shadow:
                0 22px 44px rgba(0, 0, 0, 0.9),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }
        .card.disabled { filter: grayscale(100%) brightness(0.5); pointer-events: none; }

        .card-cost {
            width: 26px; height: 26px; font-size: 14px;
            top: -10px; left: -10px; position: absolute;
            border-radius: 50%;
            display: flex; justify-content: center; align-items: center;
            font-weight: bold;
            color: #a5d4ff;
            z-index: 5;
            background: radial-gradient(circle at 32% 28%, #353945, #12141a 72%);
            border: 1px solid rgba(196, 174, 140, 0.45);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }
        .card-type {
            width: 22px; height: 22px; font-size: 11px;
            top: -6px; right: -6px; position: absolute;
            border-radius: 50%;
            display: flex; justify-content: center; align-items: center;
            font-weight: bold;
            color: #f5f2eb;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
            z-index: 5;
        }
        .type-ping { background: linear-gradient(165deg, #5c6678, #3f4858); border: 1px solid rgba(130, 145, 165, 0.4); }
        .type-ze { background: linear-gradient(165deg, #9a2228, #6b151a); border: 1px solid rgba(200, 120, 120, 0.45); }
        .card-name {
            text-align: center;
            font-weight: bold;
            font-size: 16px;
            margin-top: 5px;
            padding-bottom: 2px;
            color: #f2ebe1;
            letter-spacing: 0.04em;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
        }
        .card-category {
            text-align: center;
            font-size: 11px;
            color: #9d9480;
            margin-bottom: 4px;
            border-bottom: 1px solid rgba(95, 90, 78, 0.45);
            padding-bottom: 5px;
            letter-spacing: 0.08em;
        }
        .card-img {
            height: 50px;
            margin: 5px 0;
            border-radius: 5px;
            font-size: 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #6d6a64;
            overflow: hidden;
            background: rgba(4, 5, 7, 0.72);
            border: 1px solid rgba(72, 68, 58, 0.85);
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 6px 16px rgba(0, 0, 0, 0.55);
        }

        /* 关键修复：卡面描述不再使用 flex 居中，彻底解决文字堆叠和悬停错乱 */
        .card-desc { font-size: 12px; color: #b8b4a8; flex: 1; text-align: left; display: block; margin-top: 5px; line-height: 1.45; white-space: normal; overflow: hidden; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65); }
        
        .card-count-badge { position: absolute; bottom: -10px; right: -10px; background: var(--blood-red); color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; font-size: 12px; font-weight: bold; border: 2px solid #222; z-index: 10; }

        #settings-panel { flex-direction: column; gap: 20px; }

        /* ================= 三生石 (图鉴) — 容器 id 为 #screen-gallery ================= */
        #screen-gallery .screen-content { background: var(--ink-bg); padding: 40px; overflow-y: auto; width: 100%; height: 100%; }
        .gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid #333; padding-bottom: 20px; }
        .gallery-section-title { font-size: 24px; color: var(--blood-red); margin-top: 30px; margin-bottom: 25px; font-weight: bold; }
        .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 25px; justify-items: center; }

        /* 三生石：加粗高对比描边 + 外缘线(仅 #screen-gallery，此前误写 #gallery-panel 未命中 DOM) */
        #screen-gallery .deck-card {
            border-style: solid;
            border-width: 3px;
            border-color: rgba(200, 190, 172, 0.95);
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(255, 255, 255, 0.075),
                inset 0 -10px 22px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(18, 16, 14, 0.95),
                0 0 0 4px rgba(95, 88, 74, 0.65);
        }
        #screen-gallery .deck-card.mid-rarity-card {
            border-width: 4px;
            border-color: #b8cce8;
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(210, 220, 235, 0.1),
                inset 0 -10px 22px rgba(0, 0, 0, 0.4),
                0 0 0 2px rgba(45, 65, 98, 0.95),
                0 0 0 6px rgba(70, 110, 160, 0.55);
        }
        #screen-gallery .deck-card.high-rarity-card {
            border-width: 4px;
            border-color: #e9c456;
            box-shadow:
                0 6px 18px rgba(0, 0, 0, 0.72),
                inset 0 1px 0 rgba(255, 230, 170, 0.12),
                inset 0 -10px 22px rgba(0, 0, 0, 0.45),
                0 0 0 2px rgba(95, 68, 22, 0.95),
                0 0 0 6px rgba(130, 95, 35, 0.55);
        }

        /* ================= 地图与事件 ================= */
        #screen-map .screen-content { background: url('./../assets/map_bg.png') center/cover, var(--ink-bg); position: relative; }
        .map-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
        .map-line { stroke: rgba(48, 46, 44, 0.82); stroke-width: 2; stroke-dasharray: 8, 7; }
        .map-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; transition: 0.3s; opacity: 0.5; pointer-events: none;}
        .map-node.reachable { opacity: 1; pointer-events: auto; }
        .map-node.reachable:hover { transform: translate(-50%, -50%) scale(1.2); filter: drop-shadow(0 0 10px var(--blood-red)); }
        .map-node.visited { opacity: 0.3; }
        /* 地图节点：glyph + mark(ink 淡墨晕圈 / seal 朱文印)— 数据见 js/data/events.js → MapChapters */
        .node-icon {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 56px;
            height: 56px;
            box-sizing: border-box;
        }
        .node-icon.big { width: 72px; height: 72px; }
        .node-glyph {
            position: relative;
            z-index: 1;
            font-family: 'Zhi Mang Xing', 'Ma Shan Zheng', cursive;
            font-size: 38px;
            line-height: 1;
            color: #121318;
            letter-spacing: 0;
            text-shadow: 0 1px 1px rgba(255, 255, 255, 0.12), 0 2px 16px rgba(0, 0, 0, 0.35);
            pointer-events: none;
        }
        .node-icon.big .node-glyph { font-size: 48px; }
        .map-mark-ink::before {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 50%;
            background: radial-gradient(ellipse 88% 82% at 44% 40%, rgba(28, 28, 32, 0.34) 0%, rgba(28, 28, 32, 0.14) 46%, rgba(28, 28, 32, 0.05) 64%, transparent 74%);
            box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.06);
            pointer-events: none;
        }
        /* 水墨字：略提高不透明度与描边感，在地图底图上更易辨认 */
        .map-mark-ink .node-glyph {
            transform: rotate(-5deg);
            color: rgba(6, 6, 10, 0.98);
            text-shadow:
                0 0 4px rgba(250, 247, 240, 0.75),
                0 0 1px rgba(250, 247, 240, 0.95),
                0 1px 3px rgba(0, 0, 0, 0.72),
                0 2px 12px rgba(0, 0, 0, 0.45);
        }
        .map-mark-seal {
            border: 2.5px solid rgba(169, 32, 32, 0.95);
            border-radius: 3px;
            background: linear-gradient(152deg, rgba(255, 250, 248, 0.2) 0%, rgba(235, 195, 188, 0.16) 100%);
            box-shadow:
                inset 0 0 0 1px rgba(255, 228, 222, 0.35),
                0 2px 10px rgba(0, 0, 0, 0.4);
            transform: rotate(-7deg);
        }
        .map-mark-seal .node-glyph {
            font-family: 'Ma Shan Zheng', 'Zhi Mang Xing', cursive;
            color: #9a1818;
            text-shadow: 0 0 1px rgba(60, 12, 12, 0.35);
            transform: rotate(5deg);
        }
        .node-icon.big.map-mark-seal { border-width: 3px; }
        .map-node.reachable:hover .map-mark-seal {
            box-shadow:
                inset 0 0 0 1px rgba(255, 228, 222, 0.5),
                0 0 20px rgba(180, 42, 42, 0.45);
        }
        .node-name { writing-mode: vertical-rl; font-size: 18px; font-weight: bold; position: absolute; top: -6px; right: -28px; letter-spacing: 4px; text-shadow: 2px 2px 5px black; color: #e8e4dc; font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;}

        #map-return-btn { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 150; display: none; background: rgba(139,24,24,0.9); border-color: #ff6b6b; padding: 10px 40px; font-size: 20px; border-radius: 8px;}

        /* 事件界面背景：默认 + 按节点类型切换(由 #screen-event 的 class 与 --event-bg-image 驱动) */
        #screen-event {
            --event-bg-image: url('./../assets/event_bg.png');
        }
        #screen-event.event-bg-teahouse { --event-bg-image: url('./../assets/event_bg_teahouse.png'); }
        #screen-event.event-bg-village { --event-bg-image: url('./../assets/event_bg_village.png'); }
        #screen-event.event-bg-temple { --event-bg-image: url('./../assets/event_bg_temple.png'); }
        #screen-event.event-bg-wangxiang { --event-bg-image: url('./../assets/event_bg_wangxiang.png'); }
        #screen-event.event-bg-naihe { --event-bg-image: url('./../assets/event_bg_naihe.png'); }

        #screen-event .screen-content {
            background: var(--event-bg-image) center/cover, var(--ink-bg);
            justify-content: flex-end;
            align-items: center;
            padding-bottom: 50px;
        }
        .dialog-box { width: 80%; max-width: 1000px; height: 250px; background: rgba(10,10,15,0.78); border: 2px solid #444; border-radius: 10px; position: relative; padding: 40px; display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
        .dialog-name { position: absolute; top: -20px; left: 30px; background: var(--ink-border); padding: 5px 20px; font-size: 24px; font-weight: bold; border: 1px solid #555; color: var(--blood-red); }
        .dialog-text { font-size: 28px; line-height: 1.5; text-shadow: 1px 1px 2px black; }
        .dialog-options { display: none; flex-direction: column; gap: 15px; width: 60%; margin: 0 auto; z-index: 10;}
        .dialog-opt-btn { background: rgba(30,30,35,0.9); border: 1px solid #555; padding: 15px; color: white; font-size: 20px; text-align: center; cursor: pointer; transition: 0.2s; font-family: inherit;}
        .dialog-opt-btn:hover { background: var(--blood-red); border-color: #fff; }

        /* ================= 战斗状态栏 ================= */
        .status-bar { display: flex; justify-content: center; gap: 5px; margin-top: 5px; height: 24px; pointer-events: auto; }
        .status-icon { position: relative; font-size: 16px; cursor: help; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 4px; border: 1px solid #555; }
        .status-tooltip { visibility: hidden; position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.95); color: #fff; padding: 6px 12px; border-radius: 4px; border: 1px solid #888; font-size: 12px; white-space: nowrap; z-index: 100; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
        .status-icon:hover .status-tooltip { visibility: visible; opacity: 1; }

        #screen-combat .screen-content { display: flex; flex-direction: column; background: url('./../assets/combat_bg.png') center/cover, var(--ink-bg); }

        /*
         * 山路战斗：`combat_bg_mountain.png` 只叠在「战区」.combat-middle 内，半透明 + 底部渐变透明，
         * 不覆盖顶部气/势与底部手牌区，避免喧宾夺主挡 UI。
         */
        #screen-combat.combat-bg-mountain .combat-middle::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background: url('./../assets/combat_bg_mountain.png') center 42% / cover no-repeat;
            opacity: 0.38;
            -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.2) 88%, transparent 100%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.2) 88%, transparent 100%);
        }
        #screen-combat.combat-bg-mountain .combat-middle .combat-arena-row {
            position: relative;
            z-index: 1;
        }

        .combat-top { padding: 10px 40px; display: flex; justify-content: space-between; align-items: center; font-size: 24px; font-weight: bold; }
        .stat-badge { background: rgba(0,0,0,0.8); padding: 5px 15px; border: 1px solid #444; border-radius: 20px; }
        .combat-middle { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: stretch; position: relative; gap: 0; padding: 8px 12px; }
        .combat-arena-row {
            display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; align-content: center;
            gap: 24px 88px; width: 100%;
        }
        #player { margin-right: 48px; }
        #enemy-list { margin-left: 48px; }
        .enemy-list {
            display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 16px 22px;
            flex: 0 1 auto; min-width: 140px; position: relative;
        }
        /* 3 敌：单行略缩小，减轻与手牌/按钮区抢位 */
        .enemy-list.enemy-layout-triple {
            display: flex;
            flex-wrap: nowrap;
            gap: 10px 14px;
            justify-content: center;
            align-items: flex-end;
            max-width: min(100%, 520px);
        }
        .enemy-list.enemy-layout-triple .entity-sprite {
            width: 128px;
            height: 172px;
        }
        .enemy-list.enemy-layout-triple .hp-container {
            width: 128px;
        }
        .enemy-list.enemy-layout-triple .intent {
            font-size: 13px;
            top: -34px;
            padding: 4px 8px;
            max-width: 140px;
            white-space: normal;
            text-align: center;
            line-height: 1.2;
        }
        .enemy-list.enemy-layout-triple .enemy-name-tag {
            max-width: 132px;
            font-size: 12px;
        }
        .enemy-list.enemy-layout-triple .status-bar {
            flex-wrap: wrap;
            max-width: 124px;
            height: auto;
            min-height: 22px;
            gap: 3px;
            justify-content: center;
        }
        .enemy-list.enemy-layout-triple .status-icon {
            font-size: 14px;
            padding: 1px 4px;
        }
        /* 4+ 敌：2 列网格(田字 / 2×N)，整体变窄，避免与右侧结束回合按钮重叠 */
        .enemy-list.enemy-layout-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 118px));
            gap: 8px 16px;
            justify-content: center;
            align-content: end;
            max-width: min(100%, 280px);
        }
        .enemy-list.enemy-layout-grid .entity-sprite {
            width: 108px;
            height: 144px;
        }
        .enemy-list.enemy-layout-grid .hp-container {
            width: 108px;
        }
        .enemy-list.enemy-layout-grid .intent {
            position: relative;
            top: auto;
            left: auto;
            font-size: 11px;
            padding: 3px 5px;
            max-width: 112px;
            white-space: normal;
            text-align: center;
            line-height: 1.25;
            margin-bottom: 2px;
        }
        .enemy-list.enemy-layout-grid .entity.enemy-slot {
            padding-top: 2px;
        }
        .enemy-list.enemy-layout-grid .status-bar {
            flex-wrap: wrap;
            max-width: 106px;
            height: auto;
            min-height: 20px;
            gap: 2px;
            justify-content: center;
            margin-top: 2px;
        }
        .enemy-list.enemy-layout-grid .status-icon {
            font-size: 12px;
            padding: 1px 3px;
        }
        .enemy-list.enemy-layout-grid .hp-text {
            font-size: 11px;
            top: -18px;
        }
        .enemy-list.enemy-layout-grid .hp-text .hp-pct {
            font-size: 10px;
        }
        .enemy-list.enemy-layout-grid .enemy-name-tag {
            max-width: 110px;
            font-size: 11px;
        }
        /* 四魑魅专用：更扁、占高更小，避免压到下方手牌区 */
        .enemy-list.enemy-layout-chi-four {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 108px));
            gap: 4px 12px;
            justify-content: center;
            align-content: end;
            max-width: min(100%, 248px);
        }
        .enemy-list.enemy-layout-chi-four .entity-sprite { width: 92px; height: 114px; }
        .enemy-list.enemy-layout-chi-four .hp-container { width: 92px; height: 10px; }
        .enemy-list.enemy-layout-chi-four .intent {
            position: relative; top: auto; left: auto; font-size: 10px;
            padding: 2px 4px; max-width: 96px; white-space: normal; line-height: 1.2; margin-bottom: 1px;
        }
        .enemy-list.enemy-layout-chi-four .enemy-name-tag { max-width: 94px; font-size: 10px; line-height: 1.15; }
        .enemy-list.enemy-layout-chi-four .status-bar { flex-wrap: wrap; max-width: 92px; height: auto; min-height: 18px; gap: 2px; margin-top: 1px; }
        .enemy-list.enemy-layout-chi-four .status-icon { font-size: 11px; padding: 0 3px; }
        .enemy-list.enemy-layout-chi-four .hp-text { top: -16px; font-size: 10px; }
        .enemy-list.enemy-layout-chi-four .hp-text .hp-pct { font-size: 9px; }
        .entity.enemy-slot {
            transition: box-shadow 0.25s, transform 0.25s, outline-color 0.2s;
            border-radius: 8px;
            padding: 6px 4px 0;
            outline: 2px solid transparent;
            outline-offset: 2px;
        }
        /* 意图环：等待绿 / 伤害红 / 上状态或自buff蓝 */
        .entity.enemy-slot.enemy-intent-wait {
            box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.62), 0 0 18px rgba(34, 197, 94, 0.24);
        }
        .entity.enemy-slot.enemy-intent-atk {
            box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.78), 0 0 22px rgba(239, 68, 68, 0.34);
        }
        .entity.enemy-slot.enemy-intent-buff {
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.72), 0 0 20px rgba(59, 130, 246, 0.32);
        }
        .entity.enemy-slot.drag-hover-target {
            outline: 2px dashed rgba(250, 250, 250, 0.85);
            outline-offset: 4px;
        }
        .drag-battle-hint {
            position: fixed; z-index: 10000; pointer-events: none; display: none;
            padding: 8px 12px; max-width: min(320px, 90vw);
            background: rgba(8, 8, 12, 0.92); border: 1px solid #4b5563; border-radius: 8px;
            font-size: 15px; line-height: 1.35; color: #e5e7eb;
            box-shadow: 0 8px 24px rgba(0,0,0,0.55); transform: translate(-50%, calc(-100% - 14px));
        }
        .drag-battle-hint.visible { display: block; }
        /* 受击：红闪 */
        .entity.enemy-slot.enemy-glow-hit {
            animation: enemyGlowHit 0.55s ease;
        }
        /* 自身强化/得到御骸等：蓝闪 */
        .entity.enemy-slot.enemy-glow-buff {
            animation: enemyGlowBuff 0.55s ease;
        }
        @keyframes enemyGlowHit {
            0%, 100% { outline-color: transparent; }
            35% { outline-color: rgba(239, 68, 68, 0.95); box-shadow: 0 0 20px rgba(239, 68, 68, 0.65); }
        }
        @keyframes enemyGlowBuff {
            0%, 100% { outline-color: transparent; }
            35% { outline-color: rgba(59, 130, 246, 0.95); box-shadow: 0 0 18px rgba(59, 130, 246, 0.55); }
        }
        .entity { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
        /*
         * 妖怪立绘资产：assets/enemy_<archKey>.png(archKey 见 js/data/enemies.js → EnemyArchetypes)
         * 显示尺寸与推荐比例：
         *   - 默认：.entity-sprite 宽 180px × 高 240px → 比例 3:4，建议原画 360×480 或 540×720(竖版，cover 裁切)
         *   - 四魑布局：.enemy-layout-chi-four .entity-sprite 92×114 → 约 46:57
         *   - 窄屏：.entity-sprite 100×140 → 5:7
         * 玩家立绘：CSS 变量 --portrait-combat-url(assets/portrait_combat.png)，与敌共用 .entity-sprite 尺寸规则
         */
        .entity-sprite { width: 180px; height: 240px; }
        #player .player-combat-portrait.entity-sprite {
            border: none;
            padding: 0;
            background-color: #1a1a1f;
            background-image: var(--portrait-combat-url);
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
        }
        .hp-container { width: 180px; height: 12px; background: #222; border: 1px solid #000; position: relative; }
        .hp-fill { height: 100%; background: var(--blood-red); width: 100%; transition: 0.3s; }
        .hp-text { position: absolute; top: -20px; left: 0; width: 100%; text-align: center; font-size: 14px; text-shadow: 1px 1px 2px black; line-height: 1.25; }
        .hp-text .hp-pct { font-size: 12px; color: #86efac; font-weight: normal; }
        .hp-text .hp-block { font-size: 12px; color: #93c5fd; }
        .intent { position: absolute; top: -54px; background: rgba(0,0,0,0.8); padding: 5px 14px; border: 1px solid #555; font-size: 16px; color: #ff6b6b; border-radius: 5px; max-width: 220px; white-space: normal; text-align: center; line-height: 1.25; word-break: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
        .intent.intent-has-detail { cursor: help; }
        .combat-bottom { height: 260px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 20px; position: relative; }
        .pile { position: absolute; bottom: 30px; width: 100px; height: 140px; background: rgba(20,20,25,0.9); border: 1px solid #444; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 18px; z-index: 120; }
        #draw-pile { left: 40px; } #discard-pile { right: 40px; }
        #exhaust-pile { right: 150px; border-color: var(--gold); color: var(--gold-light); box-shadow: inset 0 0 10px rgba(184,134,11,0.25); }
        .picker-card-wrapper { cursor: pointer; transition: 0.2s; position: relative; }
        .picker-card-wrapper:hover { transform: translateY(-5px); z-index: 100; }
        .picker-card-wrapper.selected { transform: translateY(-15px); }
        .picker-card-wrapper.selected .deck-card { border-color: var(--gold-light); box-shadow: 0 0 18px rgba(255,215,0,0.6); }
        .card.is-mirror { border-color: var(--gold-light) !important; box-shadow: 0 0 14px rgba(255,215,0,0.55) !important; }
        .mirror-tag { color: var(--gold-light); font-size: 11px; margin-left: 4px; padding: 1px 5px; border: 1px solid var(--gold-light); border-radius: 3px; font-weight: normal; vertical-align: middle; }
        #end-turn-btn { position: absolute; right: 40px; bottom: 255px; background: #333; color: #888; border: 1px solid #555; padding: 15px 30px; font-size: 20px; cursor: not-allowed; transition: 0.3s; font-family: inherit; z-index: 130;}
        #end-turn-btn.active { background: var(--blood-red); color: white; border-color: #fff; cursor: pointer; }
        #end-turn-btn.active:hover { box-shadow: 0 0 15px rgba(139,24,24,0.8); }

        .hand { display: flex; gap: 8px; justify-content: center; align-items: flex-end; height: 100%; max-width: calc(100% - 300px); margin: 0 150px; position: relative; z-index: 20; }
        .hand-card-stack { display: flex; align-items: flex-end; position: relative; }
        .hand-card-stack .card { flex: 0 0 auto; }
        .hand-card-stack .card:not(:first-child) { margin-left: -95px; }
        
        .ping-ze-tracker { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); font-size: 26px; letter-spacing: 0; display: flex; gap: 14px; z-index: 50; }
        .pz-char { 
            position: relative; width: 46px; height: 46px; 
            display: flex; align-items: center; justify-content: center; 
            font-family: 'Ma Shan Zheng','Noto Serif SC',serif;
            animation: pzPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
        }
        .pz-char.pz-ping {
            color: #c2c9d4;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88), 0 0 14px rgba(0, 0, 0, 0.42);
        }
        .pz-char.pz-ze { color: var(--blood-red); }
        /* 灰色水墨圈：默认状态 */
        .pz-char::before {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 50%;
            border: 2px solid #5a5a5e;
            border-top-width: 3px;
            border-right-width: 1px;
            border-bottom-width: 2px;
            border-left-width: 2px;
            transform: rotate(-4deg);
            opacity: 0.65;
            pointer-events: none;
            transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
        }
        /* 金色(吴钩)：圆环扩张 */
        .pz-char.pz-match-blade::before {
            border-color: var(--gold-light);
            box-shadow: 0 0 10px rgba(255,215,0,0.55), inset 0 0 4px rgba(184,134,11,0.35);
            opacity: 1;
        }
        .pz-char.pz-match-blade { animation: pzMatchPulse 0.4s ease; }
        /* 青泪(感时)：柔边椭圆 + 虚线 */
        .pz-char.pz-match-tear::before {
            border-color: #5eead4;
            border-style: dashed;
            border-radius: 45% 55% 48% 52%;
            box-shadow: 0 0 12px rgba(45,212,191,0.45), inset 0 0 6px rgba(20,184,166,0.25);
            opacity: 1;
        }
        .pz-char.pz-match-tear { animation: pzMatchPulseTear 0.45s ease; }
        @keyframes pzMatchPulseTear { 0% { transform: scale(1) skewX(0);} 50% { transform: scale(1.12) skewX(-2deg);} 100% { transform: scale(1) skewX(0);} }
        /* 双诗同时缀连：双色描边 */
        .pz-char.pz-match-both::before {
            border: 2px solid rgba(255, 215, 0, 0.95);
            border-radius: 50%;
            background: transparent;
            box-shadow:
                0 0 0 2px rgba(45, 212, 191, 0.92),
                0 0 14px rgba(255,215,0,0.35),
                0 0 12px rgba(45,212,191,0.4);
            opacity: 1;
        }
        .pz-char.pz-match-both { animation: pzMatchPulse 0.4s ease; }
        @keyframes pzPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
        @keyframes pzMatchPulse { 0% { transform: scale(1);} 50% { transform: scale(1.15);} 100% { transform: scale(1);} }
        
        #kuhai-flee-modal.modal { z-index: 950; }
        #junxing-modal.modal { z-index: 960; }
        .kuhai-flee-box {
            background: var(--ink-panel); border: 1px solid var(--gold); border-radius: 10px; padding: 26px 30px;
            max-width: 460px; box-shadow: 0 20px 50px rgba(0,0,0,0.9); text-align: center;
        }
        .kuhai-flee-title { color: var(--gold-light); font-size: 22px; letter-spacing: 4px; margin-bottom: 14px; font-weight: bold; }
        .kuhai-flee-text { color: #ccc; font-size: 15px; line-height: 1.75; margin-bottom: 20px; text-align: left; }
        .kuhai-flee-hint {
            color: #c9b896;
            font-size: 14px;
            line-height: 1.55;
            margin: -6px 0 14px;
            padding: 10px 12px;
            text-align: center;
            border: 1px solid rgba(139, 24, 24, 0.45);
            border-radius: 6px;
            background: rgba(20, 12, 12, 0.55);
            letter-spacing: 0.5px;
        }
        .kuhai-flee-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
        #kuhai-flee-pay.btn-g.disabled {
            opacity: 0.55;
            cursor: not-allowed;
            pointer-events: auto;
        }
        #kuhai-flee-pay.btn-g.disabled:hover {
            transform: none;
            border-bottom-color: transparent;
            color: #ccc;
            text-shadow: none;
        }

        .dmg-text { position: absolute; color: white; font-size: 40px; font-weight: bold; -webkit-text-stroke: 2px black; pointer-events: none; animation: floatUp 2.4s forwards; z-index: 100; font-family: 'Georgia', serif; }
        .dmg-text.crit { color: var(--blood-red); font-size: 50px; }
        .dmg-text.block { color: #60a5fa; }
        .dmg-text.gan-shi { color: #2dd4bf; font-size: 38px; -webkit-text-stroke: 1px #0f172a; text-shadow: 0 0 12px rgba(45,212,191,0.7); }
        @keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 55% { opacity: 1; } 100% { transform: translateY(-120px) scale(1.35); opacity: 0; } }

        /* ================= 战斗结算界面 ================= */
        #screen-settlement .screen-content { 
            display: flex; flex-direction: column; align-items: center; 
            background: url('./../assets/event_bg.png') center/cover, var(--ink-bg); 
            padding: 40px 40px 80px 40px; overflow-y: auto; justify-content: flex-start;
        }
        .settlement-title { font-size: 48px; color: var(--blood-red); margin-bottom: 30px; letter-spacing: 10px; text-shadow: 0 0 15px rgba(139,24,24,0.8); flex-shrink: 0; }
        .settlement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 90%; max-width: 1100px; flex: none; margin-bottom: 20px; }
        
        #reward-card-box { grid-column: span 2; min-height: 250px; }
        
        .reward-box { background: rgba(20,20,25,0.9); border: 2px solid #444; border-radius: 8px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; min-height: 150px;}
        .reward-box.claimed { filter: brightness(0.4) grayscale(0.8); pointer-events: none; border-color: #222; }
        .reward-title { font-size: 20px; color: var(--gold); margin-bottom: 15px; position: absolute; top: 15px; left: 20px; }
        .reward-empty { color: #666; font-size: 16px; font-style: italic; margin-top: 15px;}
        .reward-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; margin-top: 30px;}
        
        .settlement-actions { margin-top: 20px; display: flex; gap: 40px; flex-shrink: 0; margin-bottom: 40px; }

        .reward-card-container { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px;}
        .reward-card-wrapper { cursor: pointer; transition: 0.2s; position: relative; }
        .reward-card-wrapper:hover { transform: translateY(-5px); z-index: 100; }
        .reward-card-wrapper.selected { transform: translateY(-15px); }
        .reward-card-wrapper.selected .deck-card { border-color: var(--gold); box-shadow: 0 0 20px var(--gold); }
        
        .reward-claim-btn { background: rgba(139,24,24,0.2); border: 1px solid var(--blood-red); color: #ccc; padding: 10px 30px; font-size:18px; border-radius: 4px; cursor: pointer; transition: 0.2s; margin-top: 10px;}
        .reward-claim-btn:hover { background: var(--blood-red); color: #fff; }
        .reward-claim-btn.disabled { opacity: 0.5; cursor: not-allowed; background: #333; border-color: #555;}

        /* ================= 顶级层 ================= */
        #toast { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); background: rgba(139,24,24,0.9); padding: 10px 30px; font-size: 20px; border-radius: 5px; border: 1px solid #ff6b6b; color: white; z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s; }
        #fxCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; }

        /* ================= 诗韵触发特效(水墨爆裂) ================= */
        .poetry-burst {
            position: fixed; top: 38%; left: 50%; transform: translate(-50%, -50%);
            pointer-events: none; z-index: 9998;
            display: flex; gap: 14px; align-items: center; justify-content: center;
            font-family: 'Ma Shan Zheng', cursive;
        }
        .poetry-burst--tear { flex-direction: column; gap: 20px; }
        .poetry-burst-char {
            font-size: 96px; line-height: 1;
            color: var(--gold-light);
            text-shadow: 0 0 14px rgba(255,215,0,0.65), 0 0 30px rgba(184,134,11,0.55), 2px 3px 0 rgba(0,0,0,0.85);
            opacity: 0;
            animation: poetryCharIn 1.2s ease-out forwards;
            filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7));
        }
        .poetry-burst-char--tear {
            color: #a5f3fc;
            text-shadow: 0 0 18px rgba(34,211,238,0.85), 0 0 36px rgba(6,182,212,0.45), 2px 4px 0 rgba(15,23,42,0.9);
            animation: poetryCharInTear 1.35s ease-out forwards;
        }
        @keyframes poetryCharInTear {
            0%   { opacity: 0; transform: translateY(-16px) scale(0.65); filter: blur(10px) drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
            25%  { opacity: 1; transform: translateY(4px) scale(1.02); filter: blur(0); }
            65%  { opacity: 1; transform: translateY(0) scale(1); }
            100% { opacity: 0; transform: translateY(28px) scale(1.08); filter: blur(5px); }
        }
        .poetry-burst-drip-root {
            position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
            display: flex; gap: 10px; pointer-events: none;
        }
        .poetry-burst-drop {
            width: 6px; height: 22px;
            border-radius: 40% 40% 60% 60%;
            background: linear-gradient(180deg, rgba(165,243,252,0.95), rgba(6,182,212,0.35));
            opacity: 0;
            animation: poetryDropFall 1s ease-in forwards;
            box-shadow: 0 0 8px rgba(34,211,238,0.7);
        }
        @keyframes poetryDropFall {
            0%   { opacity: 0; transform: translateY(-30px) scaleY(0.4); }
            20%  { opacity: 1; }
            100% { opacity: 0; transform: translateY(120px) scaleY(1.2); }
        }
        @keyframes poetryCharIn {
            0%   { opacity: 0; transform: translateY(-30px) scale(0.55); filter: blur(8px) drop-shadow(0 4px 6px rgba(0,0,0,0.7)); }
            22%  { opacity: 1; transform: translateY(0)     scale(1);    filter: blur(0)   drop-shadow(0 4px 6px rgba(0,0,0,0.7)); }
            70%  { opacity: 1; transform: translateY(0)     scale(1.04); }
            100% { opacity: 0; transform: translateY(-40px) scale(1.12); filter: blur(3px) drop-shadow(0 4px 6px rgba(0,0,0,0.7)); }
        }
        .poetry-burst-ring {
            position: absolute; top: 50%; left: 50%;
            width: 620px; height: 620px;
            transform: translate(-50%, -50%) scale(0);
            border: 3px solid var(--gold-light);
            border-radius: 50%;
            box-shadow: 0 0 50px rgba(255,215,0,0.45), inset 0 0 50px rgba(184,134,11,0.35);
            opacity: 0.85;
            animation: poetryRing 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
        }
        .poetry-burst-ring.inner {
            width: 360px; height: 360px;
            border-width: 2px;
            opacity: 0.9;
            animation: poetryRing 1.1s 0.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
            box-shadow: 0 0 30px rgba(255,215,0,0.55);
        }
        @keyframes poetryRing {
            0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0.85; }
            70%  { opacity: 0.4; }
            100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
        }

        /* ================= 移动端横屏压缩适配 ================= */
        @media screen and (max-height: 600px) {
            :root { --abar-height: 12vh; }
            .game-title { font-size: 60px; margin-bottom: 20px; }
            .btn-g { padding: 8px 20px; font-size: 18px; }
            .saves-container { gap: 20px; }
            .save-slot { width: 150px; height: 220px; }
            
            .deck-card, .card { width: 110px; height: 165px; padding: 6px; border-width: 1px; border-radius: 8px; }
            .card-name { font-size: 13px; margin-top: 2px; }
            .card-category { font-size: 9px; margin-bottom: 2px; padding-bottom: 2px; }
            .card-cost { width: 20px; height: 20px; font-size: 12px; top: -6px; left: -6px; }
            .card-type { width: 18px; height: 18px; font-size: 9px; top: -4px; right: -4px; }
            .card-img { height: 35px; margin: 3px 0; }
            .card-desc { font-size: 10px; line-height: 1.2; }
            
            .combat-bottom { height: 160px; padding-bottom: 5px; }
            .pile { width: 70px; height: 100px; font-size: 14px; bottom: 20px; }
            #draw-pile { left: 10px; } #discard-pile { right: 10px; }
            #exhaust-pile { right: 90px; }
            #end-turn-btn { bottom: 150px; right: 10px; padding: 8px 15px; font-size: 14px; }
            .hand { max-width: calc(100% - 170px); margin: 0 85px; gap: 4px; }
            .hand-card-stack .card:not(:first-child) { margin-left: -70px; }
            .enemy-list { max-width: 95%; gap: 8px 10px; }
            #player { margin-right: 20px; }
            #enemy-list { margin-left: 20px; }
            .entity-sprite { width: 100px; height: 140px; }
            .combat-top { font-size: 16px; padding: 5px 15px; }
            
            #info-content, #deck-content, #pile-content { width: 95%; height: 95%; padding: 15px; }
            .info-col { padding: 10px; }
            .info-title { font-size: 18px; margin-bottom: 10px; }
            .attr-item { font-size: 14px; margin-bottom: 10px; }
            .settlement-title { font-size: 32px; margin-bottom: 15px; }

            .poetry-burst { gap: 8px; }
            .poetry-burst-char { font-size: 56px; }
            .poetry-burst-ring { width: 380px; height: 380px; }
            .poetry-burst-ring.inner { width: 220px; height: 220px; }

            .pz-char { width: 34px; height: 34px; font-size: 20px; }
            .ping-ze-tracker { font-size: 20px; gap: 10px; top: 60px; }
        }

        /* —— 开发者模式 —— */
        #abar-title.dev-tap-flash { animation: devTapFlash 0.18s ease; }
        @keyframes devTapFlash {
            0%   { color: #fff; text-shadow: 0 0 12px var(--gold-light); }
            100% { color: #888; text-shadow: none; }
        }
        #dev-abar-btn { color: var(--gold-light); }

        #dev-confirm.modal { z-index: 1000; }
        .dev-confirm-box {
            background: var(--ink-panel, #15151a);
            border: 1px solid var(--gold);
            border-radius: 10px;
            padding: 30px 40px;
            min-width: 420px;
            max-width: 560px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.85), 0 0 30px rgba(184,134,11,0.25) inset;
            text-align: center;
        }
        .dev-confirm-title { color: var(--gold-light); font-size: 24px; letter-spacing: 4px; margin-bottom: 14px; font-weight: bold; }
        .dev-confirm-text { color: #ccc; font-size: 15px; line-height: 1.7; margin-bottom: 22px; }
        .dev-confirm-btns { display: flex; gap: 24px; justify-content: center; }

        #dev-panel.modal { z-index: 999; }
        .dev-panel-box {
            width: 80%;
            max-width: 980px;
            height: 86%;
            background: var(--ink-panel, #15151a);
            border: 1px solid var(--gold);
            border-radius: 10px;
            position: relative;
            display: flex;
            flex-direction: column;
            padding: 28px 30px 22px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 30px rgba(184,134,11,0.18) inset;
        }
        .dev-panel-title {
            color: var(--gold-light);
            font-size: 22px;
            letter-spacing: 6px;
            text-align: center;
            border-bottom: 1px solid #333;
            padding-bottom: 12px;
            margin-bottom: 16px;
            font-weight: bold;
        }
        .dev-panel-body { flex: 1; overflow-y: auto; padding-right: 8px; }
        .dev-panel-body::-webkit-scrollbar { width: 8px; }
        .dev-panel-body::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

        .dev-section { border: 1px solid #2a2a30; border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; background: rgba(20,20,25,0.6); }
        .dev-section-title { color: var(--gold); font-size: 16px; font-weight: bold; letter-spacing: 2px; margin-bottom: 10px; border-bottom: 1px dashed #333; padding-bottom: 6px; }
        .dev-section.dev-disabled { opacity: 0.7; }
        .dev-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; color: #ddd; font-size: 14px; }
        .dev-row label { color: #aaa; font-size: 13px; min-width: 64px; }
        .dev-toggle-row label { min-width: auto; color: #ddd; cursor: pointer; }
        .dev-row input[type="text"], .dev-row input[type="number"], .dev-row select {
            background: #0d0d12;
            border: 1px solid #333;
            color: #eee;
            font: inherit;
            padding: 4px 8px;
            border-radius: 4px;
            min-width: 100px;
            max-width: 280px;
        }
        .dev-row input[type="number"] { width: 90px; }
        .dev-row input:focus, .dev-row select:focus { outline: none; border-color: var(--gold); }
        .dev-row .dev-btn { padding: 6px 14px !important; font-size: 14px !important; border: 1px solid #444; border-radius: 4px; cursor: pointer; }
        .dev-row .dev-btn:hover { transform: none; border-bottom: 1px solid var(--gold); }
        .dev-mute { color: #888; font-size: 12px; }
