
:root{
  --nm31-bg:#f5f6fa;
  --nm31-card:#fff;
  --nm31-soft:#f4f5f8;
  --nm31-line:#e5e8ef;
  --nm31-text:#191c26;
  --nm31-muted:#747d8d;
  --nm31-purple:#6c5cf6;
  --nm31-purple2:#8d79ff;
  --nm31-purple-soft:#efedff;
  --nm31-shadow:0 14px 38px rgba(29,37,58,.055);
}

/* =========================================================
   ONE CABINET SIDEBAR — ACCOUNT + INVENTORY
   ========================================================= */
html body.account-page .account-shell,
html body.inventory-page .inventory-main>.container,
html body.inventory-page .inventory-main>.container.nm19-inventory-shell{
  grid-template-columns:252px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:start!important;
}

html body.account-page .account-sidebar,
html body.inventory-page .nm31-cabinet-sidebar{
  position:sticky!important;
  top:96px!important;
  width:252px!important;
  min-width:252px!important;
  padding:12px!important;
  background:#fff!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:20px!important;
  box-shadow:var(--nm31-shadow)!important;
  overflow:hidden!important;
}

/* kill older inventory sidebars so there is only ONE */
html body.inventory-page .nm19-inventory-rail,
html body.inventory-page .nm28-inventory-sidebar,
html body.inventory-page .nm27-inventory-sidebar{
  display:none!important;
}

html body.account-page .sidebar-profile,
html body.inventory-page .nm31-sidebar-profile{
  min-height:70px!important;
  padding:9px 9px 13px!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  border-bottom:1px solid var(--nm31-line)!important;
}

