.gear.menu-screen {
  position: relative;
  z-index: 1;
  background: transparent;
}
#screen-gear {
  background: #120d18;
  overflow: hidden;
}
.armory-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.gear > .screen-head,
.gear > .armory-nav,
.gear > .gear-body,
.gear > .run-lock-banner {
  position: relative;
  z-index: 1;
}
.gear .screen-title {
  text-shadow: 0 0 22px rgba(255, 150, 70, 0.45);
}

.armory-nav {
  border-bottom-color: rgba(255, 170, 110, 0.18);
}
.armory-nav > .hub-btn {
  position: relative;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(20, 14, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}
.armory-nav > .hub-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 190, 120, 0.4);
}
.armory-nav > .active {
  border-color: #ffb46a;
  background: linear-gradient(180deg, rgba(255, 150, 70, 0.32), rgba(120, 50, 30, 0.5));
  color: #fff1dc;
  box-shadow: 0 0 22px rgba(255, 130, 50, 0.25), inset 0 -2px 0 #ffb46a;
}

.gear .gear-panel,
.gear[data-view="forge"] .gear-forge,
.auto-scrap-panel > * {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.gear .gear-panel,
.gear .gear-slot {
  background: rgba(24, 17, 28, 0.74);
}
.gear[data-view="forge"] .gear-forge {
  background: linear-gradient(160deg, rgba(60, 30, 26, 0.82), rgba(22, 15, 26, 0.86));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 120, 50, 0.08);
}

.gear .gear-bag-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.gear .gear-bag-title {
  color: #ffc98a;
  font-weight: 900;
}
.gear-bag-head .armory-capacity {
  flex: 1;
  min-width: 220px;
  padding: 6px 8px 6px 14px;
  gap: 12px;
  border-radius: 999px;
  border-color: rgba(255, 190, 130, 0.22);
  background: rgba(26, 18, 30, 0.7);
}
.gear-bag-head .armory-capacity > div {
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.gear-bag-head .armory-capacity b {
  font: 800 13px/1 Arial, sans-serif;
  white-space: nowrap;
}
.gear-bag-head .armory-capacity span {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gear-bag-head .armory-capacity .hub-btn {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 10px;
  border-radius: 999px;
}
.armory-head-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.armory-head-tools .hub-btn {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 10.5px;
  letter-spacing: 1px;
  border-radius: 999px;
}
.armory-head-tools .hub-btn[hidden] {
  display: none;
}
.hub-btn.armory-seen {
  border-color: rgba(255, 92, 122, 0.55);
  color: #ffb3c2;
}
.hub-btn.armory-seen:hover {
  background: rgba(255, 92, 122, 0.18);
}
.hub-btn.armory-pick.on {
  border-color: #7ff2c0;
  color: #0c1a14;
  background: #7ff2c0;
}
.gear .gear-filters {
  align-items: center;
}
.gear .gear-filters .armory-weapon-type {
  width: auto;
  min-width: 170px;
  margin-left: auto;
}
.gear .gear-chip.on {
  box-shadow: 0 0 14px rgba(255, 180, 110, 0.25);
}

.gear .gear-bag {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 6px 6px 16px;
}
.gear .gear-tile {
  min-height: 134px;
  padding: 14px 10px 12px;
  border: 1px solid color-mix(in srgb, var(--rar) 40%, transparent);
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rar) 22%, transparent), transparent 62%),
    linear-gradient(160deg, rgba(42, 30, 44, 0.9), rgba(20, 15, 26, 0.92));
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gear .gear-tile:hover {
  transform: translateY(-4px);
  border-color: var(--rar);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 22px color-mix(in srgb, var(--rar) 35%, transparent);
}
.gear .gear-tile .gear-icon {
  transition: transform 0.25s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}
.gear .gear-tile:hover .gear-icon {
  animation: armoryBob 1.2s ease-in-out infinite;
}
@keyframes armoryBob {
  50% {
    transform: translateY(-4px) scale(1.06);
  }
}
.gear .gear-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 48%, transparent 66%);
  transform: translateX(-120%);
}
.gear .gear-tile[style*="--rar"]:hover::after {
  opacity: 1;
  animation: armorySheen 0.9s ease;
}
@keyframes armorySheen {
  to {
    transform: translateX(120%);
  }
}
.gear .gear-new {
  animation: armoryNew 1.6s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 92, 122, 0.7);
}
@keyframes armoryNew {
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(255, 92, 122, 0.95);
  }
}

