/* === МОБИЛЬНАЯ ВЕРСИЯ Fantasy Icarus — ПРОИЗВОДИТЕЛЬНОСТЬ + ТОЧНОЕ ПОЗИЦИОНИРОВАНИЕ === */

@media (max-width: 768px) {
    /* ===== ЦВЕТОВАЯ ТЕМАТИКА: СЕРОЕ / ОРАНЖЕВОЕ / ЗОЛОТОЕ ===== */
    :root {
        --ic-bg-deep: #0d0d0d;
        --ic-bg-main: #1a1a1a;
        --ic-bg-card: #242424;
        --ic-bg-hover: #2e2e2e;
        --ic-border: #3a3a3a;
        --ic-gold: #e8a030;
        --ic-orange: #e86c2a;
        --ic-text: #f0f0f0;
        --ic-text-dim: #b0b0b0;
        --safe-area-top: env(safe-area-inset-top, 0);
        --safe-area-bottom: env(safe-area-inset-bottom, 0);
        --header-height: 68px;
        --blur-heavy: blur(24px);
        --blur-medium: blur(16px);
        --glass-bg: rgba(26,26,26,0.92);
        --glass-bg-light: rgba(36,36,36,0.95);
        --glass-border: rgba(255,255,255,0.1);
    }

    /* ===== БАЗОВЫЕ СТИЛИ — МИНИМАЛЬНЫЕ ===== */
    html { font-size: 14px; -webkit-text-size-adjust: 100%; }
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    
    body { 
        margin: 0; padding: 0; 
        background: var(--ic-bg-deep);
        color: var(--ic-text);
        font-family: system-ui, -apple-system, sans-serif;
        /* Глобальный text-align: center УБРАН — даёт баги с флексами */
    }
    
    main { 
        padding-top: calc(68px + env(safe-area-inset-top, 0)) !important; 
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
        width: 100% !important; max-width: 100% !important; 
        box-sizing: border-box;
    }
    
    section, .profile-section, .storage-section, .transfer-section, 
    .promocode-section, .expenses-section, .vip-section, 
    .battlepass-section, .donation-shop-section, .settings-section,
    .forum-section, .news-section, .shop-section {
        padding-top: 16px !important;
        margin-top: 0 !important;
        box-sizing: border-box;
    }

    /* ===== HEADER — ЛЁГКИЙ ===== */
    .nav-container {
        position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
        height: calc(68px + env(safe-area-inset-top, 0));
        background: rgba(26,26,26,0.95);
        backdrop-filter: blur(24px);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        padding-top: env(safe-area-inset-top, 0);
    }
    .nav-links { display: none !important; }
    .nav-buttons { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 16px; gap: 12px; }
    .nav-logo img { width: 36px; height: 36px; }

    .hamburger {
        display: flex !important; flex-direction: column; justify-content: center; align-items: center;
        width: 44px; height: 44px; background: rgba(36,36,36,0.9); backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.08); cursor: pointer; padding: 6px;
        z-index: 1002; border-radius: 12px; transition: background 0.15s;
    }
    .hamburger > div { width: 24px; height: 2px; background: linear-gradient(90deg, #e8a030, #e86c2a); margin: 3px 0; border-radius: 2px; transition: all 0.25s; transform-origin: left center; }
    .hamburger.active > div:nth-child(1) { transform: rotate(45deg) translate(2px, 2px); width: 26px; }
    .hamburger.active > div:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger.active > div:nth-child(3) { transform: rotate(-45deg) translate(2px, -2px); width: 26px; }

    /* ===== MOBILE MENU — СЛЕВА НАПРАВО ===== */
    .mobile-menu { position: fixed; inset: 0; width: 100vw; height: 100vh; background: transparent; z-index: 1001; display: flex; justify-content: flex-start; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s, visibility 0.25s; }
    .mobile-menu.active { opacity: 1; visibility: visible; pointer-events: auto; }
    .mobile-menu::before { content: ''; position: absolute; inset: 0; background: rgba(13,13,13,0.7); backdrop-filter: blur(16px); opacity: 0; transition: opacity 0.25s; z-index: 1; }
    .mobile-menu.active::before { opacity: 1; }
    .mobile-menu-panel { position: relative; z-index: 2; width: 100%; max-width: 300px; min-width: 260px; height: 100vh; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); box-shadow: 8px 0 32px rgba(0,0,0,0.6); border-right: 1px solid rgba(255,255,255,0.08); transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; overflow: hidden; }
    .mobile-menu.active .mobile-menu-panel { transform: translateX(0); }
    .mobile-menu-content { flex: 1; overflow-y: auto; padding: calc(68px + env(safe-area-inset-top)) 16px 24px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
    .mobile-menu-content > a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #f0f0f0; text-decoration: none; font-size: 0.95rem; font-weight: 600; border-radius: 12px; background: rgba(36,36,36,0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); transition: all 0.15s; min-height: 52px; }
    .mobile-menu-content > a:hover, .mobile-menu-content > a.active { background: rgba(232,160,48,0.12); color: #e8a030; border-color: rgba(232,160,48,0.3); transform: translateX(4px); }
    .mobile-menu-content > a i { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: #e8a030; font-size: 1.1rem; flex-shrink: 0; }
    .mobile-menu-content .profile-dropdown, .mobile-menu-content .auth-buttons { width: 100%; margin-top: 8px; }
    .mobile-menu-content .profile-dropdown summary, .mobile-menu-content .auth-buttons > a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #f0f0f0; text-decoration: none; font-size: 0.95rem; font-weight: 600; border-radius: 12px; background: rgba(36,36,36,0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); min-height: 52px; cursor: pointer; }
    .mobile-menu-content .profile-dropdown summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
    .mobile-menu-content .profile-dropdown summary::-webkit-details-marker { display: none; }
    .mobile-menu-content .profile-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #e8a030; box-shadow: 0 0 16px rgba(232,160,48,0.3); }
    .mobile-menu-content .profile-name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobile-menu-content .profile-arrow { font-size: 0.8rem; color: #e8a030; transition: transform 0.15s; }
    .mobile-menu-content .profile-dropdown[open] .profile-arrow { transform: rotate(180deg); }
    .mobile-menu-content .dropdown-menu { position: static; display: none; flex-direction: column; gap: 4px; margin-top: 8px; padding: 8px; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
    .mobile-menu-content .profile-dropdown[open] .dropdown-menu { display: flex; }

    /* Header avatar dropdown - down-right and centered on mobile */
    .profile-dropdown { position: relative !important; }
    .profile-dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 280px !important;
        max-width: 90vw !important;
        margin-top: 8px !important;
        background: rgba(26,26,26,0.95) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
        z-index: 1001 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .profile-dropdown[open] .dropdown-menu,
    .profile-dropdown:hover .dropdown-menu {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    .profile-dropdown .dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #f0f0f0; text-decoration: none; font-size: 0.9rem; border-radius: 8px; background: transparent; }
    .profile-dropdown .dropdown-menu a:hover { background: rgba(232,160,48,0.12); color: #e8a030; }
    .profile-dropdown .dropdown-menu a i { width: 20px; text-align: center; color: #e8a030; }

    .mobile-menu-content .dropdown-menu { position: static; display: none; flex-direction: column; gap: 4px; margin-top: 8px; padding: 8px; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
    .mobile-menu-content .profile-dropdown[open] .dropdown-menu { display: flex; }
    .mobile-menu-content .dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #f0f0f0; text-decoration: none; font-size: 0.9rem; border-radius: 8px; background: transparent; }
    .mobile-menu-content .dropdown-menu a:hover { background: rgba(232,160,48,0.12); color: #e8a030; }
    .mobile-menu-content .dropdown-menu a i { width: 20px; text-align: center; color: #e8a030; }
    .mobile-menu-content .lang-switcher { display: flex; gap: 8px; margin-top: 8px; }
    .mobile-menu-content .lang-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; color: #f0f0f0; text-decoration: none; font-size: 0.9rem; font-weight: 600; border-radius: 10px; background: rgba(36,36,36,0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); min-height: 48px; }
    .mobile-menu-content .lang-btn:hover, .mobile-menu-content .lang-btn.active { background: rgba(232,160,48,0.1); color: #e8a030; border-color: rgba(232,160,48,0.3); }

    /* ===== HERO ===== */
    .home-hero-section { padding: 24px 16px; text-align: center; min-height: auto; }
    .home-hero-image { max-width: 100%; margin: 0 auto 20px; border-radius: 16px; overflow: hidden; border: 2px solid #e8a030; box-shadow: 0 8px 32px rgba(232,160,48,0.2); }
    .home-hero-text h1 { font-size: 1.8rem; margin-bottom: 12px; line-height: 1.2; background: linear-gradient(135deg, #f0f0f0, #e8a030, #e86c2a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .home-hero-text p { font-size: 0.95rem; margin-bottom: 20px; line-height: 1.5; color: #b0b0b0; }
    .home-cta-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #e8a030, #e86c2a); color: #0d0d0d; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1rem; min-height: 48px; box-shadow: 0 4px 24px rgba(232,160,48,0.4); }

    /* ===== PROFILE — ВСЁ ПО ЦЕНТРУ ЧЕРЕЗ FLEX ===== */
    .profile-dashboard-tabs { display: flex; overflow-x: auto; gap: 6px; padding: 8px 16px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; margin: 0 -16px 16px; justify-content: center; }
    .profile-dashboard-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 10px 16px; font-size: 0.85rem; min-height: 44px; border-radius: 8px; background: rgba(36,36,36,0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); color: #f0f0f0; }
    .profile-dashboard-tabs button.active { background: linear-gradient(135deg, #e8a030, #e86c2a); color: #0d0d0d; border-color: #e8a030; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; gap: 12px; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); margin-bottom: 16px; width: 100%; }
    .profile-avatar { width: 96px !important; height: 96px !important; border: 3px solid #e8a030; box-shadow: 0 0 24px rgba(232,160,48,0.3); margin: 0 auto !important; display: block !important; }
    .profile-info { text-align: center !important; width: 100%; }
    .profile-info h2 { font-size: 1.4rem; margin-bottom: 4px; color: #e8a030; text-align: center !important; }
    
    /* ПРОФИЛЬ — ЖЁСТКАЯ ЦЕНТРОВКА ВСЕХ ЭЛЕМЕНТОВ */
    .profile-balance-info,
    .profile-balance-info--extended,
    .profile-balance-info-extended {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
        width: 100% !important;
        margin-top: 12px !important;
    }
    .profile-balance-item {
        flex: 1 1 140px !important;
        max-width: 160px !important;
        min-width: 130px !important;
        background: rgba(36,36,36,0.95) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        border-radius: 12px !important;
        padding: 14px 12px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
    }
    .profile-balance-item i { font-size: 1.5rem !important; color: #e8a030 !important; margin-bottom: 4px !important; }
    .balance-details { display: flex !important; flex-direction: column !important; gap: 2px !important; width: 100% !important; align-items: center !important; justify-content: center !important; }
    .balance-label { font-size: 0.75rem !important; color: #b0b0b0 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; text-align: center !important; }
    .balance-amount { font-size: 1.3rem !important; font-weight: 800 !important; color: #e8a030 !important; line-height: 1.2 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; text-align: center !important; width: 100% !important; }
    .profile-balance-info-extended, .profile-balance-info--extended, .profile-meta-grid, .profile-forum-shortcuts { justify-content: center !important; }
    .profile-meta-card, .profile-forum-shortcut { text-align: center !important; flex: 1 1 120px !important; }
    .profile-forum-shortcuts { gap: 16px !important; }

    .profile-section { padding: 16px !important; margin: 8px 0 !important; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); }
    .profile-section h3 { font-size: 1.15rem; margin-bottom: 12px; color: #e8a030; }
    .profile-form input, .profile-form select, .profile-form textarea { width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px; border: 1px solid #3a3a3a; background: #0d0d0d; color: #f0f0f0; min-height: 48px; box-sizing: border-box; }

    /* ===== STORAGE / ИНВЕНТАРЬ — МАКСИМАЛЬНАЯ ПРОИЗВОДИТЕЛЬНОСТЬ ===== */
    .profile-storage-table { display: none; }
    .profile-storage-mobile { display: block; }
    
    .storage-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important;
        gap: 10px !important;
        padding: 12px !important;
        /* Критично для производительности */
        contain: layout style paint;
    }
    .storage-item-card { 
        background: rgba(36,36,36,0.95) !important;
        backdrop-filter: blur(16px) !important;
        border-radius: 12px !important; 
        padding: 12px 10px !important; 
        margin: 0 !important; 
        border: 1px solid rgba(255,255,255,0.08) !important; 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        min-height: 120px !important;
        /* Ключевое для производительности */
        contain: layout style paint;
        content-visibility: auto;
        transform: translateZ(0);
    }
    .storage-item-card:hover { border-color: #e8a030 !important; transform: translateY(-2px) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important; }
    .storage-item-icon { 
        width: 64px !important; height: 64px !important; 
        border-radius: 12px !important; overflow: hidden !important; 
        flex-shrink: 0 !important; background: #0d0d0d !important; 
        border: 1px solid #3a3a3a !important; 
        display: flex !important; align-items: center !important; justify-content: center !important; 
        margin-bottom: 10px !important; 
    }
    .storage-item-icon img { 
        width: 56px !important; height: 56px !important; 
        object-fit: contain !important; 
        /* Ключевое для производительности */
        content-visibility: auto;
    }
    .storage-item-info { width: 100% !important; text-align: center !important; }
    .storage-item-name { font-weight: 700 !important; font-size: 0.75rem !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; color: #f0f0f0 !important; margin-bottom: 6px !important; }
    .storage-item-time { font-size: 0.65rem !important; color: #b0b0b0 !important; margin-bottom: 8px !important; }
    .storage-item-controls { display: flex !important; align-items: center !important; gap: 6px !important; justify-content: center !important; flex-wrap: wrap !important; margin-top: 6px !important; padding-top: 8px !important; border-top: 1px solid rgba(255,255,255,0.08) !important; width: 100% !important; }
    .storage-qty-btn { width: 36px !important; height: 36px !important; border-radius: 10px !important; background: #0d0d0d !important; border: 1px solid #e8a030 !important; color: #e8a030 !important; font-size: 1.1rem !important; display: flex !important; align-items: center !important; justify-content: center !important; }
    .storage-qty-input { width: 52px !important; text-align: center !important; padding: 6px !important; font-size: 0.85rem !important; border-radius: 8px !important; border: 1px solid #3a3a3a !important; background: #0d0d0d !important; color: #f0f0f0 !important; }
    .storage-checkbox { width: 20px !important; height: 20px !important; accent-color: #e8a030 !important; }
    
    .profile-storage-table { display: none; }
    .profile-storage-mobile { display: block; }

    /* ===== МОДАЛЬНЫЕ ОКНА — ТОЧНОЕ ПОЗИЦИОНИРОВАНИЕ СПРАВА ПО ЦЕНТРУ ===== */
    /* Базовый класс для всех модалок */
    .modal { 
        padding: 0 !important; 
        z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding-right: 16px !important;
    }
    .modal-content { 
        width: 92% !important; 
        max-width: 360px !important; 
        max-height: 85vh !important; 
        border-radius: 16px !important; 
        overflow: hidden !important; 
        background: rgba(26,26,26,0.95) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important;
        display: flex !important;
        flex-direction: column !important;
        animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important;
    }
    @keyframes modalSlideIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
    .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    .modal-footer { padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; display: flex !important; gap: 8px !important; justify-content: center !important; }

    /* Character Select Modal — скрыта по умолчанию, справа по центру */
    #character-select-modal.modal { display: none !important; }
    #character-select-modal.modal[hidden] { display: none !important; }
    #character-select-modal.modal:not([hidden]) {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding-right: 16px !important;
        position: fixed !important; inset: 0 !important; z-index: 2000 !important;
        background: rgba(13,13,13,0.7) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }
    #character-select-modal .modal-content { width: 92% !important; max-width: 360px !important; max-height: 85vh !important; border-radius: 16px !important; overflow: hidden !important; background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important; display: flex !important; flex-direction: column !important; animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    @keyframes modalSlideIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
    #character-select-modal .modal-content .close { display: none !important; }
    #character-select-modal .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #character-select-modal .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    #character-select-modal .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    #character-select-modal .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    #character-select-modal .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    #character-select-modal .character-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; gap: 10px !important; justify-content: center !important; }
    #character-select-modal .character-item { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 8px !important; padding: 12px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.08) !important; cursor: pointer !important; transition: all 0.15s !important; min-height: 100px !important; }
    #character-select-modal .character-item:hover { border-color: #e8a030 !important; transform: translateY(-2px) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important; }
    #character-select-modal .character-item img { width: 56px !important; height: 56px !important; object-fit: contain !important; border-radius: 8px !important; }
    #character-select-modal .character-item span { font-size: 0.85rem !important; font-weight: 600 !important; color: #f0f0f0 !important; text-align: center !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 100% !important; }

    /* Fix Confirm Modal — скрыта по умолчанию, справа по центру */
    #fix-confirm-modal.modal { display: none !important; }
    #fix-confirm-modal.modal[hidden] { display: none !important; }
    #fix-confirm-modal.modal:not([hidden]) {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding-right: 16px !important;
        position: fixed !important; inset: 0 !important; z-index: 2000 !important;
        background: rgba(13,13,13,0.7) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }
    #fix-confirm-modal .modal-content { width: 92% !important; max-width: 340px !important; max-height: 85vh !important; border-radius: 16px !important; overflow: hidden !important; background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important; display: flex !important; flex-direction: column !important; animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    #fix-confirm-modal .modal-content .close { display: none !important; }
    #fix-confirm-modal .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    #fix-confirm-modal .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    #fix-confirm-modal .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    #fix-confirm-modal #fix-confirm-message { font-size: 0.95rem !important; color: #f0f0f0 !important; line-height: 1.5 !important; margin: 0 !important; text-align: center !important; }
    #fix-confirm-modal .modal-footer { display: flex !important; gap: 10px !important; justify-content: center !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-btn { min-width: 100px !important; flex: 1 !important; }

    /* Общие модалки — справа по центру */
    .modal { 
        padding: 0 !important; 
        z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding-right: 16px !important;
    }
    .modal-content { 
        width: 92% !important; 
        max-width: 360px !important; 
        max-height: 85vh !important; 
        border-radius: 16px !important; 
        overflow: hidden !important; 
        background: rgba(26,26,26,0.95) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important;
        display: flex !important;
        flex-direction: column !important;
        animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important;
    }
    .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    .modal-footer { padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; display: flex !important; gap: 8px !important; justify-content: center !important; }

    /* Формы в модалках */
    .modal-form-group { margin-bottom: 12px !important; }
    .modal-form-label { display: block !important; margin-bottom: 5px !important; font-weight: 600 !important; font-size: 0.8rem !important; color: #b0b0b0 !important; text-align: center !important; }
    .modal-form-input, .modal-form-select, .modal-form-textarea { 
        width: 100% !important; 
        padding: 10px 12px !important; 
        font-size: 0.95rem !important; 
        border-radius: 10px !important; 
        border: 1px solid #3a3a3a !important; 
        background: #0d0d0d !important; 
        color: #f0f0f0 !important; 
        min-height: 44px !important; 
        box-sizing: border-box !important; 
        text-align: center !important;
    }
    .modal-form-input:focus, .modal-form-select:focus, .modal-form-textarea:focus { outline: none !important; border-color: #e8a030 !important; box-shadow: 0 0 0 3px rgba(232,160,48,0.2) !important; }
    .modal-form-textarea { min-height: 80px !important; resize: vertical !important; text-align: left !important; }
    
    .modal-btn { min-height: 44px !important; padding: 10px 20px !important; font-size: 0.9rem !important; font-weight: 700 !important; border-radius: 10px !important; transition: all 0.15s !important; }
    .modal-btn-primary { background: linear-gradient(135deg, #e8a030, #e86c2a) !important; color: #0d0d0d !important; border: none !important; box-shadow: 0 2px 8px rgba(232,160,48,0.3) !important; }
    .modal-btn-primary:hover { transform: translateY(-1px) !important; box-shadow: 0 4px 16px rgba(232,160,48,0.4) !important; }
    .modal-btn-secondary { background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(16px) !important; color: #f0f0f0 !important; border: 1px solid rgba(255,255,255,0.08) !important; }
    .modal-btn-secondary:hover { background: #2e2e2e !important; border-color: #e8a030 !important; }
    .modal-btn-danger { background: linear-gradient(135deg, #e84a4a, #c83a3a) !important; color: #fff !important; border: none !important; }

    /* ===== PROFILE — ЖЁСТКАЯ ЦЕНТРОВКА ВСЕГО ===== */
    .profile-dashboard-tabs { display: flex; overflow-x: auto; gap: 6px; padding: 8px 16px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; margin: 0 -16px 16px; justify-content: center; }
    .profile-dashboard-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 10px 16px; font-size: 0.85rem; min-height: 44px; border-radius: 8px; background: rgba(36,36,36,0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); color: #f0f0f0; }
    .profile-dashboard-tabs button.active { background: linear-gradient(135deg, #e8a030, #e86c2a); color: #0d0d0d; border-color: #e8a030; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; gap: 12px; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); margin-bottom: 16px; width: 100%; }
    .profile-avatar { width: 96px !important; height: 96px !important; border: 3px solid #e8a030; box-shadow: 0 0 24px rgba(232,160,48,0.3); margin: 0 auto !important; display: block !important; }
    .profile-info { text-align: center !important; width: 100%; }
    .profile-info h2 { font-size: 1.4rem; margin-bottom: 4px; color: #e8a030; text-align: center !important; }
    
    .profile-balance-info, .profile-balance-info--extended, .profile-balance-info-extended {
        display: flex !important; flex-wrap: wrap !important; gap: 10px !important; justify-content: center !important; width: 100% !important; margin-top: 12px !important;
    }
    .profile-balance-item {
        flex: 1 1 140px !important; max-width: 160px !important; min-width: 130px !important;
        background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 12px !important; padding: 14px 12px !important; text-align: center !important; display: flex !important; flex-direction: column !important; align-items: center !important; gap: 4px !important;
    }
    .profile-balance-item i { font-size: 1.5rem !important; color: #e8a030 !important; margin-bottom: 4px !important; }
    .balance-details { display: flex !important; flex-direction: column !important; gap: 2px !important; width: 100% !important; align-items: center !important; justify-content: center !important; }
    .balance-label { font-size: 0.75rem !important; color: #b0b0b0 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; text-align: center !important; }
    .balance-amount { font-size: 1.3rem !important; font-weight: 800 !important; color: #e8a030 !important; line-height: 1.2 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; text-align: center !important; width: 100% !important; }

    .profile-section { padding: 16px !important; margin: 8px 0 !important; background: rgba(26,26,26,0.95); backdrop-filter: blur(24px); border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); }
    .profile-section h3 { font-size: 1.15rem; margin-bottom: 12px; color: #e8a030; }
    .profile-form input, .profile-form select, .profile-form textarea { width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px; border: 1px solid #3a3a3a; background: #0d0d0d; color: #f0f0f0; min-height: 48px; box-sizing: border-box; }

    /* ===== STORAGE / ИНВЕНТАРЬ — ОПТИМИЗАЦИЯ ===== */
    .profile-storage-table { display: none; }
    .profile-storage-mobile { display: block; }
    
    .storage-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important;
        gap: 10px !important;
        padding: 12px !important;
        contain: layout style paint;
    }
    .storage-item-card { 
        background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important;
        border-radius: 12px !important; padding: 12px 10px !important; margin: 0 !important; 
        border: 1px solid rgba(255,255,255,0.08) !important; 
        display: flex !important; flex-direction: column !important; align-items: center !important; min-height: 120px !important;
        contain: layout style paint;
        content-visibility: auto;
        transform: translateZ(0);
    }
    .storage-item-card:hover { border-color: #e8a030 !important; transform: translateY(-2px) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important; }
    .storage-item-icon { width: 64px !important; height: 64px !important; border-radius: 12px !important; overflow: hidden !important; flex-shrink: 0 !important; background: #0d0d0d !important; border: 1px solid #3a3a3a !important; display: flex !important; align-items: center !important; justify-content: center !important; margin-bottom: 10px !important; }
    .storage-item-icon img { width: 56px !important; height: 56px !important; object-fit: contain !important; content-visibility: auto; }
    .storage-item-info { width: 100% !important; text-align: center !important; }
    .storage-item-name { font-weight: 700 !important; font-size: 0.75rem !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; color: #f0f0f0 !important; margin-bottom: 6px !important; }
    .storage-item-time { font-size: 0.65rem !important; color: #b0b0b0 !important; margin-bottom: 8px !important; }
    .storage-item-controls { display: flex !important; align-items: center !important; gap: 6px !important; justify-content: center !important; flex-wrap: wrap !important; margin-top: 6px !important; padding-top: 8px !important; border-top: 1px solid rgba(255,255,255,0.08) !important; width: 100% !important; }
    .storage-qty-btn { width: 36px !important; height: 36px !important; border-radius: 10px !important; background: #0d0d0d !important; border: 1px solid #e8a030 !important; color: #e8a030 !important; font-size: 1.1rem !important; display: flex !important; align-items: center !important; justify-content: center !important; }
    .storage-qty-input { width: 52px !important; text-align: center !important; padding: 6px !important; font-size: 0.85rem !important; border-radius: 8px !important; border: 1px solid #3a3a3a !important; background: #0d0d0d !important; color: #f0f0f0 !important; }
    .storage-qty-max { font-size: 0.65rem !important; color: #b0b0b0 !important; }
    .storage-checkbox { width: 20px !important; height: 20px !important; accent-color: #e8a030 !important; }
    .storage-checkbox-label { display: flex !important; align-items: center !important; gap: 4px !important; font-size: 0.7rem !important; color: #b0b0b0 !important; cursor: pointer !important; }
    
    .profile-storage-table { display: none; }
    .profile-storage-mobile { display: block; }

    /* ===== МОДАЛЬНЫЕ ОКНА — СПРАВА ПО ЦЕНТРУ ===== */
    .modal { 
        padding: 0 !important; z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding-right: 16px !important;
    }
    .modal-content { 
        width: 92% !important; max-width: 360px !important; max-height: 85vh !important; 
        border-radius: 16px !important; overflow: hidden !important; 
        background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; 
        border: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important;
        display: flex !important; flex-direction: column !important;
        animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important;
    }
    .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    .modal-footer { padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; display: flex !important; gap: 8px !important; justify-content: center !important; }

    /* Character Select Modal */
    #character-select-modal.modal { display: none !important; }
    #character-select-modal.modal[hidden] { display: none !important; }
    #character-select-modal.modal:not([hidden]) {
        display: flex !important; align-items: center !important; justify-content: flex-end !important; padding-right: 16px !important;
        position: fixed !important; inset: 0 !important; z-index: 2000 !important;
        background: rgba(13,13,13,0.7) !important; backdrop-filter: blur(16px) !important;
    }
    #character-select-modal .modal-content { width: 92% !important; max-width: 360px !important; max-height: 85vh !important; border-radius: 16px !important; overflow: hidden !important; background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important; display: flex !important; flex-direction: column !important; animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    @keyframes modalSlideIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
    #character-select-modal .modal-content .close { display: none !important; }
    #character-select-modal .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #character-select-modal .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    #character-select-modal .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    #character-select-modal .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    #character-select-modal .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    #character-select-modal .character-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; gap: 10px !important; justify-content: center !important; }
    #character-select-modal .character-item { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 8px !important; padding: 12px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.08) !important; cursor: pointer !important; transition: all 0.15s !important; min-height: 100px !important; }
    #character-select-modal .character-item:hover { border-color: #e8a030 !important; transform: translateY(-2px) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important; }
    #character-select-modal .character-item img { width: 56px !important; height: 56px !important; object-fit: contain !important; border-radius: 8px !important; }
    #character-select-modal .character-item span { font-size: 0.85rem !important; font-weight: 600 !important; color: #f0f0f0 !important; text-align: center !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 100% !important; }

    #fix-confirm-modal.modal { display: none !important; }
    #fix-confirm-modal.modal[hidden] { display: none !important; }
    #fix-confirm-modal.modal:not([hidden]) { display: flex !important; align-items: center !important; justify-content: flex-end !important; padding-right: 16px !important; position: fixed !important; inset: 0 !important; z-index: 2000 !important; background: rgba(13,13,13,0.7) !important; backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important; }
    #fix-confirm-modal .modal-content { width: 92% !important; max-width: 340px !important; max-height: 85vh !important; border-radius: 16px !important; overflow: hidden !important; background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important; display: flex !important; flex-direction: column !important; animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    #fix-confirm-modal .modal-content .close { display: none !important; }
    #fix-confirm-modal .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    #fix-confirm-modal .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    #fix-confirm-modal .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    #fix-confirm-modal #fix-confirm-message { font-size: 0.95rem !important; color: #f0f0f0 !important; line-height: 1.5 !important; margin: 0 !important; text-align: center !important; }
    #fix-confirm-modal .modal-footer { display: flex !important; gap: 10px !important; justify-content: center !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    #fix-confirm-modal .modal-btn { min-width: 100px !important; flex: 1 !important; }

    /* Общие модалки */
    .modal { padding: 0 !important; z-index: 2000 !important; display: flex !important; align-items: center !important; justify-content: flex-end !important; padding-right: 16px !important; }
    .modal-content { width: 92% !important; max-width: 360px !important; max-height: 85vh !important; border-radius: 16px !important; overflow: hidden !important; background: rgba(26,26,26,0.95) !important; backdrop-filter: blur(24px) !important; -webkit-backdrop-filter: blur(24px) !important; border: 1px solid rgba(255,255,255,0.08) !important; box-shadow: 0 0 48px rgba(0,0,0,0.7), inset 1px 1px 0 rgba(255,255,255,0.08) !important; display: flex !important; flex-direction: column !important; animation: modalSlideIn 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    .modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; }
    .modal-title { font-size: 1rem !important; font-weight: 700 !important; color: #e8a030 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 200px !important; text-align: center !important; flex: 1 !important; }
    .modal-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #0d0d0d !important; backdrop-filter: blur(16px) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: #f0f0f0 !important; font-size: 1.2rem !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.15s !important; flex-shrink: 0 !important; }
    .modal-close:hover { background: #e86c2a !important; border-color: #e86c2a !important; color: #fff !important; transform: rotate(90deg) !important; }
    .modal-body { flex: 1 1 auto !important; overflow-y: auto !important; padding: 16px !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; text-align: center !important; }
    .modal-footer { padding: 14px 16px !important; background: rgba(36,36,36,0.95) !important; backdrop-filter: blur(16px) !important; border-top: 1px solid rgba(255,255,255,0.08) !important; flex-shrink: 0 !important; display: flex !important; gap: 8px !important; justify-content: center !important; }

    /* Общие фиксы — только необходимое */
    .section-header h2 { font-size: 1.2rem; margin-bottom: 12px; color: #e8a030; }
    .section-content { padding: 0 16px !important; }
    .tab-content { display: none; }
    .tab-content.active { display: block; }
    
    button, .btn, .button, a, input, select, textarea,
    .hamburger, .mobile-menu-content > a, .lang-btn,
    .storage-qty-btn, .promocode-btn, .tab-button,
    .profile-dashboard-tabs button, .profile-trade-tabs button,
    .expenses-tabs button, .promocode-tabs button,
    .storage-qty-btn, .quantity-decrease, .quantity-increase,
    .modal-btn, .modal-close {
        min-height: 44px !important; min-width: 44px !important; padding: 10px 16px !important; font-size: 0.95rem !important;
    }
    
    input, select, textarea { min-height: 44px !important; font-size: 1rem !important; padding: 10px 12px !important; }
    input[type=\"text\"], input[type=\"email\"], input[type=\"password\"], input[type=\"number\"], input[type=\"search\"], textarea, select { font-size: 16px !important; }
    img { max-width: 100%; height: auto; }
    .storage-item-icon img { width: 56px !important; height: 56px !important; object-fit: contain !important; content-visibility: auto; }
    
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive table { min-width: 600px; }
    
    p, span, div, td, th { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
    :focus-visible { outline: 2px solid #e8a030; outline-offset: 2px; }
    @media print { .mobile-menu, .nav-container, .hamburger { display: none !important; } }
}



