/* =====================================================
       INVENTORY BAR
    ===================================================== */

    /* =====================================================
       TOP NAV
    ===================================================== */
/* =====================================================
       PROFILE PAGE
    ===================================================== */
    .profile-page {
      --profile-bg: #0e121a;
      --profile-surface: #111722;
      --profile-surface-soft: #131a25;
      --profile-border: #1b2636;
      --profile-muted: #687894;
      --profile-muted-strong: #8b96ab;
      --profile-gold: #f2b31e;
      --profile-gold-end: #f0a20d;
      --profile-cta-gradient: linear-gradient(180deg, #ffdc5c 0%, #f6bf35 48%, #e99a17 100%);
      --profile-font: 'Google Sans', 'Google Sans Text', 'Product Sans', 'Helvetica Neue', Arial, sans-serif;
      --profile-item-font: tfutura, Futura, 'Helvetica Neue', Arial, sans-serif;
      min-height: calc(100vh - 160px);
      padding-bottom: 40px;
      width: 100%;
      min-width: 0;
      background: var(--profile-bg);
      font-family: var(--profile-font);
    }
    .profile-page :is(
      .profile-username,
      .profile-balance-val,
      .progress-level-badge,
      .progress-label,
      .level-reward-btn,
      .card-title-text,
      .card-input-wrap input,
      .card-form-message,
      .profile-action-btn,
      .profile-ticket-title,
      .profile-ticket-arrow,
      .best-drop-title,
      .best-drop-price,
      .best-drop-btn,
      .inv-tab,
      .inv-balance-badge,
      .inv-toggle-wrap,
      .inv-sell-all,
      .skin-card-price,
      .skin-card-status,
      .skin-card-empty,
      .upgrade-item-price,
      .upgrade-card-footer,
      .contract-mini-price,
      .contract-footer-cell
    ) {
      font-family: var(--profile-font);
      letter-spacing: 0;
    }
    .profile-page :is(
      .best-drop-name,
      .best-drop-subname,
      .skin-card-name,
      .skin-card-subname,
      .upgrade-item-name,
      .upgrade-item-sub,
      .contract-mini-name,
      .contract-mini-sub
    ) {
      font-family: tfutura, Futura, 'Helvetica Neue', Arial, sans-serif;
    }
    .profile-page .contents {
      width: min(100%, 1920px);
      max-width: 100%;
      min-width: 0;
    }

    .profile-page .breadcrumb-home {
      background: transparent;
      border: 0;
      border-radius: 0;
      color: #e2a915;
    }

    .profile-page .breadcrumb-home:hover {
      background: transparent;
      border: 0;
      color: #e2a915;
    }

    .profile-page .breadcrumb-home svg {
      fill: none;
      stroke: currentColor;
    }

    /* =====================================================
       PROFILE INFO SECTION
    ===================================================== */
    .profile-info-section {
      padding: 18px 24px 0;
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr) minmax(220px, 1fr);
      gap: 24px;
      max-width: 1920px;
      margin: 0 auto;
      box-sizing: border-box;
      align-items: stretch;
    }
    .profile-info-section > * {
      min-width: 0;
    }
    .public-profile-page .profile-info-section {
      grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
      justify-content: stretch;
    }

    .public-profile-page .contents {
      width: min(100%, 1280px);
    }

    .public-profile-page .profile-user-row {
      margin-bottom: 18px;
    }

    .public-profile-page .profile-balance-val {
      font-size: 26px;
      font-weight: 700;
    }

    .public-profile-page .progress-label-row {
      gap: 8px;
    }

    .public-profile-page .progress-label {
      white-space: normal;
    }

    .public-best-drop-card {
      min-height: 100%;
    }

    .public-inventory-section {
      margin-top: 26px;
    }

    .public-inventory-section .inventory-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
    }

    .public-inventory-toolbar {
      align-items: center;
      gap: 20px;
      margin-bottom: 22px;
    }

    .public-inventory-section .inventory-title {
      font-size: 12px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0;
      text-transform: none;
    }

    .public-inventory-title {
      margin-left: auto;
      opacity: 0.9;
    }

    .public-profile-page .upgrade-card,
    .public-profile-page .contract-result-card {
      color: inherit;
      text-decoration: none;
    }

    /* =====================================================
       LEFT CARD
    ===================================================== */
    .profile-card {
      background: #111722;
      border: 1px solid var(--profile-border);
      border-radius: 12px;
      padding: 28px 32px 30px;
      min-width: 0;
      min-height: 328px;
      box-sizing: border-box;
    }

    /* User row contains: avatar + (name/balance) + actions on the right */
    .profile-user-row {
      display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 30px;
      min-width: 0;
    }
    .profile-avatar-wrap {
      width: 56px; height: 56px; border-radius: 0; overflow: hidden; flex-shrink: 0;
      border: 1px solid rgba(242,179,30,0.34);
    }
    .profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
    .profile-user-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 220px; max-width: 100%; }
    .profile-username-row { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
    .profile-username { font-size: 18px; font-weight: 500; line-height: 1.2; color: var(--profile-muted-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
    .profile-verified {
      width: 18px; height: 18px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .profile-verified img { width: 18px; height: 18px; object-fit: contain; }
    .profile-balance-row { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
    .profile-balance-val { font-size: 26px; font-weight: 700; line-height: 1.15; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
    .profile-balance-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }

    /* =====================================================
       PROFILE ACTION BUTTONS — desktop: inline with user-row on the right
    ===================================================== */
    .profile-actions {
      display: flex;
      gap: 16px;
      flex: 0 1 auto;
      flex-wrap: wrap;
      width: auto;
      max-width: 100%;
      margin-left: auto;
      align-items: center;
      justify-content: flex-end;
    }

    .profile-action-btn {
      min-height: 56px;
      padding: 0 32px;
      border-radius: 10px;
      border: none;
      font-size: 18px;
      font-weight: 700;
      line-height: 1;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      white-space: nowrap;
      flex: 0 0 auto;
      min-width: 0;
      width: auto;
      max-width: 100%;
    }
    .profile-action-btn.primary,
    .best-drop-btn {
      background: var(--profile-cta-gradient);
      border: 0;
      color: #ffffff;
      font-family: var(--profile-font);
      font-size: 18px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0;
      text-decoration: none;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 8px 18px rgba(233,154,23,0.18);
    }
    .profile-action-btn.primary:hover,
    .best-drop-btn:hover {
      transform: translateY(-1px);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), 0 10px 22px rgba(233,154,23,0.24);
    }
    .profile-action-btn.primary .btn-plus {
      font-size: 18px; font-weight: 900; line-height: 1; margin-right: 2px;
    }

    .profile-action-btn.secondary {
      padding: 0 32px;
      background: transparent;
      border: 2px solid rgba(255,255,255,0.9);
      color: #ffffff;
    }
    .profile-action-btn.secondary:hover { border-color: #6a6a88; background: rgba(255,255,255,0.04); }
    .profile-action-btn.secondary img { width: 14px; height: 14px; }

    .profile-action-btn.primary-icon,
    .profile-action-btn.secondary-icon {
      display: none;
    }

    /* =====================================================
       PROGRESS LIST
    ===================================================== */
    .profile-progress-list {
      background: #0e121a;
      border-radius: 12px;
      padding: 28px 32px 30px;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }
    .progress-item { display: flex; align-items: center; gap: 32px; }

    /* Все бейджи (LVL + иконки) — одинаковая pill-форма, синевато-серая */
    .progress-level-badge,
    .progress-icon-badge {
      width: 90px;
      height: 36px;
      border-radius: 24px;
      background: #222b3e;
      border: 1px solid #2e3a52;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .progress-level-badge {
      font-size: 18px; font-weight: 500; color: var(--profile-muted-strong);
      line-height: 1;
      letter-spacing: 0;
    }
    .progress-level-badge.lv {
      /* Same look as others - no green */
      background: #222b3e;
      border: 1px solid #2e3a52;
      color: var(--profile-muted-strong);
    }
    .progress-icon-badge img {
      width: 16px; height: 16px; object-fit: contain; opacity: 0.7;
    }

    .progress-content { flex: 1; min-width: 0; }
    .progress-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .progress-label { font-size: 16px; font-weight: 500; line-height: 1.2; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .progress-label .muted { color: var(--profile-muted); }
    .progress-info {
      width: 18px; height: 18px;
      border-radius: 50%;
      border: 1px solid #3a3a55;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; flex-shrink: 0;
      color: var(--profile-muted); font-size: 10px; font-weight: 600;
      background: transparent;
      appearance: none;
      font-family: inherit;
      padding: 0;
      position: relative;
    }
    .progress-info:hover { color: #fff; border-color: #6a6a88; }
    .progress-info.is-open,
    .progress-info:focus-visible {
      color: #fff;
      border-color: var(--profile-gold);
      outline: none;
    }
    .progress-info.is-open::after,
    .progress-info:focus-visible::after {
      content: attr(data-profile-tooltip);
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      z-index: 20;
      width: min(240px, 75vw);
      padding: 10px 12px;
      border: 1px solid #3a3a55;
      border-radius: 8px;
      background: #17172b;
      color: #fff;
      font-size: 12px;
      font-weight: 500;
      line-height: 1.35;
      text-align: left;
      box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    }
    .progress-meter-row {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }
    .progress-bar-wrap { width: 100%; height: 6px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
    .progress-meter-row .progress-bar-wrap {
      flex: 1 1 auto;
      min-width: 0;
    }
    .progress-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
    .progress-bar-fill.xp       { background: linear-gradient(90deg, #4BB543, #6dd663); width: 5%; }
    .progress-bar-fill.upgrade  { background: linear-gradient(90deg, var(--profile-gold), var(--profile-gold-end)); width: 50%; }
    .progress-bar-fill.contract { background: linear-gradient(90deg, var(--profile-gold), var(--profile-gold-end)); width: 33%; }
    .progress-bar-fill.case     { background: linear-gradient(90deg, var(--profile-gold), var(--profile-gold-end)); width: 10%; }
    .level-reward-form {
      flex: 0 0 auto;
      margin: 0;
    }
    .level-reward-btn {
      min-width: 96px;
      height: 32px;
      padding: 0 18px;
      border: 0;
      border-radius: 8px;
      background: linear-gradient(180deg, #ffd95a 0%, #eea300 100%);
      color: #fff;
      font-family: inherit;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 14px rgba(238,163,0,0.2);
      transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
      white-space: nowrap;
    }
    .level-reward-btn:hover {
      transform: translateY(-1px);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 18px rgba(238,163,0,0.28);
    }
    .level-reward-btn:disabled {
      cursor: default;
      opacity: 0.65;
      transform: none;
      box-shadow: none;
    }

    /* =====================================================
       MIDDLE CARDS
    ===================================================== */
    .profile-middle { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

    .coupon-card, .email-card, .trade-url-card {
      background: #111722;
      border: 1px solid var(--profile-border);
      border-radius: 12px;
      padding: 32px;
      flex: 1 1 0;
      min-width: 0;
      box-sizing: border-box;
    }

    .card-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }

    .card-title-icon {
      width: 52px; height: 52px; border-radius: 8px;
      background: rgba(242,179,30,0.13); border: 1px solid rgba(242,179,30,0.28);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
      font-size: 40px; font-weight: 500; color: var(--profile-gold); line-height: 1;
    }
    .card-title-icon img { width: 18px; height: 18px; object-fit: contain; }

    .card-title-text { font-size: 24px; line-height: 1.15; color: #ffffff; text-transform: none; letter-spacing: 0; font-weight: 700; }
    .card-subtitle { display: none; }
    .card-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
      min-width: 0;
    }
    .card-input-wrap input {
      width: 100%;
      height: 48px;
      box-sizing: border-box;
      background: #0e121a;
      border: 1px solid #1b2636;
      border-radius: 8px;
      color: #ffffff;
      font-size: 15px;
      font-weight: 500;
      line-height: 1.2;
      padding: 0 44px 0 16px;
      outline: none;
      transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
      font-family: inherit;
    }
    .card-input-wrap input::placeholder { color: #526079; }
    .card-input-wrap input:focus {
      background: #111925;
      border-color: rgba(242,179,30,0.74);
      box-shadow: 0 0 0 1px rgba(242,179,30,0.14);
    }
    .card-input-btn {
      position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      width: 32px; height: 32px; background: transparent; border: 0; border-radius: 6px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px; font-weight: 700; color: var(--profile-muted-strong); transition: color 0.2s, background 0.2s;
    }
    .card-input-btn:hover { color: var(--profile-gold); background: rgba(242,179,30,0.08); }
    .card-input-btn svg { width: 22px; height: 22px; }
    .card-form-message {
      margin-top: 10px;
      font-size: 11px;
      line-height: 1.35;
    }
    .card-form-message.success { color: #55d66b; }
    .card-form-message.error { color: #ff6b6b; }

    .trade-url-card {
      flex: 0 0 auto;
    }

    .profile-extra-card {
      display: none;
    }

    .profile-extra-card.is-visible {
      display: block;
    }

    .profile-ticket-link {
      min-height: 96px;
      padding: 0 32px;
      border: 1px solid var(--profile-border);
      border-radius: 12px;
      background: #111722;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      flex: 0 0 auto;
      text-decoration: none;
      box-sizing: border-box;
      transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .profile-ticket-link:hover {
      border-color: #2b3a52;
      background: #131a25;
      transform: translateY(-1px);
    }

    .profile-ticket-title {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
      font-size: 24px;
      line-height: 1.15;
      font-weight: 700;
      color: #ffffff;
    }

    .profile-ticket-status {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #72d981;
      box-shadow: 0 0 12px rgba(114,217,129,0.42);
      flex: 0 0 auto;
    }

    .profile-ticket-arrow {
      width: 32px;
      height: 32px;
      color: #687894;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      transition: color 0.18s ease, transform 0.18s ease;
    }

    .profile-ticket-link:hover .profile-ticket-arrow {
      color: var(--profile-gold);
      transform: translateX(2px);
    }

    .profile-ticket-arrow svg {
      width: 24px;
      height: 24px;
    }

    .trade-url-card.is-highlighted {
      border-color: rgba(242,179,30,0.75);
      box-shadow: 0 0 0 1px rgba(242,179,30,0.2), 0 10px 30px rgba(0,0,0,0.18);
    }

    .profile-modal[hidden] {
      display: none !important;
    }

    .profile-modal {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      box-sizing: border-box;
    }

    .profile-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(7, 8, 18, 0.72);
      backdrop-filter: blur(3px);
    }

    .profile-modal-card {
      position: relative;
      z-index: 1;
      width: min(420px, 100%);
      border: 1px solid #2a2a40;
      border-radius: 16px;
      background: #15152a;
      padding: 22px;
      box-shadow: 0 24px 70px rgba(0,0,0,0.45);
      color: #fff;
      box-sizing: border-box;
      font-family: var(--profile-font);
    }

    .profile-modal-close {
      position: absolute;
      top: 14px;
      right: 14px;
      width: 28px;
      height: 28px;
      border: 1px solid #34344e;
      border-radius: 8px;
      background: transparent;
      color: #8888aa;
      cursor: pointer;
      font-size: 20px;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: inherit;
    }

    .profile-modal-close:hover {
      color: #fff;
      border-color: #6a6a88;
    }

    .profile-modal-title {
      margin: 0 36px 18px 0;
      font-size: 16px;
      line-height: 1.2;
      font-weight: 700;
    }

    .deposit-form {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .deposit-field {
      display: flex;
      flex-direction: column;
      gap: 8px;
      color: #8888aa;
      font-size: 11px;
      line-height: 1.2;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0;
    }

    .deposit-field input {
      width: 100%;
      height: 46px;
      border: 1px solid #2a2a40;
      border-radius: 10px;
      background: rgba(255,255,255,0.04);
      color: #fff;
      padding: 0 14px;
      box-sizing: border-box;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.2;
      font-family: inherit;
      outline: none;
    }

    .deposit-field input:focus {
      border-color: var(--profile-gold);
    }

    .deposit-quick-amounts {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .deposit-quick-amounts button {
      height: 38px;
      border: 1px solid #34344e;
      border-radius: 10px;
      background: rgba(255,255,255,0.035);
      color: #fff;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      font-family: inherit;
    }

    .deposit-quick-amounts button:hover {
      border-color: var(--profile-gold);
      color: var(--profile-gold);
    }

    .deposit-submit-btn {
      width: 100%;
      height: 46px;
      border: none;
      border-radius: 10px;
      background: linear-gradient(180deg, var(--profile-gold) 0%, var(--profile-gold-end) 100%);
      color: #fff;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      font-family: inherit;
    }

    .deposit-submit-btn:disabled,
    .card-input-btn:disabled {
      cursor: progress;
      opacity: 0.65;
    }

    /* =====================================================
       RIGHT CARD — BEST DROP
    ===================================================== */
    .best-drop-card {
      background: #111722;
      border: 1px solid var(--profile-border);
      border-radius: 12px;
      padding: 32px 34px 38px;
      display: flex; flex-direction: column; align-items: center;
      position: relative;
      min-width: 0;
      min-height: 328px;
      box-sizing: border-box;
    }

    .best-drop-title {
      width: 100%;
      font-size: 24px;
      line-height: 1.2;
      font-weight: 700;
      color: #ffffff;
      margin-bottom: 10px;
      align-self: center;
      text-align: center;
    }

    .best-drop-price {
      display: flex; align-items: center; gap: 6px;
      font-size: 18px; line-height: 1; font-weight: 700; color: #5bdb6f;
      position: absolute; top: 86px; right: 32px;
      z-index: 3;
    }
    .best-drop-price img {
      width: 16px !important;
      height: 16px !important;
    }
    .best-drop-price .coin-dot {
      width: 10px; height: 10px; background: #4BB543; border-radius: 50%; display: inline-block; flex-shrink: 0;
    }

    .best-drop-img-wrap {
      width: 168px;
      height: 168px;
      border-radius: 50%;
      position: relative;
      margin: 4px 0 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      overflow: visible;
    }
    .best-drop-img-wrap::before {
      content: '';
      display: none;
    }
    .best-drop-img-circle {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      z-index: 0;
      opacity: 0.96;
      background-image: url('../../img/bg_img_4.svg');
      background-position: center;
      background-size: cover;
      border: 1px solid rgba(136,136,170,0.34);
    }
    .best-drop-gun {
      width: 218px;
      height: 132px;
      flex-shrink: 0;
      max-width: none;
      object-fit: contain;
      position: relative;
      z-index: 2;
      filter: drop-shadow(0 8px 16px rgba(0,0,0,0.58));
    }

    .best-drop-name { font-family: var(--profile-item-font); font-size: 16px; line-height: 1.2; font-weight: 500; color: var(--profile-muted-strong); margin-bottom: 2px; align-self: flex-start; width: 100%; }
    .best-drop-subname {
      font-family: var(--profile-item-font);
      font-size: 18px; line-height: 1.2; font-weight: 700; color: #ffffff;
      margin-bottom: 30px;
      align-self: flex-start;
      width: 100%;
      padding-bottom: 24px;
      border-bottom: 2px solid var(--profile-gold);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .best-drop-img-circle.yellow { background-image: url('../../img/bg_img_3.svg'); border-color: rgba(255,215,0,0.46); }
    .best-drop-img-circle.purple { background-image: url('../../img/bg_img.svg'); border-color: rgba(151,93,248,0.46); }
    .best-drop-img-circle.red { background-image: url('../../img/bg_img_1.svg'); border-color: rgba(235,75,75,0.46); }
    .best-drop-img-circle.blue { background-image: url('../../img/bg_img_2.svg'); border-color: rgba(75,105,255,0.46); }
    .best-drop-img-circle.gray { background-image: url('../../img/bg_img_4.svg'); border-color: rgba(136,136,170,0.34); }
    .best-drop-img-circle.green { background-image: url('../../img/bg_img_4.svg'); border-color: rgba(75,181,67,0.42); }
    .best-drop-subname.yellow { border-bottom-color: #FFD700; }
    .best-drop-subname.purple { border-bottom-color: #975DF8; }
    .best-drop-subname.red { border-bottom-color: #eb4b4b; }
    .best-drop-subname.blue { border-bottom-color: #4b69ff; }
    .best-drop-subname.gray { border-bottom-color: #8888aa; }
    .best-drop-subname.green { border-bottom-color: #4BB543; }
    .best-drop-btn {
      width: 100%;
      min-height: 56px;
      padding: 0 24px;
      border-radius: 8px;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      margin-top: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      text-align: center;
    }

    /* =====================================================
       INVENTORY TABS
    ===================================================== */
    .inventory-section {
      padding: 36px 0 0;
      width: 100%;
      max-width: 1296px;
      margin: 0 auto;
      min-width: 0;
      box-sizing: border-box;
    }
    .inventory-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 44px;
      flex-wrap: wrap;
      gap: 18px 32px;
      min-width: 0;
    }
    .inventory-tabs {
      display: flex;
      align-items: center;
      gap: 28px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .inv-tab {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      height: 37px;
      padding: 0 0 14px;
      cursor: pointer;
      border-radius: 0;
      transition: color 0.18s ease;
      color: #687894;
      font-size: 13px;
      font-weight: 500;
      border-bottom: 0;
      line-height: 1;
      min-width: 0;
    }
    .inv-tab:hover { color: #ffffff; }
    .inv-tab::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 2px;
      background: transparent;
      transition: background 0.18s ease;
    }
    .inv-tab.active { color: #e2a915; }
    .inv-tab.active::after { background: #e2a915; }
    .inv-tab img {
      width: 16px;
      height: 16px;
      object-fit: contain;
      opacity: 0.55;
    }
    .inv-tab.active img {
      opacity: 1;
      filter: brightness(0) saturate(100%) invert(74%) sepia(71%) saturate(805%) hue-rotate(356deg) brightness(96%) contrast(86%);
    }
    .inventory-controls {
      display: flex;
      align-items: center;
      gap: 28px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .inv-balance-badge {
      display: flex;
      align-items: center;
      gap: 8px;
      height: auto;
      padding: 0;
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      font-size: 13px;
      line-height: 1;
      font-weight: 700;
      color: #ffffff;
    }
    .inv-balance-badge .coin-dot { width: 10px; height: 10px; background: #FFD700; border-radius: 50%; display: inline-block; }
    .inv-balance-badge img {
      width: 14px;
      height: 14px;
      object-fit: contain;
      flex-shrink: 0;
    }
    .inv-balance-badge .inv-balance-coin-end {
      width: 14px;
      height: 14px;
      opacity: 0.72;
    }
    .inv-toggle-wrap {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 0;
      border: 0;
      background: transparent;
      font: inherit;
      font-size: 13px;
      line-height: 1;
      font-weight: 500;
      color: #687894;
      cursor: pointer;
    }
    .inv-toggle-wrap.is-active { color: #58c873; }
    .inv-toggle {
      width: 31px;
      height: 10px;
      border-radius: 999px;
      background: #263447;
      position: relative;
      cursor: pointer;
      transition: background 0.2s;
    }
    .inv-toggle::after {
      content: '';
      position: absolute;
      top: 2px;
      right: 3px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #58c873;
      box-shadow: 0 0 8px rgba(88,200,115,0.65);
      transition: right 0.2s, background 0.2s, box-shadow 0.2s;
    }
    .inv-toggle-wrap:not(.is-active) .inv-toggle { background: #2a2a40; }
    .inv-toggle-wrap:not(.is-active) .inv-toggle::after {
      right: 22px;
      background: #687894;
      box-shadow: none;
    }
    .inv-sell-all {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0;
      background: transparent;
      border: 0;
      border-radius: 0;
      font-size: 13px;
      line-height: 1;
      font-weight: 500;
      color: #526079;
      cursor: pointer;
      transition: color 0.18s ease, opacity 0.18s ease;
    }
    .inv-sell-all:hover { color: #ffffff; }
    .inv-sell-all:disabled { opacity: 0.5; cursor: not-allowed; }
    .inv-sell-all:disabled:hover { color: #526079; }
    .inv-sell-all-icon {
      display: block;
      width: 14px;
      height: 14px;
      flex: 0 0 14px;
    }

    /* =====================================================
       INVENTORY GRID — SKINS
       The price is positioned in the top-right corner.
       Action icons are positioned in the top-left corner.
    ===================================================== */
    /* =====================================================
       SKIN CARDS — без фона, без рамок, без скругления
       Карточка лежит прямо на фоне страницы.
       Цветная полоска — под именем, не под карточкой.
       Action icons appear on hover or keyboard focus.
    ===================================================== */
    .inventory-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(116px, 100%), 1fr));
      gap: 10px 14px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }
    .inventory-grid > * {
      min-width: 0;
    }

    .skin-card {
      position: relative;
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 17px 0 0;
      display: flex; flex-direction: column; align-items: stretch;
      cursor: pointer;
      transition: transform 0.18s ease;
      min-width: 0;
      max-width: 100%;
    }
    .skin-card:hover { transform: translateY(-2px); }
    .public-winning-card {
      color: inherit;
      text-decoration: none;
    }

    /* Цена СПРАВА сверху над картинкой */
    .skin-card-price {
      position: absolute;
      top: 1px;
      right: 0;
      display: flex; align-items: center; gap: 5px;
      font-size: 11px; color: #58c873; font-weight: 500;
      line-height: 1;
      transition: opacity 0.18s ease;
    }
    .skin-card-price .price-coin {
      width: 10px; height: 10px;
      object-fit: contain;
      flex-shrink: 0;
      display: inline-block;
    }

    /* Action icons in the top-left corner. */
    .skin-card-actions {
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      align-items: center;
      gap: 5px;
      z-index: 2;
      opacity: 0;
      transition: opacity 0.18s ease;
      pointer-events: none;
    }
    .skin-card:is(:hover, :focus-within) .skin-card-actions { opacity: 1; pointer-events: auto; }
    .skin-card:is(:hover, :focus-within) .skin-card-price { opacity: 0; }

    .skin-action-btn {
      width: 24px;
      height: 24px;
      border-radius: 3px;
      background: #121925;
      border: 1px solid #1b2535;
      padding: 0;
      appearance: none;
      color: inherit;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: all 0.15s;
    }
    .skin-action-btn:hover { background: #172132; border-color: #344257; }
    .skin-action-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .skin-action-btn img { width: 12px; height: 12px; object-fit: contain; opacity: 0.75; }
    .skin-action-btn.text-btn {
      font-size: 13px; line-height: 1; font-weight: 700; color: #8f9bb0;
    }
    .skin-action-btn.text-btn:hover { color: #fff; }
    .skin-card.unavailable { opacity: 0.62; }
    .skin-card-status {
      position: absolute; right: 10px; bottom: 60px; z-index: 2;
      padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,0.42);
      color: #b8b8cc; font-size: 10px; line-height: 1; font-weight: 700;
    }

    /* Круг с изображением скина */
    .skin-card-img-wrap {
      width: 66px;
      height: 62px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      position: relative; overflow: visible;
      margin: 0 auto 0;
    }
    .skin-card-bg-img {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: contain; z-index: 0;
    }
    .skin-card-img {
      position: relative;
      width: 94px; height: 62px;
      max-width: none;
      object-fit: contain;
      z-index: 1;
      filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    }

    /* Имя + подпись с цветной нижней полоской */
    .skin-card-name {
      font-family: var(--profile-item-font);
      font-size: 10px;
      line-height: 1.05;
      font-weight: 500;
      color: #8888aa;
      text-align: left;
      width: 100%;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      margin-bottom: 1px;
    }
    .skin-card-subname {
      font-family: var(--profile-item-font);
      font-size: 12px;
      line-height: 1.05;
      color: #fff;
      font-weight: 700;
      text-align: left;
      width: 100%;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      padding-bottom: 4px;
      border-bottom: 2px solid;
    }
    .skin-card.yellow .skin-card-subname { border-bottom-color: #FFD700; }
    .skin-card.purple .skin-card-subname { border-bottom-color: #975DF8; }
    .skin-card.red    .skin-card-subname { border-bottom-color: #eb4b4b; }
    .skin-card.blue   .skin-card-subname { border-bottom-color: #4b69ff; }
    .skin-card.gray   .skin-card-subname { border-bottom-color: #8888aa; }

    /* =====================================================
       UPGRADE CARDS
       Two roomy history groups per row: inputs, arrow, target result.
    ===================================================== */
    .inventory-grid.grid-upgrade {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 42px 40px;
      align-items: start;
    }
    .upgrade-card {
      position: relative;
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      cursor: pointer; transition: all 0.2s;
      min-width: 0;
    }
    .upgrade-card:hover { transform: translateY(-2px); }

    .upgrade-main-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
      align-items: center;
      column-gap: 12px;
      min-height: 206px;
      min-width: 0;
    }

    .upgrade-input-panel,
    .upgrade-output-panel {
      min-width: 0;
    }

    .upgrade-input-panel.single,
    .upgrade-output-panel {
      align-self: end;
    }

    .upgrade-input-panel.multi {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px 12px;
      align-self: start;
      min-width: 0;
    }

    .upgrade-history-item {
      position: relative;
      min-width: 0;
    }

    .upgrade-history-item.mini {
      padding-top: 12px;
    }

    .upgrade-history-item.large {
      padding-top: 24px;
    }

    .upgrade-item-price {
      position: absolute;
      top: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      color: #4BB543;
      font-family: var(--profile-font);
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
      letter-spacing: 0;
    }

    .upgrade-history-item.mini .upgrade-item-price {
      font-size: 8px;
      gap: 2px;
    }

    .upgrade-history-item.large .upgrade-item-price {
      font-size: 16px;
    }

    .upgrade-item-price .price-crown {
      width: 10px;
      height: 10px;
      object-fit: contain;
      flex-shrink: 0;
    }

    .upgrade-history-item.mini .price-crown {
      width: 7px;
      height: 7px;
    }

    .upgrade-item-img-wrap {
      border-radius: 50%;
      overflow: visible;
      display: flex; align-items: center; justify-content: center;
      position: relative;
      margin-left: auto;
      margin-right: auto;
    }

    .upgrade-history-item.mini .upgrade-item-img-wrap {
      width: 54px;
      height: 36px;
      margin-bottom: 1px;
    }

    .upgrade-history-item.large .upgrade-item-img-wrap {
      width: 124px;
      height: 104px;
      margin-bottom: 9px;
    }

    .upgrade-item-bg {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: contain;
      z-index: 0;
    }

    .upgrade-item-img {
      position: relative; z-index: 1;
      object-fit: contain;
      filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    }

    .upgrade-history-item.mini .upgrade-item-img {
      width: 78px;
      height: 42px;
      max-width: none;
    }

    .upgrade-history-item.large .upgrade-item-img {
      width: 172px;
      height: 104px;
      max-width: none;
    }

    .history-operation-metric {
      flex-direction: column;
      gap: 3px;
      isolation: isolate;
    }
    .history-operation-metric .history-operation-item-img {
      position: relative;
      z-index: 1;
      width: 76%;
      height: 46%;
      object-fit: contain;
      filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    }

    .upgrade-item-name,
    .upgrade-item-sub {
      font-family: var(--profile-item-font);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .upgrade-item-name {
      color: #8888aa;
      font-weight: 500;
    }

    .upgrade-history-item.mini .upgrade-item-name {
      font-size: 7px;
      line-height: 1.05;
      margin-bottom: 1px;
    }

    .upgrade-history-item.large .upgrade-item-name {
      font-size: 14px;
      line-height: 1.05;
      margin-bottom: 4px;
    }

    .upgrade-item-sub {
      color: #ffffff;
      font-weight: 700;
      border-bottom: 2px solid;
    }

    .upgrade-history-item.mini .upgrade-item-sub {
      font-size: 8px;
      line-height: 1.05;
      padding-bottom: 3px;
    }

    .upgrade-history-item.large .upgrade-item-sub {
      font-size: 16px;
      line-height: 1.05;
      padding-bottom: 7px;
    }

    .upgrade-history-item.yellow .upgrade-item-sub { border-color: #FFD700; }
    .upgrade-history-item.purple .upgrade-item-sub { border-color: #975DF8; }
    .upgrade-history-item.red    .upgrade-item-sub { border-color: #eb4b4b; }
    .upgrade-history-item.blue   .upgrade-item-sub { border-color: #4b69ff; }
    .upgrade-history-item.gray   .upgrade-item-sub { border-color: #8888aa; }

    .upgrade-arrow-wrap {
      width: 58px;
      height: 58px;
      border: 2px solid #1b2535;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      justify-self: center;
      align-self: center;
      transform: rotate(45deg);
      background: rgba(14, 21, 31, 0.58);
    }

    .upgrade-arrow-btn {
      width: 29px;
      height: 29px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      border: none; cursor: pointer; transition: transform 0.2s;
      color: #07120e; z-index: 2;
      transform: rotate(-45deg);
      padding: 0;
    }
    .upgrade-arrow-wrap:hover .upgrade-arrow-btn { transform: rotate(-45deg) scale(1.08); }
    .upgrade-arrow-btn.win  { background: #63d66f; box-shadow: 0 0 12px rgba(99,214,111,0.38); }
    .upgrade-arrow-btn.lose { background: #eb4b4b; box-shadow: 0 0 12px rgba(235,75,75,0.42); }
    .upgrade-arrow-btn svg { width: 15px; height: 15px; }

    .upgrade-card-footer {
      display: flex; align-items: center; justify-content: space-between;
      border-bottom: 2px solid #2b3549;
      padding-bottom: 8px;
      margin-top: 9px;
      font-size: 15px;
      line-height: 1.1;
    }
    .upgrade-chance { color: #8888aa; }
    .upgrade-chance b { color: #8888aa; font-weight: 500; margin-left: 10px; }
    .upgrade-result { font-weight: 500; }
    .upgrade-result.win  { color: #4BB543; }
    .upgrade-result.lose { color: #eb4b4b; }

    /* =====================================================
       CONTRACT CARDS
       Compact 3-input strip plus one result card, matching the profile mockup.
    ===================================================== */
    .inventory-grid.grid-contract {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(620px, 100%), 1fr));
      gap: 26px 40px;
    }

    .contract-group {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      column-gap: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      min-width: 0;
      max-width: 100%;
      align-items: end;
    }

    .contract-col {
      display: flex;
      flex-direction: column;
      padding-top: 22px;
      position: relative;
      min-width: 0;
      min-height: 139px;
    }

    .contract-mini-price {
      position: absolute;
      top: 0; right: 0;
      display: flex; align-items: center; gap: 4px;
      font-size: 12px; color: #4BB543; font-weight: 700;
      line-height: 1;
    }
    .contract-mini-price .price-coin {
      width: 10px; height: 10px; object-fit: contain; flex-shrink: 0;
    }

    .contract-mini-img-wrap {
      width: 88px;
      height: 70px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      position: relative; overflow: visible;
      margin: 0 auto 2px;
    }
    .contract-mini-bg {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: contain; z-index: 0;
    }
    .contract-mini-img-wrap .history-operation-item-img {
      position: relative; z-index: 1;
      width: 112px;
      height: 70px;
      max-width: none;
      object-fit: contain;
      filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    }
    .contract-mini-img-wrap .history-operation-value,
    .contract-mini-img-wrap .history-operation-label {
      display: none;
    }

    .contract-mini-name {
      font-family: var(--profile-item-font);
      font-size: 12px; line-height: 1.05; font-weight: 500; color: #8888aa;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      margin-bottom: 2px;
    }
    .contract-mini-sub {
      font-family: var(--profile-item-font);
      font-size: 14px; line-height: 1.05; color: #fff; font-weight: 700;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      padding-bottom: 7px;
      border-bottom: 2px solid;
    }
    .contract-col.yellow .contract-mini-sub { border-color: #FFD700; }
    .contract-col.red    .contract-mini-sub { border-color: #eb4b4b; }
    .contract-col.purple .contract-mini-sub { border-color: #975DF8; }
    .contract-col.blue   .contract-mini-sub { border-color: #4b69ff; }
    .contract-col.gray   .contract-mini-sub { border-color: #8888aa; }

    .contract-footer-cell {
      display: flex; align-items: center; justify-content: space-between;
      font-size: 13px;
      line-height: 1.1;
      color: #8888aa;
      margin-top: 10px;
      min-height: 18px;
    }
    .contract-pagination {
      display: flex; align-items: center; gap: 8px;
      color: #4a4a6a;
      font-size: 13px;
      line-height: 1.1;
    }
    .contract-pagination .arrow { cursor: pointer; }
    .contract-pagination .arrow:hover { color: #fff; }
    .contract-pagination .current { color: #8888aa; font-weight: 500; }
    .contract-chance { color: #8888aa; }
    .contract-chance b { color: #8888aa; font-weight: 600; margin-left: 6px; }
    .contract-win  { color: #4BB543; font-weight: 600; }
    .contract-lose { color: #eb4b4b; font-weight: 600; }

    .contract-result-card {
      position: relative;
      background: #111b1d;
      border: none;
      border-radius: 6px;
      padding: 22px 12px 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      align-self: stretch;
      cursor: pointer;
      transition: background 0.2s;
      min-width: 0;
      min-height: 139px;
    }
    .contract-result-card:hover { background: #142124; }

    .contract-result-card .contract-mini-price {
      position: absolute;
      top: 0;
      right: 12px;
    }
    .contract-result-card .contract-mini-img-wrap {
      width: 88px;
      height: 70px;
      margin: 0 auto 2px;
    }
    .contract-result-card .contract-mini-name {
      margin-top: 0;
    }
    .contract-result-card .contract-mini-sub {
      border-bottom: 2px solid;
      padding-bottom: 7px;
    }
    .contract-result-card.yellow .contract-mini-sub { border-color: #FFD700; }
    .contract-result-card.red    .contract-mini-sub { border-color: #eb4b4b; }
    .contract-result-card.purple .contract-mini-sub { border-color: #975DF8; }
    .contract-result-card.blue   .contract-mini-sub { border-color: #4b69ff; }
    .contract-result-card.gray   .contract-mini-sub { border-color: #8888aa; }

/* =====================================================
       RESPONSIVE
    ===================================================== */
    @media (max-width: 1100px) {
      .profile-info-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .public-profile-page .profile-info-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .inventory-grid.grid-upgrade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .best-drop-card {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        padding: 20px 28px;
        min-height: 0;
        color: #ffffff;
      }
      .best-drop-title { margin-bottom: 0; }
      .best-drop-img-wrap { flex-shrink: 0; margin: 0; }
      .best-drop-name, .best-drop-subname { align-self: auto; }
      .best-drop-btn { width: auto; padding: 12px 32px; margin-top: 0; }
      .profile-user-row {
        flex-wrap: nowrap;
      }
      .profile-actions {
        display: flex;
        flex: 0 0 auto;
        width: auto;
        gap: 8px;
        margin-left: auto;
      }
      .profile-action-btn.primary,
      .profile-action-btn.secondary { display: none; }
      .profile-action-btn.primary-icon,
      .profile-action-btn.secondary-icon { display: flex; }
      .profile-action-btn.primary-icon {
        width: 46px; height: 46px; padding: 0; flex: 0 0 auto;
        border-radius: 12px;
        background: var(--profile-cta-gradient);
        color: #ffffff; border: none;
        font-size: 24px; font-weight: 900;
        align-items: center; justify-content: center;
        cursor: pointer; transition: all 0.2s;
      }
      .profile-action-btn.primary-icon:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), 0 10px 22px rgba(233,154,23,0.24); }
      .profile-action-btn.secondary-icon {
        width: 46px; height: 46px; padding: 0; flex: 0 0 auto;
        border-radius: 12px;
        background: transparent;
        border: 1.5px solid #3a3a55;
        color: #ffffff;
        font-size: 18px; font-weight: 700;
        align-items: center; justify-content: center;
        cursor: pointer; transition: all 0.2s;
      }
      .profile-action-btn.secondary-icon:hover { border-color: #6a6a88; background: rgba(255,255,255,0.04); }
      .profile-action-btn.secondary-icon img { width: 18px; height: 18px; }
    }

    @media (max-width: 1024px) {
    }

    @media (max-width: 900px) {
      .profile-info-section { grid-template-columns: minmax(0, 1fr); }
      .public-profile-page .profile-info-section { grid-template-columns: minmax(0, 1fr); }
      .best-drop-card { flex-direction: column; }
      .best-drop-img-wrap { margin: 16px 0 14px; }
      .best-drop-name, .best-drop-subname { align-self: flex-start; }
      .best-drop-btn { width: 100%; margin-top: auto; }
      .contract-group { column-gap: 12px; }
    }

    @media (max-width: 767px) {
      .inventory-grid.grid-upgrade { grid-template-columns: minmax(0, 1fr); }
      .contract-group { column-gap: 10px; }
      .inventory-toolbar { flex-direction: column; align-items: flex-start; }
      .public-inventory-toolbar { align-items: flex-start; }
      .public-inventory-title { margin-left: 0; }

      .profile-action-btn.primary,
      .profile-action-btn.secondary { display: none; }
      .profile-action-btn.primary-icon,
      .profile-action-btn.secondary-icon { display: flex; }
      .profile-action-btn.primary-icon {
        width: 46px; height: 46px; padding: 0; flex: 0 0 auto; border-radius: 12px;
        background: var(--profile-cta-gradient);
        color: #FFFFFF; border: none;
        font-size: 24px; font-weight: 900;
        align-items: center; justify-content: center;
        cursor: pointer; transition: all 0.2s;
      }
      .profile-action-btn.secondary-icon {
        width: 46px; height: 46px; padding: 0; flex: 0 0 auto; border-radius: 12px;
        background: transparent; border: 1.5px solid #3a3a55;
        color: #ffffff; font-size: 18px; font-weight: 700;
        align-items: center; justify-content: center;
        cursor: pointer; transition: all 0.2s;
      }
      .profile-action-btn.secondary-icon img { width: 18px; height: 18px; }

      /* === МОБИЛЬНАЯ ВЁРСТКА КАК НА СКРИНШОТЕ ===
         1) Профильная карточка на всю ширину сверху.
            Внутри: avatar + name/balance слева, кнопки [+] [⇄] справа.
         2) Ниже двухколоночная сетка: левый столбец — купон+email,
            правый столбец — Best Drop на всю высоту.
      */
      .profile-info-section {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
          "profile profile"
          "middle  best";
        gap: 14px;
        padding: 16px;
      }
      .profile-card {
        grid-area: profile;
        grid-column: 1 / -1;
        padding: 16px;
        min-height: 0;
        border-radius: 8px;
      }
      .profile-middle { grid-area: middle; gap: 14px; }
      .best-drop-card {
        grid-area: best;
        flex-direction: column;
        align-items: center;
        padding: 16px;
        min-height: 0;
        border-radius: 8px;
        gap: 0;
      }
      .best-drop-title {
        font-size: 12px;
        text-align: left;
        margin-bottom: 0;
      }
      .best-drop-price {
        top: 16px;
        right: 16px;
        font-size: 11px;
      }
      .best-drop-price img {
        width: 12px !important;
        height: 12px !important;
      }
      .best-drop-card .best-drop-img-wrap {
        width: 112px;
        height: 112px;
        margin: 12px 0;
      }
      .best-drop-gun {
        width: 134px;
        height: 80px;
      }
      .best-drop-name {
        font-size: 10px;
      }
      .best-drop-subname {
        font-size: 11px;
        padding-bottom: 7px;
        margin-bottom: 12px;
        border-bottom-width: 1px;
      }
      .best-drop-card .best-drop-btn {
        width: 100%;
        min-height: 34px;
        margin-top: 12px;
        padding: 0 12px;
        font-size: 12px;
      }

      /* В профильной карточке: actions уже стоят справа благодаря margin-left:auto во flex-строке */
      .profile-card .profile-user-row { margin-bottom: 14px; gap: 12px; flex-wrap: nowrap; }
      .profile-card .profile-actions { gap: 8px; margin-left: auto; }
      .profile-avatar-wrap {
        width: 44px;
        height: 44px;
      }
      .profile-username {
        font-size: 12px;
      }
      .profile-balance-val {
        font-size: 16px;
      }
      .profile-balance-icon {
        width: 14px;
        height: 14px;
      }
      .profile-progress-list {
        background: transparent;
        padding: 0;
        border-radius: 0;
        gap: 10px;
      }
      .progress-item {
        gap: 12px;
      }

      /* Прогресс-бейджи мобилки немного компактнее */
      .progress-level-badge,
      .progress-icon-badge { width: 52px; height: 30px; }
      .progress-level-badge { font-size: 10px; }
      .progress-label { font-size: 10px; }
      .progress-label-row { margin-bottom: 6px; }

      /* Купон-иконка на мобилке мельче */
      .coupon-card .card-title-icon {
        width: 22px; height: 22px;
        font-size: 13px;
      }
      .coupon-card, .email-card, .trade-url-card, .profile-ticket-link {
        padding: 14px;
        border-radius: 8px;
      }
      .card-title-row {
        gap: 9px;
        margin-bottom: 12px;
      }
      .card-subtitle { font-size: 10px; margin-bottom: 10px; }
      .card-title-text { font-size: 10px; }
      .card-input-wrap input {
        height: 34px;
        border-radius: 6px;
        font-size: 11px;
        padding: 0 38px 0 12px;
      }
      .card-input-btn {
        right: 4px;
        width: 26px;
        height: 26px;
      }
      .card-input-btn svg {
        width: 16px;
        height: 16px;
      }
      .profile-ticket-link {
        min-height: 62px;
      }
      .profile-ticket-title {
        gap: 8px;
        font-size: 12px;
      }
      .profile-ticket-status {
        width: 10px;
        height: 10px;
      }
      .profile-ticket-arrow {
        width: 26px;
        height: 26px;
      }
      .profile-ticket-arrow svg {
        width: 16px;
        height: 16px;
      }
    }

    @media (max-width: 600px) {
      .profile-info-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .best-drop-card { flex-direction: column; }
    }

    @media (max-width: 480px) {
      .profile-info-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
      }
    }

    /* Desktop profile layout aligned with the compact Figma frame. */
    @media (min-width: 1101px) {
      .profile-page { padding-bottom: 24px; }
      .profile-page .breadcrumb {
        margin-bottom: 4px;
        padding: 12px 24px 0;
        font-size: 10px;
      }
      .profile-page .breadcrumb-home { width: 20px; height: 20px; }
      .profile-page .breadcrumb-home svg { width: 14px; height: 14px; }

      .profile-info-section {
        grid-template-columns: minmax(0, 1.95fr) minmax(210px, .62fr) minmax(210px, .58fr);
        gap: 12px;
        padding: 10px 24px 0;
        align-items: stretch;
      }
      .profile-card,
      .profile-middle,
      .best-drop-card { height: 230px; min-height: 230px; }
      .profile-card,
      .coupon-card,
      .email-card,
      .trade-url-card,
      .profile-ticket-link,
      .best-drop-card { border: 0; }

      .profile-card {
        padding: 14px 16px;
        border-radius: 8px;
      }
      .profile-user-row {
        flex-wrap: nowrap;
        gap: 8px;
        min-height: 42px;
        margin-bottom: 10px;
      }
      .profile-avatar-wrap { width: 40px; height: 40px; }
      .profile-user-info { flex: 1 1 130px; gap: 2px; }
      .profile-username { font-size: 9px; font-weight: 500; }
      .profile-verified,
      .profile-verified img { width: 12px; height: 12px; }
      .profile-balance-row { gap: 4px; }
      .profile-balance-val { font-size: 14px; font-weight: 600; line-height: 16px; }
      .profile-balance-icon { width: 12px; height: 12px; }
      .profile-actions { flex-wrap: nowrap; gap: 6px; }
      .profile-action-btn {
        min-height: 34px;
        height: 34px;
        padding: 0 14px;
        border-radius: 6px;
        font-size: 9px;
        font-weight: 600;
      }
      .profile-action-btn.primary,
      .best-drop-btn { font-size: 9px; font-weight: 600; box-shadow: none; }
      .profile-action-btn.primary .btn-plus { width: 12px; height: 12px; margin: 0; }
      .profile-action-btn.secondary {
        padding: 0 12px;
        border-width: 1px;
        border-color: #687894;
      }
      .profile-action-btn.secondary img { width: 12px; height: 12px; }

      .profile-progress-list {
        height: 150px;
        padding: 7px 10px;
        gap: 5px;
        border-radius: 6px;
        background: #0d141e;
      }
      .progress-item { min-height: 30px; gap: 9px; }
      .progress-level-badge,
      .progress-icon-badge {
        width: 44px;
        height: 20px;
        border: 0;
        border-radius: 10px;
      }
      .progress-level-badge { font-size: 8px; }
      .progress-icon-badge img { width: 11px; height: 11px; }
      .progress-label-row { height: 12px; margin-bottom: 3px; }
      .progress-label {
        color: #ffffff;
        font-size: 8px;
        font-weight: 500;
        line-height: 11px;
      }
      .progress-info {
        width: 12px;
        height: 12px;
        padding: 0;
        border: 0;
      }
      .progress-info img { width: 12px; height: 12px; }
      .progress-bar-wrap { height: 3px; }
      .progress-meter-row { gap: 6px; }
      .level-reward-btn {
        min-width: 54px;
        height: 18px;
        padding: 0 7px;
        border-radius: 4px;
        font-size: 7px;
        box-shadow: none;
      }

      .profile-middle { gap: 8px; }
      .coupon-card,
      .email-card,
      .trade-url-card,
      .profile-ticket-link {
        min-height: 0;
        padding: 10px 12px;
        border-radius: 7px;
        background: #111722;
      }
      .coupon-card,
      .email-card { flex: 1 1 0; }
      .card-title-row { gap: 7px; margin-bottom: 7px; }
      .card-title-icon {
        width: 20px;
        height: 20px;
        border: 0;
        border-radius: 5px;
        background: transparent;
      }
      .card-title-icon img { width: 20px; height: 20px; }
      .card-title-text { font-size: 10px; font-weight: 600; line-height: 12px; }
      .card-input-wrap input {
        height: 28px;
        padding: 0 30px 0 9px;
        border-width: 1px;
        border-radius: 5px;
        color: #ffffff;
        font-size: 8px;
        font-weight: 500;
      }
      .card-input-btn {
        right: 3px;
        width: 22px;
        height: 22px;
        border-radius: 4px;
      }
      .card-input-btn img { width: 12px; height: 12px; }
      .card-form-message { margin-top: 3px; font-size: 7px; }
      .profile-ticket-link {
        flex: 1 1 0;
        gap: 8px;
      }
      .profile-ticket-title { gap: 7px; font-size: 10px; font-weight: 600; }
      .profile-ticket-status { width: 7px; height: 7px; box-shadow: none; }
      .profile-ticket-arrow { width: 18px; height: 18px; }
      .profile-ticket-arrow img { width: 12px; height: 12px; }
      .trade-url-card.is-highlighted {
        border: 1px solid rgba(242,179,30,0.55);
        box-shadow: none;
      }

      .best-drop-card {
        padding: 12px;
        border-radius: 8px;
      }
      .best-drop-title { margin-bottom: 0; font-size: 10px; font-weight: 600; }
      .best-drop-price {
        top: 30px;
        right: 12px;
        gap: 3px;
        font-size: 8px;
        font-weight: 500;
      }
      .best-drop-price img { width: 10px !important; height: 10px !important; }
      .best-drop-img-wrap {
        width: 104px;
        height: 104px;
        margin: 3px 0 0;
      }
      .best-drop-gun { width: 138px; height: 82px; }
      .best-drop-name { margin-bottom: 1px; font-size: 8px; font-weight: 500; }
      .best-drop-subname {
        margin-bottom: 8px;
        padding-bottom: 6px;
        border-bottom-width: 1px;
        font-size: 9px;
        font-weight: 500;
      }
      .best-drop-btn {
        min-height: 32px;
        height: 32px;
        padding: 0 12px;
        border-radius: 6px;
        box-shadow: none;
      }

      .inventory-section { padding-top: 14px; }
      .inventory-toolbar {
        min-height: 30px;
        margin-bottom: 12px;
        gap: 8px 18px;
      }
      .inventory-tabs { gap: 18px; }
      .inv-tab {
        height: 28px;
        padding-bottom: 8px;
        gap: 5px;
        font-size: 8px;
      }
      .inv-tab::after { height: 1px; }
      .inv-tab img { width: 11px; height: 11px; }
      .inventory-controls { gap: 14px; }
      .inv-balance-badge {
        height: auto;
        padding: 0;
        gap: 4px;
        font-size: 8px;
      }
      .inv-balance-badge img,
      .inv-balance-badge .inv-balance-coin-end { width: 10px; height: 10px; }
      .inv-toggle-wrap,
      .inv-sell-all { gap: 7px; font-size: 8px; }
      .inv-toggle { width: 24px; height: 8px; }
      .inv-toggle::after { top: 1px; right: 2px; width: 6px; height: 6px; }
      .inv-toggle-wrap:not(.is-active) .inv-toggle::after { right: 16px; }
      .inv-sell-all-icon { width: 10px; height: 10px; flex-basis: 10px; }
    }

.skin-card-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
  text-align: center;
  color: #687894;
  background: rgba(20, 20, 32, 0.55);
  font-family: var(--profile-font);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

/* Profile typography: keep the compact desktop layout, but make its text readable. */
@media (min-width: 1101px) {
  .profile-page .breadcrumb,
  .profile-page .breadcrumb .breadcrumb-current,
  .profile-page .breadcrumb .breadcrumb-separator { font-size: 14px !important; }

  .profile-page .profile-username { font-size: 13px; }
  .profile-page .profile-balance-val { font-size: 18px; line-height: 20px; }
  .profile-page .profile-action-btn,
  .profile-page .profile-action-btn.primary,
  .profile-page .best-drop-btn { font-size: 13px; }

  .profile-page .progress-level-badge,
  .profile-page .progress-label { font-size: 12px; }
  .profile-page .level-reward-btn { font-size: 11px; }

  .profile-page .card-title-text,
  .profile-page .profile-ticket-title { font-size: 14px; }
  .profile-page .card-input-wrap input { font-size: 12px; }
  .profile-page .card-form-message { font-size: 11px; }

  .profile-page .best-drop-title { font-size: 14px; }
  .profile-page .best-drop-price { font-size: 12px; }
  .profile-page .best-drop-name { font-size: 12px; }
  .profile-page .best-drop-subname { font-size: 13px; }

  .profile-page .inv-tab,
  .profile-page .inv-balance-badge,
  .profile-page .inv-toggle-wrap,
  .profile-page .inv-sell-all { font-size: 12px; }
  .profile-page .skin-card-empty { font-size: 15px; }

  .profile-page .skin-card-price { font-size: 15px; }
  .profile-page .skin-action-btn.text-btn { font-size: 17px; }
  .profile-page .skin-card-status { font-size: 14px; }
  .profile-page .skin-card-name { font-size: 14px; }
  .profile-page .skin-card-subname { font-size: 16px; }

  .profile-page .upgrade-history-item.mini .upgrade-item-price { font-size: 12px; }
  .profile-page .upgrade-history-item.large .upgrade-item-price { font-size: 20px; }
  .profile-page .upgrade-history-item.mini .upgrade-item-name { font-size: 11px; }
  .profile-page .upgrade-history-item.large .upgrade-item-name { font-size: 18px; }
  .profile-page .upgrade-history-item.mini .upgrade-item-sub { font-size: 12px; }
  .profile-page .upgrade-history-item.large .upgrade-item-sub { font-size: 20px; }
  .profile-page .upgrade-card-footer { font-size: 19px; }

  .profile-page .contract-mini-price { font-size: 16px; }
  .profile-page .contract-mini-name { font-size: 16px; }
  .profile-page .contract-mini-sub { font-size: 18px; }
  .profile-page .contract-footer-cell,
  .profile-page .contract-pagination { font-size: 17px; }
}
