      .role-fade-ghost {
        position: fixed;
        pointer-events: none;
        z-index: 10008;
        opacity: 1;
        transition: opacity 1280ms ease, filter 1280ms ease;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        will-change: opacity, filter;
      }
      .role-fade-ghost.fade-out {
        opacity: 0;
        filter: blur(2px) brightness(0.95);
      }
      .save-panel {
        width: 100%;
        padding: 20px;
        background: rgba(30, 41, 59, 0.75);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
      }
      .settings-view {
        width: 840px;
      }
      .settings-sidebar-toprow {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .settings-shell {
        width: 100%;
        background: rgba(30, 41, 59, 0.75);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
        display: flex;
        height: calc(100vh - 80px);
        min-height: 520px;
      }
      .settings-sidebar {
        width: 220px;
        background: rgba(0, 20, 25, 0.7);
        border: 2px solid #0ff;
        border-left: none;
        border-top-left-radius: 16px;
        border-bottom-left-radius: 16px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        height: 100%;
      }
      .settings-content {
        flex: 1;
        padding: 24px;
        height: 100%;
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
      }
      .settings-content::-webkit-scrollbar { width: 0; height: 0; }
      .settings-shell, .settings-shell * { user-select: none; -webkit-user-select: none; -ms-user-select: none; }
      .settings-shell input, .settings-shell textarea, .settings-shell [contenteditable="true"] { user-select: text; -webkit-user-select: text; -ms-user-select: text; }
      #settings-panel-basic { display: none; }
      #settings-panel-battle { display: none; }
      #settings-panel-save { display: none; }
      .settings-card-mt16 { margin-top: 16px; }
      #keybind-wrap { margin-top: 10px; }
      .save-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }
      #settings-panel-save #cloud-auth-status {
        flex: 1;
        text-align: center;
        color: rgba(148, 163, 184, 0.95);
        font-size: 18px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 8px;
      }
      #save-sort-btn { min-width: 80px; }
      #save-add-btn { min-width: 100px; }
      #settings-panel-save { height: 100%; min-height: 0; position: relative; overflow: hidden; }
      #settings-panel-save > .settings-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
      }
      #save-advanced-toggle { display: none !important; }
      .account-mail-btn {
        position: absolute;
        right: 18px;
        bottom: 18px;
        width: 46px;
        height: 46px;
        border-radius: 14px;
        border: 2px solid rgba(0, 255, 255, 0.55);
        background: rgba(0, 20, 25, 0.55);
        color: rgba(0, 255, 255, 0.95);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        outline: none;
        transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
        z-index: 1100;
      }
      .account-mail-btn.kx-has-unclaimed::after {
        content: "";
        position: absolute;
        right: 8px;
        top: 8px;
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #ef4444;
        box-shadow: 0 0 0 2px rgba(0, 20, 25, 0.9);
      }
      .account-mail-btn:hover {
        border-color: rgba(0, 255, 255, 0.8);
        background: rgba(0, 20, 25, 0.7);
      }
      .account-mail-btn:active { transform: scale(0.98); }
      .kx-mail-modal, .kx-mail-modal * { user-select: none; -webkit-user-select: none; -ms-user-select: none; }
      .kx-mail-list {
        min-height: 180px;
        max-height: 360px;
        overflow: auto;
        padding: 10px 8px;
        background: rgba(0, 10, 15, 0.12);
        border-radius: 12px;
        scrollbar-color: rgba(0, 255, 255, 0.28) rgba(0, 10, 15, 0.25);
        scrollbar-width: thin;
      }
      .kx-mail-list::-webkit-scrollbar { width: 10px; }
      .kx-mail-list::-webkit-scrollbar-track {
        background: rgba(0, 10, 15, 0.25);
        border-radius: 999px;
      }
      .kx-mail-list::-webkit-scrollbar-thumb {
        background: rgba(0, 255, 255, 0.22);
        border-radius: 999px;
        border: 0;
      }
      .kx-mail-row {
        display: flex;
        gap: 10px;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid rgba(0, 255, 255, 0.18);
        background: rgba(0, 20, 25, 0.35);
        margin-bottom: 10px;
      }
      .kx-mail-main { flex: 1; min-width: 0; }
      .kx-mail-title { font-size: 16px; line-height: 1.25; color: rgba(226, 232, 240, 0.95); }
      .kx-mail-meta { margin-top: 2px; font-size: 12px; line-height: 1.2; color: rgba(148, 163, 184, 0.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .kx-mail-body { margin-top: 8px; font-size: 13px; line-height: 1.35; color: rgba(203, 213, 225, 0.9); max-height: 2.7em; overflow: hidden; }
      .kx-mail-actions { display: flex; flex-direction: column; gap: 8px; }
      .kx-mail-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 22px;
        padding: 0 10px;
        border-radius: 999px;
        border: 1px solid rgba(0, 255, 255, 0.2);
        color: rgba(0, 255, 255, 0.9);
        font-size: 12px;
        white-space: nowrap;
      }
      #save-advanced-overlay {
        position: absolute;
        inset: 0;
        z-index: 1200;
        background: rgba(0, 20, 25, 0.55);
        display: none;
        padding: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        overflow: hidden;
      }
      #save-advanced-overlay.kx-open {
        opacity: 1;
        pointer-events: auto;
      }
      #save-advanced-overlay .settings-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
        clip-path: inset(0 0 100% 0);
        transition: clip-path 220ms ease;
      }
      #save-advanced-overlay.kx-open .settings-card {
        clip-path: inset(0 0 0 0);
      }
      #save-list {
        flex: 1;
        min-height: 220px;
        overflow: auto;
        padding: 10px 8px;
        background: rgba(0, 10, 15, 0.12);
        border-radius: 12px;
        outline: none;
        scrollbar-color: rgba(0, 255, 255, 0.28) rgba(0, 10, 15, 0.25);
        scrollbar-width: thin;
      }
      #save-list::-webkit-scrollbar { width: 10px; }
      #save-list::-webkit-scrollbar-track {
        background: rgba(0, 10, 15, 0.25);
        border-radius: 999px;
      }
      #save-list::-webkit-scrollbar-thumb {
        background: rgba(0, 255, 255, 0.22);
        border-radius: 999px;
        border: 0;
      }
      #save-list::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 255, 0.32); }
      #bg-style-options {
        display: flex;
        gap: 10px;
        margin-top: 10px;
        flex-wrap: wrap;
      }
      #bg-style-options .bg-style-btn[data-bg="default"] {
        color: #0ff;
        background: linear-gradient(135deg, #0a0a1a, #001a1a);
      }
      #bg-style-options .bg-style-btn[data-bg="starfield"] {
        color: #88aaff;
        background: linear-gradient(135deg, #020818, #0a1030);
      }
      #bg-style-options .bg-style-btn[data-bg="matrix"] {
        color: #0f0;
        background: linear-gradient(135deg, #000, #001a00);
      }
      #bg-style-options .bg-style-btn[data-bg="nebula"] {
        color: #c080ff;
        background: linear-gradient(135deg, #0a0015, #1a0030);
      }
      #bg-style-options .bg-style-btn[data-bg="snowfall"] {
        color: #cde;
        background: linear-gradient(135deg, #0a1020, #1a2040);
      }
      #bg-upload-btn {
        color: #fa0;
        background: linear-gradient(135deg, #1a1000, #0a0800);
      }
      #bg-upload-input { display: none; }
      .settings-model-row {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 10px;
      }
      #settings-model-preview {
        cursor: pointer;
        border: 2px solid #0ff;
        border-radius: 8px;
        background: rgba(0, 15, 20, 0.8);
      }
      #settings-model-info {
        color: #888;
        font-size: 12px;
      }
      .mc-row-mb14 { margin-bottom: 14px; }
      #mc-shape-row { gap: 10px; }
      .settings-card {
        background: rgba(0, 20, 20, 0.6);
        border: 1px solid #0ff;
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 12px;
      }
      .settings-card-title {
        font-size: 16px;
        color: #fff;
        margin-bottom: 8px;
      }
      .settings-card-desc {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 12px;
      }
      .bg-slider-group {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .bg-slider-row {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #e2e8f0;
        font-size: 12px;
      }
      .bg-slider-row label {
        width: 40px;
        color: #94a3b8;
      }
      .bg-slider-row input[type="range"] {
        flex: 1;
        accent-color: #38bdf8;
      }
      #settings-panel-battle .bg-slider-row label {
        width: 124px;
        white-space: nowrap;
        word-break: keep-all;
      }
      #settings-panel-battle .battle-toggle-row input[type="checkbox"] {
        margin-left: auto;
      }
      #toast-loadout-switch,
      #hit-close-panels-switch,
      #battle-lock-switch,
      #threat-display-switch,
      #quick-plan-switch,
      #plan-key-switch,
      #stamina-tip-switch,
      #interact-tip-switch,
      #low-hp-warn-switch,
      #bg-hit-shake-switch,
      #map-marker-switch,
      #cloud-auto-save-switch,
      #local-auto-save-switch,
      #login-restore-switch,
      #leaderboard-mode-switch {
        width: 44px;
        height: 22px;
        border-radius: 999px;
        border: 1px solid #334155;
        background: rgba(2,6,23,0.8);
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        cursor: pointer;
        position: relative;
        transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
      }
      #toast-loadout-switch::before,
      #hit-close-panels-switch::before,
      #battle-lock-switch::before,
      #threat-display-switch::before,
      #quick-plan-switch::before,
      #plan-key-switch::before,
      #stamina-tip-switch::before,
      #interact-tip-switch::before,
      #low-hp-warn-switch::before,
      #bg-hit-shake-switch::before,
      #map-marker-switch::before,
      #cloud-auto-save-switch::before,
      #local-auto-save-switch::before,
      #login-restore-switch::before,
      #leaderboard-mode-switch::before {
        content: "";
        position: absolute;
        left: 2px;
        top: 1px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #64748b;
        box-shadow: 0 2px 10px rgba(0,0,0,0.35);
        transition: transform 160ms ease, background 160ms ease;
      }
      #toast-loadout-switch:checked,
      #hit-close-panels-switch:checked,
      #battle-lock-switch:checked,
      #threat-display-switch:checked,
      #quick-plan-switch:checked,
      #plan-key-switch:checked,
      #stamina-tip-switch:checked,
      #interact-tip-switch:checked,
      #low-hp-warn-switch:checked,
      #bg-hit-shake-switch:checked,
      #map-marker-switch:checked,
      #cloud-auto-save-switch:checked,
      #local-auto-save-switch:checked,
      #login-restore-switch:checked,
      #leaderboard-mode-switch:checked {
        background: rgba(56,189,248,0.28);
        border-color: #38bdf8;
        box-shadow: 0 0 0 2px rgba(56,189,248,0.18) inset;
      }
      #toast-loadout-switch:checked::before,
      #hit-close-panels-switch:checked::before,
      #battle-lock-switch:checked::before,
      #threat-display-switch:checked::before,
      #quick-plan-switch:checked::before,
      #plan-key-switch:checked::before,
      #stamina-tip-switch:checked::before,
      #interact-tip-switch:checked::before,
      #low-hp-warn-switch:checked::before,
      #bg-hit-shake-switch:checked::before,
      #map-marker-switch:checked::before,
      #cloud-auto-save-switch:checked::before,
      #local-auto-save-switch:checked::before,
      #login-restore-switch:checked::before,
      #leaderboard-mode-switch:checked::before {
        transform: translateX(22px);
        background: #e2e8f0;
      }

      .leaderboard-mode-row {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 8px;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .leaderboard-mode-label {
        font-size: 12px;
        color: rgba(148, 163, 184, 0.9);
        line-height: 1;
      }
      .leaderboard-mode-label.active {
        color: rgba(0, 255, 255, 0.9);
      }
      .leaderboard-row.arena {
        grid-template-columns: 24px 32px 1fr 56px 78px;
      }
      .leaderboard-duel {
        justify-self: end;
        background: rgba(0, 255, 255, 0.12);
        border: 1px solid rgba(0, 255, 255, 0.65);
        color: rgba(0, 255, 255, 0.95);
        padding: 4px 10px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 12px;
      }
      .leaderboard-duel:disabled {
        opacity: 0.45;
        cursor: not-allowed;
      }
      .leaderboard-points {
        color: rgba(0, 255, 255, 0.85);
        font-size: 12px;
        text-align: right;
      }
      .bg-slider-value {
        width: 44px;
        text-align: right;
        color: #e2e8f0;
      }
      .world-settings-group {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .world-settings-row {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 12px;
        color: #e2e8f0;
      }
      .world-settings-row label {
        width: 84px;
        color: #94a3b8;
      }
      .world-settings-row input[type="range"] {
        flex: 1;
        accent-color: #38bdf8;
      }
      .keybind-row {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .keybind-label {
        width: 84px;
        color: #94a3b8;
        font-size: 12px;
      }
      .keybind-btn {
        min-width: 70px;
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #334155;
        background: rgba(2,6,23,0.8);
        color: #e2e8f0;
        cursor: pointer;
      }
      .keybind-btn.waiting {
        border-color: #38bdf8;
        box-shadow: 0 0 10px rgba(56,189,248,0.35);
        color: #7dd3fc;
      }
      .keybind-hint {
        font-size: 11px;
        color: #94a3b8;
      }
      .bg-slider-group,
      .bg-slider-group *,
      .world-settings-group,
      .world-settings-group *,
      .keybind-row,
      .keybind-row * {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .settings-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
      }
      .settings-nav-item {
        padding: 10px 14px;
        background: rgba(0, 255, 255, 0.08);
        border: 1px solid #0ff;
        color: #0ff;
        cursor: pointer;
        text-align: left;
        font-size: 14px;
        border-radius: 8px;
      }
      .settings-nav-item:hover { background: rgba(0, 255, 255, 0.2); }
      .settings-nav-item.active { background: rgba(0, 255, 255, 0.25); }
      .settings-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(0, 255, 255, 0.2);
        border: 2px solid #0ff;
        cursor: pointer;
      }
      .settings-avatar-wrap { position: relative; }
      .settings-avatar-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 8px;
        padding: 10px;
        background: rgba(0, 20, 25, 0.98);
        border: 1px solid #0ff;
        border-radius: 8px;
        flex-wrap: wrap;
        gap: 10px;
        z-index: 30;
      }
      .settings-avatar-dropdown.open { display: flex; }
      .avatar-option {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        border: 2px solid #0ff;
        flex-shrink: 0;
      }
      .avatar-option[data-avatar="0"] { background: rgba(0, 255, 255, 0.6); }
      .avatar-option[data-avatar="1"] { background: rgba(255, 255, 255, 0.9); }
      .avatar-option[data-avatar="2"] { background: linear-gradient(135deg, #0ff 50%, #f0f 50%); }
      .avatar-option[data-avatar="3"] { background: repeating-linear-gradient(45deg, #0ff, #0ff 4px, rgba(0, 20, 25, 0.9) 4px, rgba(0, 20, 25, 0.9) 8px); }
      .avatar-option[data-avatar="4"] { background: rgba(0, 20, 25, 0.95); box-shadow: inset 0 0 0 8px #0ff; }
      .settings-avatar[data-avatar="0"] { background: rgba(0, 255, 255, 0.6); }
      .settings-avatar[data-avatar="1"] { background: rgba(255, 255, 255, 0.9); }
      .settings-avatar[data-avatar="2"] { background: linear-gradient(135deg, #0ff 50%, #f0f 50%); }
      .settings-avatar[data-avatar="3"] { background: repeating-linear-gradient(45deg, #0ff, #0ff 4px, rgba(0, 20, 25, 0.9) 4px, rgba(0, 20, 25, 0.9) 8px); }
      .settings-avatar[data-avatar="4"] { background: rgba(0, 20, 25, 0.95); box-shadow: inset 0 0 0 8px #0ff; }
      .settings-profile-name {
        font-size: 14px;
        color: #0ff;
        word-break: break-all;
        cursor: pointer;
      }
      .settings-profile-signature {
        font-size: 12px;
        color: rgba(0, 255, 255, 0.7);
        word-break: break-all;
        min-height: 18px;
        cursor: pointer;
      }
      .settings-profile-signature:empty::before {
        content: "点击填写个性签名";
        color: rgba(0, 255, 255, 0.4);
      }
      .settings-profile-level { font-size: 12px; color: rgba(0, 255, 255, 0.8); }
      .bg-style-btn {
        width: 60px;
        height: 40px;
        border-radius: 6px;
        cursor: pointer;
        border: 2px solid #555;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        transition: 0.2s;
        user-select: none;
      }
      .bg-style-btn.active { border-color: #0ff; box-shadow: 0 0 0 2px rgba(0,255,255,0.3); }
      .mc-color-btn {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.4);
        cursor: pointer;
        padding: 0;
        background: transparent;
      }
      .mc-color-btn.active { box-shadow: 0 0 0 2px rgba(0,255,255,0.6); }
      #model-customize-panel {
        display: none;
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 999;
        background: rgba(0, 15, 25, 0.95);
        border: 2px solid #0ff;
        border-radius: 12px;
        padding: 20px 24px;
        min-width: 280px;
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
      }
      .mc-title {
        color: #0ff;
        font-size: 16px;
        margin-bottom: 14px;
        text-align: center;
      }
      .mc-row {
        margin-bottom: 10px;
      }
      .mc-row span {
        color: #aaa;
        font-size: 13px;
      }
      .mc-row .mc-colors {
        display: flex;
        gap: 6px;
        margin-top: 4px;
        flex-wrap: wrap;
      }
      .mc-actions {
        display: flex;
        justify-content: center;
      }
      #mc-close-btn {
        background: rgba(0, 255, 255, 0.15);
        border: 1px solid #0ff;
        color: #0ff;
        padding: 6px 20px;
        cursor: pointer;
        font-size: 14px;
        border-radius: 6px;
      }
      .save-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 16px;
      }
      .save-slot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 12px;
        padding: 12px 14px;
        margin-bottom: 12px;
      }
      .save-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }
      .save-label {
        font-weight: 700;
      }
      .save-status {
        font-size: 12px;
        color: #94a3b8;
      }
      .save-actions {
        display: flex;
        gap: 8px;
      }
      .save-btn {
        min-width: 70px;
      }
      .leaderboard-view {
        width: calc(100vw - 24px - 160px - 24px);
        box-sizing: border-box;
        padding: 8px 12px;
        justify-content: center;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .leaderboard-shell {
        width: 98%;
        min-width: 560px;
        max-width: 1512px;
        background: rgba(0, 20, 25, 0.9);
        border: 1px solid rgba(0, 255, 255, 0.25);
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        height: calc(93.5vh - 80px);
        max-height: calc(93.5vh - 80px);
        min-height: 484px;
        margin: 0 auto;
        box-sizing: border-box;
      }
      .leaderboard-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        height: 40px;
        margin-bottom: 10px;
      }
      .leaderboard-title {
        font-size: 16px;
        color: #0ff;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        line-height: 1;
        pointer-events: none;
      }
      .leaderboard-refresh {
        background: rgba(0, 255, 255, 0.12);
        border: 1px solid #0ff;
        color: #0ff;
        padding: 5px 12px;
        border-radius: 10px;
        cursor: pointer;
      }
      .leaderboard-top3 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
      }
      .leaderboard-top3:empty { display: grid; }
      .leaderboard-row.top3 {
        background: rgba(0, 255, 255, 0.1);
        border-color: rgba(0, 255, 255, 0.3);
      }
      .leaderboard-row.self {
        border-color: rgba(125, 211, 252, 0.9);
        box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35);
      }
      .leaderboard-row.located {
        animation: lbLocatePulse 900ms ease-out 1;
      }
      @keyframes lbLocatePulse {
        0% { transform: scale(1); box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.55), 0 0 0 rgba(56,189,248,0); }
        45% { transform: scale(1.01); box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.65), 0 0 18px rgba(56,189,248,0.25); }
        100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35), 0 0 0 rgba(56,189,248,0); }
      }
      .leaderboard-row.self-alt {
        border-color: rgba(125, 211, 252, 0.5);
      }
      .leaderboard-row .leaderboard-me-badge {
        margin-left: 8px;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
        color: rgba(15, 23, 42, 0.95);
        background: rgba(125, 211, 252, 0.95);
        border: 1px solid rgba(125, 211, 252, 0.9);
        line-height: 1.1;
        pointer-events: none;
      }
      .leaderboard-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        background: rgba(0, 10, 15, 0.12);
        border-radius: 12px;
        outline: none;
        scrollbar-color: rgba(0, 255, 255, 0.28) rgba(0, 10, 15, 0.25);
        scrollbar-width: thin;
      }
      .leaderboard-list::-webkit-scrollbar { width: 10px; }
      .leaderboard-list::-webkit-scrollbar-track {
        background: rgba(0, 10, 15, 0.25);
        border-radius: 999px;
      }
      .leaderboard-list::-webkit-scrollbar-thumb {
        background: rgba(0, 255, 255, 0.22);
        border-radius: 999px;
        border: 0;
      }
      .leaderboard-list::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 255, 0.32); }
      .leaderboard-row {
        display: grid;
        grid-template-columns: 24px 32px 1fr 64px;
        gap: 8px;
        align-items: center;
        padding: 8px 8px;
        border-radius: 10px;
        background: rgba(0, 255, 255, 0.06);
        border: 1px solid rgba(0, 255, 255, 0.18);
      }
      .leaderboard-row:hover { background: rgba(0, 255, 255, 0.1); }
      .leaderboard-empty {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100%;
        color: rgba(226, 232, 240, 0.7);
        font-size: 14px;
        border-radius: 12px;
        background: rgba(0, 255, 255, 0.04);
        border: 1px dashed rgba(0, 255, 255, 0.18);
      }
      .leaderboard-rank {
        color: rgba(0, 255, 255, 0.85);
        font-weight: 700;
        font-size: 12px;
        text-align: center;
      }
      .leaderboard-avatar-wrap {
        position: relative;
        width: 32px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .leaderboard-avatar {
        width: 28px;
        height: 28px;
        border-width: 1px;
      }
      .leaderboard-level-badge {
        position: absolute;
        left: 50%;
        bottom: -6px;
        transform: translateX(-50%);
        padding: 2px 6px;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 700;
        color: rgba(0, 255, 255, 0.95);
        background: rgba(0, 10, 15, 0.85);
        border: 1px solid rgba(0, 255, 255, 0.35);
        line-height: 1.1;
        pointer-events: none;
      }
      .leaderboard-name {
        color: #e2e8f0;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .leaderboard-stage {
        color: rgba(0, 255, 255, 0.85);
        font-size: 12px;
        text-align: right;
      }
      .leaderboard-hint {
        margin-top: 10px;
        font-size: 12px;
        color: rgba(0, 255, 255, 0.6);
      }
      .leaderboard-detail-modal {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 10021;
        width: min(420px, calc(100vw - 32px));
        background: rgba(0, 15, 25, 0.96);
        border: 2px solid #0ff;
        border-radius: 14px;
        padding: 14px 16px;
        box-shadow: 0 0 28px rgba(0, 255, 255, 0.25);
      }
      .leaderboard-detail-top {
        display: grid;
        grid-template-columns: 56px 1fr auto;
        gap: 12px;
        align-items: center;
      }
      .leaderboard-avatar-lg {
        width: 56px;
        height: 56px;
        border-width: 2px;
      }
      .leaderboard-detail-name { color: #e2e8f0; font-size: 16px; }
      .leaderboard-detail-level { color: rgba(0, 255, 255, 0.8); font-size: 12px; margin-top: 2px; }
      .leaderboard-detail-close {
        background: rgba(0, 255, 255, 0.14);
        border: 1px solid #0ff;
        color: #0ff;
        padding: 6px 12px;
        border-radius: 10px;
        cursor: pointer;
      }
      .leaderboard-detail-sign {
        margin-top: 12px;
        color: rgba(0, 255, 255, 0.75);
        font-size: 13px;
        word-break: break-all;
      }
      .leaderboard-detail-stats {
        margin-top: 12px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(0, 255, 255, 0.08);
        border: 1px solid rgba(0, 255, 255, 0.2);
      }
      .leaderboard-detail-stat {
        color: #e2e8f0;
        font-size: 14px;
      }
      .side-panel {
        width: 160px;
        padding: 16px;
        background: rgba(30, 41, 59, 0.75);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
      }
      .side-button {
        border: 1px solid #334155;
        border-radius: 10px;
        background: #0f172a;
        color: #e2e8f0;
        font-weight: 700;
        padding: 10px 12px;
        cursor: pointer;
        text-align: center;
        transition: transform 80ms ease, box-shadow 80ms ease;
      }
      .side-button.active {
        background: #38bdf8;
        border-color: #38bdf8;
        color: #0f172a;
      }
      .btn:hover,
      .chest:hover,
      .chest-upgrade:hover,
      .probability-button:hover,
      .challenge-button:hover,
      .stat-add:hover,
      .side-button:hover,
      button:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(56, 189, 248, 0.28);
        filter: brightness(1.05);
      }
      .btn:disabled:hover,
      .chest:disabled:hover,
      .chest-upgrade:disabled:hover,
      .probability-button:disabled:hover,
      .challenge-button:disabled:hover,
      .stat-add:disabled:hover,
      button:disabled:hover {
        transform: none;
        box-shadow: none;
        filter: none;
      }
      .side-button.pressed {
        transform: scale(0.96);
        box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.06);
      }
      /* [ID: IDX-STYLES] */
      .app {
        width: 840px;
        padding: 24px;
        background: rgba(30, 41, 59, 0.75);
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
        position: relative;
        z-index: 2;
        filter: brightness(var(--app-brightness, 1));
      }
      .top {
        display: grid;
        grid-template-columns: 260px 160px 260px;
        gap: 20px;
        align-items: center;
        justify-content: center;
      }
      .slots {
        display: grid;
        grid-template-rows: repeat(4, 1fr);
        gap: 12px;
        width: 260px;
      }
      .slot {
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 10px;
        padding: 10px 12px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-height: 68px;
        position: relative;
      }
      .slot-name {
        font-size: 14px;
        color: #94a3b8;
      }
      .slot-hint {
        font-size: 12px;
        color: #64748b;
      }
      .slot-item {
        font-size: 15px;
        font-weight: 600;
        color: #e2e8f0;
        min-height: 20px;
      }
      .slot-attr {
        font-size: 12px;
        color: #94a3b8;
        min-height: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
      }
      .slot-attr-left {
        color: #e2e8f0;
        font-weight: 600;
        white-space: nowrap;
      }
      .slot-attr-right {
        color: #94a3b8;
        text-align: right;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        line-height: 1.2;
        gap: 8px;
      }
      .slot .slot-attr-right {
        position: absolute;
        top: 6px;
        right: 10px;
        max-width: 48%;
        align-items: flex-end;
        gap: 4px;
      }
      .slot-attr-main {
        font-weight: 700;
        color: #e2e8f0;
        font-size: 13px;
        margin-bottom: 2px;
      }
      .slot-attr-right .line {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .float-text.miss {
        color: #94a3b8;
      }
      .float-text.dmg {
        color: #f59e0b;
      }
      .player {
        width: 144px;
        height: 144px;
        background: var(--player-fill, #0f172a);
        border: 2px solid var(--player-border, #64748b);
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
      }
      .player-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
      }
      .player-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: #94a3b8;
      }
      .player-level {
        color: #e2e8f0;
        font-weight: 700;
      }
      .exp-bar {
        width: 120px;
        height: 6px;
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 999px;
        overflow: hidden;
      }
      .exp-fill {
        display: block;
        height: 100%;
        width: 0%;
        background: #22c55e;
        transition: width 0.2s ease;
      }
      .plan-btn {
        margin-top: 8px;
        background: #0ea5e9;
        color: #0b1220;
        border: none;
        border-radius: 6px;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }
      .plan-panel {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 540px;
        max-width: 90vw;
        background: rgba(15,23,42,0.96);
        border: 1px solid #334155;
        border-radius: 10px;
        padding: 10px 10px 12px 10px;
        z-index: 10002;
        display: none;
        user-select: none;
      }
      .plan-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
      }
      .plan-title {
        color: #e2e8f0;
        font-size: 14px;
        font-weight: 700;
      }
      .plan-sort {
        background: #334155;
        color: #e2e8f0;
        border: none;
        border-radius: 6px;
        padding: 4px 8px;
        font-size: 12px;
        cursor: pointer;
      }
      .plan-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 8px;
        border: 1px solid #334155;
        border-radius: 6px;
        background: rgba(2,6,23,0.85);
        margin-bottom: 8px;
      }
      .plan-row.sortable {
        cursor: move;
      }
      .plan-row.dragging {
        opacity: 0.5;
      }
      .plan-name {
        color: #e2e8f0;
        font-size: 13px;
        cursor: pointer;
      }
      .plan-input {
        flex: 1;
        min-width: 0;
        padding: 6px 10px;
        font-size: 13px;
        color: #e2e8f0;
        background: rgba(2,6,23,0.9);
        border: 1px solid #334155;
        border-radius: 6px;
        outline: none;
      }
      .plan-input:focus {
        border-color: #0ea5b7;
        box-shadow: 0 0 0 2px rgba(14,165,183,0.25);
      }
      .settings-inline-label {
        color: #e2e8f0;
        font-size: 14px;
        margin-top: 10px;
      }
      .settings-inline-hint {
        font-size: 12px;
        color: #94a3b8;
        margin-top: 4px;
      }
      .settings-input {
        width: 100%;
        padding: 4px 0;
        font-size: 14px;
        color: #e2e8f0;
        background: transparent;
        border: none;
        border-radius: 0;
        outline: none;
      }
      .settings-input:focus {
        border-bottom: 1px solid #0ea5b7;
        box-shadow: none;
      }
      .no-select { user-select: none; -webkit-user-select: none; -ms-user-select: none; }
      .equip-modal {
        position: fixed;
        left: 0;
        top: 0;
        transform: none;
        width: 100vw;
        height: 100vh;
        box-sizing: border-box;
        background: radial-gradient(1200px 800px at 50% -10%, rgba(56,189,248,0.16), rgba(0,0,0,0) 55%), rgba(2,6,23,0.96);
        border: 0;
        border-radius: 0;
        padding: 22px 22px 18px 22px;
        z-index: 10020;
        display: none;
        overflow: hidden;
        display: none;
        flex-direction: column;
      }
      .equip-header { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 14px; }
      .equip-header-actions { display: flex; gap: 6px; align-items: center; }
      .equip-body { flex: 1 1 0; display: grid; grid-template-columns: 380px minmax(0,1fr); gap: 18px; min-height: 0; position: relative; z-index: 0; }
      .equip-wheel { border: 0; border-radius: 0; padding: 0; box-sizing: border-box; background: transparent; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 0; perspective: 780px; transform-style: preserve-3d; position: relative; z-index: 1; }
      .equip-wheel, .equip-wheel * { user-select: none; -webkit-user-select: none; -ms-user-select: none; }
      .equip-wheel-item { border: 1px solid rgba(51,65,85,0.72); border-radius: 22px; padding: 14px 16px; background: linear-gradient(165deg, rgba(30,41,59,0.38), rgba(2,6,23,0.70) 55%, rgba(2,6,23,0.88)); cursor: pointer; box-sizing: border-box; transform-style: preserve-3d; will-change: transform, opacity; transition: opacity 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease, filter 120ms ease; height: 132px; overflow: hidden; position: relative; box-shadow: 0 10px 26px rgba(0,0,0,0.40), 0 0 0 1px rgba(2,6,23,0.55) inset, 0 -10px 18px rgba(0,0,0,0.32) inset; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.28)); }
      .equip-wheel-item::before { content: ""; position: absolute; inset: 0; border-radius: 22px; pointer-events: none; background: radial-gradient(520px 220px at 30% 0%, rgba(125,211,252,0.18), rgba(0,0,0,0) 58%), linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 45%); opacity: 0.9; transform: translateZ(1px); }
      .equip-wheel-item.active { border-color: rgba(125,211,252,0.98); box-shadow: 0 0 0 2px rgba(125,211,252,0.34), 0 18px 34px rgba(0,0,0,0.45), 0 0 0 1px rgba(2,6,23,0.55) inset, 0 -12px 20px rgba(0,0,0,0.34) inset; background: linear-gradient(165deg, rgba(30,41,59,0.46), rgba(2,6,23,0.78) 55%, rgba(2,6,23,0.92)); }
      .equip-wheel-item.wobble { animation: equipWheelWobble 360ms ease-out 1; }
      @keyframes equipWheelWobble {
        0% { filter: brightness(1); }
        45% { filter: brightness(1.06); }
        100% { filter: brightness(1); }
      }
      .equip-wheel-item.pos-m2 { transform: translateY(-86px) rotateX(55deg) translateZ(-120px) scale(0.88); opacity: 0.55; }
      .equip-wheel-item.pos-m1 { transform: translateY(-38px) rotateX(28deg) translateZ(-40px) scale(0.94); opacity: 0.8; }
      .equip-wheel-item.pos-0 { transform: translateY(0px) rotateX(0deg) translateZ(50px) scale(1); opacity: 1; }
      .equip-wheel-item.pos-p1 { transform: translateY(38px) rotateX(-28deg) translateZ(-40px) scale(0.94); opacity: 0.8; }
      .equip-wheel-item.pos-p2 { transform: translateY(86px) rotateX(-55deg) translateZ(-120px) scale(0.88); opacity: 0.55; }
      .equip-wheel-row { display: flex; gap: 12px; align-items: flex-start; }
      .equip-wheel-sloticon { width: 26px; height: 26px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.8); display: flex; align-items: center; justify-content: center; color: #e2e8f0; font-weight: 800; flex: 0 0 auto; box-shadow: 0 6px 12px rgba(0,0,0,0.35); background: rgba(2,6,23,0.28); }
      .equip-wheel-left { min-width: 0; flex: 1 1 0; }
      .equip-wheel-name { font-size: 20px; font-weight: 900; line-height: 1.15; margin-bottom: 6px; }
      .equip-wheel-hint { color: rgba(148,163,184,0.9); font-size: 12px; }
      .equip-wheel-right { text-align: right; min-width: 150px; }
      .equip-wheel-main { color: #e2e8f0; font-size: 22px; font-weight: 900; line-height: 1.15; }
      .equip-wheel-sub { color: rgba(148,163,184,0.9); font-size: 14px; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-height: 52px; }
      .equip-wheel-subline { min-height: 14px; line-height: 14px; }
      .equip-right { border: 1px solid rgba(51,65,85,0.8); border-radius: 18px; padding: 14px; box-sizing: border-box; background: rgba(2,6,23,0.35); display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 3; }
      .equip-right-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
      .equip-right-slot { width: 36px; height: 36px; border-radius: 12px; border: 1px solid rgba(71,85,105,0.8); background: rgba(30,41,59,0.35); display: flex; align-items: center; justify-content: center; color: #e2e8f0; font-weight: 900; user-select: none; -webkit-user-select: none; -ms-user-select: none; }
      .equip-pane-actions { display: flex; gap: 8px; align-items: center; }
      .equip-pane-btn { background: rgba(30,41,59,0.5); border: 1px solid rgba(71,85,105,0.8); color: #e2e8f0; border-radius: 10px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
      .equip-pane-btn:disabled { opacity: 0.5; cursor: not-allowed; }
      .equip-pane-list { overflow: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
      .equip-pane-list::-webkit-scrollbar { display: none; }
      .equip-pane-list { scrollbar-width: none; }
      .equip-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid #334155; border-radius: 8px; background: rgba(2,6,23,0.85); position: relative; }
      .equip-row.selected { border-color: #38bdf8; background: rgba(14,165,233,0.18); box-shadow: 0 0 0 1px rgba(56,189,248,0.4) inset; }
      .equip-row .meta { color: #e2e8f0; font-size: 13px; }
      .equip-row .equip-name { font-size: 16px; font-weight: 800; line-height: 1.15; }
      .equip-row .slot-attr { justify-content: flex-start; }
      .equip-row .equip-attr-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
      .equip-row .equip-attr-main { color: #e2e8f0; font-weight: 700; }
      .equip-row .equip-attr-sub { color: #94a3b8; }
      .equip-row .actions { display: flex; gap: 6px; }
      .equip-btn-blue { background: #2563eb; border: none; color: #e2e8f0; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
      .equip-btn-red { background: #dc2626; border: none; color: #fee2e2; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
      .equip-btn-blue:disabled, .equip-btn-red:disabled { opacity: 0.5; cursor: not-allowed; }
      .equip-multi-toggle { background: #2563eb; border: none; color: #e2e8f0; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
      .equip-sell-confirm { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(15,23,42,0.95); border: 1px solid #334155; border-radius: 8px; padding: 12px; z-index: 10040; display: none; min-width: 240px; }
      .equip-sell-confirm-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
      .plan-actions {
        display: flex;
        gap: 6px;
      }
      .plan-switch {
        background: linear-gradient(135deg, #22d3ee, #38bdf8);
        color: #06121f;
        border: none;
        border-radius: 6px;
        padding: 4px 8px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }
      .plan-switch:disabled {
        background: #64748b;
        color: #0f172a;
        cursor: not-allowed;
      }
      .plan-delete {
        background: transparent;
        border: 1px solid #ef4444;
        color: #ef4444;
        border-radius: 6px;
        padding: 4px 8px;
        font-size: 12px;
        cursor: pointer;
      }
      .plan-delete:disabled {
        opacity: 0.4;
        cursor: not-allowed;
      }
      .plan-add {
        width: 100%;
        background: #0ea5e9;
        color: #0b1220;
        border: none;
        border-radius: 6px;
        padding: 6px 8px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }
      .face {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        font-size: 32px;
        color: var(--player-face, #e2e8f0);
      }
      .eyes {
        display: flex;
        gap: 26px;
      }
      .eye {
        display: inline-block;
        width: 18px;
        text-align: center;
      }
      .eye-left {
        text-align: right;
        transform: scaleX(2);
        transform-origin: right center;
      }
      .eye-right {
        text-align: left;
        transform-origin: left center;
      }
      .eye-right.long {
        transform: scaleX(2);
      }
      .mouth {
        display: inline-block;
        transform: rotate(90deg);
        font-size: 32px;
      }
      .bottom {
        margin-top: 28px;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        justify-content: center;
        gap: 24px;
        width: 100%;
        position: relative;
      }
      .challenge-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin-left: 12px;
        transform: translateY(15px);
        grid-column: 3;
        justify-self: center;
      }
      .chest-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        grid-column: 2;
        justify-self: center;
      }
      .chest-level {
        font-size: 13px;
        color: #94a3b8;
      }
      .chest-level-badge {
        min-width: 44px;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .chest-level-badge span {
        font-size: 10px;
        line-height: 1;
        white-space: nowrap;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .chest-upgrade {
        height: 40px;
        padding: 0 14px;
        border: none;
        border-radius: 10px;
        background: linear-gradient(135deg, #22d3ee, #38bdf8);
        box-shadow: 0 10px 20px rgba(56, 189, 248, 0.32);
        color: #06121f;
        font-weight: 700;
        cursor: pointer;
        width: 120px;
        flex: 0 0 auto;
      }
      .upgrade-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        width: 140px;
        grid-column: 1;
        justify-self: center;
      }
      .upgrade-cost {
        font-size: 12px;
        color: #94a3b8;
        width: 100%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .probability-button {
        height: 24px;
        padding: 0 8px;
        min-width: 44px;
        border: 1px solid rgba(34, 211, 238, 0.85);
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(2, 6, 23, 0.55), rgba(15, 23, 42, 0.75));
        box-shadow:
          0 0 0 1px rgba(168, 85, 247, 0.25) inset,
          0 0 14px rgba(34, 211, 238, 0.28),
          0 0 24px rgba(168, 85, 247, 0.18);
        color: #e2e8f0;
        text-shadow: 0 0 10px rgba(34, 211, 238, 0.45), 0 0 14px rgba(168, 85, 247, 0.25);
        font-weight: 700;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        flex: 0 0 auto;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .probability-button .lvn-level {
        font-size: 10px;
        line-height: 1;
        white-space: nowrap;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      #upgradeCost {
        width: auto;
        min-width: 88px;
        padding: 0 8px;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .probability-button:hover {
        border-color: rgba(34, 211, 238, 0.95);
        box-shadow:
          0 0 0 1px rgba(168, 85, 247, 0.32) inset,
          0 0 18px rgba(34, 211, 238, 0.38),
          0 0 34px rgba(168, 85, 247, 0.24);
        filter: brightness(1.08);
      }
      @keyframes kxUpgradePulse {
        0% { transform: scale(1); filter: brightness(1); box-shadow: 0 10px 20px rgba(56, 189, 248, 0.32); }
        40% { transform: scale(1.06); filter: brightness(1.22); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.28) inset, 0 0 16px rgba(34, 211, 238, 0.45), 0 10px 28px rgba(56, 189, 248, 0.4); }
        100% { transform: scale(1); filter: brightness(1); box-shadow: 0 10px 20px rgba(56, 189, 248, 0.32); }
      }
      .chest-upgrade.kx-upgrade-pulse {
        animation: kxUpgradePulse 260ms ease-out;
      }
      .chest-upgrade:disabled {
        background: #64748b;
        color: #0f172a;
        cursor: not-allowed;
      }
      .chest {
        width: 120px;
        height: 90px;
        background: #facc15;
        border: none;
        border-radius: 14px;
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        cursor: pointer;
        box-shadow: 0 10px 20px rgba(250, 204, 21, 0.35);
        flex: 0 0 auto;
      }
      .chest:disabled {
        background: #94a3b8;
        color: #334155;
        cursor: not-allowed;
        box-shadow: none;
      }
      .count {
        font-size: 16px;
        color: #e2e8f0;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        -webkit-user-select: none;
      }
      .gold {
        font-size: 16px;
        color: #f59e0b;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        -webkit-user-select: none;
      }
      .dust {
        font-size: 16px;
        color: #7dd3fc;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        -webkit-user-select: none;
      }
      .challenge-button {
        height: 32px;
        padding: 0 14px;
        border: none;
        border-radius: 10px;
        background: #a78bfa;
        color: #0f172a;
        font-weight: 700;
        cursor: pointer;
        width: 100px;
        flex: 0 0 auto;
      }
      .stage-label {
        font-size: 12px;
        color: #94a3b8;
        text-align: center;
      }
      .battle-overlay {
        position: fixed;
        inset: 0;
        background: #0f172a;
        display: none;
        z-index: 120;
      }
      .battle-overlay.active {
        display: flex;
      }
      .battle-stage {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        position: relative;
      }
      .battle-top {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        color: #e2e8f0;
        font-weight: 800;
      }
      .battle-mid {
        flex: 1;
        display: grid;
        grid-template-columns: auto auto;
        gap: 32px;
        justify-content: center;
        align-items: center;
      }
      .unit {
        background: transparent;
        border: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 220px;
      }
      .unit-model {
        position: relative;
        height: 80px;
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: hidden;
      }
      .pawn {
        position: absolute;
        width: 28px;
        height: 28px;
        background: var(--player-fill, #38bdf8);
        border-radius: 4px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        transition: transform 0.18s ease;
      }
      .unit.enemy .pawn { background: #f59e0b; }
      .bow {
        position: absolute;
        width: 14px;
        height: 14px;
        border: 2px solid #a78bfa;
        border-left-color: transparent;
        border-bottom-color: transparent;
        border-radius: 50%;
        left: 10px;
        top: 10px;
      }
      .unit.enemy .bow { right: 10px; left: auto; transform: scaleX(-1); }
      .arrow {
        position: fixed;
        width: 16px;
        height: 2px;
        background: #e5e7eb;
        border-radius: 2px;
        transform-origin: left center;
        z-index: 10025;
        transition: left 0.8s ease, top 0.8s ease, transform 0.1s ease;
      }
      .arrow.enemy { background: #fca5a5; }
      .bars {
        display: grid;
        gap: 6px;
        width: 160px;
        margin: 0 auto;
      }
      .bar {
        height: 8px;
        background: #0b1220;
        border: 1px solid #3b4a65;
        border-radius: 999px;
        overflow: hidden;
        position: relative;
      }
      .bar-fill {
        height: 100%;
        width: 0%;
        transition: width 0.25s ease;
      }
      .bar-fill.hp { background: linear-gradient(180deg, #ff7a7c, #ff4d4f); box-shadow: inset 0 0 6px rgba(255,255,255,0.4); }
      .bar-fill.sta { background: linear-gradient(180deg, #93c5fd, #60a5fa); box-shadow: inset 0 0 6px rgba(255,255,255,0.35); }
      .bar-fill.shield { background: linear-gradient(180deg, #ffffff, #e5e7eb); box-shadow: inset 0 0 6px rgba(255,255,255,0.6); }
      .bar { box-shadow: 0 0 8px rgba(255,255,255,0.06); }
      .bar-text {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 10px;
        color: #e2e8f0;
        pointer-events: none;
      }
      .battle-actions {
        display: flex;
        justify-content: center;
        gap: 12px;
      }
      .btn-ghost {
        border: 1px solid #64748b;
        background: transparent;
        color: #e2e8f0;
      }
      .battle-log {
        height: 120px;
        overflow: auto;
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 10px;
        padding: 8px;
        color: #cbd5e1;
        font-size: 12px;
      }
      .battle-result {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        padding: 16px 24px;
        background: rgba(30, 41, 59, 0.98);
        border: 1px solid #334155;
        border-radius: 12px;
        color: #e2e8f0;
        font-size: 20px;
        font-weight: 800;
        box-shadow: 0 20px 50px rgba(0,0,0,0.35);
        z-index: 202;
      }
      .battle-result #resultRewards {
        margin-top: 10px;
        font-size: 14px;
        font-weight: 700;
        color: #e2e8f0;
      }
      .battle-result #resultHint {
        margin-top: 8px;
        font-size: 12px;
        color: #94a3b8;
        text-align: center;
      }
      .battle-overlay.result-mode {
        background: #0f172a;
        backdrop-filter: none;
        z-index: 10002;
      }
      .battle-curtain {
        position: absolute;
        inset: 0;
        background: rgba(32, 32, 32, 0.44);
        z-index: 1;
        pointer-events: none;
      }
      .battle-overlay.result-mode .battle-actions {
        opacity: 0;
        pointer-events: none;
      }
      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.85);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
      }
      .modal {
        width: 420px;
        background: #1e293b;
        border-radius: 16px;
        padding: 18px 20px 20px;
        border: 1px solid #334155;
      }
      .modal-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 16px;
      }
      .compare {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
      }
      .item-card {
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 12px;
        padding: 12px;
        min-height: 84px;
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      .item-label {
        font-size: 12px;
        color: #94a3b8;
      }
      .item-name {
        font-size: 16px;
        font-weight: 700;
      }
      .probability-section {
        margin-top: 12px;
      }
      .probability-list {
        margin-top: 8px;
        display: grid;
        gap: 6px;
        position: relative;
        overflow: hidden;
      }
      .kx-prob-fade-in {
        animation: kxProbFadeIn 220ms ease both;
      }
      @keyframes kxProbFadeIn {
        from { opacity: 0; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
      }
      .kx-prob-particle {
        position: absolute;
        width: 4px;
        height: 4px;
        border-radius: 999px;
        pointer-events: none;
        opacity: 0.9;
        transform: translate(0, 0);
        animation: kxProbParticle 520ms ease-out forwards;
      }
      @keyframes kxProbParticle {
        to { transform: translate(var(--dx), var(--dy)) scale(0.6); opacity: 0; }
      }
      .probability-row {
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        color: #e2e8f0;
      }
      .modal-actions {
        display: flex;
        gap: 12px;
        margin-top: 16px;
        justify-content: flex-end;
      }
      #probabilityModal .modal-actions {
        justify-content: space-between;
        align-items: center;
      }
      #probabilityModal .probability-actions-left {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      #probabilityModal #upgradeCost {
        height: 40px;
        display: flex;
        align-items: center;
      }
      .btn {
        border: none;
        border-radius: 10px;
        padding: 8px 14px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        min-width: 80px;
        flex: 0 0 auto;
      }
      .btn:active,
      .chest:active,
      .chest-upgrade:active,
      .probability-button:active,
      .challenge-button:active,
      .stat-add:active {
        transform: translateY(1px) scale(0.98);
        filter: brightness(0.95);
      }
      .btn,
      button,
      .chest,
      .chest-upgrade,
      .probability-button,
      .challenge-button,
      .stat-add {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        -webkit-touch-callout: none;
      }
      .btn-sell {
        background: #22c55e;
        color: #0f172a;
      }
      .btn-replace {
        background: #38bdf8;
        color: #0f172a;
      }
      #closeProbability {
        background: #cbd5e1;
        color: #0f172a;
      }
      .btn-wear {
        background: #facc15;
        color: #0f172a;
      }
      .btn-wave {
        position: absolute;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        background: rgba(255,255,255,0.6);
        animation: btnRipple 500ms ease-out forwards;
        z-index: 1;
      }
      @keyframes btnRipple {
        0% { opacity: 0.8; width: 0; height: 0; }
        100% { opacity: 0; width: 160px; height: 160px; }
      }
      .battle-tip {
        margin-top: 8px;
        text-align: center;
        color: #94a3b8;
        font-size: 11px;
        min-height: 14px;
      }
      .app,
      .app *,
      .battle-overlay,
      .battle-overlay *,
      .modal-backdrop,
      .modal-backdrop *,
      .modal,
      .modal * {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        -webkit-touch-callout: none;
      }
      #model-customize-panel, #model-customize-panel * {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .hidden {
        display: none;
      }
      .click-effect {
        position: fixed;
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.35);
        box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
        transform: translate(-50%, -50%);
        animation: clickPulse 0.45s ease-out forwards;
        pointer-events: none;
        z-index: 18;
      }
      .hit-effect {
        position: fixed;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid rgba(255,255,255,0.9);
        transform: translate(-50%, -50%) scale(0.6);
        animation: hitPulse 0.45s ease-out forwards;
        pointer-events: none;
        z-index: 10026;
      }
      .stun-effect {
        position: fixed;
        width: 12px;
        height: 12px;
        border: 2px dashed #facc15;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        animation: stunSpin 0.9s linear infinite;
        pointer-events: none;
        z-index: 10027;
      }
      .heal-effect {
        position: fixed;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(34,197,94,0.9);
        background: rgba(34,197,94,0.4);
        transform: translate(-50%, -50%) scale(0.8);
        animation: healPulse 0.6s ease-out forwards;
        pointer-events: none;
        z-index: 10026;
      }
      .float-text {
        position: fixed;
        left: 0;
        top: 0;
        transform: translate(-50%, 0);
        font-size: 14px;
        font-weight: 800;
        text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
        pointer-events: none;
        opacity: 0;
        animation: floatBounce 0.5s ease-out;
        z-index: 10030;
      }
      .float-text.gold {
        color: #f59e0b;
      }
      .float-text.exp {
        color: #22c55e;
      }
      .float-text.chest {
        color: #38bdf8;
      }
      .float-text.crit {
        color: #ef4444;
      }
      .float-text.stat-pos {
        color: #22c55e;
      }
      .float-text.stat-neg {
        color: #ef4444;
      }
      .float-text.dmg {
        font-size: 16px;
        animation: floatBounce 0.85s ease-out;
      }
      .float-layer {
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 60;
      }
      .reward-float {
        position: absolute;
        transform: translate(-50%, 0);
        font-size: 14px;
        font-weight: 800;
        opacity: 0;
        text-shadow: none;
        filter: none;
        animation: rewardFloat 0.55s ease-out;
      }
      .reward-float.gold { color: #f59e0b; }
      .reward-float.exp { color: #22c55e; }
      .reward-float.dust { color: #7dd3fc; }
      .reward-float {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .reward-float.chest { color: #38bdf8; }
      .reward-float.crit { color: #ef4444; }
      .equip-fly-orb {
        position: fixed;
        width: 12px;
        height: 12px;
        border-radius: 9999px;
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        transform: translate(-50%, -50%) scale(0.9);
        will-change: transform, opacity;
        z-index: 10040;
      }
      .equip-slot-flash {
        position: fixed;
        width: 24px;
        height: 24px;
        border-radius: 9999px;
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(0.6);
        box-shadow: 0 0 12px rgba(255,255,255,0.9);
        animation: equipSlotFlash 360ms ease-out forwards;
        z-index: 10042;
      }
      @keyframes equipSlotFlash {
        0% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.6); }
        60% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.0); }
        100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28); }
      }
      .slot-hit-shake {
        animation: slotHitShake 120ms ease-in-out;
      }
      @keyframes slotHitShake {
        0% { transform: translate(0,0); }
        30% { transform: translate(0.6px,0); }
        60% { transform: translate(-0.6px,0); }
        100% { transform: translate(0,0); }
      }
      .slot-border-white, .slot-border-green, .slot-border-blue, .slot-border-purple, .slot-border-red, .slot-border-gold, .slot-border-rainbow { position: relative; }
      .slot-border-white::after,
      .slot-border-green::after,
      .slot-border-blue::after,
      .slot-border-purple::after,
      .slot-border-red::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 2px;
        background: currentColor;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        opacity: 0.95;
      }
      .slot-border-white { color: rgba(148,163,184,0.72); }
      .slot-border-green { color: rgba(34,197,94,0.72); }
      .slot-border-blue { color: rgba(59,130,246,0.72); }
      .slot-border-purple { color: rgba(168,85,247,0.72); }
      .slot-border-red { color: rgba(239,68,68,0.72); }
      .slot-border-gold::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 2px;
        background:
          linear-gradient(135deg, #c9c27a, #f1edc8 40%, #9f8f3a 70%, #e6dd9a),
          linear-gradient(110deg, rgba(255,255,255,0.26) 15%, rgba(255,255,255,0.0) 30% 70%, rgba(255,255,255,0.26) 85%);
        background-size: 100% 100%, 240% 240%;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        animation: goldSheen 3.2s ease-in-out infinite;
        pointer-events: none;
        opacity: 0.95;
      }
      @keyframes goldSheen {
        0% { background-position: 0% 0%, 0% 0%; }
        50% { background-position: 0% 0%, 100% 100%; }
        100% { background-position: 0% 0%, 0% 0%; }
      }
      .slot-border-rainbow { position: relative; }
      .slot-border-rainbow::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        padding: 2px;
        background:
          conic-gradient(from 0deg, #ff9aa2, #a2d2ff, #baffc9, #ffdfba, #cdb4db, #ffd6a5, #ff9aa2),
          linear-gradient(110deg, rgba(255,255,255,0.24) 14%, rgba(255,255,255,0.0) 30% 70%, rgba(255,255,255,0.24) 86%);
        background-size: 100% 100%, 260% 260%;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        animation: rainbowSheen 3.6s linear infinite;
        pointer-events: none;
        opacity: 0.95;
      }
      @keyframes rainbowSheen {
        0% { background-position: center center, 0% 0%; }
        100% { background-position: center center, 140% 140%; }
      }
      @keyframes borderPulse {
        0%, 100% { opacity: 0.72; filter: brightness(1); }
        50% { opacity: 1; filter: brightness(1.3); }
      }
      .slot-border-gold::after {
        animation: goldSheen 3.2s ease-in-out infinite, borderPulse 2s ease-in-out infinite;
      }
      .slot-border-rainbow::after {
        animation: rainbowSheen 3.6s linear infinite, borderPulse 1.8s ease-in-out infinite;
      }
      .slot.slot-border-white, .slot.slot-border-green, .slot.slot-border-blue, .slot.slot-border-purple, .slot.slot-border-red, .slot.slot-border-gold, .slot.slot-border-rainbow { border-color: transparent; }
      .equip-row.slot-border-white, .equip-row.slot-border-green, .equip-row.slot-border-blue, .equip-row.slot-border-purple, .equip-row.slot-border-red, .equip-row.slot-border-gold, .equip-row.slot-border-rainbow { border-color: transparent; }
      @keyframes rewardFloat {
        0% { opacity: 0; transform: translate(-50%, 0) scale(0.96); }
        20% { opacity: 1; }
        100% { opacity: 0; transform: translate(-50%, -22px) scale(1); }
      }
      .attr-pos {
        color: #22c55e;
        font-weight: 700;
      }
      .attr-neg {
        color: #ef4444;
        font-weight: 700;
      }
      .attr-arrow {
        margin-left: 6px;
        display: inline-block;
        font-weight: 900;
        font-size: 1.05em;
        line-height: 1;
      }
      @keyframes clickPulse {
        0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
        100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
      }
      @keyframes hitPulse {
        0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.6); }
        100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
      }
      @keyframes stunSpin {
        0% { transform: translate(-50%, -50%) rotate(0deg); }
        100% { transform: translate(-50%, -50%) rotate(360deg); }
      }
      @keyframes healPulse {
        0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.8); }
        100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
      }
      @keyframes floatBounce {
        0% {
          opacity: 0;
          transform: translate(-50%, 0) scale(0.9);
        }
        15% {
          opacity: 1;
        }
        50% {
          transform: translate(-50%, -12px) scale(1);
        }
        100% {
          opacity: 0;
          transform: translate(-50%, -24px) scale(1);
        }
      }
      .quality-white {
        color: #94a3b8;
      }
      .quality-green {
        color: #22c55e;
      }
      .quality-blue {
        color: #3b82f6;
      }
      .quality-purple {
        color: #a855f7;
      }
      .quality-red {
        color: #ef4444;
      }
      .quality-gold {
        color: #f59e0b;
      }
      .quality-rainbow {
        color: transparent;
        background: linear-gradient(120deg, #ff9aa2, #a2d2ff);
        -webkit-background-clip: text;
        background-clip: text;
        background-size: 200% 200%;
        animation: shimmer 1.6s linear infinite;
      }
      @keyframes shimmer {
        0% {
          background-position: 0% 50%;
        }
        100% {
          background-position: 100% 50%;
        }
      }
      .stats-panel {
        width: 300px;
        padding: 20px;
        background: #1e293b;
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .stats-column {
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .sub-panel {
        margin-top: 0;
      }
      .stats-title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 12px;
      }
      .stats-list {
        display: grid;
        gap: 8px;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .slot, .slot * {
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .stat-row {
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        color: #e2e8f0;
        user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
      }
      .alloc-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 10px;
        font-size: 12px;
        color: #94a3b8;
      }
      .stat-add {
        margin-left: 8px;
        border: none;
        border-radius: 6px;
        padding: 2px 6px;
        font-size: 12px;
        font-weight: 700;
        background: #0ea5e9;
        color: #0f172a;
        cursor: pointer;
      }
      .stat-add:disabled {
        background: #64748b;
        color: #0f172a;
        cursor: not-allowed;
      }
      .sub-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        margin-top: 12px;
        font-size: 14px;
        color: #7dd3fc;
      }
      .triangle {
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #38bdf8;
        transition: transform 0.2s ease;
      }
      .triangle.expanded {
        transform: rotate(180deg);
      }
      .sub-stats {
        margin-top: 10px;
      }
    /* [ID: IDX-UIHIDDEN] */
    .ui-hidden .layout { display: none !important; }
    .ui-hidden .side-panel { display: none !important; }
    .ui-hidden .battle-overlay { display: none !important; }
    .ui-hidden .modal-backdrop { display: none !important; }
    .ui-hidden #model-customize-panel { display: none !important; }
    .app-loading {
      position: fixed;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: radial-gradient(1200px 700px at 50% 45%, rgba(0, 255, 255, 0.08), rgba(0, 0, 0, 0.92));
      z-index: 30000;
      opacity: 1;
      transition: opacity 240ms ease;
      pointer-events: auto;
      user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
    }
    .app-loading.hide {
      opacity: 0;
      pointer-events: none;
    }
    .app-loading-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 16px 18px;
      min-width: 180px;
      max-width: 90vw;
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.82);
      border: 1px solid rgba(51, 65, 85, 0.9);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(6px);
      user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
    }
    .app-loading-spinner {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: 3px solid rgba(56, 189, 248, 0.22);
      border-top-color: rgba(0, 255, 255, 0.92);
      box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.12);
      animation: appLoadingSpin 900ms linear infinite;
    }
    .app-loading-text {
      color: rgba(226, 232, 240, 0.92);
      font-size: 13px;
      letter-spacing: 1px;
      animation: appLoadingPulse 1200ms ease-in-out infinite;
      max-width: 220px;
      white-space: nowrap;
      user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
    }
    @keyframes appLoadingSpin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    @keyframes appLoadingPulse {
      0%, 100% { opacity: 0.68; }
      50% { opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .app-loading-spinner { animation: none; }
      .app-loading-text { animation: none; }
      .app-loading { transition: none; }
    }
    .top-resources-panel {
      position: fixed;
      top: 24px;
      right: 24px;
      display: flex;
      gap: 20px;
      align-items: center;
      background: rgba(15, 23, 42, 0.8);
      padding: 10px 20px;
      border-radius: 12px;
      border: 1px solid #334155;
      backdrop-filter: blur(4px);
      z-index: 100;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
      transform: scale(0.8);
      transform-origin: top right;
    }
    .top-resources-panel > * {
      pointer-events: auto;
    }
    .death-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      z-index: 20000;
      display: none;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      user-select: none;
      -webkit-user-select: none;
    }
    .death-popup {
      background: #1e293b;
      border: 2px solid #ef4444;
      border-radius: 16px;
      padding: 30px;
      text-align: center;
      box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
      max-width: 400px;
      width: 90%;
    }
    .death-title {
      font-size: 32px;
      color: #ef4444;
      font-weight: 800;
      margin-bottom: 20px;
      text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
    .death-list {
      text-align: left;
      color: #e2e8f0;
      font-size: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 20px;
    }
    .death-item {
      display: flex;
      justify-content: space-between;
    }
    .death-hint {
      color: #64748b;
      font-size: 12px;
    }