html body.account-page .sidebar-avatar,
html body.inventory-page .nm31-sidebar-avatar{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#6558f6,#8b76ff)!important;
  background-size:cover!important;
  background-position:center!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-size:15px!important;
  font-weight:950!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

html body.account-page .sidebar-profile strong,
html body.inventory-page .nm31-sidebar-profile strong{
  display:block!important;
  color:var(--nm31-text)!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:850!important;
}

html body.account-page .sidebar-profile small,
html body.inventory-page .nm31-sidebar-profile small{
  display:block!important;
  margin-top:4px!important;
  color:#8a92a1!important;
  font-size:9px!important;
  line-height:1.2!important;
}

html body.account-page .account-nav,
html body.inventory-page .nm31-cabinet-nav{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  margin:10px 0 0!important;
  padding:0!important;
}

html body.account-page .account-nav-item,
html body.inventory-page .nm31-cabinet-nav a{
  min-height:46px!important;
  width:100%!important;
  padding:6px 9px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  border:1px solid transparent!important;
  border-radius:13px!important;
  background:transparent!important;
  color:#626b7c!important;
  text-decoration:none!important;
  text-align:left!important;
  font-size:10.5px!important;
  line-height:1.2!important;
  font-weight:800!important;
  box-shadow:none!important;
  cursor:pointer!important;
}

html body.account-page .account-nav-item>span,
html body.inventory-page .nm31-nav-icon{
  width:34px!important;
  height:34px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:10px!important;
  background:#f4f5f9!important;
  color:#6c5cf6!important;
  font-size:0!important;
}

html body.account-page .account-nav-item>span svg,
html body.inventory-page .nm31-nav-icon svg{
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:#6c5cf6!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

html body.account-page .account-nav-item:hover,
html body.inventory-page .nm31-cabinet-nav a:hover{
  background:#f6f5ff!important;
  border-color:#ece9ff!important;
  color:#383f4e!important;
}

html body.account-page .account-nav-item.active,
html body.inventory-page .nm31-cabinet-nav a.active{
  background:linear-gradient(135deg,#efedff,#f6f4ff)!important;
  border-color:#e5e0ff!important;
  color:#6556f1!important;
}

html body.account-page .account-nav-item.active>span,
html body.inventory-page .nm31-cabinet-nav a.active .nm31-nav-icon{
  background:#fff!important;
  box-shadow:0 5px 14px rgba(70,59,142,.07)!important;
}

html body.account-page .sidebar-login-other,
html body.inventory-page .nm31-sidebar-logout{
  width:100%!important;
  min-height:44px!important;
  margin:12px 0 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#3f4654!important;
  font-size:10.5px!important;
  font-weight:850!important;
  box-shadow:none!important;
}

html body.account-page .sidebar-login-other:hover,
html body.inventory-page .nm31-sidebar-logout:hover{
  background:#f7f7fa!important;
  border-color:#dcdfe6!important;
}

/* remove shop if an older patch inserted it in cabinet menu */
html body.account-page .account-nav a[href*="shop.html"],
html body.account-page .account-nav-item[href*="shop.html"]{
  display:none!important;
}

/* inventory content beside the exact same sidebar */
html body.inventory-page .inventory-main{
  padding:12px 0 46px!important;
  overflow:visible!important;
}
html body.inventory-page .inventory-main>.container,
html body.inventory-page .inventory-main>.container.nm19-inventory-shell{
  width:min(1260px,calc(100% - 32px))!important;
  display:grid!important;
}
html body.inventory-page .nm19-inventory-content,
html body.inventory-page .nm31-inventory-content{
  min-width:0!important;
  width:100%!important;
  overflow:visible!important;
}
html body.inventory-page .inventory-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
html body.inventory-page .inventory-card{
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html body.inventory-page .inventory-card-image{
  height:152px!important;
  padding:12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#f4f5f8!important;
  overflow:hidden!important;
}
html body.inventory-page .inventory-card-image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  background:transparent!important;
}

/* =========================================================
   SHOP — CATEGORIES, ONE PANE AT A TIME
   ========================================================= */
html body .nm31-shop-tabs-wrap{
  position:sticky!important;
  top:82px!important;
  z-index:35!important;
  padding:9px 0!important;
  background:rgba(245,246,250,.95)!important;
  backdrop-filter:blur(14px)!important;
}

html body .nm31-shop-tabs{
  width:max-content!important;
  max-width:calc(100% - 24px)!important;
  margin:0 auto!important;
  padding:5px!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  overflow-x:auto!important;
  background:#fff!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:15px!important;
  box-shadow:0 9px 24px rgba(29,37,58,.045)!important;
}

html body .nm31-shop-tab{
  flex:0 0 auto!important;
  min-height:40px!important;
  padding:0 14px!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  background:transparent!important;
  color:#697283!important;
  font-size:10px!important;
  font-weight:850!important;
  cursor:pointer!important;
}

html body .nm31-shop-tab:hover{
  background:#f6f5ff!important;
  color:#6556f1!important;
}

html body .nm31-shop-tab.active{
  background:var(--nm31-purple-soft)!important;
  border-color:#e1dcff!important;
  color:#6556f1!important;
}

html body .nm31-shop-stage{
  width:min(1180px,calc(100% - 32px))!important;
  margin:4px auto 58px!important;
}

html body .nm31-shop-pane{
  display:none!important;
}

html body .nm31-shop-pane.active{
  display:block!important;
}

html body .nm31-shop-pane>.store32-section,
html body .nm31-shop-pane>.store-v28-section,
html body .nm31-shop-pane>.nm31-shop-generated-section{
  margin:0!important;
}

html body .nm31-shop-generated-section{
  padding:22px!important;
  background:#fff!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:20px!important;
  box-shadow:none!important;
}

html body .nm31-shop-generated-title{
  margin:0 0 15px!important;
}

html body .nm31-shop-generated-title span{
  display:block!important;
  color:#6c5cf6!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}

html body .nm31-shop-generated-title h2{
  margin:5px 0 0!important;
  color:var(--nm31-text)!important;
  font-size:22px!important;
  letter-spacing:-.03em!important;
}

html body .nm31-shop-generated-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}

html body .nm31-shop-empty{
  min-height:240px!important;
  display:grid!important;
  place-items:center!important;
  padding:30px!important;
  background:#fff!important;
  border:1px solid var(--nm31-line)!important;
  border-radius:20px!important;
  color:#8a92a1!important;
  text-align:center!important;
  font-size:11px!important;
}

/* hide old store scrolling nav after tab system is built */
html body.nm31-shop-ready .store32-nav,
html body.nm31-shop-ready .store-v28-jump{
  display:none!important;
}

/* do not show all store sections in the original long list */
html body.nm31-shop-ready .store32-content>.store32-section,
html body.nm31-shop-ready #store-catalog>.store-v28-grid{
  display:none!important;
}

/* =========================================================
   CONTEST — NO USER HISTORY LIST
   ========================================================= */
html body.contest-page .contest-history,
html body.contest-page #contestHistory,
html body.contest-page #contestRefresh{
  display:none!important;
}

html body.contest-page .contest-content{
  padding-bottom:52px!important;
}

html body.contest-page .contest-steps{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

html body.contest-page .contest-steps article:nth-child(n+4){
  display:none!important;
}

html body.contest-page .contest-layout{
  margin-bottom:0!important;
}

/* responsive */
@media(max-width:1000px){
  html body.account-page .account-shell,
  html body.inventory-page .inventory-main>.container,
  html body.inventory-page .inventory-main>.container.nm19-inventory-shell{
    grid-template-columns:1fr!important;
  }
  html body.account-page .account-sidebar,
  html body.inventory-page .nm31-cabinet-sidebar{
    position:static!important;
    width:100%!important;
    min-width:0!important;
  }
  html body.account-page .account-nav,
  html body.inventory-page .nm31-cabinet-nav{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html body.inventory-page .inventory-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:720px){
  html body.account-page .account-nav,
  html body.inventory-page .nm31-cabinet-nav{
    grid-template-columns:1fr 1fr!important;
  }
  html body.inventory-page .inventory-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html body .nm31-shop-generated-grid{
    grid-template-columns:1fr!important;
  }
}

