    /* ==================== 8-THEME BESPOKE 16-BIT PIXEL-ART IN-GAME WINDOWS & BATTLE STAGES ==================== */
    .px-win-modal {
      position: relative;
      border: 4px solid var(--win-border, var(--combat-accent, var(--ui-accent, #d4a44a)));
      border-radius: var(--win-radius, 4px);
      background:
        var(--win-surface-tex, repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0px, rgba(255,255,255,0.022) 2px, transparent 2px, transparent 4px)),
        linear-gradient(180deg, var(--win-bg-top, rgba(22,18,15,0.96)) 0%, var(--win-bg-bot, rgba(11,10,9,0.98)) 100%);
      box-shadow:
        0 0 0 3px #0c0907,
        0 0 0 6px var(--win-outer-rim, color-mix(in srgb, var(--ui-accent, #d4a44a) 55%, #000)),
        inset 0 0 0 2px var(--win-inner-rim, color-mix(in srgb, var(--ui-accent, #d4a44a) 32%, transparent)),
        inset 0 0 42px rgba(0,0,0,0.78),
        0 24px 62px rgba(0,0,0,0.9);
      image-rendering: pixelated;
    }
    .px-combat-modal {
      position: relative;
      border: 14px solid var(--win-border, var(--combat-accent, var(--ui-accent, #d4a44a)));
      border-image-source: var(--win-combat-frame-img, none);
      border-image-slice: 8;
      border-image-width: 14px;
      border-image-outset: 0px;
      border-image-repeat: round;
      border-radius: 0px;
      background:
        var(--win-surface-tex, repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0px, rgba(255,255,255,0.022) 2px, transparent 2px, transparent 4px)),
        linear-gradient(180deg, var(--win-bg-top, rgba(22,18,15,0.96)) 0%, var(--win-bg-bot, rgba(11,10,9,0.98)) 100%);
      box-shadow:
        0 0 0 3px #090706,
        0 0 0 6px var(--win-outer-rim, color-mix(in srgb, var(--ui-accent, #d4a44a) 55%, #000)),
        inset 0 0 0 2px var(--win-inner-rim, color-mix(in srgb, var(--ui-accent, #d4a44a) 34%, transparent)),
        inset 0 0 40px rgba(0,0,0,0.72),
        0 28px 72px rgba(0,0,0,0.92);
      image-rendering: pixelated;
    }
    .px-combat-modal::before,
    .px-win-modal::before {
      content: '';
      position: absolute;
      inset: 4px;
      border: 2px solid var(--win-frame-inner, color-mix(in srgb, var(--ui-accent, #d4a44a) 36%, transparent));
      pointer-events: none;
      border-radius: 0px;
      z-index: 25;
    }
    .px-combat-modal::after,
    .px-win-modal::after {
      content: '';
      position: absolute;
      inset: 2px;
      pointer-events: none;
      z-index: 26;
      background-image:
        var(--win-corner-tl, none),
        var(--win-corner-tr, none),
        var(--win-corner-bl, none),
        var(--win-corner-br, none);
      background-position: top left, top right, bottom left, bottom right;
      background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;
      background-repeat: no-repeat;
      image-rendering: pixelated;
    }
    .px-combat-modal::after {
      inset: 3px;
      background-size: 26px 26px, 26px 26px, 26px 26px, 26px 26px;
    }
    .px-combat-header,
    .px-win-header {
      position: relative;
      background-color: #120e0b;
      background-image:
        linear-gradient(90deg, rgba(10,8,7,0.88) 0%, rgba(12,10,9,0.68) 48%, rgba(10,8,7,0.86) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(10,8,7,0.76) 100%),
        var(--win-stage-img, none);
      background-size: cover, cover, cover;
      background-position: center, center, center 40%;
      border-bottom: 3px solid var(--win-header-border, color-mix(in srgb, var(--ui-accent, #d4a44a) 78%, #000));
      box-shadow: inset 0 2px 0 rgba(255,255,255,0.16), inset 0 -2px 0 rgba(0,0,0,0.65);
    }
    .px-win-header::after,
    .px-combat-header::after {
      content: '';
      position: absolute;
      left: 0; right: 0; bottom: 0;
      height: 3px;
      background: var(--win-header-trim, transparent);
      pointer-events: none;
    }
    .px-float-panel {
      position: relative;
      border: 3px solid var(--win-border, var(--ui-accent, #d4a44a));
      border-radius: var(--win-radius, 4px);
      background:
        linear-gradient(180deg, rgba(11,10,9,0.74) 0%, rgba(11,10,9,0.95) 48%, rgba(8,7,6,0.98) 100%),
        var(--win-stage-img, none);
      background-size: cover, cover;
      background-position: center, center top;
      box-shadow:
        0 0 0 2px #090706,
        0 0 0 4px var(--win-outer-rim, color-mix(in srgb, var(--ui-accent, #d4a44a) 48%, #000)),
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 18px 38px rgba(0,0,0,0.84);
      image-rendering: pixelated;
    }
    .px-float-panel::after {
      content: '';
      position: absolute;
      inset: 2px;
      pointer-events: none;
      background-image:
        var(--win-corner-tl, none),
        var(--win-corner-tr, none),
        var(--win-corner-bl, none),
        var(--win-corner-br, none);
      background-position: top left, top right, bottom left, bottom right;
      background-size: 14px 14px;
      background-repeat: no-repeat;
      opacity: 0.92;
    }
    .fs-sidebar-drawer,
    .guide-drawer {
      background:
        linear-gradient(180deg, rgba(12,10,9,0.82) 0px, rgba(12,10,9,0.96) 115px, var(--win-bg-bot, rgba(10,11,11,0.98)) 100%),
        var(--win-stage-img, none) !important;
      background-size: 100% 100%, 100% 130px !important;
      background-repeat: no-repeat !important;
      background-position: top left, top center !important;
      border-left: 4px solid var(--win-border, var(--ui-accent, #d4a44a)) !important;
      box-shadow: -3px 0 0 #0a0807, -6px 0 0 var(--win-outer-rim, rgba(0,0,0,0.65)), -18px 0 48px rgba(0,0,0,0.86) !important;
    }

    /* 1. TAVERN (古堡酒馆): Heavy Oak Planks + Wrought-Iron & Brass Rivet Corners */
    :root[data-theme="tavern"] {
      --win-border: #b87a38;
      --win-outer-rim: #4b2b12;
      --win-inner-rim: rgba(251, 191, 36, 0.36);
      --win-frame-inner: rgba(217, 119, 6, 0.38);
      --win-bg-top: rgba(28, 19, 13, 0.96);
      --win-bg-bot: rgba(15, 10, 7, 0.98);
      --win-header-border: #a16207;
      --win-header-trim: repeating-linear-gradient(90deg, #f59e0b 0 6px, #451a03 6px 12px);
      --win-surface-tex: repeating-linear-gradient(0deg, rgba(245,158,11,0.03) 0px, rgba(245,158,11,0.03) 3px, rgba(0,0,0,0.12) 3px, rgba(0,0,0,0.12) 6px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23231208'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%236b3a17'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%239a5b26'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%233d1f0c'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%23180c05'/%3E%3Crect x='8' y='8' width='8' height='8' fill='none'/%3E%3Crect x='2' y='2' width='4' height='4' fill='%23d97706'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23fde68a'/%3E%3Crect x='18' y='2' width='4' height='4' fill='%23d97706'/%3E%3Crect x='19' y='3' width='2' height='2' fill='%23fde68a'/%3E%3Crect x='2' y='18' width='4' height='4' fill='%23d97706'/%3E%3Crect x='3' y='19' width='2' height='2' fill='%23fde68a'/%3E%3Crect x='18' y='18' width='4' height='4' fill='%23d97706'/%3E%3Crect x='19' y='19' width='2' height='2' fill='%23fde68a'/%3E%3Crect x='9' y='3' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='13' y='3' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='9' y='19' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='13' y='19' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='3' y='9' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='3' y='13' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='19' y='9' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='19' y='13' width='2' height='2' fill='%23fbbf24'/%3E%3Crect x='8' y='1' width='8' height='1' fill='%23c27d38'/%3E%3Crect x='8' y='22' width='8' height='1' fill='%233d1f0c'/%3E%3Crect x='1' y='8' width='1' height='8' fill='%23c27d38'/%3E%3Crect x='22' y='8' width='1' height='8' fill='%233d1f0c'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%235c3416' d='M0 0h14v4H4v10H0z'/%3E%3Cpath fill='%23d97706' d='M1 1h12v2H3v10H1z'/%3E%3Crect x='2' y='2' width='3' height='3' fill='%23fde68a'/%3E%3Crect x='9' y='1' width='2' height='2' fill='%23fef3c7'/%3E%3Crect x='1' y='9' width='2' height='2' fill='%23fef3c7'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%235c3416' d='M2 0h14v14h-4V4H2z'/%3E%3Cpath fill='%23d97706' d='M3 1h12v12h-2V3H3z'/%3E%3Crect x='11' y='2' width='3' height='3' fill='%23fde68a'/%3E%3Crect x='5' y='1' width='2' height='2' fill='%23fef3c7'/%3E%3Crect x='13' y='9' width='2' height='2' fill='%23fef3c7'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%235c3416' d='M0 2h4v10h10v4H0z'/%3E%3Cpath fill='%23d97706' d='M1 3h2v10h10v2H1z'/%3E%3Crect x='2' y='11' width='3' height='3' fill='%23fde68a'/%3E%3Crect x='9' y='13' width='2' height='2' fill='%23fef3c7'/%3E%3Crect x='1' y='5' width='2' height='2' fill='%23fef3c7'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%235c3416' d='M12 2h4v14H2v-4h10z'/%3E%3Cpath fill='%23d97706' d='M13 3h2v12H3v-2h10z'/%3E%3Crect x='11' y='11' width='3' height='3' fill='%23fde68a'/%3E%3Crect x='5' y='13' width='2' height='2' fill='%23fef3c7'/%3E%3Crect x='13' y='5' width='2' height='2' fill='%23fef3c7'/%3E%3C/svg%3E");
    }
    /* 2. FOREST (精灵泉林): Mossy Bark + Glowing Cyan-Emerald Elven Rune Leaves */
    :root[data-theme="forest"] {
      --win-border: #2da671;
      --win-outer-rim: #0d3d29;
      --win-inner-rim: rgba(52, 211, 153, 0.42);
      --win-frame-inner: rgba(45, 212, 191, 0.36);
      --win-bg-top: rgba(11, 26, 20, 0.96);
      --win-bg-bot: rgba(6, 15, 11, 0.98);
      --win-header-border: #10b981;
      --win-header-trim: repeating-linear-gradient(90deg, #34d399 0 4px, #064e3b 4px 8px, #22d3ee 8px 10px, #064e3b 10px 16px);
      --win-surface-tex: radial-gradient(circle at 20% 0%, rgba(52,211,153,0.08), transparent 45%), repeating-linear-gradient(45deg, rgba(16,185,129,0.025) 0 2px, transparent 2px 6px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23052318'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%230b5139'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%2316855d'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%23083827'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%23041710'/%3E%3Crect x='2' y='2' width='4' height='4' fill='%2334d399'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='18' y='2' width='4' height='4' fill='%2334d399'/%3E%3Crect x='19' y='3' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='2' y='18' width='4' height='4' fill='%2334d399'/%3E%3Crect x='3' y='19' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='18' y='18' width='4' height='4' fill='%2334d399'/%3E%3Crect x='19' y='19' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='9' y='2' width='2' height='3' fill='%236ee7b7'/%3E%3Crect x='13' y='3' width='2' height='2' fill='%2322d3ee'/%3E%3Crect x='9' y='19' width='2' height='3' fill='%236ee7b7'/%3E%3Crect x='13' y='19' width='2' height='2' fill='%2322d3ee'/%3E%3Crect x='2' y='9' width='3' height='2' fill='%236ee7b7'/%3E%3Crect x='3' y='13' width='2' height='2' fill='%2322d3ee'/%3E%3Crect x='19' y='9' width='3' height='2' fill='%236ee7b7'/%3E%3Crect x='19' y='13' width='2' height='2' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23065f46' d='M0 0h14v2H6v2H4v2H2v8H0z'/%3E%3Cpath fill='%2334d399' d='M1 1h11v2H5v2H3v7H1z'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='6' y='6' width='2' height='2' fill='%23a7f3d0'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23065f46' d='M2 0h14v14h-2V6h-2V4h-2V2H2z'/%3E%3Cpath fill='%2334d399' d='M4 1h11v11h-2V5h-2V3H4z'/%3E%3Crect x='12' y='2' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23a7f3d0'/%3E%3Crect x='6' y='2' width='2' height='2' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23065f46' d='M0 2h2v8h2v2h2v2h8v2H0z'/%3E%3Cpath fill='%2334d399' d='M1 4h2v7h2v2h7v2H1z'/%3E%3Crect x='2' y='12' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23a7f3d0'/%3E%3Crect x='8' y='12' width='2' height='2' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23065f46' d='M14 2h2v14H2v-2h8v-2h2v-2h2z'/%3E%3Cpath fill='%2334d399' d='M13 4h2v11H4v-2h7v-2h2z'/%3E%3Crect x='12' y='12' width='2' height='2' fill='%2367e8f9'/%3E%3Crect x='8' y='8' width='2' height='2' fill='%23a7f3d0'/%3E%3Crect x='6' y='12' width='2' height='2' fill='%2322d3ee'/%3E%3C/svg%3E");
    }
    /* 3. DRAGON (巨龙宝库): Obsidian Basalt Plates + Molten Lava Seams & Gold Hoard Fangs */
    :root[data-theme="dragon"] {
      --win-border: #dc2626;
      --win-outer-rim: #450a0a;
      --win-inner-rim: rgba(249, 115, 22, 0.45);
      --win-frame-inner: rgba(239, 68, 68, 0.44);
      --win-bg-top: rgba(28, 12, 10, 0.96);
      --win-bg-bot: rgba(14, 7, 6, 0.99);
      --win-header-border: #ea580c;
      --win-header-trim: repeating-linear-gradient(90deg, #fbbf24 0 3px, #ef4444 3px 9px, #1c1917 9px 14px);
      --win-surface-tex: radial-gradient(ellipse 80% 35% at 50% 100%, rgba(234,88,12,0.12), transparent 70%), repeating-linear-gradient(135deg, rgba(239,68,68,0.03) 0 3px, transparent 3px 9px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23170807'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%23331918'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%23572320'/%3E%3Crect x='4' y='4' width='16' height='16' fill='%23dc2626'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%23291312'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%23120706'/%3E%3Crect x='1' y='1' width='5' height='5' fill='%23b91c1c'/%3E%3Crect x='2' y='2' width='3' height='3' fill='%23fbbf24'/%3E%3Crect x='18' y='1' width='5' height='5' fill='%23b91c1c'/%3E%3Crect x='19' y='2' width='3' height='3' fill='%23fbbf24'/%3E%3Crect x='1' y='18' width='5' height='5' fill='%23b91c1c'/%3E%3Crect x='2' y='19' width='3' height='3' fill='%23fbbf24'/%3E%3Crect x='18' y='18' width='5' height='5' fill='%23b91c1c'/%3E%3Crect x='19' y='19' width='3' height='3' fill='%23fbbf24'/%3E%3Crect x='8' y='3' width='3' height='2' fill='%23f97316'/%3E%3Crect x='13' y='3' width='3' height='2' fill='%23fbbf24'/%3E%3Crect x='8' y='19' width='3' height='2' fill='%23f97316'/%3E%3Crect x='13' y='19' width='3' height='2' fill='%23fbbf24'/%3E%3Crect x='3' y='8' width='2' height='3' fill='%23f97316'/%3E%3Crect x='3' y='13' width='2' height='3' fill='%23fbbf24'/%3E%3Crect x='19' y='8' width='2' height='3' fill='%23f97316'/%3E%3Crect x='19' y='13' width='2' height='3' fill='%23fbbf24'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23292524' d='M0 0h15v3H7v2H5v2H3v8H0z'/%3E%3Cpath fill='%23ef4444' d='M1 1h12v2H6v2H4v2H3v6H1z'/%3E%3Cpath fill='%23fbbf24' d='M2 2h4v2H4v2H2z'/%3E%3Crect x='11' y='1' width='2' height='2' fill='%23fdba74'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23292524' d='M1 0h15v15h-3V7h-2V5H9V3H1z'/%3E%3Cpath fill='%23ef4444' d='M3 1h12v12h-2V7h-1V5h-2V3H3z'/%3E%3Cpath fill='%23fbbf24' d='M10 2h4v4h-2V4h-2z'/%3E%3Crect x='3' y='1' width='2' height='2' fill='%23fdba74'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23292524' d='M0 1h3v8h2v2h2v2h8v3H0z'/%3E%3Cpath fill='%23ef4444' d='M1 3h2v6h1v2h2v2h7v2H1z'/%3E%3Cpath fill='%23fbbf24' d='M2 10h2v2h2v2H2z'/%3E%3Crect x='11' y='13' width='2' height='2' fill='%23fdba74'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23292524' d='M13 1h3v15H1v-3h8v-2h2V9h2z'/%3E%3Cpath fill='%23ef4444' d='M13 3h2v12H3v-2h7v-2h2V9h1z'/%3E%3Cpath fill='%23fbbf24' d='M12 10h2v4h-4v-2h2z'/%3E%3Crect x='3' y='13' width='2' height='2' fill='%23fdba74'/%3E%3C/svg%3E");
    }
    /* 4. JAPAN (和风樱庭): Daytime Sunlit Vermilion Torii Lacquer + Cedar Lattice + Sakura Petals */
    :root[data-theme="japan"] {
      --win-border: #dc2626;
      --win-outer-rim: #5c1623;
      --win-inner-rim: rgba(251, 182, 206, 0.5);
      --win-frame-inner: rgba(251, 191, 36, 0.42);
      --win-bg-top: rgba(44, 24, 28, 0.94);
      --win-bg-bot: rgba(24, 14, 18, 0.97);
      --win-header-border: #dc2626;
      --win-header-trim: repeating-linear-gradient(90deg, #dc2626 0 10px, #fef3c7 10px 13px, #f472b6 13px 18px, #7c2d12 18px 22px);
      --win-surface-tex: radial-gradient(circle at 82% 8%, rgba(251,182,206,0.12), transparent 44%), repeating-linear-gradient(90deg, rgba(255,248,238,0.025) 0 1px, transparent 1px 16px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23451015'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%23b91c1c'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%23dc2626'/%3E%3Crect x='4' y='4' width='16' height='16' fill='%23fbbf24'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%2378350f'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%232e1619'/%3E%3Crect x='2' y='2' width='4' height='4' fill='%23f9a8d4'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23fef08a'/%3E%3Crect x='18' y='2' width='4' height='4' fill='%23f9a8d4'/%3E%3Crect x='19' y='3' width='2' height='2' fill='%23fef08a'/%3E%3Crect x='2' y='18' width='4' height='4' fill='%23f9a8d4'/%3E%3Crect x='3' y='19' width='2' height='2' fill='%23fef08a'/%3E%3Crect x='18' y='18' width='4' height='4' fill='%23f9a8d4'/%3E%3Crect x='19' y='19' width='2' height='2' fill='%23fef08a'/%3E%3Crect x='8' y='2' width='3' height='2' fill='%23fce7f3'/%3E%3Crect x='13' y='2' width='3' height='2' fill='%23fde68a'/%3E%3Crect x='8' y='20' width='3' height='2' fill='%23fce7f3'/%3E%3Crect x='13' y='20' width='3' height='2' fill='%23fde68a'/%3E%3Crect x='2' y='8' width='2' height='3' fill='%23fce7f3'/%3E%3Crect x='2' y='13' width='2' height='3' fill='%23fde68a'/%3E%3Crect x='20' y='8' width='2' height='3' fill='%23fce7f3'/%3E%3Crect x='20' y='13' width='2' height='3' fill='%23fde68a'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23991b1b' d='M0 0h14v3H3v11H0z'/%3E%3Crect x='3' y='3' width='4' height='4' fill='%23f472b6'/%3E%3Crect x='4' y='2' width='2' height='6' fill='%23fbcfe8'/%3E%3Crect x='2' y='4' width='6' height='2' fill='%23fbcfe8'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%23fde047'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23991b1b' d='M2 0h14v14h-3V3H2z'/%3E%3Crect x='9' y='3' width='4' height='4' fill='%23f472b6'/%3E%3Crect x='10' y='2' width='2' height='6' fill='%23fbcfe8'/%3E%3Crect x='8' y='4' width='6' height='2' fill='%23fbcfe8'/%3E%3Crect x='10' y='4' width='2' height='2' fill='%23fde047'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23991b1b' d='M0 2h3v11h11v3H0z'/%3E%3Crect x='3' y='9' width='4' height='4' fill='%23f472b6'/%3E%3Crect x='4' y='8' width='2' height='6' fill='%23fbcfe8'/%3E%3Crect x='2' y='10' width='6' height='2' fill='%23fbcfe8'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23fde047'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23991b1b' d='M13 2h3v14H2v-3h11z'/%3E%3Crect x='9' y='9' width='4' height='4' fill='%23f472b6'/%3E%3Crect x='10' y='8' width='2' height='6' fill='%23fbcfe8'/%3E%3Crect x='8' y='10' width='6' height='2' fill='%23fbcfe8'/%3E%3Crect x='10' y='10' width='2' height='2' fill='%23fde047'/%3E%3C/svg%3E");
    }
    :root[data-theme="japan"] .px-combat-header {
      background-image:
        linear-gradient(90deg, rgba(42,16,22,0.72) 0%, rgba(42,16,22,0.34) 50%, rgba(42,16,22,0.72) 100%),
        linear-gradient(180deg, rgba(255,248,250,0.06) 0%, rgba(36,14,18,0.52) 100%),
        var(--win-stage-img, none);
    }
    :root[data-theme="japan"] .px-battle-stage {
      background-color: #8cc4eb;
      background-image:
        radial-gradient(ellipse 46% 36% at 24% 88%, rgba(239,68,68,0.22) 0%, transparent 72%),
        radial-gradient(ellipse 46% 36% at 76% 88%, rgba(56,189,248,0.22) 0%, transparent 72%),
        linear-gradient(180deg, rgba(255,250,252,0.03) 0%, rgba(28,16,20,0.08) 54%, rgba(22,12,16,0.52) 100%),
        var(--win-stage-img, none);
      box-shadow: inset 0 8px 18px rgba(255,240,245,0.16), inset 0 -14px 24px rgba(24,12,16,0.48);
    }
    /* 5. CHINA (盛唐古城): Imperial Vermilion & Gold Hui-Wen (回纹) Stepped Pixel Fretwork */
    :root[data-theme="china"] {
      --win-border: #e59a3a;
      --win-outer-rim: #7f1d1d;
      --win-inner-rim: rgba(251, 191, 36, 0.48);
      --win-frame-inner: rgba(248, 113, 113, 0.42);
      --win-bg-top: rgba(34, 15, 14, 0.96);
      --win-bg-bot: rgba(16, 8, 9, 0.98);
      --win-header-border: #dc2626;
      --win-header-trim: repeating-linear-gradient(90deg, #fbbf24 0 6px, #991b1b 6px 10px, #10b981 10px 13px, #991b1b 13px 18px);
      --win-surface-tex: repeating-linear-gradient(0deg, rgba(251,146,60,0.03) 0 2px, transparent 2px 6px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23450a0a'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%23991b1b'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%23fbbf24'/%3E%3Crect x='3' y='3' width='18' height='18' fill='%237f1d1d'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%23f59e0b'/%3E%3Crect x='6' y='6' width='12' height='12' fill='%23450a0a'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%231c0909'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%2310b981'/%3E%3Crect x='19' y='3' width='2' height='2' fill='%2310b981'/%3E%3Crect x='3' y='19' width='2' height='2' fill='%2310b981'/%3E%3Crect x='19' y='19' width='2' height='2' fill='%2310b981'/%3E%3Crect x='9' y='3' width='2' height='2' fill='%23fde047'/%3E%3Crect x='13' y='3' width='2' height='2' fill='%23fde047'/%3E%3Crect x='9' y='19' width='2' height='2' fill='%23fde047'/%3E%3Crect x='13' y='19' width='2' height='2' fill='%23fde047'/%3E%3Crect x='3' y='9' width='2' height='2' fill='%23fde047'/%3E%3Crect x='3' y='13' width='2' height='2' fill='%23fde047'/%3E%3Crect x='19' y='9' width='2' height='2' fill='%23fde047'/%3E%3Crect x='19' y='13' width='2' height='2' fill='%23fde047'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%237f1d1d' d='M0 0h14v14H0z' opacity='.85'/%3E%3Cpath fill='%23fbbf24' d='M0 0h14v2H2v12H0zm4 4h10v2H6v8H4zm4 4h6v2h-4v4H8z'/%3E%3Crect x='11' y='11' width='2' height='2' fill='%2334d399'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%237f1d1d' d='M2 0h14v14H2z' opacity='.85'/%3E%3Cpath fill='%23fbbf24' d='M2 0h14v14h-2V2H2zm0 4h10v10h-2V6H2zm0 4h6v6H6v-4H2z'/%3E%3Crect x='3' y='11' width='2' height='2' fill='%2334d399'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%237f1d1d' d='M0 2h14v14H0z' opacity='.85'/%3E%3Cpath fill='%23fbbf24' d='M0 2h2v12h12v2H0zm4 0h2v8h8v2H4zm4 0h2v4h4v2H8z'/%3E%3Crect x='11' y='3' width='2' height='2' fill='%2334d399'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%237f1d1d' d='M2 2h14v14H2z' opacity='.85'/%3E%3Cpath fill='%23fbbf24' d='M14 2h2v14H2v-2h12zm-4 0h2v10H2v-2h8zM6 2h2v6H2V6h4z'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%2334d399'/%3E%3C/svg%3E");
    }
    /* 6. SCIFI (星舰宇宙): Titanium Bulkhead + Neon Cyan/Magenta Chamfered HUD Brackets & Scanlines */
    :root[data-theme="scifi"] {
      --win-border: #38bdf8;
      --win-outer-rim: #0c2b4d;
      --win-inner-rim: rgba(56, 189, 248, 0.5);
      --win-frame-inner: rgba(56, 189, 248, 0.34);
      --win-radius: 2px;
      --win-bg-top: rgba(8, 18, 36, 0.96);
      --win-bg-bot: rgba(4, 9, 20, 0.98);
      --win-header-border: #0ea5e9;
      --win-header-trim: repeating-linear-gradient(90deg, #38bdf8 0 14px, transparent 14px 18px, #e879f9 18px 24px, transparent 24px 30px);
      --win-surface-tex: repeating-linear-gradient(0deg, rgba(56,189,248,0.045) 0 1px, transparent 1px 4px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%23051024'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%2312355c'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%2338bdf8'/%3E%3Crect x='4' y='4' width='16' height='16' fill='%230b203b'/%3E%3Crect x='6' y='6' width='12' height='12' fill='%23040b18'/%3E%3Crect x='1' y='1' width='5' height='5' fill='%2367e8f9'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23e879f9'/%3E%3Crect x='18' y='1' width='5' height='5' fill='%2367e8f9'/%3E%3Crect x='19' y='3' width='2' height='2' fill='%23e879f9'/%3E%3Crect x='1' y='18' width='5' height='5' fill='%2367e8f9'/%3E%3Crect x='3' y='19' width='2' height='2' fill='%23e879f9'/%3E%3Crect x='18' y='18' width='5' height='5' fill='%2367e8f9'/%3E%3Crect x='19' y='19' width='2' height='2' fill='%23e879f9'/%3E%3Crect x='8' y='2' width='8' height='1' fill='%23bae6fd'/%3E%3Crect x='10' y='4' width='4' height='1' fill='%23e879f9'/%3E%3Crect x='8' y='21' width='8' height='1' fill='%23bae6fd'/%3E%3Crect x='10' y='19' width='4' height='1' fill='%23e879f9'/%3E%3Crect x='2' y='8' width='1' height='8' fill='%23bae6fd'/%3E%3Crect x='4' y='10' width='1' height='4' fill='%23e879f9'/%3E%3Crect x='21' y='8' width='1' height='8' fill='%23bae6fd'/%3E%3Crect x='19' y='10' width='1' height='4' fill='%23e879f9'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%2338bdf8' d='M0 0h14v2H2v12H0z'/%3E%3Crect x='4' y='4' width='6' height='2' fill='%23e879f9'/%3E%3Crect x='4' y='6' width='2' height='4' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%2338bdf8' d='M2 0h14v14h-2V2H2z'/%3E%3Crect x='6' y='4' width='6' height='2' fill='%23e879f9'/%3E%3Crect x='10' y='6' width='2' height='4' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%2338bdf8' d='M0 2h2v12h12v2H0z'/%3E%3Crect x='4' y='10' width='6' height='2' fill='%23e879f9'/%3E%3Crect x='4' y='6' width='2' height='4' fill='%2322d3ee'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%2338bdf8' d='M14 2h2v14H2v-2h12z'/%3E%3Crect x='6' y='10' width='6' height='2' fill='%23e879f9'/%3E%3Crect x='10' y='6' width='2' height='4' fill='%2322d3ee'/%3E%3C/svg%3E");
    }
    /* 7. SPACEMARINE (星际战士): Riveted Gothic Steel Armor Plates + Brass Corner Bolts & Hazard Trim */
    :root[data-theme="spacemarine"] {
      --win-border: #64748b;
      --win-outer-rim: #1e293b;
      --win-inner-rim: rgba(234, 179, 8, 0.42);
      --win-frame-inner: rgba(148, 163, 184, 0.36);
      --win-radius: 0px;
      --win-bg-top: rgba(17, 23, 34, 0.97);
      --win-bg-bot: rgba(9, 12, 19, 0.99);
      --win-header-border: #ca8a04;
      --win-header-trim: repeating-linear-gradient(-45deg, #eab308 0 6px, #111827 6px 12px);
      --win-surface-tex: repeating-linear-gradient(90deg, rgba(148,163,184,0.03) 0 2px, transparent 2px 24px), repeating-linear-gradient(0deg, rgba(0,0,0,0.14) 0 2px, transparent 2px 6px);
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%230f172a'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%23475569'/%3E%3Crect x='2' y='2' width='20' height='20' fill='%2364748b'/%3E%3Crect x='4' y='4' width='16' height='16' fill='%23eab308'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%231e293b'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%230b111c'/%3E%3Crect x='1' y='1' width='5' height='5' fill='%23ca8a04'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23e2e8f0'/%3E%3Crect x='18' y='1' width='5' height='5' fill='%23ca8a04'/%3E%3Crect x='20' y='2' width='2' height='2' fill='%23e2e8f0'/%3E%3Crect x='1' y='18' width='5' height='5' fill='%23ca8a04'/%3E%3Crect x='2' y='20' width='2' height='2' fill='%23e2e8f0'/%3E%3Crect x='18' y='18' width='5' height='5' fill='%23ca8a04'/%3E%3Crect x='20' y='20' width='2' height='2' fill='%23e2e8f0'/%3E%3Crect x='8' y='2' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='14' y='2' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='8' y='20' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='14' y='20' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='2' y='8' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='2' y='14' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='20' y='8' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='20' y='14' width='2' height='2' fill='%23cbd5e1'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23475569' d='M0 0h15v5H5v10H0z'/%3E%3Cpath fill='%23eab308' d='M0 0h14v2H2v12H0z'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='10' y='2' width='2' height='2' fill='%2394a3b8'/%3E%3Crect x='2' y='10' width='2' height='2' fill='%2394a3b8'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23475569' d='M1 0h15v15h-5V5H1z'/%3E%3Cpath fill='%23eab308' d='M2 0h14v14h-2V2H2z'/%3E%3Crect x='11' y='3' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='4' y='2' width='2' height='2' fill='%2394a3b8'/%3E%3Crect x='12' y='10' width='2' height='2' fill='%2394a3b8'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23475569' d='M0 1h5v10h10v5H0z'/%3E%3Cpath fill='%23eab308' d='M0 2h2v12h12v2H0z'/%3E%3Crect x='3' y='11' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='10' y='12' width='2' height='2' fill='%2394a3b8'/%3E%3Crect x='2' y='4' width='2' height='2' fill='%2394a3b8'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23475569' d='M11 1h5v15H1v-5h10z'/%3E%3Cpath fill='%23eab308' d='M14 2h2v14H2v-2h12z'/%3E%3Crect x='11' y='11' width='2' height='2' fill='%23cbd5e1'/%3E%3Crect x='4' y='12' width='2' height='2' fill='%2394a3b8'/%3E%3Crect x='12' y='4' width='2' height='2' fill='%2394a3b8'/%3E%3C/svg%3E");
    }
    /* 8. MINECRAFT (方块世界): Chunky Voxel Cobblestone & Oak Bevels + Diamond/Emerald Ore Block Corners */
    :root[data-theme="minecraft"] {
      --win-border: #78716c;
      --win-outer-rim: #292524;
      --win-inner-rim: rgba(74, 222, 128, 0.42);
      --win-frame-inner: rgba(168, 162, 158, 0.35);
      --win-radius: 0px;
      --win-bg-top: rgba(34, 32, 30, 0.96);
      --win-bg-bot: rgba(20, 21, 19, 0.98);
      --win-header-border: #4ade80;
      --win-header-trim: repeating-linear-gradient(90deg, #4ade80 0 8px, #22c55e 8px 16px, #854d0e 16px 24px, #38bdf8 24px 28px, #854d0e 28px 36px);
      --win-surface-tex: repeating-conic-gradient(rgba(255,255,255,0.025) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
      --win-combat-frame-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' shape-rendering='crispEdges'%3E%3Crect width='24' height='24' fill='%231c1917'/%3E%3Crect x='1' y='1' width='22' height='22' fill='%2378716c'/%3E%3Cpath fill='%23d6d3d1' d='M1 1h22v1H2v21H1z'/%3E%3Cpath fill='%23292524' d='M22 2h1v21H2v-1h20z'/%3E%3Crect x='5' y='5' width='14' height='14' fill='%2344403c'/%3E%3Crect x='7' y='7' width='10' height='10' fill='%231c1917'/%3E%3Crect x='2' y='2' width='4' height='4' fill='%2357534e'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%2338bdf8'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%234ade80'/%3E%3Crect x='18' y='2' width='4' height='4' fill='%2357534e'/%3E%3Crect x='20' y='2' width='2' height='2' fill='%2338bdf8'/%3E%3Crect x='18' y='4' width='2' height='2' fill='%234ade80'/%3E%3Crect x='2' y='18' width='4' height='4' fill='%2357534e'/%3E%3Crect x='2' y='20' width='2' height='2' fill='%2338bdf8'/%3E%3Crect x='4' y='18' width='2' height='2' fill='%234ade80'/%3E%3Crect x='18' y='18' width='4' height='4' fill='%2357534e'/%3E%3Crect x='20' y='20' width='2' height='2' fill='%2338bdf8'/%3E%3Crect x='18' y='18' width='2' height='2' fill='%234ade80'/%3E%3Crect x='8' y='2' width='4' height='2' fill='%234ade80'/%3E%3Crect x='12' y='2' width='4' height='2' fill='%2322c55e'/%3E%3Crect x='8' y='4' width='8' height='2' fill='%23854d0e'/%3E%3Crect x='8' y='19' width='4' height='3' fill='%2357534e'/%3E%3Crect x='12' y='19' width='4' height='3' fill='%23a8a29e'/%3E%3Crect x='2' y='8' width='3' height='4' fill='%23a8a29e'/%3E%3Crect x='2' y='12' width='3' height='4' fill='%2357534e'/%3E%3Crect x='19' y='8' width='3' height='4' fill='%2357534e'/%3E%3Crect x='19' y='12' width='3' height='4' fill='%23a8a29e'/%3E%3C/svg%3E");
      --win-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect width='12' height='12' fill='%2357534e'/%3E%3Cpath fill='%23a8a29e' d='M0 0h12v2H2v10H0z'/%3E%3Cpath fill='%23292524' d='M10 2h2v10H2v-2h8z'/%3E%3Crect x='3' y='3' width='3' height='3' fill='%2338bdf8'/%3E%3Crect x='6' y='6' width='3' height='3' fill='%234ade80'/%3E%3C/svg%3E");
      --win-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='4' width='12' height='12' fill='%2357534e'/%3E%3Cpath fill='%23a8a29e' d='M4 0h12v2H6v10H4z'/%3E%3Cpath fill='%23292524' d='M14 2h2v10H6v-2h8z'/%3E%3Crect x='10' y='3' width='3' height='3' fill='%2338bdf8'/%3E%3Crect x='7' y='6' width='3' height='3' fill='%234ade80'/%3E%3C/svg%3E");
      --win-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect y='4' width='12' height='12' fill='%2357534e'/%3E%3Cpath fill='%23a8a29e' d='M0 4h12v2H2v10H0z'/%3E%3Cpath fill='%23292524' d='M10 6h2v10H2v-2h8z'/%3E%3Crect x='3' y='10' width='3' height='3' fill='%2338bdf8'/%3E%3Crect x='6' y='7' width='3' height='3' fill='%234ade80'/%3E%3C/svg%3E");
      --win-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect x='4' y='4' width='12' height='12' fill='%2357534e'/%3E%3Cpath fill='%23a8a29e' d='M4 4h12v2H6v10H4z'/%3E%3Cpath fill='%23292524' d='M14 6h2v10H6v-2h8z'/%3E%3Crect x='10' y='10' width='3' height='3' fill='%2338bdf8'/%3E%3Crect x='7' y='7' width='3' height='3' fill='%234ade80'/%3E%3C/svg%3E");
    }
    :root[data-theme="minecraft"] .px-combat-modal,
    :root[data-theme="minecraft"] .px-win-modal {
      box-shadow:
        inset 3px 3px 0 rgba(255,255,255,0.22),
        inset -3px -3px 0 rgba(0,0,0,0.65),
        0 0 0 3px #1c1917,
        0 0 0 6px #44403c,
        0 24px 56px rgba(0,0,0,0.88);
    }
    /* 9. SHENZHEN NIGHT (深圳夜景): Modern Architectural Graphite Steel & Champagne-Gold Bevels + Bay Teal Accent */
    :root[data-theme="shenzhen"] {
      --win-border: #c59f59;
      --win-outer-rim: #0b1220;
      --win-inner-rim: rgba(45, 212, 191, 0.35);
      --win-frame-inner: rgba(245, 195, 94, 0.38);
      --win-radius: 2px;
      --win-bg-top: rgba(15, 24, 40, 0.96);
      --win-bg-bot: rgba(9, 15, 26, 0.98);
      --win-header-border: #f5c35e;
      --win-header-trim: repeating-linear-gradient(90deg, #f5c35e 0 12px, #2dd4bf 12px 16px, #334155 16px 28px);
      --win-surface-tex: repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 16px);
    }
    /* 10. BIOHAZARD WASTELAND (生化废土): Rusted Quarantine Steel, Hazard Caution Stripes & Toxic Lime Accents */
    :root[data-theme="zombie"] {
      --win-border: #84cc16;
      --win-outer-rim: #0c100d;
      --win-inner-rim: rgba(163, 230, 53, 0.32);
      --win-frame-inner: rgba(234, 179, 8, 0.35);
      --win-radius: 2px;
      --win-bg-top: rgba(20, 27, 21, 0.96);
      --win-bg-bot: rgba(11, 15, 12, 0.98);
      --win-header-border: #eab308;
      --win-header-trim: repeating-linear-gradient(-45deg, #eab308 0 8px, #18181b 8px 16px);
      --win-surface-tex: repeating-linear-gradient(0deg, rgba(163, 230, 53, 0.025) 0 1px, transparent 1px 8px);
    }

    @keyframes fighterCombatClash {
      0%, 100% { transform: translate(0, 0) rotate(0deg); }
      20% { transform: translate(-2.6px, -1.2px) rotate(-4deg); }
      40% { transform: translate(2.8px, 1px) rotate(4deg); }
      60% { transform: translate(-2px, 1.4px) rotate(-3deg); }
      80% { transform: translate(2.2px, -1.4px) rotate(3deg); }
    }
    .fighter-combat-clash { animation: fighterCombatClash 0.28s linear infinite; transform-box: fill-box; transform-origin: center center; }
    @keyframes clashDashFlow {
      from { stroke-dashoffset: 24; }
      to { stroke-dashoffset: 0; }
    }
    .clash-tether-line { animation: clashDashFlow 0.55s linear infinite; }
    @keyframes clashSmokePulse {
      0%, 100% { transform: scale(0.92) rotate(-6deg); opacity: 0.92; }
      50% { transform: scale(1.16) rotate(8deg); opacity: 1; }
    }
    .clash-smoke-puff { animation: clashSmokePulse 0.46s ease-in-out infinite; transform-box: fill-box; transform-origin: center center; }
    .px-battle-stage {
      position: relative;
      height: 174px;
      background-color: #100d0b;
      background-image:
        linear-gradient(180deg, rgba(10,9,8,0.28) 0%, rgba(12,10,9,0.18) 54%, rgba(9,8,7,0.58) 100%),
        var(--win-stage-img, none);
      background-size: cover, cover;
      background-position: center, center 58%;
      border-top: 2px solid rgba(0,0,0,0.65);
      border-bottom: 3px solid var(--win-header-border, color-mix(in srgb, var(--ui-accent, #d4a44a) 62%, #000));
      box-shadow: inset 0 10px 20px rgba(0,0,0,0.42);
      image-rendering: pixelated;
      overflow: hidden;
    }
    .px-replay-stage-strip {
      position: relative;
      height: 74px;
      background-color: #100d0b;
      background-image:
        linear-gradient(90deg, rgba(10,8,7,0.72) 0%, rgba(10,8,7,0.22) 50%, rgba(10,8,7,0.72) 100%),
        linear-gradient(180deg, rgba(10,8,7,0.24) 0%, rgba(10,8,7,0.78) 100%),
        var(--win-stage-img, none);
      background-size: cover;
      background-position: center 55%;
      border-bottom: 2px solid var(--win-header-border, color-mix(in srgb, var(--ui-accent, #d4a44a) 55%, #000));
      image-rendering: pixelated;
    }
    @keyframes mcHurtShake {
      0% { transform: translate(0, 0) rotate(0deg) scale(1); filter: brightness(1); }
      14% { transform: translate(12px, -4px) rotate(10deg) scale(1.08); filter: brightness(1.45) saturate(2.4) sepia(0.55) hue-rotate(-35deg); }
      30% { transform: translate(-10px, 3px) rotate(-8deg) scale(0.95); filter: brightness(1.35) saturate(2.2) sepia(0.5) hue-rotate(-35deg); }
      48% { transform: translate(9px, -2px) rotate(7deg) scale(1.04); filter: brightness(1.3) saturate(2.0) sepia(0.4) hue-rotate(-35deg); }
      68% { transform: translate(-6px, 2px) rotate(-4deg) scale(0.98); filter: brightness(1.15) saturate(1.4); }
      85% { transform: translate(3px, 0) rotate(2deg) scale(1); filter: brightness(1.05); }
      100% { transform: translate(0, 0) rotate(0deg) scale(1); filter: brightness(1); }
    }
    @keyframes mcDmgFloat {
      0% { opacity: 0; transform: translate(-50%, 6px) scale(0.5); }
      22% { opacity: 1; transform: translate(-50%, -14px) scale(1.32); }
      75% { opacity: 1; transform: translate(-50%, -26px) scale(1.05); }
      100% { opacity: 0; transform: translate(-50%, -36px) scale(0.9); }
    }
    @keyframes combatValPopUp {
      0% { transform: scale(1); }
      25% { transform: scale(1.62) translateY(-6px); filter: drop-shadow(0 0 14px #fbbf24) brightness(1.35); }
      55% { transform: scale(0.9) translateY(2px); }
      78% { transform: scale(1.16) translateY(-2px); }
      100% { transform: scale(1); filter: none; }
    }
    @keyframes combatValPopDown {
      0% { transform: scale(1); }
      22% { transform: scale(0.62) rotate(-8deg); filter: drop-shadow(0 0 12px #ef4444); }
      52% { transform: scale(1.24) rotate(5deg); }
      100% { transform: scale(1) rotate(0); filter: none; }
    }
    @keyframes combatValRing {
      0% { transform: translate(-50%, -50%) scale(0.35); opacity: 0.95; }
      100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
    }
    @keyframes combatNumClashL {
      0% { transform: translateX(0) scale(1); }
      38% { transform: translateX(24px) scale(1.35) rotate(8deg); filter: brightness(1.6) drop-shadow(0 0 12px #ef4444); }
      55% { transform: translateX(-7px) scale(0.92) rotate(-4deg); }
      100% { transform: translateX(0) scale(1) rotate(0); filter: none; }
    }
    @keyframes combatNumClashR {
      0% { transform: translateX(0) scale(1); }
      38% { transform: translateX(-24px) scale(1.35) rotate(-8deg); filter: brightness(1.6) drop-shadow(0 0 12px #38bdf8); }
      55% { transform: translateX(7px) scale(0.92) rotate(4deg); }
      100% { transform: translateX(0) scale(1) rotate(0); filter: none; }
    }
    @keyframes combatClashSpark {
      0%, 28% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0deg); }
      42% { opacity: 1; transform: translate(-50%, -50%) scale(1.45) rotate(35deg); }
      100% { opacity: 0; transform: translate(-50%, -50%) scale(2.3) rotate(90deg); }
    }
    @keyframes combatDmgBoom {
      0% { opacity: 0.75; transform: scale(0.55) translateY(-10px); filter: drop-shadow(0 0 12px #fbbf24); }
      45% { opacity: 1; transform: scale(1.52) translateY(2px); filter: drop-shadow(0 0 24px #ef4444) brightness(1.35); }
      72% { transform: scale(0.94) translateY(-1px); }
      88% { transform: scale(1.1); }
      100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 3px 0 #450a0a) drop-shadow(0 0 12px rgba(239,68,68,0.65)); }
    }
    @keyframes winHeroJump {
      0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
      18% { transform: translateY(4px) scale(1.1, 0.9) rotate(-2deg); }
      45% { transform: translateY(-20px) scale(0.94, 1.08) rotate(3deg); }
      68% { transform: translateY(0) scale(1.06, 0.94) rotate(-2deg); }
      84% { transform: translateY(-8px) scale(0.98, 1.03) rotate(2deg); }
    }
    @keyframes winSparkle {
      0%, 100% { opacity: 0.35; transform: translateY(0) scale(0.85) rotate(0deg); }
      50% { opacity: 1; transform: translateY(-8px) scale(1.2) rotate(20deg); }
    }
    .mc-hurt-flash { animation: mcHurtShake 0.42s steps(4, end) both !important; }
    .mc-dmg-float {
      position: absolute; left: 50%; top: -4px; z-index: 30;
      font-family: ui-monospace, monospace; font-weight: 900; font-size: 16px;
      color: #fca5a5; text-shadow: 2px 2px 0 #7f1d1d, -1px -1px 0 #450a0a;
      pointer-events: none; white-space: nowrap;
      animation: mcDmgFloat 0.92s steps(10, end) forwards;
    }
    .mc-dmg-float.is-direct {
      color: #e9d5ff;
      font-size: 17px;
      text-shadow: 2px 2px 0 #3b0764, -1px -1px 0 #0c4a6e, 0 0 10px rgba(56, 189, 248, 0.85);
    }
    .mc-dmg-float.is-zero-mitigated {
      color: #67e8f9;
      font-size: 17px;
      text-shadow: 2px 2px 0 #083344, -1px -1px 0 #042f2e, 0 0 10px rgba(34, 211, 238, 0.8);
    }
    .combat-val-pop-up { display: inline-block; animation: combatValPopUp 0.56s cubic-bezier(.22,1,.36,1) both; }
    @keyframes combatEvInL { from { opacity: 0; transform: translateX(-14px) scale(0.92); } to { opacity: 1; transform: translateX(0) scale(1); } }
    @keyframes combatEvInR { from { opacity: 0; transform: translateX(14px) scale(0.92); } to { opacity: 1; transform: translateX(0) scale(1); } }
    @keyframes combatEvInC { from { opacity: 0; transform: translateY(8px) scale(0.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
    .combat-ev-in-l { animation: combatEvInL 0.34s cubic-bezier(.22,1,.36,1) both; }
    .combat-ev-in-r { animation: combatEvInR 0.34s cubic-bezier(.22,1,.36,1) both; }
    .combat-ev-in-c { animation: combatEvInC 0.34s cubic-bezier(.22,1,.36,1) both; }
    .combat-val-pop-down { display: inline-block; animation: combatValPopDown 0.52s ease-out both; }
    .combat-val-ring {
      position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; border-radius: 0;
      border: 2px solid var(--ring-col, #fbbf24); pointer-events: none;
      animation: combatValRing 0.48s steps(6, end) forwards;
    }
    .combat-num-clash-l { display: inline-block; animation: combatNumClashL 0.62s cubic-bezier(.22,1,.36,1) both; }
    .combat-num-clash-r { display: inline-block; animation: combatNumClashR 0.62s cubic-bezier(.22,1,.36,1) both; }
    .combat-clash-burst {
      position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; pointer-events: none;
      background: #fde047;
      border: 3px solid #ffffff;
      box-shadow: 0 0 0 2px #7c2d12;
      animation: combatClashSpark 0.44s steps(5, end) forwards;
    }
    .combat-dmg-boom { display: inline-block; animation: combatDmgBoom 0.68s cubic-bezier(.22,1,.36,1) both; }
    .win-hero-jump { animation: winHeroJump 1.15s cubic-bezier(.22,1,.36,1) infinite; }
    .win-sparkle { animation: winSparkle 1.35s ease-in-out infinite; }
    .px-stage-fx-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 25;
      overflow: visible;
    }
    .px-stage-fx-item {
      position: absolute;
      pointer-events: none;
      image-rendering: pixelated;
    }
    @keyframes pxHitBlink {
      0%, 49% { filter: brightness(2.6) contrast(1.5); }
      25%, 74% { filter: sepia(1) hue-rotate(-45deg) saturate(5) brightness(1.2); }
      100% { filter: none; }
    }
    .px-hit-blink {
      animation: pxHitBlink 0.36s steps(4, end) both !important;
    }
    .px-dmg-pop {
      font-family: ui-monospace, "Courier New", monospace;
      font-weight: 900;
      font-size: 28px;
      line-height: 1;
      letter-spacing: 0.04em;
      color: #fef08a;
      background: #991b1b;
      border: 2px solid #fde047;
      box-shadow: 3px 3px 0 #450a0a;
      padding: 2px 8px;
      text-shadow: 2px 2px 0 #450a0a;
      white-space: nowrap;
      z-index: 32;
    }
    .px-dmg-pop.is-zero-mitigated {
      color: #a5f3fc;
      background: #0e7490;
      border-color: #67e8f9;
      box-shadow: 3px 3px 0 #083344;
      text-shadow: 2px 2px 0 #083344;
    }
    .px-block-float {
      font-family: ui-monospace, "Courier New", monospace;
      font-weight: 900;
      font-size: 16px;
      letter-spacing: 0.06em;
      color: #e0f2fe;
      background: #0c4a6e;
      border: 2px solid #7dd3fc;
      box-shadow: 3px 3px 0 #082f49;
      padding: 2px 8px;
      white-space: nowrap;
      z-index: 32;
    }

    /* Board Piece Hover Mini HP Bar */
    .fighter-hover-hpbar {
      opacity: 0;
      transition: opacity 0.2s ease, transform 0.2s ease;
      pointer-events: none;
    }
    .fighter-node:hover .fighter-hover-hpbar {
      opacity: 1;
    }

    /* True 90°-Rotated Side Seat Deck & Discard (Top edge genuinely faces center of board!) */
    .seat-pos-left .opp-deck-box,
    .seat-pos-left .opp-discard-box,
    .seat-pos-right .opp-deck-box,
    .seat-pos-right .opp-discard-box {
      width: calc(6.2cqw * var(--opp-card-scale, 1)) !important;
      height: calc(8.8cqw * var(--opp-card-scale, 1)) !important;
      transform-origin: center center;
    }
    .seat-pos-left .opp-deck-box,
    .seat-pos-left .opp-discard-box {
      transform: rotate(90deg);
    }
    .seat-pos-right .opp-deck-box,
    .seat-pos-right .opp-discard-box {
      transform: rotate(-90deg);
    }
    .seat-pos-left .side-count-badge {
      transform: rotate(-90deg);
    }
    .seat-pos-right .side-count-badge {
      transform: rotate(90deg);
    }
    .seat-pos-left .opp-side-hand-count {
      position: absolute;
      right: calc(100% + 0.5cqw);
      top: 50%;
      transform: translateY(-50%);
      white-space: nowrap;
      z-index: 12;
    }
    .seat-pos-right .opp-side-hand-count {
      position: absolute;
      left: calc(100% + 0.5cqw);
      top: 50%;
      transform: translateY(-50%);
      white-space: nowrap;
      z-index: 12;
    }
    .opp-side-meta-dock {
      position: absolute;
      bottom: calc(100% + 0.45cqw);
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      z-index: 22;
      pointer-events: auto;
    }

    /* All-4-Seats Front Hero HP Bar (Horizontal bar with smooth green→yellow→red fill + centered HP/Max) */
    .seat-hp-bar-h {
      position: relative;
      height: 16px;
      border-radius: 999px;
      background: rgba(10, 12, 11, 0.92);
      border: 1.5px solid rgba(255, 255, 255, 0.26);
      box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 2px 10px rgba(0, 0, 0, 0.68);
      overflow: visible;
    }
    .seat-hp-bar-track {
      position: absolute;
      inset: 0;
      border-radius: inherit;
      overflow: hidden;
      pointer-events: none;
    }
    .seat-hp-bar-fill {
      height: 100%;
      border-radius: 999px;
      transition: width 0.35s cubic-bezier(.22,1,.36,1), background 0.35s ease;
    }
    .seat-hp-bar-label {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: ui-monospace, monospace;
      font-weight: 900;
      font-size: 10.5px;
      color: #ffffff;
      text-shadow: 0 1px 2px #000, 0 0 4px #000;
      letter-spacing: 0.04em;
      pointer-events: none;
      z-index: 2;
    }
    .viewer-hp-front-bar {
      position: absolute;
      bottom: calc(100% + 42px * var(--my-card-scale, 1) * var(--big-hud-mult, 1) + 8px);
      left: 50%;
      transform: translateX(-50%);
      width: min(330px, 92%);
      min-width: 180px;
      height: 17px;
      z-index: 26;
      pointer-events: auto;
    }
    .viewer-hp-front-bar .seat-hp-bar-label {
      font-size: 11px;
    }
    .opp-top-hp-front {
      width: calc(25cqw * var(--opp-card-scale, 1));
      min-width: 110px;
      height: calc(1.55cqw * var(--opp-card-scale, 1));
      min-height: 13px;
      margin-top: calc(0.45cqw * var(--opp-card-scale, 1));
    }
    .opp-top-hp-front .seat-hp-bar-label {
      font-size: calc(0.95cqw * var(--opp-card-scale, 1));
    }
    .seat-pos-bottom .opp-top-hp-front {
      margin-top: 0;
      margin-bottom: calc(0.45cqw * var(--opp-card-scale, 1));
    }
    .opp-side-hp-front {
      position: absolute;
      top: 50%;
      width: calc(21cqw * var(--opp-card-scale, 1));
      height: calc(1.55cqw * var(--opp-card-scale, 1));
      min-height: 14px;
      z-index: 16;
    }
    .seat-pos-left .opp-side-hp-front {
      left: calc(100% + 0.1cqw);
      transform: translate(-44%, -50%) rotate(90deg);
    }
    .seat-pos-right .opp-side-hp-front {
      right: calc(100% + 0.1cqw);
      transform: translate(44%, -50%) rotate(-90deg);
    }
    .seat-pos-left .opp-side-hp-front .seat-hp-bar-label {
      transform: rotate(-90deg);
      font-size: calc(0.92cqw * var(--opp-card-scale, 1));
      white-space: nowrap;
    }
    .seat-pos-right .opp-side-hp-front .seat-hp-bar-label {
      transform: rotate(90deg);
      font-size: calc(0.92cqw * var(--opp-card-scale, 1));
      white-space: nowrap;
    }
    .seat-pos-left .opp-side-hp-front .seat-hp-bar-frac,
    .seat-pos-right .opp-side-hp-front .seat-hp-bar-frac {
      padding: 1px 6px;
      border-radius: 999px;
      background: rgba(8, 10, 10, 0.92);
      border: 1px solid rgba(255, 255, 255, 0.34);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
      line-height: 1.25;
    }

    /* Viewer HUD Integrated Solid Left-Side Multi-HP Sidekick Dock (NEVER transparent/floating!) */
    .hud-sidekick-dock {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 6px;
      padding: 7px 9px;
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(14, 15, 20, 0.95) 0%, rgba(8, 9, 13, 0.97) 100%);
      border: 1.5px solid var(--hud-border, rgba(251, 191, 36, 0.5));
      box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.72), 0 4px 12px rgba(0, 0, 0, 0.55);
      min-width: 124px;
      max-width: 152px;
      align-self: stretch;
      flex-shrink: 0;
    }

    /* Bespoke Theme Victory Stage Backdrop + Central Pedestal Anchor */
    .win-stage-wrap {
      position: relative;
      width: min(100%, calc(45dvh * 16 / 9));
      margin-inline: auto;
      aspect-ratio: 16 / 9;
      border-radius: 12px;
      overflow: hidden;
      border: 2px solid var(--ui-accent);
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.78), 0 0 22px var(--ui-glow);
      background: #0c0a09;
    }
    .win-stage-bg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      image-rendering: pixelated;
    }
    .win-stage-vignette {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.04) 55%, rgba(0,0,0,0.58) 100%);
      pointer-events: none;
    }
    .win-pedestal-heroes {
      position: absolute;
      left: 50%;
      bottom: 23%;
      transform: translateX(-50%);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 18px;
      z-index: 6;
    }
    .win-hero-cluster {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .win-sidekicks-back {
      position: absolute;
      bottom: 26px;
      left: 50%;
      width: max-content;
      transform: translateX(-50%);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 78px;
      pointer-events: none;
      z-index: 2;
    }
    @keyframes winSidekickJump {
      0%, 100% { transform: translateY(0) scale(1, 1); }
      22% { transform: translateY(2px) scale(1.08, 0.92); }
      52% { transform: translateY(-13px) scale(0.95, 1.06); }
      78% { transform: translateY(0) scale(1.04, 0.96); }
    }
    .win-sidekick-jump {
      animation: winSidekickJump 0.98s cubic-bezier(.22,1,.36,1) infinite;
    }
    .win-loser-flank {
      position: absolute;
      bottom: 5.5%;
      display: flex;
      align-items: flex-end;
      gap: 12px;
      z-index: 8;
    }
    .win-loser-flank.left { left: 2.5%; }
    .win-loser-flank.right { right: 2.5%; }
    @keyframes winLoserSway {
      0%, 100% { transform: translateY(0) rotate(-1.5deg); }
      50% { transform: translateY(-2px) rotate(1.5deg); }
    }
    .win-loser-avatar-anim {
      animation: winLoserSway 2.6s ease-in-out infinite;
    }
    @keyframes winBubblePop {
      0% { opacity: 0; transform: translateY(6px) scale(0.8); }
      65% { opacity: 1; transform: translateY(-2px) scale(1.03); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .win-loser-bubble {
      position: relative;
      max-width: 188px;
      padding: 6px 11px;
      border-radius: 10px;
      background: #fffdf7;
      color: #1c1917;
      border: 2px solid #1c1917;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.78);
      font-size: clamp(11px, 1.15vw, 13.5px);
      font-weight: 900;
      line-height: 1.35;
      text-align: center;
      animation: winBubblePop 0.34s cubic-bezier(.22,1,.36,1) both;
    }
    .win-loser-bubble::after {
      content: '';
      position: absolute;
      bottom: -6px;
      left: 50%;
      transform: translateX(-50%) rotate(45deg);
      width: 9px;
      height: 9px;
      background: #fffdf7;
      border-right: 2px solid #1c1917;
      border-bottom: 2px solid #1c1917;
    }

    /* Dynamic Auto-Scaling Action Point Gems Crowned Above Hero Portrait (Base Gold + Trailing Temporary Bonus Cyan/Emerald) */
    .hero-ap-anchor {
      position: absolute;
      bottom: calc(100% + 20px);
      left: 50%;
      transform: translateX(-50%);
      z-index: 42;
      pointer-events: auto;
      white-space: nowrap;
    }
    .ap-gem-tray {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 5px 10px;
      border-radius: 999px;
      background: rgba(12, 10, 9, 0.94);
      border: 1.5px solid rgba(251, 191, 36, 0.72);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.88), 0 0 14px rgba(251, 191, 36, 0.25);
      transition: gap 0.22s ease, border-color 0.25s ease, opacity 0.25s ease;
    }
    .ap-gem-tray.ap-tray-waiting {
      border-color: rgba(148, 163, 184, 0.42);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
      opacity: 0.76;
    }
    .ap-gem-tray.ap-tray-empty {
      border-color: rgba(16, 185, 129, 0.75);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), 0 0 12px rgba(16, 185, 129, 0.28);
    }
    .ap-gem-tray.ap-scale-md { gap: 5px; padding: 4px 9px; }
    .ap-gem-tray.ap-scale-sm { gap: 4px; padding: 4px 8px; }
    .ap-gem-tray.ap-scale-xs { gap: 3px; padding: 3px 7px; }
    .ap-gem {
      position: relative;
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.25s cubic-bezier(.22,1,.36,1), opacity 0.25s ease, width 0.22s ease, height 0.22s ease;
      flex-shrink: 0;
    }
    .ap-gem-tray.ap-scale-md .ap-gem { width: 17px; height: 17px; }
    .ap-gem-tray.ap-scale-sm .ap-gem { width: 15px; height: 15px; }
    .ap-gem-tray.ap-scale-xs .ap-gem { width: 13px; height: 13px; }
    .ap-gem-diamond {
      width: 100%;
      height: 100%;
      transform: rotate(45deg) scale(0.76);
      border-radius: 3px;
      transition: all 0.25s ease;
    }
    .ap-gem-base.ap-ready .ap-gem-diamond {
      background: linear-gradient(135deg, #fef9c3 0%, #fbbf24 45%, #d97706 100%);
      border: 1.5px solid #fefce8;
      box-shadow: 0 0 12px rgba(251, 191, 36, 0.95), inset 0 1px 2px rgba(255, 255, 255, 0.7);
    }
    .ap-gem-base.ap-used .ap-gem-diamond {
      background: rgba(28, 25, 23, 0.72);
      border: 1.5px solid rgba(168, 162, 158, 0.45);
      transform: rotate(45deg) scale(0.60);
      opacity: 0.48;
    }
    .ap-gem-bonus.ap-ready .ap-gem-diamond {
      background: linear-gradient(135deg, #cffafe 0%, #22d3ee 48%, #10b981 100%);
      border: 1.5px solid #ecfeff;
      box-shadow: 0 0 14px rgba(34, 211, 238, 0.98), 0 0 6px rgba(16, 185, 129, 0.95);
    }
    .ap-gem-bonus.ap-used .ap-gem-diamond {
      background: rgba(8, 47, 73, 0.48);
      border: 1.5px dashed rgba(34, 211, 238, 0.48);
      transform: rotate(45deg) scale(0.58);
      opacity: 0.45;
    }
    .ap-gem-attack_only.ap-ready .ap-gem-diamond {
      background: linear-gradient(135deg, #fecaca 0%, #ef4444 48%, #991b1b 100%);
      border: 1.5px solid #fef2f2;
      box-shadow: 0 0 14px rgba(239, 68, 68, 0.95), 0 0 6px rgba(248, 113, 113, 0.9);
    }
    .ap-gem-attack_only.ap-used .ap-gem-diamond {
      background: rgba(69, 10, 10, 0.48);
      border: 1.5px dashed rgba(248, 113, 113, 0.48);
      transform: rotate(45deg) scale(0.58);
      opacity: 0.45;
    }
    .ap-gem-plus {
      position: absolute;
      top: -5px;
      right: -3px;
      font-size: 10px;
      font-weight: 900;
      line-height: 1;
      color: #67e8f9;
      text-shadow: 0 1px 3px #000;
      pointer-events: none;
    }
    .ap-gem-count {
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
      color: #fde68a;
      text-shadow: 0 1px 2px #000;
      padding-left: 2px;
      letter-spacing: 0.02em;
    }
    .ap-gem-tray.ap-mini {
      gap: 4px;
      padding: 2px 7px;
      border-width: 1.5px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
    }
    .ap-gem-tray.ap-mini .ap-gem { width: 12px; height: 12px; }
    .ap-gem-tray.ap-mini .ap-gem-count { font-size: 10px; }
    .ap-gem-tray.ap-mini .ap-gem-plus { font-size: 8px; top: -4px; right: -2px; }
    .opp-active-ap-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(14, 11, 9, 0.92);
      border: 1.5px solid rgba(251, 191, 36, 0.85);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85);
      white-space: nowrap;
      pointer-events: none;
    }
    @keyframes apBonusPopIn {
      0% { opacity: 0; transform: scale(0.2) translateY(-8px); filter: brightness(2.2); }
      55% { opacity: 1; transform: scale(1.42) translateY(0); filter: brightness(1.4); }
      100% { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1); }
    }
    .ap-bonus-new {
      animation: apBonusPopIn 0.55s cubic-bezier(.22,1,.36,1) both;
    }
    @keyframes apGemSpend {
      0% { transform: scale(1.35); filter: brightness(1.9); }
      100% { transform: scale(1); filter: brightness(1); }
    }
    .ap-gem-spent-anim {
      animation: apGemSpend 0.36s ease-out both;
    }
    /* Unified Theme-Driven Main Menu System (All 7 Themes + Space Marine Blue×Purple Gradient) */
    .px-brand-banner {
      position: relative;
      background:
        radial-gradient(ellipse 95% 80% at 25% 0%, color-mix(in srgb, var(--ui-accent) 34%, transparent) 0%, transparent 72%),
        radial-gradient(ellipse 90% 80% at 85% 100%, color-mix(in srgb, var(--ui-accent-2, var(--ui-accent)) 28%, transparent) 0%, transparent 72%),
        linear-gradient(180deg, var(--ui-panel-top) 0%, var(--ui-panel-bot) 100%);
      border: 3px solid var(--ui-accent);
      border-radius: 6px;
      box-shadow:
        0 0 0 2px #09080b,
        0 0 0 5px color-mix(in srgb, var(--ui-accent-2, var(--ui-accent)) 36%, #000),
        inset 0 0 0 2px color-mix(in srgb, var(--ui-accent-light) 22%, transparent),
        0 18px 40px rgba(0,0,0,0.72);
    }
    :root[data-theme="spacemarine"] .px-brand-banner {
      border-color: transparent;
      background:
        linear-gradient(135deg, rgba(18, 30, 68, 0.94) 0%, rgba(16, 15, 42, 0.96) 50%, rgba(36, 14, 62, 0.95) 100%) padding-box,
        var(--ui-grad) border-box;
      box-shadow:
        0 0 0 2px #070a18,
        -6px 0 24px rgba(59, 130, 246, 0.34),
        6px 0 24px rgba(168, 85, 247, 0.34),
        0 18px 40px rgba(0,0,0,0.75);
    }
    :root[data-theme="minecraft"] .px-brand-banner::before,
    :root[data-theme="minecraft"] .px-brand-banner::after {
      content: '';
      position: absolute;
      width: 6px; height: 6px;
      background: var(--ui-accent);
      box-shadow: 0 0 0 1px #0f0a06;
    }
    :root[data-theme="minecraft"] .px-brand-banner::before { top: 6px; left: 6px; background: var(--ui-accent); }
    :root[data-theme="minecraft"] .px-brand-banner::after { top: 6px; right: 6px; background: var(--ui-accent-2, var(--ui-accent)); }
    .px-rivet-bl, .px-rivet-br {
      position: absolute;
      bottom: 6px;
      width: 6px; height: 6px;
      box-shadow: 0 0 0 1px #0f0a06;
      pointer-events: none;
    }
    .px-rivet-bl { left: 6px; background: var(--ui-accent); }
    .px-rivet-br { right: 6px; background: var(--ui-accent-2, var(--ui-accent)); }
    .px-panel {
      position: relative;
      border: 2px solid var(--ui-border) !important;
      background: linear-gradient(135deg, var(--ui-panel-top) 0%, var(--ui-panel-bot) 100%) !important;
      box-shadow:
        0 0 0 2px rgba(8,6,5,0.88),
        inset 0 1px 0 color-mix(in srgb, var(--ui-accent-light) 22%, transparent),
        0 14px 36px rgba(0,0,0,0.62) !important;
    }
    .px-topbar-popover {
      color: var(--foreground);
      filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.78));
    }
    .px-topbar-popover .px-pop-inner {
      background: color-mix(in srgb, var(--ui-panel-bot, #100e14) 84%, rgba(6, 5, 8, 0.92));
      border-radius: 6px;
    }
    .vol-chevron-hit {
      border-left: 1px solid rgba(255, 255, 255, 0.16);
      padding-left: 4px;
      margin-left: 2px;
      transition: background 0.15s ease, color 0.15s ease;
    }
    .vol-chevron-hit:hover {
      background: rgba(255, 255, 255, 0.14);
      border-radius: 3px;
    }
    :root[data-theme="spacemarine"] .px-panel {
      border-color: transparent !important;
      background:
        linear-gradient(135deg, rgba(16, 26, 56, 0.88) 0%, rgba(16, 15, 38, 0.91) 52%, rgba(30, 14, 52, 0.90) 100%) padding-box,
        linear-gradient(125deg, rgba(59,130,246,0.78) 0%, rgba(168,85,247,0.78) 100%) border-box !important;
    }
    :root[data-theme="spacemarine"] .px-topbar {
      background: linear-gradient(90deg, #0f1f48 0%, #141236 50%, #241042 100%) !important;
      border-bottom: 2px solid #7c3aed !important;
    }
    :root[data-theme="spacemarine"] .ow-cta-btn {
      background: linear-gradient(90deg, #2563eb 0%, #4f46e5 48%, #9333ea 100%) !important;
      border-color: #c4b5fd !important;
    }
    .px-theme-accent { color: var(--ui-accent) !important; }
    .px-theme-light { color: var(--ui-accent-light) !important; }
    .px-theme-pill {
      border-color: color-mix(in srgb, var(--ui-accent) 60%, transparent) !important;
      background: color-mix(in srgb, var(--ui-accent) 16%, rgba(12,12,16,0.85)) !important;
      color: var(--ui-accent-light) !important;
    }
    .px-theme-btn {
      border: 1.5px solid color-mix(in srgb, var(--ui-accent) 62%, transparent);
      background: color-mix(in srgb, var(--ui-accent) 15%, rgba(14,14,18,0.88));
      color: var(--ui-accent-light);
      transition: filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .px-theme-btn:hover {
      border-color: var(--ui-accent-light);
      background: color-mix(in srgb, var(--ui-accent-2, var(--ui-accent)) 28%, rgba(14,14,18,0.92));
      filter: brightness(1.08);
    }
    .px-theme-cta,
    .px-theme-cta-sm {
      background: var(--ui-grad);
      border: 1px solid var(--ui-accent-light);
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0,0,0,0.65);
      box-shadow: 0 2px 0 rgba(0,0,0,0.65);
      transition: filter 0.15s ease, transform 0.12s ease;
    }
    .px-theme-cta:hover,
    .px-theme-cta-sm:hover { filter: brightness(1.1); transform: translateY(-1px); }
    .px-theme-active-box {
      border-color: var(--ui-accent) !important;
      background: linear-gradient(135deg, color-mix(in srgb, var(--ui-accent) 20%, rgba(12,12,16,0.9)), color-mix(in srgb, var(--ui-accent-2, var(--ui-accent)) 14%, rgba(12,12,16,0.92))) !important;
      box-shadow: 0 0 0 1px rgba(0,0,0,0.85), 0 6px 20px var(--ui-glow) !important;
    }
    .px-section-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 10.5px;
      font-weight: 900;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ui-accent-light);
    }
    .px-section-tag::before {
      content: '◆';
      font-size: 9px;
      color: var(--ui-accent);
      opacity: 0.95;
    }
    .px-pixel-title {
      text-shadow: 0 3px 0 rgba(12,8,6,0.95), 0 0 20px var(--ui-glow);
      letter-spacing: 0.08em;
    }
    .px-crest-svg { image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(10,6,3,0.95)) drop-shadow(0 0 12px var(--ui-glow)); }

    /* ============================================================================
       BATCH V10 — 7-THEME BESPOKE 16-BIT PIXEL LOBBY UI SKINS (Minecraft Shelved)
       Distinct pixel silhouettes, corner SVG ornaments, plaques & tactile states
       ============================================================================ */
    :root:not([data-theme="minecraft"]) .px-panel,
    :root:not([data-theme="minecraft"]) .px-brand-banner,
    :root:not([data-theme="minecraft"]) .ow-cta-btn,
    :root:not([data-theme="minecraft"]) .px-subpanel,
    :root:not([data-theme="minecraft"]) [data-lobby-mode],
    :root:not([data-theme="minecraft"]) .px-theme-btn,
    :root:not([data-theme="minecraft"]) .px-theme-cta-sm {
      image-rendering: pixelated;
    }

    :root:not([data-theme="minecraft"]) .px-topbar {
      padding-bottom: 9px !important;
    }
    :root:not([data-theme="minecraft"]) #lounge-diorama {
      border-radius: 2px !important;
      box-shadow: inset 0 0 0 2px rgba(0,0,0,0.65), 0 0 0 2px #080605 !important;
    }

    /* Shared crisp 4-corner pixel ornament layer on all 7 active themes' panels */
    :root:not([data-theme="minecraft"]) .px-panel {
      background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat-x, repeat, no-repeat !important;
      background-position: top 3px left 3px, top 3px right 3px, bottom 3px left 3px, bottom 3px right 3px, top left, 0 0, 0 0 !important;
      background-size: 16px 16px, 16px 16px, 16px 16px, 16px 16px, 100% 4px, auto, 100% 100% !important;
      background-image:
        var(--win-corner-tl),
        var(--win-corner-tr),
        var(--win-corner-bl),
        var(--win-corner-br),
        var(--win-header-trim),
        var(--win-surface-tex),
        linear-gradient(180deg, var(--ui-panel-top) 0%, var(--ui-panel-bot) 100%) !important;
    }

    /* -------------------- TRUE 16-BIT PIXEL ART 9-SLICE THEMES (styled cleanly via #theme-pixel-9slice-css, zero static CSS conflicts; Minecraft untouched) -------------------- */
    :root[data-theme="tavern"] .px-rivet-bl, :root[data-theme="tavern"] .px-rivet-br,
    :root[data-theme="japan"] .px-rivet-bl, :root[data-theme="japan"] .px-rivet-br,
    :root[data-theme="china"] .px-rivet-bl, :root[data-theme="china"] .px-rivet-br,
    :root[data-theme="forest"] .px-rivet-bl, :root[data-theme="forest"] .px-rivet-br,
    :root[data-theme="dragon"] .px-rivet-bl, :root[data-theme="dragon"] .px-rivet-br,
    :root[data-theme="scifi"] .px-rivet-bl, :root[data-theme="scifi"] .px-rivet-br,
    :root[data-theme="spacemarine"] .px-rivet-bl, :root[data-theme="spacemarine"] .px-rivet-br,
    :root[data-theme="shenzhen"] .px-rivet-bl, :root[data-theme="shenzhen"] .px-rivet-br,
    :root[data-theme="zombie"] .px-rivet-bl, :root[data-theme="zombie"] .px-rivet-br { display: none; }
    :root[data-theme="tavern"] .px-section-tag::before { content: '❖'; color: #fbbf24; }
    :root[data-theme="japan"] .px-section-tag::before { content: '✿'; color: #f9a8d4; }
    :root[data-theme="china"] .px-section-tag::before { content: '回'; color: #fbbf24; font-size: 11px; }
    :root[data-theme="forest"] .px-section-tag::before { content: '✦'; color: #67e8f9; }
    :root[data-theme="dragon"] .px-section-tag::before { content: '▲'; color: #f97316; }
    :root[data-theme="scifi"] .px-section-tag::before { content: '▸'; color: #e879f9; font-size: 12px; }
    :root[data-theme="spacemarine"] .px-section-tag::before { content: '✚'; color: #eab308; }
    :root[data-theme="shenzhen"] .px-section-tag::before { content: '◆'; color: #f5c35e; font-size: 11px; }
    :root[data-theme="zombie"] .px-section-tag::before { content: '☣'; color: #a3e635; font-size: 12px; }

    /* ==================== V20 FEATURED HERO SHIMMER BORDER & NON-INTRUSIVE PROMO POSTER ==================== */
    @keyframes pxFeaturedBorderShimmer {
      0%, 100% { border-color: #f43f5e; box-shadow: inset 0 0 0 1px rgba(251,191,36,0.55), 0 0 0 2px rgba(244,63,94,0.32), 0 6px 18px rgba(0,0,0,0.55); }
      33%      { border-color: #fbbf24; box-shadow: inset 0 0 0 1px rgba(254,240,138,0.85), 0 0 0 2px rgba(251,191,36,0.42), 0 6px 18px rgba(0,0,0,0.55); }
      66%      { border-color: #fb7185; box-shadow: inset 0 0 0 1px rgba(244,63,94,0.75), 0 0 0 2px rgba(254,202,202,0.34), 0 6px 18px rgba(0,0,0,0.55); }
    }
    @keyframes pxFeaturedSheenSweep {
      0%   { transform: translateX(-140%) skewX(-22deg); opacity: 0; }
      18%  { opacity: 0.42; }
      52%  { opacity: 0.42; }
      72%  { transform: translateX(240%) skewX(-22deg); opacity: 0; }
      100% { transform: translateX(240%) skewX(-22deg); opacity: 0; }
    }
    .featured-hero-shimmer {
      position: relative;
      overflow: hidden !important;
      isolation: isolate;
      border-width: 2px !important;
      animation: pxFeaturedBorderShimmer 2.4s steps(6, end) infinite !important;
    }
    @keyframes uaWhatsNewIn {
      0%   { transform: translateY(10px) scale(0.97); opacity: 0; }
      100% { transform: translateY(0) scale(1); opacity: 1; }
    }
    #whats-new-modal-shell {
      animation: uaWhatsNewIn 0.22s steps(5, end) both;
    }
    .ua-whatsnew-card {
      position: relative;
      border: 2px solid color-mix(in srgb, var(--exp-accent, var(--ui-border, #a16207)) 58%, #292524);
      background: linear-gradient(155deg, rgba(22, 18, 16, 0.92), rgba(10, 9, 8, 0.88));
      border-radius: 8px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 18px rgba(0,0,0,0.36);
      image-rendering: pixelated;
    }
    .ua-whatsnew-card.is-latest {
      border-color: var(--exp-accent, var(--ui-accent, #fbbf24));
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--exp-accent, #fbbf24) 30%, transparent), 0 10px 28px rgba(0,0,0,0.52);
    }
    .ua-whatsnew-exp-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.06em;
      color: var(--exp-accent, #fbbf24);
      background: color-mix(in srgb, var(--exp-accent, #fbbf24) 14%, rgba(12, 10, 9, 0.92));
      border: 1px solid color-mix(in srgb, var(--exp-accent, #fbbf24) 55%, transparent);
    }
    .ua-whatsnew-banner-btn {
      position: relative;
      display: block;
      width: 100%;
      overflow: hidden;
      background: #090807;
      border: 2px solid color-mix(in srgb, var(--exp-accent, #fbbf24) 45%, rgba(255,255,255,0.1));
      border-radius: 6px;
      cursor: pointer;
    }
    .ua-whatsnew-banner-btn img {
      image-rendering: pixelated;
    }
    .ua-whatsnew-zoom-pill {
      position: absolute;
      right: 8px;
      bottom: 8px;
      padding: 2px 8px;
      font-size: 10px;
      font-weight: 900;
      color: #fde68a;
      background: rgba(12, 10, 9, 0.92);
      border: 1px solid rgba(251,191,36,0.65);
      border-radius: 4px;
    }
    .ua-whatsnew-hero-chip {
      border: 2px solid rgba(168,162,158,0.32);
      background: rgba(18, 15, 13, 0.92);
      border-radius: 6px;
      transition: border-color 120ms steps(2, end), transform 120ms steps(2, end), background-color 120ms steps(2, end);
    }
    .ua-whatsnew-hero-chip:hover {
      border-color: var(--exp-accent, var(--ui-accent, #fbbf24));
      background: rgba(28, 22, 19, 0.96);
      transform: translateY(-1px);
    }
    .ua-whatsnew-mystery-card {
      border: 2px dashed rgba(251,191,36,0.45);
      background: rgba(16, 13, 11, 0.85);
      border-radius: 6px;
    }
    .ua-changelog-timeline {
      position: relative;
      padding-left: 18px;
    }
    .ua-changelog-timeline::before {
      content: '';
      position: absolute;
      left: 6px;
      top: 10px;
      bottom: 10px;
      width: 2px;
      background: linear-gradient(180deg, rgba(251,191,36,0.75), rgba(168,162,158,0.22));
    }
    .ua-changelog-stage {
      position: relative;
      border-radius: 8px;
      border: 1px solid rgba(168,162,158,0.24);
      background: linear-gradient(160deg, rgba(20, 17, 15, 0.9), rgba(12, 10, 9, 0.88));
    }
    .ua-changelog-stage::before {
      content: '';
      position: absolute;
      left: -17px;
      top: 18px;
      width: 10px;
      height: 10px;
      border-radius: 9999px;
      background: #1c1917;
      border: 2px solid #a8a29e;
    }
    .ua-changelog-stage.is-latest {
      border-color: rgba(251,191,36,0.62);
      box-shadow: inset 0 0 0 1px rgba(251,191,36,0.16), 0 6px 20px rgba(0,0,0,0.4);
    }
    .ua-changelog-stage.is-latest::before {
      background: #fbbf24;
      border-color: #fef3c7;
      box-shadow: 0 0 8px rgba(251,191,36,0.75);
    }
    .ua-changelog-teaser {
      border: 1px dashed rgba(251,191,36,0.42);
      background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(12,10,9,0.85));
      border-radius: 6px;
    }
    .featured-hero-shimmer::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      background: linear-gradient(105deg, transparent 32%, rgba(254,240,138,0.32) 48%, rgba(255,255,255,0.45) 50%, rgba(244,63,94,0.24) 54%, transparent 68%);
      animation: pxFeaturedSheenSweep 3.2s linear infinite;
      z-index: 38;
    }

    /* ==================== V21 KOF-OROCHI BOSS CHARACTER SELECT SLOT ==================== */
    @keyframes pxBossOrochiBorder {
      0%, 100% { border-color: #facc15; box-shadow: inset 0 0 0 2px rgba(244,63,94,0.65), 0 0 0 2px rgba(250,204,21,0.55), 0 8px 22px rgba(0,0,0,0.72); }
      25%      { border-color: #fb7185; box-shadow: inset 0 0 0 2px rgba(250,204,21,0.85), 0 0 0 2px rgba(244,63,94,0.65), 0 8px 22px rgba(0,0,0,0.72); }
      50%      { border-color: #e879f9; box-shadow: inset 0 0 0 2px rgba(254,240,138,0.85), 0 0 0 2px rgba(217,70,239,0.58), 0 8px 22px rgba(0,0,0,0.72); }
      75%      { border-color: #f97316; box-shadow: inset 0 0 0 2px rgba(254,215,170,0.78), 0 0 0 2px rgba(249,115,22,0.60), 0 8px 22px rgba(0,0,0,0.72); }
    }
    @keyframes pxBossCornerSpark {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%      { opacity: 0.35; transform: scale(0.75); }
    }
    .boss-orochi-tile {
      position: relative;
      border-width: 2px !important;
      background: linear-gradient(135deg, #2a121d 0%, #1c1026 48%, #2e1b12 100%) !important;
      animation: pxBossOrochiBorder 2.0s steps(4, end) infinite !important;
      overflow: hidden !important;
      isolation: isolate;
    }
    .boss-orochi-tile::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      background: repeating-linear-gradient(-45deg, rgba(250,204,21,0.06) 0 4px, transparent 4px 10px);
      z-index: 1;
    }
    .boss-orochi-tile::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      background: linear-gradient(108deg, transparent 28%, rgba(254,240,138,0.34) 46%, rgba(255,255,255,0.52) 50%, rgba(244,63,94,0.28) 54%, transparent 72%);
      animation: pxFeaturedSheenSweep 2.6s linear infinite;
      z-index: 6;
    }
    .boss-orochi-spark {
      position: absolute;
      width: 6px;
      height: 6px;
      background: #fef08a;
      box-shadow: 0 0 0 1px #7c2d12;
      pointer-events: none;
      z-index: 8;
      animation: pxBossCornerSpark 1.1s steps(2, end) infinite;
    }

    /* ==================== V22 METAL SLUG ARCADE VERTICAL POSTER STRIPS & FULLSCREEN LIGHTBOX ==================== */
    .smash-tile.is-poster-strip {
      min-height: 148px;
      background: #0c0a0d;
      border: 2px solid rgba(212, 161, 62, 0.48);
      transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    }
    .smash-tile.is-poster-strip .poster-strip-bg {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center top;
      image-rendering: pixelated;
      filter: brightness(0.7);
      transition: filter 0.14s ease, transform 0.18s ease;
      z-index: 1;
    }
    .smash-tile.is-poster-strip .poster-strip-grad {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(8,6,10,0.22) 0%, rgba(8,6,10,0.04) 38%, rgba(8,6,10,0.88) 72%, rgba(6,5,8,0.98) 100%);
      pointer-events: none;
      z-index: 2;
    }
    .smash-tile.is-poster-strip .poster-strip-standee {
      position: absolute;
      left: 50%;
      bottom: 20px;
      width: min(94px, 84%);
      height: 94px;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      pointer-events: none;
      opacity: 0;
      transform: translateX(-50%) translateY(8px) scale(0.92);
      transition: opacity 0.16s ease, transform 0.16s ease;
      z-index: 4;
    }
    .smash-tile.is-poster-strip .poster-strip-standee::before {
      content: '';
      position: absolute;
      left: 50%;
      bottom: 3px;
      width: 52px;
      height: 8px;
      transform: translateX(-50%);
      background: radial-gradient(ellipse at center, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 72%);
      pointer-events: none;
      z-index: 0;
    }
    .smash-tile.is-poster-strip .poster-strip-standee-img {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 100%;
      object-fit: contain;
      filter: drop-shadow(0 2px 0 #09070a) drop-shadow(0 0 8px rgba(0,0,0,0.92));
      transform-origin: center bottom;
    }
    @keyframes posterStandeeBob {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-3px); }
    }
    .smash-tile.is-poster-strip:hover:not(.is-locked),
    .smash-tile.is-poster-strip.is-picked-cur {
      transform: translateY(-2px) scale(1.04);
      border-color: var(--hero-poster-col, #fbbf24) !important;
      box-shadow: 0 0 0 2px var(--hero-poster-col, #fbbf24), 0 0 18px var(--hero-poster-glow, rgba(251,191,36,0.55)), 0 10px 22px rgba(0,0,0,0.78) !important;
      z-index: 14;
    }
    .smash-tile.is-poster-strip:hover:not(.is-locked) .poster-strip-bg,
    .smash-tile.is-poster-strip.is-picked-cur .poster-strip-bg {
      filter: brightness(1.08);
    }
    .smash-tile.is-poster-strip:hover:not(.is-locked) .poster-strip-standee,
    .smash-tile.is-poster-strip.is-picked-cur .poster-strip-standee {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
    .smash-tile.is-poster-strip:hover:not(.is-locked) .poster-strip-standee-img,
    .smash-tile.is-poster-strip.is-picked-cur .poster-strip-standee-img {
      animation: posterStandeeBob 0.9s steps(2, end) infinite;
    }
    body.ambient-off .poster-strip-standee-img {
      animation: none !important;
    }
    .boss-orochi-tile.is-poster-boss .poster-strip-bg {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center 22%;
      image-rendering: pixelated;
      filter: brightness(0.7);
      transition: filter 0.14s ease;
      z-index: 0;
    }
    .boss-orochi-tile.is-poster-boss .poster-strip-grad {
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(10,6,12,0.78) 0%, rgba(12,8,14,0.46) 44%, rgba(8,6,10,0.88) 100%);
      pointer-events: none;
      z-index: 1;
    }
    .boss-orochi-tile.is-poster-boss .boss-standee-wrap {
      opacity: 0.78;
      transform: scale(0.96);
      transition: opacity 0.14s ease, transform 0.14s ease;
    }
    .boss-orochi-tile.is-poster-boss:hover:not(.is-locked),
    .boss-orochi-tile.is-poster-boss.is-picked-cur {
      transform: translateY(-2px) scale(1.04);
      border-color: var(--hero-poster-col, #facc15) !important;
      box-shadow: 0 0 0 2px var(--hero-poster-col, #facc15), 0 0 22px var(--hero-poster-glow, rgba(250,204,21,0.58)), 0 12px 26px rgba(0,0,0,0.82) !important;
      z-index: 15;
    }
    .boss-orochi-tile.is-poster-boss:hover:not(.is-locked) .poster-strip-bg,
    .boss-orochi-tile.is-poster-boss.is-picked-cur .poster-strip-bg {
      filter: brightness(1.08);
    }
    .boss-orochi-tile.is-poster-boss:hover:not(.is-locked) .boss-standee-wrap,
    .boss-orochi-tile.is-poster-boss.is-picked-cur .boss-standee-wrap {
      opacity: 1;
      transform: scale(1.05);
    }
    .ua-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: -0.16em; flex-shrink: 0; }
    .ua-arcade-num { font-family: 'Arial Narrow', 'Impact', ui-monospace, monospace; letter-spacing: 0.04em; text-shadow: 0 2px 0 rgba(0,0,0,0.85); }
    @keyframes uaVsSlideL { 0% { transform: translateX(-70px) skewX(-6deg); opacity: 0; } 100% { transform: translateX(0) skewX(-6deg); opacity: 1; } }
    @keyframes uaVsSlideR { 0% { transform: translateX(70px) skewX(-6deg); opacity: 0; } 100% { transform: translateX(0) skewX(-6deg); opacity: 1; } }
    @keyframes uaVsSlideU { 0% { transform: translateY(-60px) skewX(-5deg); opacity: 0; } 100% { transform: translateY(0) skewX(-5deg); opacity: 1; } }
    @keyframes uaVsSlideD { 0% { transform: translateY(60px) skewX(-5deg); opacity: 0; } 100% { transform: translateY(0) skewX(-5deg); opacity: 1; } }
    @keyframes uaVsFlash { 0% { transform: scale(2.2) rotate(-10deg); opacity: 0; } 45% { transform: scale(1.06) rotate(-3deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); opacity: 1; } }
    @keyframes uaAchPop { 0% { transform: translate(-50%, -24px) scale(0.92); opacity: 0; } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }
    @keyframes uaStealthBreath { 0%,100% { opacity: 0.44; } 50% { opacity: 0.68; } }
    @keyframes uaStealthSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    .ua-fighter-stealth { animation: uaStealthBreath 2.2s ease-in-out infinite; filter: saturate(0.45) brightness(0.92) drop-shadow(0 0 8px rgba(129,140,248,0.88)); }
    .ua-stealth-ring { animation: uaStealthSpin 9s linear infinite; transform-origin: 0px 0px; }
    .ua-vs-overlay { position: fixed; inset: 0; z-index: 95; background: radial-gradient(circle at 50% 50%, rgba(28,18,12,0.86), rgba(6,5,8,0.96)); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
    .ua-vs-card-l { animation: uaVsSlideL 0.36s cubic-bezier(.16,1,.3,1) both; }
    .ua-vs-card-r { animation: uaVsSlideR 0.36s cubic-bezier(.16,1,.3,1) both; }
    .ua-vs-card-u { animation: uaVsSlideU 0.36s cubic-bezier(.16,1,.3,1) both; }
    .ua-vs-card-d { animation: uaVsSlideD 0.36s cubic-bezier(.16,1,.3,1) both; }
    .ua-vs-badge { animation: uaVsFlash 0.42s cubic-bezier(.16,1,.3,1) 0.1s both; }
    .ua-ach-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 98; animation: uaAchPop 0.32s cubic-bezier(.16,1,.3,1) both; }
    @keyframes uaThemeGlow { 0%,100% { box-shadow: 0 6px 20px rgba(0,0,0,0.68), 0 0 0 0 rgba(251,191,36,0.55); } 50% { box-shadow: 0 6px 22px rgba(0,0,0,0.72), 0 0 0 5px rgba(251,191,36,0.18); } }
    @keyframes uaNudgeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
    .ua-theme-nudge-ring { animation: uaThemeGlow 2.4s ease-in-out infinite; }
    .ua-theme-nudge-bubble { animation: uaNudgeFloat 2.8s ease-in-out infinite; }
    @keyframes uaFrameSpin { 0% { filter: hue-rotate(0deg) brightness(1); } 50% { filter: hue-rotate(18deg) brightness(1.18); } 100% { filter: hue-rotate(0deg) brightness(1); } }
    @keyframes uaFrameSheen { 0% { transform: translateX(-140%) rotate(25deg); } 36%,100% { transform: translateX(180%) rotate(25deg); } }
    @keyframes uaFramePulse { 0%,100% { box-shadow: 0 0 8px var(--fr-glow, rgba(251,191,36,0.55)), inset 0 0 6px var(--fr-glow, rgba(251,191,36,0.35)); } 50% { box-shadow: 0 0 18px var(--fr-glow, rgba(251,191,36,0.9)), inset 0 0 10px var(--fr-glow, rgba(251,191,36,0.55)); } }
    @keyframes uaArtGlowPulse { 0%,100% { filter: var(--fr-art-filter, none) drop-shadow(0 0 3px var(--fr-glow, rgba(251,191,36,0.65))); } 50% { filter: var(--fr-art-filter, none) drop-shadow(0 0 9px var(--fr-glow, rgba(251,191,36,0.95))) brightness(1.12); } }
    @keyframes uaArtPrism { 0% { filter: hue-rotate(0deg) saturate(1.25) drop-shadow(0 0 7px rgba(253,224,71,0.9)); } 50% { filter: hue-rotate(38deg) saturate(1.4) brightness(1.14) drop-shadow(0 0 11px rgba(244,114,182,0.92)); } 100% { filter: hue-rotate(0deg) saturate(1.25) drop-shadow(0 0 7px rgba(253,224,71,0.9)); } }
    @keyframes uaSparkTwinkle { 0%,100% { opacity: 0.25; transform: scale(0.75) rotate(0deg); } 50% { opacity: 1; transform: scale(1.22) rotate(45deg); } }
    @keyframes uaNameFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
    @keyframes uaNameShimmer { 0%,100% { filter: brightness(1) drop-shadow(0 0 4px var(--ns-glow, rgba(251,191,36,0.45))); } 50% { filter: brightness(1.28) drop-shadow(0 0 11px var(--ns-glow, rgba(251,191,36,0.92))); } }

    .ua-av-frame { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 2px; flex-shrink: 0; overflow: visible; }
    .ua-av-frame.has-art { padding: 0 !important; background: transparent !important; box-shadow: none !important; animation: none !important; }
    .ua-av-frame > img.ua-av-core { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; background: #0c0a09; display: block; image-rendering: pixelated; position: relative; z-index: 1; }
    .ua-av-frame.has-art > img.ua-av-core { border-radius: 4px; }
    .ua-av-frame > img.ua-av-frame-art { position: absolute; left: -29%; top: -29%; width: 158%; height: 158%; max-width: none; pointer-events: none; z-index: 4; image-rendering: pixelated; object-fit: contain; filter: var(--fr-art-filter, none) drop-shadow(0 1px 2px rgba(0,0,0,0.8)); }
    .ua-av-frame.has-art.has-pulse > img.ua-av-frame-art, .ua-av-frame.has-art.has-sheen > img.ua-av-frame-art { animation: uaArtGlowPulse 2.4s ease-in-out infinite; }
    .ua-av-frame.has-art.has-prism > img.ua-av-frame-art { animation: uaArtPrism 3.2s ease-in-out infinite; }
    .ua-av-sheen-clip { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; pointer-events: none; z-index: 3; }
    .ua-av-sheen-clip::after { content: ''; position: absolute; inset: -40% -20%; width: 42%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent); animation: uaFrameSheen 2.9s ease-in-out infinite; }
    .ua-av-frame:not(.has-art).has-pulse { animation: uaFramePulse 2.4s ease-in-out infinite; }
    .ua-av-frame:not(.has-art).has-prism { background-size: 260% 260% !important; animation: uaNameFlow 3.4s linear infinite, uaFramePulse 2.4s ease-in-out infinite; }
    .ua-av-spark { position: absolute; pointer-events: none; z-index: 6; font-size: 9px; line-height: 1; text-shadow: 0 0 6px #fff, 0 1px 2px #000; animation: uaSparkTwinkle 1.8s ease-in-out infinite; }

    .ua-av-frame.f-classic { background: linear-gradient(135deg,#f59e0b,#78350f,#fbbf24); box-shadow: 0 0 8px rgba(245,158,11,0.35); }
    .ua-av-frame.f-emerald { background: linear-gradient(135deg,#34d399,#065f46,#6ee7b7); box-shadow: 0 0 10px rgba(52,211,153,0.45); }
    .ua-av-frame.f-flame { background: linear-gradient(135deg,#f97316,#991b1b,#fde047); box-shadow: 0 0 10px rgba(249,115,22,0.5); }
    .ua-av-frame.f-sakura { background: linear-gradient(135deg,#f472b6,#831843,#fbcfe8); box-shadow: 0 0 10px rgba(244,114,182,0.48); }
    .ua-av-frame.f-cyber { background: linear-gradient(135deg,#22d3ee,#7c3aed,#ec4899); box-shadow: 0 0 12px rgba(34,211,238,0.55); }
    .ua-av-frame.f-astral { background: linear-gradient(135deg,#38bdf8,#1e3a8a,#a5f3fc); box-shadow: 0 0 10px rgba(56,189,248,0.5); }
    .ua-av-frame.f-bio { background: repeating-linear-gradient(-45deg,#facc15 0 4px,#18181b 4px 8px); box-shadow: 0 0 10px rgba(163,230,53,0.45); }
    .ua-av-frame.f-legend { background: linear-gradient(135deg,#fef08a,#f59e0b,#ec4899,#38bdf8,#fef08a); box-shadow: 0 0 14px rgba(251,191,36,0.68); animation: uaFrameSpin 3.2s ease-in-out infinite; }

    /* Account Name Styles (Lv.5 ~ Lv.195) */
    .ua-name-style { display: inline-block; font-weight: 900; }
    .ua-name-style.ns-default { color: #f5f5f4; }
    .ua-name-style.ns-amber { color: #fbbf24; }
    .ua-name-style.ns-emerald { color: #34d399; }
    .ua-name-style.ns-sky { color: #38bdf8; }
    .ua-name-style.ns-sakura { color: #f472b6; }
    .ua-name-style.ns-crimson { color: #fb7185; text-shadow: 0 0 8px rgba(244,63,94,0.55); }
    .ua-name-style.ns-silver { color: #e2e8f0; text-shadow: 0 0 9px rgba(125,211,252,0.75); }
    .ua-name-style.ns-grad { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
    .ua-name-style.ns-sunset { background-image: linear-gradient(90deg,#fde047,#fb923c,#f43f5e); }
    .ua-name-style.ns-aurora { background-image: linear-gradient(90deg,#34d399,#22d3ee,#60a5fa); }
    .ua-name-style.ns-cyber { background-image: linear-gradient(90deg,#22d3ee,#a855f7,#f472b6); }
    .ua-name-style.ns-astral { background-image: linear-gradient(90deg,#c084fc,#e879f9,#f9a8d4); }
    .ua-name-style.ns-magma { background-image: linear-gradient(90deg,#ef4444,#f97316,#fde047); }
    .ua-name-style.ns-tang { background-image: linear-gradient(90deg,#fb7185,#fbbf24,#2dd4bf); }
    .ua-name-style.ns-frost_glow { --ns-glow: rgba(125,211,252,0.85); background-image: linear-gradient(90deg,#bae6fd,#ffffff,#38bdf8,#e0f2fe); background-size: 240% 100%; animation: uaNameFlow 2.8s linear infinite, uaNameShimmer 2.4s ease-in-out infinite; }
    .ua-name-style.ns-gold_glow { --ns-glow: rgba(251,191,36,0.9); background-image: linear-gradient(90deg,#f59e0b,#fef08a,#ffffff,#fbbf24,#d97706); background-size: 260% 100%; animation: uaNameFlow 2.6s linear infinite, uaNameShimmer 2.2s ease-in-out infinite; }
    .ua-name-style.ns-blood_glow { --ns-glow: rgba(244,63,94,0.88); background-image: linear-gradient(90deg,#e11d48,#f43f5e,#c084fc,#fb7185); background-size: 240% 100%; animation: uaNameFlow 3s linear infinite, uaNameShimmer 2.1s ease-in-out infinite; }
    .ua-name-style.ns-neon_rain { --ns-glow: rgba(34,211,238,0.88); background-image: linear-gradient(90deg,#22d3ee,#c084fc,#fbbf24,#ec4899,#22d3ee); background-size: 300% 100%; animation: uaNameFlow 2.8s linear infinite, uaNameShimmer 2.2s ease-in-out infinite; }
    .ua-name-style.ns-sakura_snow { --ns-glow: rgba(249,168,212,0.88); background-image: linear-gradient(90deg,#fbcfe8,#ffffff,#f472b6,#fde68a,#fbcfe8); background-size: 280% 100%; animation: uaNameFlow 3s linear infinite, uaNameShimmer 2.4s ease-in-out infinite; }
    .ua-name-style.ns-thunder { --ns-glow: rgba(96,165,250,0.92); background-image: linear-gradient(90deg,#60a5fa,#ffffff,#a78bfa,#38bdf8,#ffffff); background-size: 280% 100%; animation: uaNameFlow 2s linear infinite, uaNameShimmer 1.7s ease-in-out infinite; }
    .ua-name-style.ns-prism { --ns-glow: rgba(255,255,255,0.85); background-image: linear-gradient(90deg,#f43f5e,#fb923c,#facc15,#34d399,#38bdf8,#a855f7,#f43f5e); background-size: 320% 100%; animation: uaNameFlow 2.6s linear infinite, uaNameShimmer 2s ease-in-out infinite; }
    .ua-name-style.ns-genesis { --ns-glow: rgba(253,224,71,0.96); background-image: linear-gradient(90deg,#fef08a,#f472b6,#38bdf8,#a855f7,#34d399,#fef08a); background-size: 360% 100%; animation: uaNameFlow 2.2s linear infinite, uaNameShimmer 1.6s ease-in-out infinite; }

    /* Honor Title Ribbons (6 Rarity Tiers) */
    .ua-title-ribbon { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 900; line-height: 1.25; border: 1px solid; overflow: hidden; white-space: nowrap; max-width: 100%; }
    .ua-title-ribbon.is-sm { padding: 1px 6px; font-size: 9.5px; gap: 3px; }
    .ua-title-ribbon.tr-uncommon { background: linear-gradient(90deg,rgba(6,78,59,0.92),rgba(4,47,46,0.92)); border-color: rgba(52,211,153,0.7); color: #a7f3d0; }
    .ua-title-ribbon.tr-rare { background: linear-gradient(90deg,rgba(12,74,110,0.92),rgba(15,23,42,0.94)); border-color: rgba(56,189,248,0.78); color: #bae6fd; box-shadow: 0 0 8px rgba(56,189,248,0.22); }
    .ua-title-ribbon.tr-epic { background: linear-gradient(90deg,rgba(76,29,149,0.92),rgba(49,16,89,0.94)); border-color: rgba(192,132,252,0.82); color: #e9d5ff; box-shadow: 0 0 10px rgba(168,85,247,0.35); }
    .ua-title-ribbon.tr-legend { background: linear-gradient(90deg,rgba(69,26,3,0.95),rgba(120,53,15,0.95),rgba(41,20,4,0.95)); border-color: rgba(251,191,36,0.92); color: #fef08a; box-shadow: 0 0 12px rgba(251,191,36,0.45); }
    .ua-title-ribbon.tr-mythic { background: linear-gradient(90deg,rgba(46,16,101,0.95),rgba(131,24,67,0.92),rgba(14,116,144,0.92),rgba(46,16,101,0.95)); background-size: 260% 100%; border-color: rgba(253,224,71,0.96); color: #ffffff; text-shadow: 0 0 8px rgba(253,224,71,0.85); box-shadow: 0 0 14px rgba(244,114,182,0.55), 0 0 6px rgba(251,191,36,0.5); animation: uaNameFlow 3.4s linear infinite; }
    .ua-title-ribbon.tr-sovereign { background: linear-gradient(90deg,#050505,#1c1407 30%,#3a2a08 50%,#1c1407 70%,#050505); background-size: 240% 100%; border: 1px solid #f5d061; color: #fff7d6; letter-spacing: 0.06em; font-style: italic; text-shadow: 0 0 6px rgba(253,224,71,0.95), 0 0 14px rgba(251,191,36,0.6); box-shadow: 0 0 0 1px rgba(0,0,0,0.85), 0 0 12px rgba(250,204,21,0.65), 0 0 26px rgba(234,179,8,0.35), inset 0 0 8px rgba(250,204,21,0.25); animation: uaNameFlow 4.2s linear infinite, uaSovereignPulse 2.6s ease-in-out infinite; }
    .ua-title-ribbon.tr-founder { background: linear-gradient(90deg,rgba(19,46,44,0.96),rgba(66,44,18,0.95),rgba(19,46,44,0.96)); background-size: 220% 100%; border-color: rgba(214,174,104,0.95); color: #f6e7c1; text-shadow: 0 0 6px rgba(214,174,104,0.7); box-shadow: 0 0 10px rgba(45,212,191,0.35), 0 0 6px rgba(214,174,104,0.45); animation: uaNameFlow 5.5s linear infinite; }
    @keyframes uaSovereignPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
    @keyframes uaRibbonSheen { 0% { left: -45%; } 45%,100% { left: 125%; } }
    .ua-title-ribbon.tr-sovereign::after, .ua-title-ribbon.tr-founder::after { content: ''; position: absolute; top: -40%; bottom: -40%; left: -45%; width: 32%; transform: skewX(-24deg); background: linear-gradient(90deg, transparent, rgba(255,250,220,0.62), transparent); pointer-events: none; animation: uaRibbonSheen 2.8s ease-in-out infinite; }
    .ua-title-ribbon.tr-legend::after, .ua-title-ribbon.tr-mythic::after { content: ''; position: absolute; top: -40%; bottom: -40%; left: -45%; width: 32%; transform: skewX(-24deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.48), transparent); pointer-events: none; animation: uaRibbonSheen 3.2s ease-in-out infinite; }
    @keyframes uaPelletDrop {
      0% { transform: translate(-50%, -12px) scale(0.7); opacity: 0; }
      14% { transform: translate(-50%, 0px) scale(1.1); opacity: 1; }
      22% { transform: translate(-50%, -3px) scale(0.95); opacity: 1; }
      30% { transform: translate(-50%, 0px) scale(1); opacity: 1; }
      72% { transform: translate(-50%, 0px) scale(1); opacity: 0.92; }
      100% { transform: translate(-50%, 2px) scale(0.75); opacity: 0; }
    }
    .ua-bunny-pellet { position: absolute; pointer-events: none; z-index: 14; width: 9px; height: 7px; border-radius: 999px; background: radial-gradient(circle at 35% 30%, #78553a, #3b2416 70%, #1c100a); border: 1px solid #1c100a; box-shadow: 0 2px 3px rgba(0,0,0,0.65); animation: uaPelletDrop 6.4s ease-out forwards; }

/* === Body Extra Styles === */
    @keyframes uaBootPulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 14px rgba(251,191,36,0.45)); } 50% { transform: scale(1.06); filter: drop-shadow(0 0 26px rgba(251,191,36,0.85)); } }
    @keyframes uaBootBarLoad { 0% { width: 12%; } 45% { width: 58%; } 100% { width: 84%; } }
    #ua-boot-splash {
      position: fixed; inset: 0; z-index: 9999;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
      background:
        radial-gradient(circle at 50% 42%, rgba(217, 119, 6, 0.22) 0%, rgba(28, 17, 12, 0.88) 48%, #0b0807 100%),
        repeating-linear-gradient(0deg, rgba(251,191,36,0.03) 0 2px, transparent 2px 16px),
        repeating-linear-gradient(90deg, rgba(251,191,36,0.03) 0 2px, transparent 2px 16px),
        #0b0807;
      transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
      user-select: none;
    }
    #ua-boot-splash.is-done { opacity: 0; transform: scale(1.03); pointer-events: none; }
    .ua-boot-crest {
      width: 68px; height: 68px; border-radius: 14px;
      border: 3px solid #f59e0b; background: linear-gradient(145deg, #291a10, #120c09);
      display: grid; place-items: center; font-size: 32px;
      box-shadow: inset 0 2px 0 rgba(254,243,199,0.28), 0 10px 28px rgba(0,0,0,0.85);
      animation: uaBootPulse 2s ease-in-out infinite;
    }
    .ua-boot-title {
      font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
      font-size: clamp(22px, 3.6vw, 34px); font-weight: 900; letter-spacing: 0.16em;
      color: #fde68a; text-shadow: 0 3px 0 #451a03, 0 0 22px rgba(245,158,11,0.55);
    }
    .ua-boot-sub {
      font-size: 12px; font-weight: 800; letter-spacing: 0.22em; color: #d6bfa0; margin-top: -10px;
    }
    .ua-boot-track {
      width: min(300px, 76vw); height: 14px; padding: 2px;
      border: 2px solid #d97706; background: #140e0b; border-radius: 4px;
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.9), 0 0 14px rgba(245,158,11,0.22);
      overflow: hidden;
    }
    .ua-boot-fill {
      height: 100%; width: 12%; border-radius: 2px;
      background: repeating-linear-gradient(90deg, #fbbf24 0 10px, #f59e0b 10px 12px);
      box-shadow: 0 0 10px rgba(251,191,36,0.7);
      animation: uaBootBarLoad 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      transition: width 0.28s ease-out;
    }
    .ua-boot-msg { font-size: 11.5px; color: #a8a29e; font-weight: 700; letter-spacing: 0.06em; }

    /* Native Little-Red-Style Card Icon Medallion & Card Tags */
    .um-pennant-shell.has-card-icon {
      height: 100%;
      max-height: 100%;
      padding: 0 2px 0 0;
      clip-path: none;
    }
    .um-pennant-shell.has-card-icon .um-pennant-body {
      clip-path: none;
      justify-content: space-between;
    }
    .um-pennant-shell.has-card-icon .um-pennant-owner {
      flex: 1 1 auto;
      padding: 3px 1px 2px;
    }
    .um-pennant-icon-slot {
      width: 100%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1px 0 3px;
    }
    .um-native-icon-medallion {
      width: 17px; height: 17px;
      border-radius: 999px;
      display: inline-flex; align-items: center; justify-content: center;
      background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--icon-bg, #1c1917) 72%, #ffffff 28%), var(--icon-bg, #1c1917) 80%);
      border: 1.5px solid var(--icon-ring, #fbbf24);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72), inset 0 1px 2px rgba(255, 255, 255, 0.22);
      color: var(--icon-ring, #fbbf24);
      line-height: 1;
      flex-shrink: 0;
    }
    .um-native-icon-medallion.is-lg { width: 24px; height: 24px; border-width: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.78); }
    .um-native-icon-medallion.is-xl { width: 34px; height: 34px; border-width: 2.4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.85); }
    .um-card-tags-bar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
      margin-bottom: 2px; flex-shrink: 0;
    }
    .um-card-tag-pill {
      font-size: 6.5px; font-weight: 900; letter-spacing: 0.04em;
      color: #99f6e4; line-height: 1.1;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    }
    .um-card-tags-bar.is-lg .um-card-tag-pill { font-size: 8.5px; }
    .um-card-tags-bar.is-xl .um-card-tag-pill { font-size: 11px; }

    /* ==================== MOBILE & TOUCH UX OPTIMIZATIONS ==================== */
    html, body, #app {
      height: 100vh;
      height: 100dvh;
    }
    #lobby-topbar.is-lobby-fixed {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      z-index: 40 !important;
      width: 100% !important;
    }
    #fs-board-pan-layer {
      will-change: transform;
      backface-visibility: hidden;
    }
    #fs-board-pan-layer.is-panning,
    #fs-board-pan-layer.is-panning * {
      transition: none !important;
    }
    #board-svg, #board-drop-stage {
      touch-action: none;
    }
    .um-card[data-card-id] {
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    @media (pointer: coarse), (max-width: 768px) {
      #lobby-topbar {
        padding: 6px 10px !important;
        gap: 6px !important;
      }
      #lobby-topbar button {
        min-height: 34px;
        padding-left: 8px;
        padding-right: 8px;
      }
      .live-action-feed {
        width: min(260px, 58vw) !important;
        max-width: 60vw !important;
      }
      #campaign-instructor-dock {
        width: min(330px, 92vw) !important;
      }
      .board-zoom-hud button {
        min-width: 30px !important;
        min-height: 30px !important;
      }
      .fs-seat-zone {
        padding-bottom: max(6px, env(safe-area-inset-bottom));
      }
      #match-prompt-pill {
        top: 48px !important;
        max-width: 90vw !important;
        font-size: 10.5px !important;
      }
      #hand-pick-modal button,
      #combat-stage-overlay button,
      #hero-overview-modal button {
        min-height: 34px;
      }
      [class*="backdrop-blur"],
      .fs-sidebar-drawer,
      .fs-capsule {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
      }
    }

    /* ==================== HERO OVERVIEW ARCADE ROSTER UI (.ua-ov-*) ==================== */
    .ua-ov-shell {
      width: min(96vw, 1460px);
      height: 93vh;
    }
    .ua-ov-header {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.06) 0%, transparent 46%),
        var(--win-header-bg, rgba(16, 18, 22, 0.94));
      border-bottom: 2px solid color-mix(in srgb, var(--ui-accent, #fbbf24) 45%, #27272a);
    }
    .ua-ov-toolbar {
      background: rgba(8, 10, 14, 0.84);
      border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    }
    .ua-ov-lounge-bar {
      background: linear-gradient(90deg, rgba(6, 22, 18, 0.82), rgba(8, 12, 16, 0.82));
      border-bottom: 1px solid rgba(52, 211, 153, 0.24);
    }
    .ua-ov-roster-pane {
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
      background-size: 20px 20px;
    }
    .ua-ov-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
      gap: 12px;
    }
    @media (max-width: 640px) {
      .ua-ov-grid {
        grid-template-columns: 1fr;
      }
    }
    .ua-ov-search {
      background: #0a0c10;
      border: 2px solid #3f3a36;
      border-radius: 6px;
      padding: 6px 11px;
      font-size: 12px;
      font-weight: 700;
      color: #f5f5f4;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.72);
      outline: none;
      transition: border-color 0.12s ease, box-shadow 0.12s ease;
    }
    .ua-ov-search:focus {
      border-color: #fbbf24;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.72), 0 0 0 2px rgba(251, 191, 36, 0.25);
    }
    .ua-ov-select {
      background: linear-gradient(180deg, #1b1e25 0%, #111318 100%);
      border: 2px solid #44403c;
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 800;
      color: #e7e5e4;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.08);
      cursor: pointer;
      outline: none;
      transition: border-color 0.12s ease, transform 0.1s ease;
    }
    .ua-ov-select:hover,
    .ua-ov-select:focus {
      border-color: #fbbf24;
    }
    .ua-ov-btn,
    .ua-ov-btn-cta,
    .ua-ov-btn-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 6px 12px;
      border: 2px solid color-mix(in srgb, var(--ui-accent, #fbbf24) 55%, #3f3a36);
      border-radius: 6px;
      background: linear-gradient(180deg, #22262e 0%, #14171d 100%);
      color: var(--ui-accent-light, #fde68a);
      font-size: 12px;
      font-weight: 800;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.14);
      cursor: pointer;
      transition: transform 0.1s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.1s ease;
    }
    .ua-ov-btn-cta {
      background: var(--ui-grad, linear-gradient(180deg, #f59e0b 0%, #b45309 100%));
      border-color: var(--ui-accent-light, #fef08a);
      color: #ffffff;
      font-weight: 900;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.26);
    }
    .ua-ov-btn-close {
      padding: 6px 11px;
      border-color: #57534e;
      background: linear-gradient(180deg, #272226 0%, #161316 100%);
      color: #e7e5e4;
      font-weight: 900;
    }
    .ua-ov-btn:hover,
    .ua-ov-btn-cta:hover {
      transform: translateY(-1px);
      filter: brightness(1.1);
      border-color: var(--ui-accent-light, #fef08a);
    }
    .ua-ov-btn-close:hover {
      transform: translateY(-1px);
      border-color: #fb7185;
      background: linear-gradient(180deg, #881337 0%, #4c0519 100%);
      color: #fff1f2;
    }
    .ua-ov-btn:active,
    .ua-ov-btn-cta:active,
    .ua-ov-btn-close:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #070608;
    }
    .ua-ov-filter-btn {
      padding: 6px 11px;
      border-radius: 6px;
      border: 2px solid #3c3835;
      background: linear-gradient(180deg, #1b1d23 0%, #121419 100%);
      color: #d6d3d1;
      font-size: 12px;
      font-weight: 800;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.08);
      cursor: pointer;
      transition: transform 0.1s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.1s ease;
    }
    .ua-ov-filter-btn:hover {
      transform: translateY(-1px);
      border-color: #a8a29e;
      color: #ffffff;
    }
    .ua-ov-filter-btn:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #070608;
    }
    .ua-ov-filter-btn.tone-amber.is-active {
      background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
      border-color: #fef08a;
      color: #1c1204;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    .ua-ov-filter-btn.tone-sky.is-active {
      background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
      border-color: #bae6fd;
      color: #082032;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    .ua-ov-filter-btn.tone-rose.is-active {
      background: linear-gradient(180deg, #f43f5e 0%, #be123c 100%);
      border-color: #fecdd3;
      color: #ffffff;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
    .ua-ov-filter-btn.tone-emerald.is-active {
      background: linear-gradient(180deg, #34d399 0%, #059669 100%);
      border-color: #a7f3d0;
      color: #04241a;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    .ua-ov-filter-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 7px;
      border: 2px solid #3f3b36;
      background: linear-gradient(180deg, #1d2027 0%, #12141a 100%);
      color: #d6d3d1;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.2;
      white-space: nowrap;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.08);
      cursor: pointer;
      transition: transform 0.1s ease, border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
    }
    .ua-ov-filter-pill:hover {
      border-color: #fbbf24;
      color: #fef3c7;
      transform: translateY(-1px);
    }
    .ua-ov-filter-pill:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #070608;
    }
    .ua-ov-filter-pill.is-active {
      border-color: #fde047;
      background: linear-gradient(180deg, #523b10 0%, #2b1d07 100%);
      color: #fef08a;
      box-shadow: 0 3px 0 #070608, 0 0 14px rgba(250, 204, 21, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    .ua-ov-lounge-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 9px 3px 4px;
      border-radius: 6px;
      border: 1.5px solid rgba(52, 211, 153, 0.58);
      background: linear-gradient(180deg, rgba(6, 78, 59, 0.62), rgba(6, 40, 32, 0.84));
      color: #ecfdf5;
      box-shadow: 0 2px 0 rgba(0, 0, 0, 0.78);
      flex-shrink: 0;
    }
    .ua-ov-group-head {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 4px 0 6px;
    }
    .ua-ov-group-bar {
      width: 4px;
      height: 18px;
      border-radius: 2px;
      background: var(--grp-accent, #fbbf24);
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
      flex-shrink: 0;
    }
    .ua-ov-group-title {
      font-size: 13.5px;
      font-weight: 900;
      letter-spacing: 0.04em;
      color: var(--grp-accent, #fbbf24);
      white-space: nowrap;
    }
    .ua-ov-group-count {
      padding: 1px 7px;
      border-radius: 4px;
      background: #14161b;
      border: 1.5px solid #3f3a36;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11px;
      font-weight: 900;
      color: #e7e5e4;
      flex-shrink: 0;
    }
    .ua-ov-group-rule {
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, color-mix(in srgb, var(--grp-accent, #fbbf24) 45%, transparent), rgba(255, 255, 255, 0.06));
    }
    .ua-ov-group-desc {
      font-size: 11px;
      color: #a8a29e;
      white-space: nowrap;
    }
    .ua-ov-card {
      position: relative;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px 10px 14px;
      min-height: 100px;
      border-radius: 8px;
      border: 2px solid #33302d;
      background:
        repeating-linear-gradient(-28deg, rgba(255, 255, 255, 0.014) 0px, rgba(255, 255, 255, 0.014) 2px, transparent 2px, transparent 10px),
        linear-gradient(180deg, rgba(28, 31, 36, 0.94) 0%, rgba(16, 18, 22, 0.97) 100%);
      box-shadow: 0 4px 0 rgba(0, 0, 0, 0.84), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      cursor: pointer;
      overflow: hidden;
      transition: transform 0.12s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
    }
    .ua-ov-card::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 4px;
      background: var(--ov-accent, #a8a29e);
      opacity: 0.85;
      transition: opacity 0.14s ease, width 0.14s ease;
    }
    .ua-ov-card:hover {
      transform: translateY(-2px);
      border-color: color-mix(in srgb, var(--ov-accent, #fbbf24) 85%, #ffffff);
      box-shadow: 0 6px 0 rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }
    .ua-ov-card:hover::before {
      opacity: 1;
    }
    .ua-ov-card.is-lounge {
      border-color: rgba(52, 211, 153, 0.78);
    }
    .ua-ov-card.is-lounge::before {
      background: #34d399;
      opacity: 0.95;
    }
    .ua-ov-card.is-selected {
      border-color: #fbbf24;
      background:
        repeating-linear-gradient(-28deg, rgba(251, 191, 36, 0.04) 0px, rgba(251, 191, 36, 0.04) 2px, transparent 2px, transparent 10px),
        linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(28, 24, 18, 0.96) 55%, rgba(16, 18, 22, 0.98) 100%);
      box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.48), 0 5px 0 rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(254, 240, 138, 0.32);
    }
    .ua-ov-card.is-selected::before {
      background: #fbbf24;
      width: 5px;
      opacity: 1;
    }
    .ua-ov-card.is-selected::after {
      content: '';
      position: absolute;
      bottom: 4px;
      right: 4px;
      width: 8px;
      height: 8px;
      border-right: 2px solid #fbbf24;
      border-bottom: 2px solid #fbbf24;
      pointer-events: none;
    }
    .ua-ov-portrait {
      position: relative;
      width: 76px;
      height: 76px;
      border-radius: 6px;
      border: 2px solid #4a4540;
      background: #090a0d;
      box-shadow: inset 0 0 0 2px #050507, 2px 3px 0 rgba(0, 0, 0, 0.82);
      overflow: hidden;
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }
    .ua-ov-card.is-lounge .ua-ov-portrait {
      border-color: rgba(52, 211, 153, 0.82);
    }
    .ua-ov-card.is-selected .ua-ov-portrait {
      border-color: #fbbf24;
    }
    .ua-ov-portrait-hi {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      image-rendering: auto;
      transition: transform 0.16s ease;
    }
    .ua-ov-card:hover .ua-ov-portrait-hi {
      transform: scale(1.05);
    }
    .ua-ov-stat-chip {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 1px 6px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 800;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(7, 8, 11, 0.82);
      line-height: 1.35;
    }
    .ua-ov-star-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 30px;
      height: 30px;
      border-radius: 6px;
      border: 2px solid #44403c;
      background: linear-gradient(180deg, #1f2127, #121418);
      color: #78716c;
      box-shadow: 0 2px 0 #070608;
      display: grid;
      place-items: center;
      font-size: 13px;
      cursor: pointer;
      transition: transform 0.1s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
    }
    .ua-ov-star-btn:hover {
      transform: translateY(-1px);
      border-color: #fbbf24;
      color: #fde68a;
    }
    .ua-ov-star-btn:active {
      transform: translateY(1px);
    }
    .ua-ov-star-btn.is-active {
      border-color: #34d399;
      background: linear-gradient(180deg, rgba(16, 185, 129, 0.34), rgba(6, 78, 59, 0.85));
      color: #fde047;
      box-shadow: 0 2px 0 #070608, 0 0 10px rgba(52, 211, 153, 0.26);
    }
    .ua-ov-unlock-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      padding: 3px 8px;
      border-radius: 6px;
      border: 2px solid;
      box-shadow: 0 2px 0 #070608;
      font-size: 10.5px;
      font-weight: 900;
      cursor: pointer;
      transition: transform 0.1s ease, filter 0.12s ease;
    }
    .ua-ov-unlock-btn:hover {
      transform: translateY(-1px);
      filter: brightness(1.08);
    }
    .ua-ov-preview {
      border-left: 2px solid color-mix(in srgb, var(--ui-accent, #fbbf24) 30%, #1c1917);
      background: linear-gradient(180deg, rgba(16, 18, 22, 0.97) 0%, rgba(10, 12, 15, 0.99) 100%);
    }
    .ua-ov-preview-portrait {
      position: relative;
      width: 96px;
      height: 96px;
      border-radius: 8px;
      border: 2.5px solid #57534e;
      background: #090a0d;
      box-shadow: inset 0 0 0 2px #050507, 3px 4px 0 rgba(0, 0, 0, 0.88);
      overflow: hidden;
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }
    .ua-ov-info-box {
      padding: 10px 12px;
      border-radius: 8px;
      background: rgba(9, 11, 15, 0.86);
      border: 1.5px solid rgba(255, 255, 255, 0.1);
      border-left: 3.5px solid var(--box-accent, #fbbf24);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 0 rgba(0, 0, 0, 0.55);
    }
    .ua-ov-deck-tile {
      padding: 6px 4px;
      border-radius: 6px;
      border: 1.5px solid;
      text-align: center;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 rgba(0, 0, 0, 0.65);
    }
    .ua-ov-cta-primary {
      width: 100%;
      padding: 10px 14px;
      border-radius: 7px;
      border: 2px solid var(--ui-accent-light, #fef08a);
      background: var(--ui-grad, linear-gradient(180deg, #f59e0b 0%, #b45309 100%));
      color: #ffffff;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0.04em;
      text-shadow: 0 2px 0 rgba(0, 0, 0, 0.75);
      box-shadow: 0 4px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.28);
      cursor: pointer;
      transition: transform 0.1s ease, filter 0.12s ease, box-shadow 0.1s ease;
    }
    .ua-ov-cta-primary:hover {
      transform: translateY(-1px);
      filter: brightness(1.08);
    }
    .ua-ov-cta-primary:active {
      transform: translateY(2px);
      box-shadow: 0 2px 0 #070608;
    }
    .ua-ov-action-btn {
      padding: 8px 10px;
      border-radius: 7px;
      border: 2px solid #44403c;
      background: linear-gradient(180deg, #1d2027 0%, #13151a 100%);
      color: #e7e5e4;
      font-size: 12px;
      font-weight: 800;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.12);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      transition: transform 0.1s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.1s ease;
    }
    .ua-ov-action-btn:hover:not(.is-disabled) {
      transform: translateY(-1px);
      filter: brightness(1.1);
    }
    .ua-ov-action-btn:active:not(.is-disabled) {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #070608;
    }
    .ua-ov-action-btn.tone-emerald {
      border-color: #34d399;
      background: linear-gradient(180deg, rgba(16, 185, 129, 0.34), rgba(6, 78, 59, 0.85));
      color: #ecfdf5;
    }
    .ua-ov-action-btn.tone-teal {
      border-color: rgba(52, 211, 153, 0.62);
      background: linear-gradient(180deg, rgba(17, 68, 54, 0.72), rgba(10, 38, 30, 0.88));
      color: #a7f3d0;
    }
    .ua-ov-action-btn.tone-amber {
      border-color: rgba(251, 191, 36, 0.62);
      background: linear-gradient(180deg, rgba(92, 58, 12, 0.7), rgba(46, 28, 7, 0.88));
      color: #fde68a;
    }
    .ua-ov-action-btn.tone-indigo {
      border-color: rgba(129, 140, 248, 0.7);
      background: linear-gradient(180deg, rgba(49, 46, 129, 0.72), rgba(28, 25, 77, 0.88));
      color: #e0e7ff;
    }
    .ua-ov-action-btn.tone-neutral {
      border-color: #44403c;
      background: linear-gradient(180deg, #1d2027 0%, #13151a 100%);
      color: #e7e5e4;
    }
    .ua-ov-action-btn.tone-neutral:hover:not(.is-disabled) {
      border-color: #fbbf24;
      color: #fef3c7;
    }
    .ua-ov-action-btn.tone-danger {
      border-color: rgba(244, 63, 94, 0.65);
      background: linear-gradient(180deg, rgba(136, 19, 55, 0.65), rgba(76, 5, 25, 0.86));
      color: #fecdd3;
    }
    .ua-ov-action-btn.is-disabled {
      border-color: #292524;
      background: rgba(18, 18, 22, 0.75);
      color: #78716c;
      box-shadow: 0 2px 0 #070608;
      cursor: not-allowed;
    }
    /* ==================== PROFILE MODAL ARCADE UI UPGRADE ==================== */
    .ua-pf-shell {
      width: min(96vw, 1380px) !important;
      max-width: 1380px !important;
      height: min(92vh, 880px) !important;
      max-height: 94dvh !important;
    }
    .ua-pf-tab-btn {
      padding: 7px 14px;
      border-radius: 7px;
      border: 2px solid #3f3b36;
      background: linear-gradient(180deg, #1d2027 0%, #12141a 100%);
      color: #d6d3d1;
      font-size: 12px;
      font-weight: 900;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.08);
      transition: transform 0.1s ease, filter 0.12s ease, border-color 0.12s ease, color 0.12s ease;
      cursor: pointer;
    }
    .ua-pf-tab-btn:hover {
      border-color: #fbbf24;
      color: #fef3c7;
      transform: translateY(-1px);
    }
    .ua-pf-tab-btn.is-active {
      border-color: #fde047;
      background: linear-gradient(180deg, #523b10 0%, #2b1d07 100%);
      color: #fef08a;
      box-shadow: 0 3px 0 #070608, 0 0 16px rgba(250, 204, 21, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    .ua-pf-mastery-card {
      position: relative;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 12px;
      border-radius: 11px;
      border: 2px solid #2b2931;
      background: linear-gradient(180deg, rgba(22, 24, 30, 0.96) 0%, rgba(12, 13, 18, 0.98) 100%);
      box-shadow: 0 4px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
      transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    }
    .ua-pf-mastery-card:hover {
      transform: translateY(-1.5px);
      border-color: rgba(251, 191, 36, 0.68);
      box-shadow: 0 6px 0 rgba(0, 0, 0, 0.65), 0 0 20px rgba(251, 191, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }
    .ua-pf-portrait {
      width: 64px;
      height: 64px;
      border-radius: 9px;
      border: 2px solid #57534e;
      background: #0b0c10;
      object-fit: cover;
      object-position: top center;
      image-rendering: auto;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.72);
      flex-shrink: 0;
    }
    /* Quick Match (快速匹配) Dedicated Cards */
    .ua-mm-mode-card {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 9px 8px;
      border-radius: 9px;
      border: 2px solid #3f3b36;
      background: linear-gradient(180deg, #1b1e26 0%, #101218 100%);
      color: #d6d3d1;
      box-shadow: 0 3px 0 #070608, inset 0 1px 0 rgba(255, 255, 255, 0.06);
      cursor: pointer;
      transition: transform 0.1s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
    }
    .ua-mm-mode-card:hover {
      border-color: #fbbf24;
      color: #fef3c7;
      transform: translateY(-1px);
    }
    .ua-mm-mode-card.is-active {
      border-color: #fde047;
      background: linear-gradient(180deg, #523b10 0%, #2b1d07 100%);
      color: #fef08a;
      box-shadow: 0 3px 0 #070608, 0 0 16px rgba(250, 204, 21, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    .ua-mm-hero-card {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 8px;
      border-radius: 9px;
      border: 2px solid #2c2f38;
      background: linear-gradient(180deg, rgba(24, 27, 34, 0.96) 0%, rgba(13, 15, 20, 0.98) 100%);
      color: #e7e5e4;
      text-align: left;
      box-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
      cursor: pointer;
      transition: transform 0.1s ease, border-color 0.12s ease, background 0.12s ease;
    }
    .ua-mm-hero-card:hover {
      border-color: #fbbf24;
      transform: translateY(-1px);
    }
    .ua-mm-hero-card.is-active {
      border-color: #fde047;
      background: linear-gradient(135deg, rgba(120, 82, 16, 0.92) 0%, rgba(43, 29, 7, 0.96) 100%);
      color: #fef9c3;
      box-shadow: 0 2px 0 #070608, 0 0 12px rgba(250, 204, 21, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
    .ua-mm-hero-card.is-locked {
      opacity: 0.56;
      filter: grayscale(0.45);
    }
    .ua-mm-rank-badge {
      padding: 1px 6px;
      border-radius: 5px;
      background: #fbbf24;
      color: #1c1204;
      font-size: 10px;
      font-weight: 900;
      font-family: ui-monospace, monospace;
      box-shadow: 0 1px 0 #070608;
      flex-shrink: 0;
    }
    .ua-mm-close-btn {
      padding: 8px 18px;
      border-radius: 8px;
      border: 2px solid #44403c;
      background: linear-gradient(180deg, #22252d 0%, #14161c 100%);
      color: #e7e5e4;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
      box-shadow: 0 2px 0 #070608;
      cursor: pointer;
      transition: border-color 0.12s ease, color 0.12s ease;
    }
    .ua-mm-close-btn:hover {
      border-color: #fbbf24;
      color: #fef3c7;
    }
    .ua-pf-portrait.is-pixel {
      image-rendering: pixelated;
      object-fit: contain;
      object-position: center;
    }
    .ua-pf-ach-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 13px;
      border-radius: 11px;
      border: 2px solid #2b2931;
      background: linear-gradient(180deg, rgba(20, 22, 28, 0.94) 0%, rgba(11, 12, 16, 0.98) 100%);
      box-shadow: 0 3px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
      transition: transform 0.12s ease, border-color 0.12s ease;
    }
    .ua-pf-ach-card.is-unlocked {
      border-color: rgba(251, 191, 36, 0.72);
      background: linear-gradient(180deg, rgba(39, 31, 15, 0.92) 0%, rgba(17, 15, 11, 0.98) 100%);
      box-shadow: 0 4px 0 rgba(0, 0, 0, 0.58), 0 0 18px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }
    .ua-pf-hero-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 9px;
      border-radius: 999px;
      border: 1.5px solid #3f3b36;
      background: rgba(15, 16, 20, 0.92);
      color: #d6d3d1;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
    }
    .ua-pf-hero-pill:hover {
      border-color: #fbbf24;
      color: #fef3c7;
    }
    .ua-pf-hero-pill.is-active {
      border-color: #fde047;
      background: rgba(120, 82, 16, 0.85);
      color: #fef08a;
      box-shadow: 0 0 10px rgba(250, 204, 21, 0.22);
    }
    /* ==================== LARGE-SCREEN / 2K+ DESKTOP UI SCALING (COMBAT MODAL + BOTTOM HUD) ==================== */
    @media (min-width: 1480px) and (min-height: 840px) {
      .fs-viewer-hud {
        bottom: calc(var(--my-hud-bottom, 8px) + 6px);
        gap: 10px;
      }
      .fs-hud-left-wing,
      .fs-hud-right-wing {
        padding: 10px 13px 9px;
      }
      .hero-hud-wrap {
        width: 90px !important;
      }
      #viewer-hero-avatar {
        width: 72px !important;
        height: 72px !important;
      }
      #combat-modal-window {
        max-width: min(94vw, 1260px) !important;
      }
      #combat-modal-window .px-combat-header {
        padding: 14px 24px !important;
      }
      #combat-modal-window .px-combat-header > div:first-child {
        font-size: 18px;
      }
      #combat-modal-window .px-battle-stage {
        height: 212px;
      }
      #combat-modal-window #combat-stage-atk-wrap img,
      #combat-modal-window #combat-stage-def-wrap img {
        width: 114px !important;
        height: 114px !important;
      }
      #combat-modal-window .um-card.lg {
        width: 212px;
        height: 294px;
      }
      #combat-modal-window .um-card.um-official.lg {
        --oc-pad: 6px;
        --oc-pen-w: 38px;
        --oc-boost: 32px;
        --oc-title-sz: 14.8px;
        --oc-body-sz: 11.4px;
        --oc-val-sz: 20.5px;
        --oc-owner-sz: 11px;
        --oc-foot-sz: 9.6px;
        --oc-icon-sz: 16px;
        --oc-notch: 7px;
      }
    }
    @media (min-width: 2100px) and (min-height: 1100px) {
      .fs-viewer-hud {
        bottom: calc(var(--my-hud-bottom, 8px) + 10px);
        gap: 12px;
      }
      .hero-hud-wrap {
        width: 102px !important;
      }
      #viewer-hero-avatar {
        width: 82px !important;
        height: 82px !important;
      }
      #combat-modal-window {
        max-width: min(92vw, 1440px) !important;
      }
      #combat-modal-window .px-battle-stage {
        height: 244px;
      }
      #combat-modal-window #combat-stage-atk-wrap img,
      #combat-modal-window #combat-stage-def-wrap img {
        width: 132px !important;
        height: 132px !important;
      }
      #combat-modal-window .um-card.lg {
        width: 242px;
        height: 334px;
      }
      #combat-modal-window .um-card.um-official.lg {
        --oc-pad: 7px;
        --oc-pen-w: 43px;
        --oc-boost: 36px;
        --oc-title-sz: 16.8px;
        --oc-body-sz: 12.8px;
        --oc-val-sz: 24px;
        --oc-owner-sz: 12.2px;
        --oc-foot-sz: 10.8px;
        --oc-icon-sz: 18px;
        --oc-notch: 8px;
      }
    }
    /* ==================== MOBILE & IPAD LANDSCAPE / SHORT-VIEWPORT MODAL FIX ==================== */
    .ua-modal-scroll {
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }
    :where(.px-win-modal, .px-combat-modal, .ua-win-modal) {
      max-width: 96vw;
    }
    .px-win-modal,
    .px-combat-modal,
    .ua-win-modal {
      max-height: 94dvh !important;
    }
    @media (max-width: 640px) {
      .px-win-modal,
      .px-combat-modal,
      .ua-win-modal {
        max-width: 96vw;
      }
    }
    @media (max-height: 760px) {
      .px-win-modal,
      .px-combat-modal,
      .ua-win-modal {
        max-height: 96dvh !important;
      }
      .ua-win-modal .win-stage-wrap {
        width: min(100%, calc(38dvh * 16 / 9));
        height: auto !important;
        min-height: 0 !important;
      }
      .px-combat-modal {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
      }
      .px-combat-modal .px-combat-header {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
      }
    }
    @media (max-height: 540px) {
      .px-win-modal,
      .px-combat-modal,
      .ua-win-modal {
        max-height: 98dvh !important;
      }
      .ua-win-modal {
        padding: 10px 12px !important;
      }
      .ua-win-modal .win-stage-wrap {
        width: min(100%, calc(32dvh * 16 / 9));
        height: auto !important;
        min-height: 0 !important;
      }
      .px-win-modal > .shrink-0,
      .px-win-modal .px-3.py-2\.5,
      .px-win-modal .px-4.py-3,
      .px-win-modal .px-5.py-3 {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
      }
    }

    /* ==================== HUANG WEIREN TAOFENG DRAMATIC CHOICE MODAL ==================== */
    @keyframes uaWeaselChomp {
      0% { transform: scale(1.36) translateY(-18px) rotate(-3deg); opacity: 0; }
      55% { transform: scale(0.95) translateY(3px) rotate(1.5deg); opacity: 1; }
      78% { transform: scale(1.05) translateY(-2px) rotate(-1deg); }
      100% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
    }
    @keyframes uaWeaselGrowl {
      0%, 100% { transform: translate(0, 0) scale(1); }
      25% { transform: translate(-1px, 1px) scale(1.015); }
      50% { transform: translate(1px, -1px) scale(1); }
      75% { transform: translate(-1px, -1px) scale(1.012); }
    }
    @keyframes uaWeaselShake {
      0%, 100% { transform: translateX(0) rotate(0deg); }
      20% { transform: translateX(-6px) rotate(-2.5deg) scale(1.05); }
      40% { transform: translateX(6px) rotate(2.5deg) scale(1.05); }
      60% { transform: translateX(-4px) rotate(-1.5deg) scale(1.03); }
      80% { transform: translateX(4px) rotate(1.5deg); }
    }
    .ua-taofeng-window {
      max-width: min(940px, 96vw);
      width: 100%;
      max-height: 92dvh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .ua-taofeng-window.is-forced {
      box-shadow:
        0 0 0 2px #261010,
        0 0 42px rgba(239, 68, 68, 0.42),
        0 28px 72px rgba(0, 0, 0, 0.94);
    }
    .ua-choose-context-bar {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 8px 16px;
      border-bottom: 1px solid color-mix(in srgb, var(--ui-accent, #d4a44a) 35%, transparent);
      background: linear-gradient(180deg, color-mix(in srgb, var(--win-bg-top, #16120f) 96%, #000) 0%, color-mix(in srgb, var(--win-bg-bot, #0b0a09) 96%, #000) 100%);
      flex-shrink: 0;
    }
    .ua-choose-card-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 8px;
      background: rgba(8, 8, 10, 0.62);
      border: 1px solid color-mix(in srgb, var(--ui-accent, #d4a44a) 32%, rgba(255,255,255,0.14));
    }
    .ua-choose-stats-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }
    .ua-choose-stat-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 9px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
      background: rgba(12, 11, 14, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: #e7e5e4;
    }
    .ua-choose-stat-pill.is-owner {
      border-color: color-mix(in srgb, var(--ui-accent, #d4a44a) 62%, transparent);
      color: var(--ui-accent-light, #fde68a);
    }
    .ua-choose-stat-pill.is-chooser {
      border-color: rgba(56, 189, 248, 0.55);
      color: #bae6fd;
    }
    .ua-opp-pick-card {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 2px solid color-mix(in srgb, var(--ui-border, rgba(212, 164, 74, 0.45)) 85%, transparent);
      background: linear-gradient(165deg, color-mix(in srgb, var(--win-bg-top, #1c1611) 94%, #000) 0%, color-mix(in srgb, var(--win-bg-bot, #0c0a08) 97%, #000) 100%);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      text-align: left;
      transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
      cursor: pointer;
    }
    .ua-opp-pick-card:hover {
      transform: translateY(-2px);
      border-color: var(--ui-accent, #fbbf24);
      box-shadow: 0 12px 26px rgba(0, 0, 0, 0.65), 0 0 16px color-mix(in srgb, var(--ui-accent, #fbbf24) 28%, transparent);
    }
    .ua-taofeng-stage {
      position: relative;
      z-index: 2;
      display: grid;
      grid-template-columns: minmax(170px, 1fr) minmax(248px, 336px) minmax(170px, 1fr);
      gap: 14px;
      align-items: center;
      padding: 12px 16px 16px;
      overflow-y: auto;
      background-color: color-mix(in srgb, var(--win-bg-top, #16120f) 92%, #000);
      background-image:
        radial-gradient(ellipse at 50% 24%, color-mix(in srgb, var(--ui-accent, #d4a44a) 16%, transparent) 0%, transparent 62%),
        linear-gradient(180deg, color-mix(in srgb, var(--win-bg-top, #16120f) 84%, transparent) 0%, color-mix(in srgb, var(--win-bg-bot, #0b0a09) 93%, transparent) 100%),
        var(--win-stage-img, none);
      background-size: cover, cover, cover;
      background-position: center, center, center;
    }
    @media (max-width: 760px) {
      .ua-taofeng-stage {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 12px 14px 16px;
      }
      .ua-taofeng-center-col {
        grid-column: 1 / -1;
        order: -1;
      }
    }
    .ua-taofeng-center-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .ua-taofeng-art-frame {
      position: relative;
      width: min(240px, 100%);
      aspect-ratio: 3 / 4;
      max-height: 30dvh;
      padding: 8px;
      border-radius: 10px;
      background: linear-gradient(145deg, color-mix(in srgb, var(--ui-accent, #d4a44a) 22%, var(--win-bg-top, #181411)) 0%, var(--win-bg-bot, #0b0a09) 100%);
      border: 3px solid var(--win-border, var(--ui-accent, #d4a44a));
      box-shadow:
        inset 0 0 0 2px #0b0907,
        0 10px 28px rgba(0, 0, 0, 0.85),
        0 0 24px color-mix(in srgb, var(--ui-accent, #d4a44a) 30%, transparent);
    }
    .ua-taofeng-window.is-forced .ua-taofeng-art-frame {
      border-color: #f87171;
      box-shadow:
        inset 0 0 0 2px #140808,
        0 10px 28px rgba(0, 0, 0, 0.9),
        0 0 28px rgba(239, 68, 68, 0.42);
    }
    .ua-taofeng-art-inner {
      position: relative;
      width: 100%;
      height: 100%;
      border-radius: 6px;
      overflow: hidden;
      border: 2px solid #090807;
      background: #060606;
    }
    .ua-taofeng-art-inner img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 22%;
      image-rendering: pixelated;
    }
    .ua-taofeng-question {
      width: 100%;
      text-align: center;
      padding: 8px 12px;
      border-radius: 8px;
      background: color-mix(in srgb, var(--win-bg-bot, #0b0a09) 88%, transparent);
      border: 1.5px solid color-mix(in srgb, var(--ui-accent, #d4a44a) 55%, transparent);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.45);
    }
    .ua-taofeng-effect-box {
      width: 100%;
      text-align: center;
      padding: 8px 12px;
      border-radius: 8px;
      background: linear-gradient(180deg, color-mix(in srgb, var(--ui-accent, #d4a44a) 18%, var(--win-bg-top, #181411)) 0%, color-mix(in srgb, var(--win-bg-bot, #0b0a09) 92%, #000) 100%);
      border: 1.5px solid color-mix(in srgb, var(--ui-accent-light, #fde68a) 62%, transparent);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    }
    .ua-taofeng-opt-wrap {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      min-width: 0;
      min-height: 184px;
    }
    .ua-taofeng-opt-btn {
      position: relative;
      width: 100%;
      min-width: 0;
      min-height: 182px;
      padding: 16px 14px !important;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      gap: 8px;
      cursor: pointer;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .ua-taofeng-opt-btn:disabled {
      cursor: not-allowed;
    }
    .ua-taofeng-opt-btn.is-bitten-locked {
      filter: grayscale(0.75) brightness(0.45) !important;
      transform: rotate(-1.2deg) !important;
    }
    .ua-taofeng-weasel-clamp {
      position: absolute;
      inset: -22px -12px -16px;
      z-index: 6;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: not-allowed;
      animation: uaWeaselChomp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .ua-taofeng-weasel-clamp.is-shaking .ua-taofeng-weasel-img {
      animation: uaWeaselShake 0.36s ease-in-out !important;
    }
    .ua-taofeng-weasel-img {
      width: min(198px, 88%);
      max-height: 196px;
      object-fit: contain;
      image-rendering: pixelated;
      filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.92)) drop-shadow(0 0 18px rgba(239, 68, 68, 0.5));
      animation: uaWeaselGrowl 1.9s steps(4, end) 0.4s infinite;
      pointer-events: none;
    }
    .ua-taofeng-bite-tag {
      margin-top: -10px;
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(127, 29, 29, 0.96);
      border: 1.5px solid #fca5a5;
      color: #fef2f2;
      font-size: 10.5px;
      font-weight: 900;
      letter-spacing: 0.04em;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
      pointer-events: none;
    }
    @media (max-width: 760px) {
      .ua-taofeng-opt-wrap { min-height: 132px; }
      .ua-taofeng-opt-btn { min-height: 128px; padding: 12px 10px; }
      .ua-taofeng-weasel-img { width: min(142px, 84%); max-height: 136px; }
    }

    /* Smash Character Select Multi-Line Hero Name Wrap */
    .smash-tile-name {
      font-size: 10.5px;
      line-height: 1.18;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      max-width: 100%;
    }

    /* PLAN A: CLEAN FULLSCREEN LIVING LOUNGE MAIN MENU + UNIFIED FLYOUT MENUS */
    .ua-clean-lobby-shell {
      position: relative;
      width: 100%;
      overflow-x: clip;
      overflow-y: hidden;
      background-size: cover;
      background-position: center;
    }
    .ua-clean-scrim {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(8, 9, 14, 0.88) 0%, rgba(8, 9, 14, 0.42) 28%, rgba(8, 9, 14, 0.04) 55%, rgba(8, 9, 14, 0.14) 100%),
        linear-gradient(180deg, rgba(8, 9, 14, 0.18) 0%, rgba(8, 9, 14, 0) 24%, rgba(8, 9, 14, 0.22) 78%, rgba(8, 9, 14, 0.68) 100%);
    }
    .ua-clean-left-rail {
      position: relative;
      box-sizing: border-box;
      z-index: 45;
      width: 100%;
      height: 100%;
      overflow: visible !important;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: clamp(10px, 1.35vh, 18px) 16px clamp(12px, 1.6vh, 20px) 18px;
      background: linear-gradient(90deg, rgba(8, 10, 16, 0.84) 0%, rgba(10, 12, 20, 0.66) 82%, rgba(10, 12, 20, 0.0) 100%);
    }
    .ua-rail-inner {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: clamp(8px, 1.35vh, 16px);
      height: 100%;
      min-height: 0;
    }
    .ua-rail-theme-cover {
      height: clamp(58px, 7.6vh, 88px);
    }
    .ua-rail-nav-stack {
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: clamp(8px, 1.35vh, 18px);
      padding: clamp(2px, 0.5vh, 8px) 0;
      min-height: 0;
    }
    .ua-rail-solo-group {
      flex: 1.32 1 0;
      min-height: clamp(88px, 11.4vh, 140px);
      max-height: 162px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: clamp(6px, 0.85vh, 10px);
    }
    .ua-rail-nav-stack > .ua-nav-flyout-wrap,
    .ua-rail-nav-stack > .ua-clean-nav-btn {
      flex: 1 1 0;
      min-height: clamp(54px, 7.2vh, 96px);
      max-height: 108px;
    }
    .ua-rail-nav-stack > .ua-nav-flyout-wrap {
      display: flex;
    }
    .ua-rail-nav-stack > .ua-nav-flyout-wrap > .ua-clean-nav-btn {
      height: 100%;
      min-height: 0;
    }
    .ua-rail-cta-btn {
      flex: 1 1 auto;
      min-height: clamp(50px, 6.6vh, 84px);
      font-size: clamp(16px, 1.12vw, 20px);
    }
    .ua-rail-mode-strip button {
      min-height: clamp(30px, 3.8vh, 44px);
      font-size: clamp(11.5px, 0.80vw, 13.5px);
    }
    .ua-rail-btn-title {
      font-size: clamp(15px, 1.04vw, 19px);
    }
    .ua-rail-btn-sub {
      font-size: clamp(11px, 0.76vw, 13px);
    }
    .ua-rail-profile-card {
      width: 100%;
      padding: clamp(8px, 1.1vh, 13px) 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      text-align: left;
    }
    .ua-rail-xp-bar {
      width: 100%;
      height: 6px;
      border-radius: 999px;
      background: rgba(0, 0, 0, 0.55);
      border: 1px solid rgba(255, 255, 255, 0.14);
      overflow: hidden;
    }
    .ua-rail-xp-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--ui-accent, #f59e0b), var(--ui-accent-light, #fde68a));
      transition: width 0.25s ease;
    }
    .ua-rail-profile-stats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }
    .ua-rail-bottom-btn {
      min-height: clamp(34px, 4.1vh, 44px);
      font-size: clamp(11.5px, 0.80vw, 13px);
    }
    .ua-workbench-lounge-panel {
      display: flex;
      flex-direction: column;
      height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .ua-workbench-cards-scroll {
      flex: 1 1 0%;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 16px 14px 26px 14px;
    }
    .ua-clean-stage-wrap {
      position: relative;
      width: 100%;
      min-height: 440px;
      z-index: 12;
      overflow: hidden;
    }
    .ua-clean-focus-wrap {
      position: relative;
      width: 100%;
      padding: 0 16px;
      margin: 10px 0;
      z-index: 35;
    }
    .ua-clean-hero-img-focus { width: 256px; height: 256px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-clean-hero-img-idle { width: 216px; height: 216px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-clean-sk-img { width: 152px; height: 152px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-clean-sk-stand-img { width: 320px; height: 320px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-workbench-sk-stand-img { width: 156px; height: 156px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-combat-stand-img { width: 118px; height: 118px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    @media (min-width: 640px) {
      .ua-combat-stand-img { width: 138px; height: 138px; }
    }
    .ua-clean-zombie-img { width: 212px; height: 212px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
    .ua-clean-stage-wrap .lounge-px-shadow {
      width: 92px;
      height: 10px;
      margin-top: -16px;
    }
    .ua-clean-cat-tree {
      position: absolute !important;
      right: 16px;
      bottom: 56px;
      z-index: 15 !important;
      transform: scale(1.45);
      transform-origin: bottom right;
    }
    @media (min-width: 1024px) {
      .ua-clean-left-rail {
        width: clamp(328px, 23.5vw, 384px);
        border-right: 1px solid color-mix(in srgb, var(--ui-accent, #fbbf24) 28%, transparent);
      }
      .ua-workbench-shell {
        overflow: hidden;
      }
      .ua-workbench-grid {
        display: flex;
        align-items: stretch;
        height: 100%;
        width: 100%;
      }
      .ua-workbench-left-rail {
        width: clamp(328px, 23.5vw, 384px);
        height: 100%;
        z-index: 60;
        background: linear-gradient(180deg, rgba(10, 12, 18, 0.90) 0%, rgba(8, 10, 15, 0.92) 100%);
        border-right: 1px solid color-mix(in srgb, var(--ui-accent, #fbbf24) 30%, transparent);
      }
      .ua-workbench-right-pane {
        height: 100%;
        padding: 12px 14px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      .ua-clean-stage-wrap {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: clamp(328px, 23.5vw, 384px);
        width: auto;
        min-height: 0;
      }
      .ua-clean-cat-tree {
        right: 34px;
        bottom: 74px;
        transform: scale(2.25);
      }
      .ua-clean-focus-wrap {
        position: absolute;
        top: 16px;
        right: 20px;
        width: 356px;
        padding: 0;
        margin: 0;
        z-index: 35;
      }
    }
    @media (min-width: 1440px) {
      .ua-clean-hero-img-focus { width: 296px; height: 296px; }
      .ua-clean-hero-img-idle { width: 248px; height: 248px; }
      .ua-clean-sk-img { width: 176px; height: 176px; }
      .ua-clean-sk-stand-img { width: 368px; height: 368px; }
      .ua-clean-cat-tree {
        right: 44px;
        bottom: 78px;
        transform: scale(2.55);
      }
    }
    @media (min-width: 1024px) and (max-height: 760px) {
      .ua-clean-cat-tree {
        right: 30px;
        bottom: 64px;
        transform: scale(1.85);
      }
    }
    @media (min-width: 1024px) and (max-width: 1279px) {
      .ua-workbench-left-rail {
        width: clamp(268px, 24.5vw, 316px);
      }
      .ua-workbench-right-pane {
        overflow-y: auto;
        overflow-x: hidden;
        padding: 10px 12px 16px 12px;
      }
      .ua-workbench-lounge-panel {
        height: auto;
        min-height: 100%;
        overflow: visible;
      }
      .ua-workbench-cards-scroll {
        flex: 0 0 auto;
        overflow: visible;
        padding: 12px 6px 18px 6px;
      }
    }
    @media (min-width: 1280px) and (max-height: 759px) {
      .ua-workbench-right-pane {
        overflow-y: auto;
        overflow-x: hidden;
      }
      .ua-workbench-lounge-panel {
        height: auto;
        min-height: 100%;
        overflow: visible;
      }
      .ua-workbench-cards-scroll {
        flex: 0 0 auto;
        overflow: visible;
      }
    }
    @media (max-width: 1023px) {
      .ua-workbench-shell {
        overflow-y: auto;
      }
      .ua-workbench-grid {
        display: flex;
        flex-direction: column;
        height: auto;
      }
      .ua-workbench-left-rail {
        width: 100%;
        height: auto;
      }
      .ua-workbench-right-pane {
        padding: 10px 12px 18px 12px;
        overflow: visible;
      }
      .ua-workbench-lounge-panel {
        height: auto;
        overflow: visible;
      }
      .ua-workbench-cards-scroll {
        overflow: visible;
        padding: 10px 4px 12px 4px;
      }
      .ua-rail-solo-group,
      .ua-rail-nav-stack > .ua-nav-flyout-wrap,
      .ua-rail-nav-stack > .ua-clean-nav-btn {
        flex: 0 0 auto;
        max-height: none;
      }
    }
    @media (max-height: 780px) {
      .ua-rail-profile-stats {
        display: none;
      }
      .ua-rail-nav-stack {
        gap: 6px;
      }
      .ua-rail-solo-group {
        min-height: 78px;
      }
      .ua-clean-nav-btn,
      .ua-rail-nav-stack > .ua-nav-flyout-wrap,
      .ua-rail-nav-stack > .ua-clean-nav-btn {
        min-height: 46px;
      }
      .ua-rail-theme-cover {
        height: 50px;
      }
    }
    .ua-clean-nav-btn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
      min-height: clamp(54px, 7.2vh, 96px);
      padding: clamp(10px, 1.35vh, 18px) clamp(14px, 1.15vw, 20px);
      text-align: left;
      transition: transform 0.14s ease, filter 0.15s ease, border-color 0.15s ease;
    }
    :root:not([data-theme="minecraft"]) .px-theme-btn.ua-clean-nav-btn,
    :root[data-theme] .px-theme-btn.ua-clean-nav-btn {
      border-image-repeat: stretch !important;
    }
    .ua-clean-nav-btn:hover {
      transform: translateX(4px);
    }

    /* Hover Flyout Pop-Up Submenus for Unified Left Navigation (Clean & Workbench) */
    .ua-nav-flyout-wrap {
      position: relative;
      z-index: 40;
    }
    .ua-nav-flyout-wrap:hover,
    .ua-nav-flyout-wrap:focus-within {
      z-index: 85;
    }
    .ua-nav-flyout-popover {
      position: absolute;
      top: -6px;
      left: 100%;
      padding-left: 12px;
      z-index: 95;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateX(-8px);
      transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
    }
    .ua-nav-flyout-wrap:hover > .ua-nav-flyout-popover,
    .ua-nav-flyout-wrap:focus-within > .ua-nav-flyout-popover {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateX(0);
    }
    .ua-nav-flyout-panel {
      min-width: 248px;
      padding: 10px;
    }
    @media (max-width: 1023px) {
      .ua-clean-lobby-shell {
        overflow-y: auto;
      }
      .ua-clean-left-rail {
        height: auto;
        padding: 10px 12px 12px 12px;
      }
      .ua-rail-inner {
        height: auto;
        gap: 8px;
      }
      .ua-rail-nav-stack {
        flex: 0 0 auto;
        gap: 8px;
      }
      .ua-clean-stage-wrap {
        min-height: 280px;
      }
      .ua-nav-flyout-popover {
        display: none !important;
        top: 100%;
        left: 0;
        right: 0;
        padding-left: 0;
        padding-top: 6px;
        transform: translateY(-4px);
      }
      .ua-nav-flyout-wrap:hover > .ua-nav-flyout-popover,
      .ua-nav-flyout-wrap:focus-within > .ua-nav-flyout-popover {
        transform: translateY(0);
      }
    }
    @media (max-width: 767px) {
      #lobby-topbar {
        padding: 5px 8px !important;
        gap: 4px !important;
      }
      #lobby-topbar button {
        min-height: 30px;
        padding: 3px 7px;
        font-size: 11px;
      }
      .ua-clean-nav-btn {
        min-height: 46px;
        padding: 8px 12px;
      }
      .ua-clean-focus-wrap {
        padding: 0 12px;
        margin: 8px 0 4px;
      }
      .ua-clean-stage-wrap {
        min-height: 260px;
        height: 276px;
      }
      .ua-clean-hero-img-focus { width: 138px; height: 138px; }
      .ua-clean-hero-img-idle { width: 112px; height: 112px; }
      .ua-clean-sk-img { width: 86px; height: 86px; }
      .ua-clean-sk-stand-img { width: 158px; height: 158px; }
      .ua-clean-zombie-img { width: 112px; height: 112px; }
      .ua-clean-cat-tree {
        right: 8px;
        bottom: 38px;
        transform: scale(1.08);
      }
    }
    @media (max-width: 768px) {
      .fs-hud-tl {
        top: 4px;
        left: 4px;
        max-width: calc(100vw - 8px);
        gap: 4px;
      }
      .fs-hud-tl [data-turn-capsule="1"] {
        max-width: 53vw;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 4px;
        padding: 2px 7px;
        height: 28px;
        white-space: nowrap;
      }
      .fs-hud-tl [data-turn-capsule="1"] > * {
        white-space: nowrap;
        flex-shrink: 0;
      }
      .fs-hud-tr {
        top: 4px;
        right: 4px;
        max-width: 64vw;
        gap: 3px;
      }
      .fs-hud-tr-row1 {
        flex-wrap: nowrap;
        gap: 3px;
        max-width: 64vw;
        overflow-x: auto;
        scrollbar-width: none;
      }
      .fs-hud-tr-row1 .fs-capsule {
        height: 26px;
        padding: 2px 6px;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .fs-hud-tr-toolbar {
        max-width: 64vw;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 3px;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 3px 6px;
        min-height: 26px;
        border-radius: 999px;
      }
      .fs-hud-tr-toolbar > *,
      .fs-hud-tr-compact-pill > * {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
      }
      .fs-hud-tr-toolbar > button {
        display: inline-flex !important;
        align-items: center !important;
        gap: 2px !important;
        height: 20px !important;
        min-height: 0 !important;
        line-height: 1 !important;
        padding: 2px 6px !important;
        font-size: 10px !important;
        border-image-width: 4px !important;
      }
      .fs-hud-tl .live-action-feed {
        margin-top: 2px;
        max-width: min(230px, 44vw);
      }
      .live-feed-box .live-feed-list:not(.is-expanded) {
        max-height: 62px;
      }
      .fs-hud-tl .fs-capsule,
      .fs-hud-tr .fs-capsule {
        font-size: 9.5px;
        padding: 2px 6px;
      }
      .fs-viewer-hud {
        max-width: 100vw;
        gap: 4px;
        padding: 0 3px;
      }
      .fs-hud-tray {
        min-width: 0;
        max-width: calc(100vw - 68px);
        padding: 4px 6px;
        gap: 4px;
        border-radius: 10px;
      }
      .fs-hud-left-wing,
      .fs-hud-right-wing {
        padding: 4px 5px;
        gap: 4px;
        border-radius: 10px;
      }
    }
    @media (max-width: 640px) {
      #lobby-topbar {
        padding: 4px 8px;
        gap: 4px;
      }
      #lobby-topbar .ua-topbar-actions .px-theme-btn {
        padding: 3px 7px;
        font-size: 11px;
      }
      .fs-hud-seat-label {
        display: none;
      }
    }
    @media (max-width: 520px) {
      .hero-hud-wrap {
        width: 52px !important;
      }
      #viewer-hero-avatar {
        width: 44px !important;
        height: 44px !important;
      }
      .fs-my-pile-size {
        width: 50px !important;
        height: 70px !important;
      }
      #fan-hand-zone {
        min-width: 0;
        flex: 1;
        padding-left: 6px;
      }
      #fan-hand-zone .um-card {
        width: 78px !important;
        height: 110px !important;
      }
      .hud-sidekick-dock {
        display: none;
      }
    }

    /* ==================== MOBILE LANDSCAPE ANTI-OVERLAP + FLOATING BOARD PAN JOYSTICK ==================== */
    .board-joystick-dock {
      position: fixed;
      right: 12px;
      bottom: 308px;
      z-index: 34;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
    }
    .match-chat-anchor {
      right: 12px;
      bottom: 262px;
    }
    @media (min-height: 541px) and (max-height: 680px) {
      .board-joystick-dock {
        bottom: 248px;
      }
      .match-chat-anchor {
        bottom: 204px;
      }
    }
    .board-joystick-dock > * {
      pointer-events: auto;
    }
    .board-joystick-tools {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 3px 6px;
      border-radius: 999px;
      background: rgba(12, 16, 20, 0.92);
      border: 1.5px solid rgba(251, 191, 36, 0.52);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
    }
    .board-joystick-tools button {
      width: 22px;
      height: 22px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
      color: #fde68a;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.12s ease;
    }
    .board-joystick-tools button:hover,
    .board-joystick-tools button:active {
      background: rgba(251, 191, 36, 0.25);
    }
    .board-joystick-pad {
      width: 84px;
      height: 84px;
      border-radius: 999px;
      position: relative;
      touch-action: none;
      cursor: grab;
      background: radial-gradient(circle, rgba(16, 24, 20, 0.72) 0%, rgba(8, 12, 10, 0.9) 100%);
      border: 2px solid rgba(251, 191, 36, 0.58);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.68), inset 0 0 14px rgba(251, 191, 36, 0.16);
    }
    .board-joystick-pad.is-active {
      cursor: grabbing;
      border-color: rgba(253, 224, 71, 0.9);
    }
    .bj-dir {
      position: absolute;
      font-size: 9px;
      line-height: 1;
      color: rgba(253, 230, 138, 0.55);
      pointer-events: none;
      font-weight: 900;
    }
    .bj-up { top: 5px; left: 50%; transform: translateX(-50%); }
    .bj-dn { bottom: 5px; left: 50%; transform: translateX(-50%); }
    .bj-lt { left: 6px; top: 50%; transform: translateY(-50%); }
    .bj-rt { right: 6px; top: 50%; transform: translateY(-50%); }
    .board-joystick-nub {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 34px;
      height: 34px;
      margin-left: -17px;
      margin-top: -17px;
      border-radius: 999px;
      background: radial-gradient(circle at 35% 30%, #fde68a 0%, #f59e0b 55%, #b45309 100%);
      border: 2px solid #fffbeb;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.72), 0 0 12px rgba(251, 191, 36, 0.5);
      pointer-events: none;
      will-change: transform;
      transition: transform 0.12s ease-out;
    }
    .board-joystick-pad.is-active .board-joystick-nub {
      transition: none;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.82), 0 0 18px rgba(253, 224, 71, 0.85);
    }
    @keyframes uaPhoneTilt {
      0%, 18% { transform: rotate(0deg); }
      45%, 78% { transform: rotate(-90deg); }
      100% { transform: rotate(0deg); }
    }
    .ua-rotate-guard {
      position: fixed;
      inset: 0;
      z-index: 95;
      background: rgba(8, 10, 14, 0.88);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    .ua-rotate-card {
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88);
    }
    .ua-rotate-phone-icon {
      display: inline-block;
      animation: uaPhoneTilt 2.4s ease-in-out infinite;
    }
    @media (max-height: 540px) and (pointer: coarse), (max-height: 480px) {
      .fs-viewer-hud {
        bottom: 2px !important;
        gap: 4px !important;
        max-width: 99vw !important;
        padding: 0 3px !important;
      }
      .fs-hud-tray {
        min-width: 0 !important;
        padding: 4px 8px 3px !important;
        gap: 10px !important;
        border-radius: 10px !important;
      }
      .fs-hud-left-wing,
      .fs-hud-right-wing {
        padding: 3px 5px !important;
        gap: 4px !important;
        border-radius: 10px !important;
      }
      .fs-hud-right-wing [data-resource-counter] {
        min-width: 48px !important;
        max-width: 74px !important;
        padding: 2px 5px !important;
        border-radius: 8px !important;
      }
      .fs-hud-right-wing [data-resource-counter] > div:first-child {
        font-size: 8px !important;
      }
      .fs-hud-right-wing [data-resource-counter] > div:last-child {
        font-size: 11px !important;
        margin-top: 1px !important;
      }
      .fs-viewer-hand {
        padding: 0 14px 1px !important;
      }
      .fs-viewer-hand .um-card.um-official {
        --oc-pad: 2px;
        --oc-pen-w: 15px;
        --oc-boost: 13px;
        --oc-title-sz: 7.4px;
        --oc-body-sz: 5.8px;
        --oc-val-sz: 9.5px;
        --oc-owner-sz: 5.8px;
        --oc-foot-sz: 5.2px;
        --oc-icon-sz: 8px;
        --oc-notch: 4px;
      }
      .hero-hud-wrap {
        width: 46px !important;
      }
      #viewer-hero-avatar {
        width: 36px !important;
        height: 36px !important;
      }
      .hero-ap-anchor {
        bottom: calc(100% + 4px) !important;
        transform: translateX(-50%) scale(0.68) !important;
        transform-origin: bottom center !important;
      }
      .hud-sidekick-dock {
        max-width: 82px !important;
        padding: 2px 4px !important;
        gap: 3px !important;
      }
      .viewer-hp-front-bar {
        width: min(156px, 58%) !important;
        min-width: 92px !important;
        height: 11px !important;
        font-size: 8.5px !important;
        bottom: calc(100% + 26px * var(--my-card-scale, 1) * var(--big-hud-mult, 1)) !important;
      }
      .fs-hud-tl {
        top: 4px !important;
        left: 4px !important;
        max-width: 46vw !important;
        gap: 3px !important;
      }
      .fs-hud-tl [data-turn-capsule="1"] {
        max-width: 45vw !important;
        height: 22px !important;
        padding: 1px 6px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
      }
      .fs-hud-tr {
        top: 4px !important;
        right: 4px !important;
        max-width: 62vw !important;
        gap: 3px !important;
      }
      .fs-hud-tr-row1 {
        flex-wrap: nowrap !important;
        max-width: 62vw !important;
        overflow-x: auto !important;
        scrollbar-width: none;
      }
      .fs-hud-tr-toolbar {
        max-width: 62vw !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none;
        padding: 2px 5px !important;
        min-height: 24px !important;
      }
      .fs-hud-tr-toolbar > *,
      .fs-hud-tr-compact-pill > * {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
      }
      .fs-hud-tr-toolbar > button {
        display: inline-flex !important;
        align-items: center !important;
        height: 20px !important;
        min-height: 0 !important;
        line-height: 1 !important;
        padding: 2px 6px !important;
        font-size: 10px !important;
      }
      .fs-hud-tl .live-action-feed {
        max-width: min(210px, 38vw) !important;
        margin-top: 2px !important;
      }
      .live-feed-box .live-feed-list:not(.is-expanded) {
        max-height: 40px !important;
      }
      #campaign-instructor-dock {
        width: min(210px, 32vw) !important;
        max-height: 44dvh !important;
        overflow-y: auto !important;
        top: 32px !important;
        left: 4px !important;
      }
      .fs-sidebar-drawer {
        z-index: 52 !important;
        width: min(290px, 76vw) !important;
      }
      #card-zoom-modal .ua-zoom-card-box {
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 10px 12px !important;
        max-height: 94dvh !important;
        overflow-y: auto !important;
      }
      #card-zoom-modal .um-card.xl {
        width: 192px !important;
        height: 268px !important;
        flex-shrink: 0;
        align-self: center;
      }
      #card-zoom-modal .um-card.um-official.xl {
        --oc-pad: 5px;
        --oc-pen-w: 32px;
        --oc-boost: 26px;
        --oc-title-sz: 12.5px;
        --oc-body-sz: 9.2px;
        --oc-val-sz: 17px;
        --oc-owner-sz: 9px;
        --oc-foot-sz: 8px;
        --oc-icon-sz: 16px;
        --oc-notch: 8px;
      }
      #card-zoom-modal .ua-zoom-card-info {
        max-height: 82dvh !important;
      }
      .board-joystick-dock {
        right: 6px;
        bottom: 108px;
        gap: 3px;
      }
      .match-chat-anchor {
        right: 6px;
        bottom: 200px;
      }
      .board-joystick-pad {
        width: 58px;
        height: 58px;
      }
      .board-joystick-nub {
        width: 22px;
        height: 22px;
        margin-left: -11px;
        margin-top: -11px;
      }
    }
    @media (max-height: 360px) {
      .board-joystick-dock {
        bottom: 94px;
      }
      .board-joystick-pad {
        width: 48px;
        height: 48px;
      }
      .match-chat-anchor {
        bottom: 170px;
      }
    }
    @media (max-height: 430px) {
      .hud-sidekick-dock {
        display: none !important;
      }
      .combat-feed-pinned {
        display: none !important;
      }
      .live-feed-box .live-feed-list:not(.is-expanded) {
        max-height: 36px !important;
      }
    }