.gear.is-picking .gear-tile.pickable {
  cursor: copy;
}
.gear.is-picking .gear-tile.pick-blocked {
  opacity: 0.38;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
.gear.is-picking .gear-tile.picked {
  border-color: #7ff2c0;
  box-shadow: 0 0 0 2px #7ff2c0, 0 0 22px rgba(127, 242, 192, 0.35);
  transform: translateY(-2px);
}
.gear-pickmark {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(10, 8, 14, 0.8);
  color: #0c1a14;
  font: 900 13px/1 Arial, sans-serif;
}
.gear-tile.picked .gear-pickmark {
  border-color: #7ff2c0;
  background: #7ff2c0;
  animation: armoryTick 0.25s ease;
}
.gear-tile.pick-blocked .gear-pickmark {
  border: 0;
  background: none;
  font-size: 12px;
}
@keyframes armoryTick {
  from {
    transform: scale(0.4);
  }
}
.armory-selbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(127, 242, 192, 0.45);
  background: linear-gradient(90deg, rgba(20, 60, 46, 0.85), rgba(22, 16, 28, 0.9));
  box-shadow: 0 0 24px rgba(127, 242, 192, 0.12);
  animation: armoryBarIn 0.22s ease;
}
.armory-selbar[hidden] {
  display: none;
}
@keyframes armoryBarIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.armory-selinfo {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.armory-selinfo b {
  color: #7ff2c0;
  font: 900 15px/1 Arial, sans-serif;
}
.armory-selinfo span {
  color: rgba(255, 255, 255, 0.65);
  font: 12px/1.3 Arial, sans-serif;
}
.armory-selbtns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.armory-selbtns .hub-btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 10.5px;
}
.hub-btn.armory-melt-go {
  border: 0;
  background: linear-gradient(180deg, #ff9a5a, #d8401e);
  color: #2a0a04;
  font-weight: 900;
}
.hub-btn.armory-melt-go:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
.armory-melt-sum {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.armory-melt-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rar);
  color: var(--rar);
  font: 800 12px/1 Arial, sans-serif;
}
.armory-melt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}
.armory-melt-cell {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--rar) 55%, transparent);
  background: rgba(20, 15, 26, 0.8);
}
.armory-melt-more {
  align-self: center;
  color: rgba(255, 255, 255, 0.6);
  font: 12px Arial, sans-serif;
}

