body.storage-screen-open {
  overflow: clip;
}

.storage-screen {
  position: fixed;
  inset: 0;
  z-index: 210;
  min-width: 980px;
  min-height: 640px;
  overflow: clip;
  background: #2d2925;
  color: rgba(246, 244, 236, 0.94);
  isolation: isolate;
}

.storage-screen::before,
.storage-screen::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.storage-screen::before {
  inset: -30px;
  z-index: -2;
  background: url("../assets/mirage-background.png") center / cover no-repeat;
  filter: blur(11px) saturate(0.7) brightness(0.75);
  transform: scale(1.06);
}

.storage-screen::after {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(90, 82, 67, 0.18), rgba(19, 20, 19, 0.4) 72%, rgba(12, 13, 12, 0.72)),
    linear-gradient(180deg, rgba(14, 15, 14, 0.2), rgba(16, 17, 16, 0.44));
}

.storage-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  height: 122px;
  padding: 29px clamp(48px, 5.5vw, 106px) 0;
  background: linear-gradient(180deg, rgba(11, 12, 11, 0.64), transparent);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.66);
}

.storage-header-copy {
  display: grid;
  max-width: 720px;
}

.storage-kicker {
  color: rgba(239, 237, 228, 0.48);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.storage-header h1 {
  margin: 1px 0 0;
  font-size: clamp(28px, 2.1vw, 40px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.storage-header p {
  margin: 5px 0 0;
  color: rgba(240, 238, 229, 0.5);
  font-size: 11px;
  letter-spacing: 0.045em;
}

.storage-label-body {
  position: absolute;
  inset: 122px 0 0;
  display: grid;
  grid-template-columns: minmax(480px, 1.15fr) minmax(390px, 0.85fr);
  align-items: center;
  padding: 0 clamp(72px, 9vw, 180px) 64px;
  gap: clamp(34px, 6vw, 110px);
}

.storage-unit-stage {
  position: relative;
  display: grid;
  min-height: 470px;
  place-items: center;
}

.storage-unit-halo {
  position: absolute;
  width: min(48vw, 690px);
  height: min(44vh, 440px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(225, 209, 169, 0.2), transparent 68%);
  filter: blur(8px);
}

.storage-unit-image {
  position: relative;
  z-index: 2;
  width: min(45vw, 660px);
  height: min(49vh, 500px);
  object-fit: contain;
  filter: drop-shadow(0 28px 18px rgba(0, 0, 0, 0.56));
}

.storage-label-panel {
  display: grid;
  width: min(100%, 500px);
  padding: 24px 26px 22px;
  border-left: 3px solid #7ea653;
  background: rgba(24, 26, 24, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.storage-label-panel label {
  color: rgba(244, 242, 233, 0.66);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.storage-label-panel input {
  width: 100%;
  height: 42px;
  margin-top: 8px;
  padding: 4px 11px 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  outline: 0;
  background: rgba(8, 9, 8, 0.46);
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  letter-spacing: 0.03em;
}

.storage-label-panel input:focus {
  border-color: rgba(164, 206, 121, 0.72);
}

.storage-label-panel small {
  margin-top: 6px;
  color: rgba(239, 237, 228, 0.34);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.storage-label-actions,
.storage-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.storage-label-actions {
  margin-top: 22px;
}

.storage-primary-button,
.storage-secondary-button,
.storage-select-all {
  min-width: 160px;
  height: 42px;
  padding: 3px 17px 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.065em;
}

.storage-primary-button {
  background: linear-gradient(180deg, #789b42, #5f8133);
}

.storage-secondary-button,
.storage-select-all {
  min-width: 96px;
  background: rgba(29, 30, 28, 0.88);
  color: rgba(255, 255, 255, 0.68);
}

.storage-primary-button:not(:disabled):hover,
.storage-secondary-button:hover,
.storage-select-all:hover {
  filter: brightness(1.1);
}

.storage-primary-button:disabled {
  cursor: default;
  filter: grayscale(0.8) brightness(0.55);
}

.storage-toolbar {
  position: absolute;
  z-index: 12;
  top: 122px;
  right: 0;
  left: 0;
  display: flex;
  height: 54px;
  align-items: center;
  padding: 0 clamp(48px, 5.5vw, 106px);
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 20, 19, 0.88);
  gap: 20px;
}

.storage-search {
  display: flex;
  width: 320px;
  height: 31px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.16);
}

.storage-search img {
  width: 34px;
  height: 17px;
  padding-inline: 9px;
  opacity: 0.68;
  filter: invert(1);
}

.storage-search input {
  width: calc(100% - 34px);
  height: 100%;
  padding: 3px 8px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  letter-spacing: 0.07em;
}

.storage-selection-count {
  margin-left: auto;
  color: rgba(244, 242, 233, 0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.storage-select-all {
  min-width: 110px;
  height: 31px;
  font-size: 9px;
}

.storage-items-body {
  position: absolute;
  top: 176px;
  right: 0;
  bottom: 86px;
  left: 0;
  overflow-y: auto;
  padding: 26px clamp(48px, 5.5vw, 106px) 38px;
}

.storage-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  align-items: start;
  gap: 25px 18px;
}

.storage-item-card {
  display: block;
  min-width: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  color: inherit;
  text-align: left;
}

.storage-item-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.41 / 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(218, 218, 214, 0.19), transparent 57%),
    linear-gradient(157deg, rgba(88, 87, 84, 0.96), rgba(151, 150, 145, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.18);
}

.storage-item-image {
  position: absolute;
  top: 0;
  left: -7%;
  width: 114%;
  height: 91%;
  object-fit: contain;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.28));
}

.storage-item-rarity {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--storage-item-rarity, #b0c3d9);
}

.storage-item-labels {
  display: grid;
  min-width: 0;
  padding-top: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.storage-item-labels strong,
.storage-item-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-item-labels strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  line-height: 14px;
}

.storage-item-labels span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 13px;
}

.storage-item-card:not(:disabled):hover .storage-item-visual {
  filter: brightness(1.08);
}

.storage-item-card.is-selected .storage-item-visual {
  outline: 2px solid rgba(233, 240, 237, 0.95);
  outline-offset: 1px;
}

.storage-item-card.is-protected {
  cursor: default;
  filter: grayscale(0.55) brightness(0.62);
}

.storage-favorite-star {
  position: absolute;
  z-index: 6;
  top: 7px;
  left: 7px;
  width: 17px;
  height: 17px;
  filter: brightness(0) saturate(100%) invert(83%) sepia(83%) saturate(1041%) hue-rotate(351deg) brightness(101%) contrast(93%) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.74));
}

.storage-selected-check {
  position: absolute;
  z-index: 7;
  top: 6px;
  right: 6px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  background: rgba(103, 145, 59, 0.96);
}

.storage-selected-check img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.storage-empty {
  display: grid;
  min-height: 48vh;
  place-items: center;
  color: rgba(244, 242, 233, 0.42);
  font-size: 11px;
  letter-spacing: 0.11em;
}

.storage-footer {
  position: absolute;
  z-index: 14;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(48px, 5.5vw, 106px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(14, 16, 15, 0.88);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.16);
}

.storage-footer-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.storage-footer-image {
  width: 70px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.44));
}

.storage-footer-identity > div {
  display: grid;
}

.storage-footer-identity strong {
  font-size: 13px;
  line-height: 15px;
}

.storage-footer-identity span {
  color: rgba(244, 242, 233, 0.46);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.storage-image-fallback {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 1366px) {
  .storage-label-body {
    grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
    padding-inline: 64px;
    gap: 32px;
  }

  .storage-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 22px 16px;
  }
}
