/* Inventory portrait composition. Live tabs, slots, sorting and capacity stay in the original DOM. */
.frame_profile .inventory-back { display: none; }
html.survival-portrait body .game .frame_profile.inventory-popup-open {
  background: linear-gradient(180deg, transparent 0 30px, #14100e 30px, #0b0c0d 85px, #11100e 100%) !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open::before {
  display: block;
  left: 0 !important;
  top: 31px !important;
  width: 100% !important;
  height: 57px !important;
  background: linear-gradient(180deg, #17120f45, #21171352 92%), url('../img/city/survival/black_rain_city_v2.webp') center 38% / cover no-repeat !important;
  border-bottom: 1px solid #ab8151;
  box-shadow: inset 0 -11px 12px #17120dd9;
  z-index: 2201 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup {
  left: 4px !important;
  top: 84px !important;
  width: calc(100% - 8px) !important;
  height: 446px !important;
  transform: none !important;
  overflow: visible !important;
  background: linear-gradient(145deg, #312922, #161616 13%, #1c1a18 82%, #171412) !important;
  border: 2px solid #9b7858 !important;
  border-radius: 7px !important;
  box-shadow: 0 0 0 2px #070707, inset 0 0 0 2px #473c33, inset 0 0 28px #000b, 0 5px 20px #000b !important;
  color: #f3e5c8 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup::before {
  left: 6px !important;
  top: 82px !important;
  width: calc(100% - 12px) !important;
  height: 315px !important;
  border: 1px solid #796f62 !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #14100a18, #0b09092e), url('../img/inventory/survival/warehouse.webp') center 46% / cover no-repeat !important;
  box-shadow: inset 0 0 0 2px #120f0c, inset 0 0 24px #0806046b !important;
  pointer-events: none;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup::after {
  display: none !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .h1 {
  left: 43px !important;
  top: -41px !important;
  width: 124px !important;
  height: 33px !important;
  box-sizing: border-box !important;
  padding-left: 35px !important;
  overflow: visible !important;
  border: 1px solid #b29469 !important;
  border-radius: 3px !important;
  background: linear-gradient(165deg, #3b2b20, #171411) !important;
  box-shadow: 0 2px 6px #000b, inset 0 1px #e9b97b7a !important;
  font: 900 16px/30px var(--br-display) !important;
  color: #f7dfb5 !important;
  text-align: left !important;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000, 0 0 9px #000 !important;
  z-index: 6 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .h1::before {
  content: '';
  left: 3px !important;
  top: 2px !important;
  width: 27px !important;
  height: 26px !important;
  clip-path: none !important;
  border: 1px solid #dcad69 !important;
  border-radius: 5px !important;
  background: linear-gradient(145deg, #433422, #171512) !important;
  box-shadow: 0 0 8px #f6a32d99, inset 0 0 0 2px #27201a !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .h1::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 5px;
  width: 21px;
  height: 21px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23ffe1ad' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='m16 2 13 7v14l-13 7-13-7V9Z M3 9l13 7 13-7 M16 16v14 M9.5 5.5l13 7'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 3px #f4ae4580);
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-close {
  top: 7px !important;
  right: 7px !important;
  width: 33px !important;
  height: 33px !important;
  border: 1px solid #ae9e82 !important;
  border-radius: 4px !important;
  background: #302923 url('../img/ui/survival/kit/button_close.webp') center / 73% no-repeat !important;
  box-shadow: inset 0 1px #e8bf8666, 0 2px 4px #000a !important;
  filter: none !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-back {
  display: block !important;
  position: absolute !important;
  left: 3px !important;
  top: -40px !important;
  z-index: 7 !important;
  box-sizing: border-box !important;
  width: 33px !important;
  height: 33px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent url('../img/ui/survival/kit/button_back.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  cursor: pointer;
  touch-action: manipulation;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-back::after {
  content: none !important;
  position: absolute;
  left: 0;
  top: -5px;
  width: 100%;
  color: #f7e3bd;
  font: 900 31px/31px Arial, sans-serif;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-tabs {
  left: 6px !important;
  top: 44px !important;
  width: calc(100% - 12px) !important;
  height: 33px !important;
  gap: 3px !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-tabs > .inventory-tab {
  height: 33px !important;
  flex: 1 1 0 !important;
  width: auto !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent url('../img/ui/survival/kit/button_secondary.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #e6dccb !important;
  font: 800 12px/31px var(--br-display) !important;
  text-shadow: 0 1px 2px #000 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-tabs > .inventory-tab.active {
  border-color: transparent !important;
  background: transparent url('../img/ui/survival/kit/button_primary.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff2d6 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-tab-icon {
  display: none !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-tab-label {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 31px !important;
  line-height: 31px !important;
  overflow: visible !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-tab-shards .inventory-tab-label {
  width: 100% !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup.inventory-tab-items-active > .inventory-sort {
  top: 7px !important;
  right: 46px !important;
  width: 96px !important;
  height: 33px !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent url('../img/ui/survival/kit/button_secondary.webp') center / 100% 100% no-repeat !important;
  color: #f1d5aa !important;
  font: 800 12px/31px var(--br-display) !important;
  box-shadow: none !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .itemBlock,
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-runes,
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-shards {
  left: 12px !important;
  top: 89px !important;
  width: calc(100% - 24px) !important;
  height: 300px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: 62px !important;
  gap: 5px !important;
  overflow: auto !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .itemBlock > .item3,
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-runes > .inventory-rune-slot,
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-shards > .inventory-shard-slot {
  height: 61px !important;
  border-color: #a18b69 !important;
  background: transparent url('../img/ui/survival/kit/icon_slot.webp') center / 100% 100% no-repeat !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty {
  left: 23px !important;
  right: 23px !important;
  top: 196px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff0d9 !important;
  font: 700 11px/17px Arial, sans-serif !important;
  text-shadow: 0 2px 4px #000, 0 0 8px #000 !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty svg {
  width: 51px !important;
  height: 51px !important;
  margin-bottom: 10px !important;
  stroke: #ffe1ad !important;
  filter: drop-shadow(0 2px 5px #000);
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty strong,
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty small {
  display: block;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty strong {
  font: 900 19px/23px Arial, sans-serif;
  margin-bottom: 3px;
  color: #fff1db;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-survival-empty small {
  font: 500 12px/16px Arial, sans-serif;
  color: #ead9bb;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-footer {
  left: 6px !important;
  bottom: 7px !important;
  width: calc(100% - 12px) !important;
  height: 33px !important;
  border: 1px solid #7d705e !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #3b332a, #1b1b1a) !important;
  box-shadow: inset 0 1px #dfb4775c !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-capacity {
  color: #faebcf !important;
  font: 700 12px/31px Arial, sans-serif !important;
}
html.survival-portrait body .game .frame_profile.inventory-popup-open .inventory-capacity-plus {
  border-color: #bb9a6b !important;
  background: linear-gradient(180deg, #625849, #2c2823) !important;
}
@media (max-width: 355px) {
  html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .h1 { font-size: 16px !important; }
  html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup.inventory-tab-items-active > .inventory-sort { width: 79px !important; font-size: 8px !important; }
  html.survival-portrait body .game .frame_profile.inventory-popup-open > .items.profile-items-popup > .inventory-tabs > .inventory-tab { font-size: 9px !important; }
}