.gear:not([data-view="codex"]) .gear-codex {
  display: none;
}
.gear[data-view="codex"] .gear-right > :not(.gear-codex):not(.gear-toast) {
  display: none;
}
.gear[data-view="codex"] .gear-right {
  overflow: auto;
  padding-bottom: 24px;
}
.gear-codex {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.cx-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
}
.cx-title {
  flex: 1 1 320px;
}
.cx-title h2 {
  margin: 0 0 6px;
  font: 900 26px Georgia, serif;
  letter-spacing: 3px;
  color: #ffdfad;
  text-shadow: 0 0 20px rgba(255, 150, 70, 0.4);
}
.cx-title p {
  margin: 0;
  color: rgba(255, 236, 220, 0.66);
  font: 13px/1.5 Arial, sans-serif;
}
.cx-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 10, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cx-tab {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font: 900 11px/1 Arial, sans-serif;
  letter-spacing: 1.4px;
  cursor: pointer;
}
.cx-tab.on {
  color: #2a1406;
  background: linear-gradient(180deg, #ffd27a, #ff9a4a);
}
.gear .cx-search {
  flex: 0 1 280px;
  width: auto;
}
.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.cx-grid[data-tab="weapons"] {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.cx-card {
  --sc: #ffb46a;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent);
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--sc) 18%, transparent), transparent 55%),
    rgba(22, 16, 28, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: armoryBarIn 0.35s ease both;
}
.cx-card[hidden] {
  display: none;
}
.cx-card:hover {
  transform: translateY(-3px);
  border-color: var(--sc);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 26px color-mix(in srgb, var(--sc) 25%, transparent);
}
.cx-card.complete::before {
  content: "COMPLETE";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--sc);
  color: #140c08;
  font: 900 9px/1 Arial, sans-serif;
  letter-spacing: 1.2px;
}
.cx-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.cx-emblem {
  flex: none;
}
.cx-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cx-name b {
  color: var(--sc);
  font: 900 19px/1.1 Georgia, serif;
  letter-spacing: 0.5px;
}
.cx-name i {
  color: rgba(255, 236, 220, 0.6);
  font: italic 12.5px/1.35 Georgia, serif;
}
.cx-tag {
  align-self: flex-start;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(127, 224, 176, 0.16);
  color: #9ff0c8;
  font: 900 9px/1 Arial, sans-serif;
  letter-spacing: 1px;
}
.cx-sig {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 11.5px/1.4 Arial, sans-serif;
}
.cx-bonus {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: #f2e6dc;
  font: 12.5px/1.45 Arial, sans-serif;
}
.cx-bonus em {
  flex: none;
  font: 900 9.5px/1 Arial, sans-serif;
  font-style: normal;
  letter-spacing: 1px;
  color: var(--sc);
}
.cx-four {
  border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent);
}
.cx-four b {
  color: var(--sc);
}
.cx-pieces {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.cx-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px 5px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  opacity: 0.42;
  filter: grayscale(0.85);
  transition: opacity 0.2s, filter 0.2s;
}
.cx-piece small {
  color: rgba(255, 255, 255, 0.6);
  font: 700 8.5px/1 Arial, sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cx-piece.own {
  opacity: 1;
  filter: none;
  border-style: solid;
  border-color: color-mix(in srgb, var(--sc) 55%, transparent);
  background: color-mix(in srgb, var(--sc) 10%, transparent);
}
.cx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.cx-have {
  color: rgba(255, 255, 255, 0.55);
  font: 700 11.5px/1.3 Arial, sans-serif;
}
.hub-btn.cx-forge {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 10.5px;
  border-color: color-mix(in srgb, var(--sc) 55%, transparent);
}
.hub-btn.cx-forge:hover {
  background: color-mix(in srgb, var(--sc) 20%, transparent);
}
.cx-weapon {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.cx-weapon-art {
  flex: none;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
}
.cx-wtext {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cx-wtext b {
  color: #ffe6c0;
  font: 900 18px/1.1 Georgia, serif;
}
.cx-trait {
  color: #ffc46a;
  font: 900 10.5px/1 Arial, sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.cx-wtext p {
  margin: 2px 0;
  color: rgba(255, 240, 228, 0.78);
  font: 12.5px/1.45 Arial, sans-serif;
}
.cx-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cx-facts span {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  font: 700 10px/1.2 Arial, sans-serif;
}
.cx-weapon.own {
  border-color: rgba(255, 196, 106, 0.55);
}
.cx-weapon.own .cx-have {
  color: #ffc46a;
}
.cx-note {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font: 12px/1.5 Arial, sans-serif;
}

@media (max-width: 760px) {
  .gear-bag-head .armory-capacity {
    border-radius: 14px;
  }
  .gear .gear-filters .armory-weapon-type {
    width: 100%;
    margin-left: 0;
  }
  .cx-grid,
  .cx-grid[data-tab="weapons"] {
    grid-template-columns: 1fr;
  }
  .gear .cx-search {
    flex: 1 1 100%;
  }
  .cx-pieces {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gear .gear-bag {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .gear .gear-new,
  .gear .gear-tile:hover .gear-icon,
  .gear .gear-tile:hover::after {
    animation: none;
  }
}
.gear .gear-chip {
  min-height: 34px;
  padding: 8px 13px;
}
.armory-tools .gear-select,
.armory-tools .hub-btn,
.gear .gear-filters .armory-weapon-type {
  min-height: 38px;
}
.gear .gear-right {
  gap: 10px;
}
@media (max-width: 760px) {
  .armory-nav > .hub-btn {
    padding: 10px 4px;
    font-size: 11px;
    letter-spacing: 0.4px;
  }
}
